]> git.sesse.net Git - vlc/blob - configure
* ./configure.in: more modules are plugins.
[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 "`strings conftest.o | grep BIGenDianSyS`"
3158             then
3159               ac_cv_c_bigendian=yes
3160             fi
3161             if test "`strings conftest.o | grep LiTTleEnDian`"
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 x$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 for ac_func in getpwuid_r getpwuid
3919 do
3920 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3921 echo "configure:3922: checking for $ac_func" >&5
3922 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+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 $ac_func(); 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 $ac_func();
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_$ac_func) || defined (__stub___$ac_func)
3942 choke me
3943 #else
3944 $ac_func();
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_$ac_func=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_$ac_func=no"
3957 fi
3958 rm -f conftest*
3959 fi
3960
3961 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3962   echo "$ac_t""yes" 1>&6
3963     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3964   cat >> confdefs.h <<EOF
3965 #define $ac_tr_func 1
3966 EOF
3967  
3968 else
3969   echo "$ac_t""no" 1>&6
3970 fi
3971 done
3972
3973
3974 NEED_GETOPT=0
3975 echo $ac_n "checking for getopt_long""... $ac_c" 1>&6
3976 echo "configure:3977: checking for getopt_long" >&5
3977 if eval "test \"`echo '$''{'ac_cv_func_getopt_long'+set}'`\" = set"; then
3978   echo $ac_n "(cached) $ac_c" 1>&6
3979 else
3980   cat > conftest.$ac_ext <<EOF
3981 #line 3982 "configure"
3982 #include "confdefs.h"
3983 /* System header to define __stub macros and hopefully few prototypes,
3984     which can conflict with char getopt_long(); below.  */
3985 #include <assert.h>
3986 /* Override any gcc2 internal prototype to avoid an error.  */
3987 /* We use char because int might match the return type of a gcc2
3988     builtin and then its argument prototype would still apply.  */
3989 char getopt_long();
3990
3991 int main() {
3992
3993 /* The GNU C library defines this for functions which it implements
3994     to always fail with ENOSYS.  Some functions are actually named
3995     something starting with __ and the normal name is an alias.  */
3996 #if defined (__stub_getopt_long) || defined (__stub___getopt_long)
3997 choke me
3998 #else
3999 getopt_long();
4000 #endif
4001
4002 ; return 0; }
4003 EOF
4004 if { (eval echo configure:4005: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4005   rm -rf conftest*
4006   eval "ac_cv_func_getopt_long=yes"
4007 else
4008   echo "configure: failed program was:" >&5
4009   cat conftest.$ac_ext >&5
4010   rm -rf conftest*
4011   eval "ac_cv_func_getopt_long=no"
4012 fi
4013 rm -f conftest*
4014 fi
4015
4016 if eval "test \"`echo '$ac_cv_func_'getopt_long`\" = yes"; then
4017   echo "$ac_t""yes" 1>&6
4018   cat >> confdefs.h <<\EOF
4019 #define HAVE_GETOPT_LONG 1
4020 EOF
4021
4022 else
4023   echo "$ac_t""no" 1>&6
4024  # FreeBSD has a gnugetopt library for this:
4025   echo $ac_n "checking for getopt_long in -lgnugetopt""... $ac_c" 1>&6
4026 echo "configure:4027: checking for getopt_long in -lgnugetopt" >&5
4027 ac_lib_var=`echo gnugetopt'_'getopt_long | sed 'y%./+-%__p_%'`
4028 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4029   echo $ac_n "(cached) $ac_c" 1>&6
4030 else
4031   ac_save_LIBS="$LIBS"
4032 LIBS="-lgnugetopt  $LIBS"
4033 cat > conftest.$ac_ext <<EOF
4034 #line 4035 "configure"
4035 #include "confdefs.h"
4036 /* Override any gcc2 internal prototype to avoid an error.  */
4037 /* We use char because int might match the return type of a gcc2
4038     builtin and then its argument prototype would still apply.  */
4039 char getopt_long();
4040
4041 int main() {
4042 getopt_long()
4043 ; return 0; }
4044 EOF
4045 if { (eval echo configure:4046: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4046   rm -rf conftest*
4047   eval "ac_cv_lib_$ac_lib_var=yes"
4048 else
4049   echo "configure: failed program was:" >&5
4050   cat conftest.$ac_ext >&5
4051   rm -rf conftest*
4052   eval "ac_cv_lib_$ac_lib_var=no"
4053 fi
4054 rm -f conftest*
4055 LIBS="$ac_save_LIBS"
4056
4057 fi
4058 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4059   echo "$ac_t""yes" 1>&6
4060   cat >> confdefs.h <<\EOF
4061 #define HAVE_GETOPT_LONG 1
4062 EOF
4063  LIB="${LIB} -lgnugetopt"
4064 else
4065   echo "$ac_t""no" 1>&6
4066 NEED_GETOPT=1
4067 fi
4068
4069 fi
4070
4071
4072 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
4073 echo "configure:4074: checking return type of signal handlers" >&5
4074 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
4075   echo $ac_n "(cached) $ac_c" 1>&6
4076 else
4077   cat > conftest.$ac_ext <<EOF
4078 #line 4079 "configure"
4079 #include "confdefs.h"
4080 #include <sys/types.h>
4081 #include <signal.h>
4082 #ifdef signal
4083 #undef signal
4084 #endif
4085 #ifdef __cplusplus
4086 extern "C" void (*signal (int, void (*)(int)))(int);
4087 #else
4088 void (*signal ()) ();
4089 #endif
4090
4091 int main() {
4092 int i;
4093 ; return 0; }
4094 EOF
4095 if { (eval echo configure:4096: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4096   rm -rf conftest*
4097   ac_cv_type_signal=void
4098 else
4099   echo "configure: failed program was:" >&5
4100   cat conftest.$ac_ext >&5
4101   rm -rf conftest*
4102   ac_cv_type_signal=int
4103 fi
4104 rm -f conftest*
4105 fi
4106
4107 echo "$ac_t""$ac_cv_type_signal" 1>&6
4108 cat >> confdefs.h <<EOF
4109 #define RETSIGTYPE $ac_cv_type_signal
4110 EOF
4111
4112
4113 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
4114 echo "configure:4115: checking for dlopen in -ldl" >&5
4115 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
4116 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4117   echo $ac_n "(cached) $ac_c" 1>&6
4118 else
4119   ac_save_LIBS="$LIBS"
4120 LIBS="-ldl  $LIBS"
4121 cat > conftest.$ac_ext <<EOF
4122 #line 4123 "configure"
4123 #include "confdefs.h"
4124 /* Override any gcc2 internal prototype to avoid an error.  */
4125 /* We use char because int might match the return type of a gcc2
4126     builtin and then its argument prototype would still apply.  */
4127 char dlopen();
4128
4129 int main() {
4130 dlopen()
4131 ; return 0; }
4132 EOF
4133 if { (eval echo configure:4134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4134   rm -rf conftest*
4135   eval "ac_cv_lib_$ac_lib_var=yes"
4136 else
4137   echo "configure: failed program was:" >&5
4138   cat conftest.$ac_ext >&5
4139   rm -rf conftest*
4140   eval "ac_cv_lib_$ac_lib_var=no"
4141 fi
4142 rm -f conftest*
4143 LIBS="$ac_save_LIBS"
4144
4145 fi
4146 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4147   echo "$ac_t""yes" 1>&6
4148   LIB="${LIB} -ldl"
4149 else
4150   echo "$ac_t""no" 1>&6
4151 fi
4152
4153 echo $ac_n "checking for cos in -lm""... $ac_c" 1>&6
4154 echo "configure:4155: checking for cos in -lm" >&5
4155 ac_lib_var=`echo m'_'cos | sed 'y%./+-%__p_%'`
4156 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4157   echo $ac_n "(cached) $ac_c" 1>&6
4158 else
4159   ac_save_LIBS="$LIBS"
4160 LIBS="-lm  $LIBS"
4161 cat > conftest.$ac_ext <<EOF
4162 #line 4163 "configure"
4163 #include "confdefs.h"
4164 /* Override any gcc2 internal prototype to avoid an error.  */
4165 /* We use char because int might match the return type of a gcc2
4166     builtin and then its argument prototype would still apply.  */
4167 char cos();
4168
4169 int main() {
4170 cos()
4171 ; return 0; }
4172 EOF
4173 if { (eval echo configure:4174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4174   rm -rf conftest*
4175   eval "ac_cv_lib_$ac_lib_var=yes"
4176 else
4177   echo "configure: failed program was:" >&5
4178   cat conftest.$ac_ext >&5
4179   rm -rf conftest*
4180   eval "ac_cv_lib_$ac_lib_var=no"
4181 fi
4182 rm -f conftest*
4183 LIBS="$ac_save_LIBS"
4184
4185 fi
4186 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4187   echo "$ac_t""yes" 1>&6
4188   LIB_IMDCT="${LIB_IMDCT} -lm"
4189   LIB_FILTER_DISTORT="${LIB_FILTER_DISTORT} -lm"
4190 else
4191   echo "$ac_t""no" 1>&6
4192 fi
4193
4194 echo $ac_n "checking for pow in -lm""... $ac_c" 1>&6
4195 echo "configure:4196: checking for pow in -lm" >&5
4196 ac_lib_var=`echo m'_'pow | sed 'y%./+-%__p_%'`
4197 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4198   echo $ac_n "(cached) $ac_c" 1>&6
4199 else
4200   ac_save_LIBS="$LIBS"
4201 LIBS="-lm  $LIBS"
4202 cat > conftest.$ac_ext <<EOF
4203 #line 4204 "configure"
4204 #include "confdefs.h"
4205 /* Override any gcc2 internal prototype to avoid an error.  */
4206 /* We use char because int might match the return type of a gcc2
4207     builtin and then its argument prototype would still apply.  */
4208 char pow();
4209
4210 int main() {
4211 pow()
4212 ; return 0; }
4213 EOF
4214 if { (eval echo configure:4215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4215   rm -rf conftest*
4216   eval "ac_cv_lib_$ac_lib_var=yes"
4217 else
4218   echo "configure: failed program was:" >&5
4219   cat conftest.$ac_ext >&5
4220   rm -rf conftest*
4221   eval "ac_cv_lib_$ac_lib_var=no"
4222 fi
4223 rm -f conftest*
4224 LIBS="$ac_save_LIBS"
4225
4226 fi
4227 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4228   echo "$ac_t""yes" 1>&6
4229   LIB_IMDCT="${LIB_IMDCT} -lm"
4230   LIB_IMDCT3DN="${LIB_IMDCT3DN} -lm"
4231   LIB_IMDCTSSE="${LIB_IMDCTSSE} -lm"
4232
4233 else
4234   echo "$ac_t""no" 1>&6
4235 fi
4236
4237
4238 THREAD_LIB=error
4239 if test "x${THREAD_LIB}" = xerror; then
4240   echo $ac_n "checking for pthread_attr_init in -lpthread""... $ac_c" 1>&6
4241 echo "configure:4242: checking for pthread_attr_init in -lpthread" >&5
4242 ac_lib_var=`echo pthread'_'pthread_attr_init | sed 'y%./+-%__p_%'`
4243 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4244   echo $ac_n "(cached) $ac_c" 1>&6
4245 else
4246   ac_save_LIBS="$LIBS"
4247 LIBS="-lpthread  $LIBS"
4248 cat > conftest.$ac_ext <<EOF
4249 #line 4250 "configure"
4250 #include "confdefs.h"
4251 /* Override any gcc2 internal prototype to avoid an error.  */
4252 /* We use char because int might match the return type of a gcc2
4253     builtin and then its argument prototype would still apply.  */
4254 char pthread_attr_init();
4255
4256 int main() {
4257 pthread_attr_init()
4258 ; return 0; }
4259 EOF
4260 if { (eval echo configure:4261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4261   rm -rf conftest*
4262   eval "ac_cv_lib_$ac_lib_var=yes"
4263 else
4264   echo "configure: failed program was:" >&5
4265   cat conftest.$ac_ext >&5
4266   rm -rf conftest*
4267   eval "ac_cv_lib_$ac_lib_var=no"
4268 fi
4269 rm -f conftest*
4270 LIBS="$ac_save_LIBS"
4271
4272 fi
4273 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4274   echo "$ac_t""yes" 1>&6
4275   THREAD_LIB="-lpthread"
4276 else
4277   echo "$ac_t""no" 1>&6
4278 fi
4279
4280 fi
4281 if test "x${THREAD_LIB}" = xerror; then
4282   echo $ac_n "checking for pthread_attr_init in -lpthreads""... $ac_c" 1>&6
4283 echo "configure:4284: checking for pthread_attr_init in -lpthreads" >&5
4284 ac_lib_var=`echo pthreads'_'pthread_attr_init | sed 'y%./+-%__p_%'`
4285 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4286   echo $ac_n "(cached) $ac_c" 1>&6
4287 else
4288   ac_save_LIBS="$LIBS"
4289 LIBS="-lpthreads  $LIBS"
4290 cat > conftest.$ac_ext <<EOF
4291 #line 4292 "configure"
4292 #include "confdefs.h"
4293 /* Override any gcc2 internal prototype to avoid an error.  */
4294 /* We use char because int might match the return type of a gcc2
4295     builtin and then its argument prototype would still apply.  */
4296 char pthread_attr_init();
4297
4298 int main() {
4299 pthread_attr_init()
4300 ; return 0; }
4301 EOF
4302 if { (eval echo configure:4303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4303   rm -rf conftest*
4304   eval "ac_cv_lib_$ac_lib_var=yes"
4305 else
4306   echo "configure: failed program was:" >&5
4307   cat conftest.$ac_ext >&5
4308   rm -rf conftest*
4309   eval "ac_cv_lib_$ac_lib_var=no"
4310 fi
4311 rm -f conftest*
4312 LIBS="$ac_save_LIBS"
4313
4314 fi
4315 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4316   echo "$ac_t""yes" 1>&6
4317   THREAD_LIB="-lpthreads"
4318 else
4319   echo "$ac_t""no" 1>&6
4320 fi
4321
4322 fi
4323 if test "x${THREAD_LIB}" = xerror; then
4324   echo $ac_n "checking for pthread_attr_init in -lc_r""... $ac_c" 1>&6
4325 echo "configure:4326: checking for pthread_attr_init in -lc_r" >&5
4326 ac_lib_var=`echo c_r'_'pthread_attr_init | sed 'y%./+-%__p_%'`
4327 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4328   echo $ac_n "(cached) $ac_c" 1>&6
4329 else
4330   ac_save_LIBS="$LIBS"
4331 LIBS="-lc_r  $LIBS"
4332 cat > conftest.$ac_ext <<EOF
4333 #line 4334 "configure"
4334 #include "confdefs.h"
4335 /* Override any gcc2 internal prototype to avoid an error.  */
4336 /* We use char because int might match the return type of a gcc2
4337     builtin and then its argument prototype would still apply.  */
4338 char pthread_attr_init();
4339
4340 int main() {
4341 pthread_attr_init()
4342 ; return 0; }
4343 EOF
4344 if { (eval echo configure:4345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4345   rm -rf conftest*
4346   eval "ac_cv_lib_$ac_lib_var=yes"
4347 else
4348   echo "configure: failed program was:" >&5
4349   cat conftest.$ac_ext >&5
4350   rm -rf conftest*
4351   eval "ac_cv_lib_$ac_lib_var=no"
4352 fi
4353 rm -f conftest*
4354 LIBS="$ac_save_LIBS"
4355
4356 fi
4357 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4358   echo "$ac_t""yes" 1>&6
4359   THREAD_LIB="-lc_r"
4360 else
4361   echo "$ac_t""no" 1>&6
4362 fi
4363
4364 fi
4365 if test "x${THREAD_LIB}" = xerror; then
4366   echo $ac_n "checking for pthread_attr_init""... $ac_c" 1>&6
4367 echo "configure:4368: checking for pthread_attr_init" >&5
4368 if eval "test \"`echo '$''{'ac_cv_func_pthread_attr_init'+set}'`\" = set"; then
4369   echo $ac_n "(cached) $ac_c" 1>&6
4370 else
4371   cat > conftest.$ac_ext <<EOF
4372 #line 4373 "configure"
4373 #include "confdefs.h"
4374 /* System header to define __stub macros and hopefully few prototypes,
4375     which can conflict with char pthread_attr_init(); below.  */
4376 #include <assert.h>
4377 /* Override any gcc2 internal prototype to avoid an error.  */
4378 /* We use char because int might match the return type of a gcc2
4379     builtin and then its argument prototype would still apply.  */
4380 char pthread_attr_init();
4381
4382 int main() {
4383
4384 /* The GNU C library defines this for functions which it implements
4385     to always fail with ENOSYS.  Some functions are actually named
4386     something starting with __ and the normal name is an alias.  */
4387 #if defined (__stub_pthread_attr_init) || defined (__stub___pthread_attr_init)
4388 choke me
4389 #else
4390 pthread_attr_init();
4391 #endif
4392
4393 ; return 0; }
4394 EOF
4395 if { (eval echo configure:4396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4396   rm -rf conftest*
4397   eval "ac_cv_func_pthread_attr_init=yes"
4398 else
4399   echo "configure: failed program was:" >&5
4400   cat conftest.$ac_ext >&5
4401   rm -rf conftest*
4402   eval "ac_cv_func_pthread_attr_init=no"
4403 fi
4404 rm -f conftest*
4405 fi
4406
4407 if eval "test \"`echo '$ac_cv_func_'pthread_attr_init`\" = yes"; then
4408   echo "$ac_t""yes" 1>&6
4409   :
4410 else
4411   echo "$ac_t""no" 1>&6
4412 fi
4413
4414   THREAD_LIB=""
4415 fi
4416
4417 echo $ac_n "checking for cthread_fork in -lthreads""... $ac_c" 1>&6
4418 echo "configure:4419: checking for cthread_fork in -lthreads" >&5
4419 ac_lib_var=`echo threads'_'cthread_fork | sed 'y%./+-%__p_%'`
4420 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4421   echo $ac_n "(cached) $ac_c" 1>&6
4422 else
4423   ac_save_LIBS="$LIBS"
4424 LIBS="-lthreads  $LIBS"
4425 cat > conftest.$ac_ext <<EOF
4426 #line 4427 "configure"
4427 #include "confdefs.h"
4428 /* Override any gcc2 internal prototype to avoid an error.  */
4429 /* We use char because int might match the return type of a gcc2
4430     builtin and then its argument prototype would still apply.  */
4431 char cthread_fork();
4432
4433 int main() {
4434 cthread_fork()
4435 ; return 0; }
4436 EOF
4437 if { (eval echo configure:4438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4438   rm -rf conftest*
4439   eval "ac_cv_lib_$ac_lib_var=yes"
4440 else
4441   echo "configure: failed program was:" >&5
4442   cat conftest.$ac_ext >&5
4443   rm -rf conftest*
4444   eval "ac_cv_lib_$ac_lib_var=no"
4445 fi
4446 rm -f conftest*
4447 LIBS="$ac_save_LIBS"
4448
4449 fi
4450 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4451   echo "$ac_t""yes" 1>&6
4452   THREAD_LIB="-lthreads"
4453 else
4454   echo "$ac_t""no" 1>&6
4455 fi
4456
4457
4458 cat > conftest.$ac_ext <<EOF
4459 #line 4460 "configure"
4460 #include "confdefs.h"
4461 #include <pthread.h>
4462 EOF
4463 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4464   egrep "pthread_cond_t" >/dev/null 2>&1; then
4465   rm -rf conftest*
4466   
4467   cat >> confdefs.h <<\EOF
4468 #define PTHREAD_COND_T_IN_PTHREAD_H 1
4469 EOF
4470
4471 fi
4472 rm -f conftest*
4473
4474 cat > conftest.$ac_ext <<EOF
4475 #line 4476 "configure"
4476 #include "confdefs.h"
4477 #include <strings.h>
4478 EOF
4479 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4480   egrep "strncasecmp" >/dev/null 2>&1; then
4481   rm -rf conftest*
4482   
4483   cat >> confdefs.h <<\EOF
4484 #define STRNCASECMP_IN_STRINGS_H 1
4485 EOF
4486
4487 fi
4488 rm -f conftest*
4489
4490
4491 for ac_hdr in getopt.h strings.h
4492 do
4493 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4494 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4495 echo "configure:4496: checking for $ac_hdr" >&5
4496 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4497   echo $ac_n "(cached) $ac_c" 1>&6
4498 else
4499   cat > conftest.$ac_ext <<EOF
4500 #line 4501 "configure"
4501 #include "confdefs.h"
4502 #include <$ac_hdr>
4503 EOF
4504 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4505 { (eval echo configure:4506: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4506 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4507 if test -z "$ac_err"; then
4508   rm -rf conftest*
4509   eval "ac_cv_header_$ac_safe=yes"
4510 else
4511   echo "$ac_err" >&5
4512   echo "configure: failed program was:" >&5
4513   cat conftest.$ac_ext >&5
4514   rm -rf conftest*
4515   eval "ac_cv_header_$ac_safe=no"
4516 fi
4517 rm -f conftest*
4518 fi
4519 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4520   echo "$ac_t""yes" 1>&6
4521     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4522   cat >> confdefs.h <<EOF
4523 #define $ac_tr_hdr 1
4524 EOF
4525  
4526 else
4527   echo "$ac_t""no" 1>&6
4528 fi
4529 done
4530
4531 for ac_hdr in sys/sockio.h fcntl.h sys/time.h sys/times.h
4532 do
4533 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4534 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4535 echo "configure:4536: checking for $ac_hdr" >&5
4536 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4537   echo $ac_n "(cached) $ac_c" 1>&6
4538 else
4539   cat > conftest.$ac_ext <<EOF
4540 #line 4541 "configure"
4541 #include "confdefs.h"
4542 #include <$ac_hdr>
4543 EOF
4544 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4545 { (eval echo configure:4546: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4546 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4547 if test -z "$ac_err"; then
4548   rm -rf conftest*
4549   eval "ac_cv_header_$ac_safe=yes"
4550 else
4551   echo "$ac_err" >&5
4552   echo "configure: failed program was:" >&5
4553   cat conftest.$ac_ext >&5
4554   rm -rf conftest*
4555   eval "ac_cv_header_$ac_safe=no"
4556 fi
4557 rm -f conftest*
4558 fi
4559 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4560   echo "$ac_t""yes" 1>&6
4561     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4562   cat >> confdefs.h <<EOF
4563 #define $ac_tr_hdr 1
4564 EOF
4565  
4566 else
4567   echo "$ac_t""no" 1>&6
4568 fi
4569 done
4570
4571 for ac_hdr in dlfcn.h image.h
4572 do
4573 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4574 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4575 echo "configure:4576: checking for $ac_hdr" >&5
4576 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4577   echo $ac_n "(cached) $ac_c" 1>&6
4578 else
4579   cat > conftest.$ac_ext <<EOF
4580 #line 4581 "configure"
4581 #include "confdefs.h"
4582 #include <$ac_hdr>
4583 EOF
4584 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4585 { (eval echo configure:4586: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4586 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4587 if test -z "$ac_err"; then
4588   rm -rf conftest*
4589   eval "ac_cv_header_$ac_safe=yes"
4590 else
4591   echo "$ac_err" >&5
4592   echo "configure: failed program was:" >&5
4593   cat conftest.$ac_ext >&5
4594   rm -rf conftest*
4595   eval "ac_cv_header_$ac_safe=no"
4596 fi
4597 rm -f conftest*
4598 fi
4599 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4600   echo "$ac_t""yes" 1>&6
4601     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4602   cat >> confdefs.h <<EOF
4603 #define $ac_tr_hdr 1
4604 EOF
4605  
4606 else
4607   echo "$ac_t""no" 1>&6
4608 fi
4609 done
4610
4611 for ac_hdr in arpa/inet.h net/if.h netinet/in.h sys/socket.h
4612 do
4613 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4614 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4615 echo "configure:4616: checking for $ac_hdr" >&5
4616 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4617   echo $ac_n "(cached) $ac_c" 1>&6
4618 else
4619   cat > conftest.$ac_ext <<EOF
4620 #line 4621 "configure"
4621 #include "confdefs.h"
4622 #include <$ac_hdr>
4623 EOF
4624 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4625 { (eval echo configure:4626: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4626 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4627 if test -z "$ac_err"; then
4628   rm -rf conftest*
4629   eval "ac_cv_header_$ac_safe=yes"
4630 else
4631   echo "$ac_err" >&5
4632   echo "configure: failed program was:" >&5
4633   cat conftest.$ac_ext >&5
4634   rm -rf conftest*
4635   eval "ac_cv_header_$ac_safe=no"
4636 fi
4637 rm -f conftest*
4638 fi
4639 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4640   echo "$ac_t""yes" 1>&6
4641     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4642   cat >> confdefs.h <<EOF
4643 #define $ac_tr_hdr 1
4644 EOF
4645  
4646 else
4647   echo "$ac_t""no" 1>&6
4648 fi
4649 done
4650
4651 for ac_hdr in machine/param.h sys/shm.h
4652 do
4653 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4654 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4655 echo "configure:4656: checking for $ac_hdr" >&5
4656 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4657   echo $ac_n "(cached) $ac_c" 1>&6
4658 else
4659   cat > conftest.$ac_ext <<EOF
4660 #line 4661 "configure"
4661 #include "confdefs.h"
4662 #include <$ac_hdr>
4663 EOF
4664 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4665 { (eval echo configure:4666: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4666 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4667 if test -z "$ac_err"; then
4668   rm -rf conftest*
4669   eval "ac_cv_header_$ac_safe=yes"
4670 else
4671   echo "$ac_err" >&5
4672   echo "configure: failed program was:" >&5
4673   cat conftest.$ac_ext >&5
4674   rm -rf conftest*
4675   eval "ac_cv_header_$ac_safe=no"
4676 fi
4677 rm -f conftest*
4678 fi
4679 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4680   echo "$ac_t""yes" 1>&6
4681     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4682   cat >> confdefs.h <<EOF
4683 #define $ac_tr_hdr 1
4684 EOF
4685  
4686 else
4687   echo "$ac_t""no" 1>&6
4688 fi
4689 done
4690
4691
4692 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
4693 echo "configure:4694: checking whether time.h and sys/time.h may both be included" >&5
4694 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
4695   echo $ac_n "(cached) $ac_c" 1>&6
4696 else
4697   cat > conftest.$ac_ext <<EOF
4698 #line 4699 "configure"
4699 #include "confdefs.h"
4700 #include <sys/types.h>
4701 #include <sys/time.h>
4702 #include <time.h>
4703 int main() {
4704 struct tm *tp;
4705 ; return 0; }
4706 EOF
4707 if { (eval echo configure:4708: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4708   rm -rf conftest*
4709   ac_cv_header_time=yes
4710 else
4711   echo "configure: failed program was:" >&5
4712   cat conftest.$ac_ext >&5
4713   rm -rf conftest*
4714   ac_cv_header_time=no
4715 fi
4716 rm -f conftest*
4717 fi
4718
4719 echo "$ac_t""$ac_cv_header_time" 1>&6
4720 if test $ac_cv_header_time = yes; then
4721   cat >> confdefs.h <<\EOF
4722 #define TIME_WITH_SYS_TIME 1
4723 EOF
4724
4725 fi
4726
4727
4728 for ac_hdr in cthreads.h pthread.h kernel/scheduler.h kernel/OS.h
4729 do
4730 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4731 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4732 echo "configure:4733: checking for $ac_hdr" >&5
4733 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4734   echo $ac_n "(cached) $ac_c" 1>&6
4735 else
4736   cat > conftest.$ac_ext <<EOF
4737 #line 4738 "configure"
4738 #include "confdefs.h"
4739 #include <$ac_hdr>
4740 EOF
4741 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4742 { (eval echo configure:4743: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4743 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4744 if test -z "$ac_err"; then
4745   rm -rf conftest*
4746   eval "ac_cv_header_$ac_safe=yes"
4747 else
4748   echo "$ac_err" >&5
4749   echo "configure: failed program was:" >&5
4750   cat conftest.$ac_ext >&5
4751   rm -rf conftest*
4752   eval "ac_cv_header_$ac_safe=no"
4753 fi
4754 rm -f conftest*
4755 fi
4756 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4757   echo "$ac_t""yes" 1>&6
4758     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4759   cat >> confdefs.h <<EOF
4760 #define $ac_tr_hdr 1
4761 EOF
4762  
4763 else
4764   echo "$ac_t""no" 1>&6
4765 fi
4766 done
4767
4768
4769 if test x$SYS != xmingw32
4770 then
4771   if test x$x_includes = xNONE; then
4772     x_includes=/usr/X11R6/include
4773   fi
4774   if test x$x_libraries = xNONE; then
4775     x_libraries=/usr/X11R6/lib
4776   fi
4777   saved_CPPFLAGS=$CPPFLAGS
4778   CPPFLAGS="$CPPFLAGS -I$x_includes"
4779   for ac_hdr in X11/extensions/dpms.h
4780 do
4781 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4782 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4783 echo "configure:4784: checking for $ac_hdr" >&5
4784 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4785   echo $ac_n "(cached) $ac_c" 1>&6
4786 else
4787   cat > conftest.$ac_ext <<EOF
4788 #line 4789 "configure"
4789 #include "confdefs.h"
4790 #include <$ac_hdr>
4791 EOF
4792 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4793 { (eval echo configure:4794: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4794 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4795 if test -z "$ac_err"; then
4796   rm -rf conftest*
4797   eval "ac_cv_header_$ac_safe=yes"
4798 else
4799   echo "$ac_err" >&5
4800   echo "configure: failed program was:" >&5
4801   cat conftest.$ac_ext >&5
4802   rm -rf conftest*
4803   eval "ac_cv_header_$ac_safe=no"
4804 fi
4805 rm -f conftest*
4806 fi
4807 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4808   echo "$ac_t""yes" 1>&6
4809     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4810   cat >> confdefs.h <<EOF
4811 #define $ac_tr_hdr 1
4812 EOF
4813  
4814     cat > conftest.$ac_ext <<EOF
4815 #line 4816 "configure"
4816 #include "confdefs.h"
4817 #include <X11/extensions/dpms.h>
4818 EOF
4819 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4820   egrep "DPMSInfo" >/dev/null 2>&1; then
4821   rm -rf conftest*
4822   
4823       cat >> confdefs.h <<\EOF
4824 #define DPMSINFO_IN_DPMS_H 1
4825 EOF
4826
4827     
4828 fi
4829 rm -f conftest*
4830
4831   
4832 else
4833   echo "$ac_t""no" 1>&6
4834 fi
4835 done
4836
4837   CPPFLAGS=$saved_CPPFLAGS
4838 fi
4839
4840 echo $ac_n "checking for ntohl in sys/param.h""... $ac_c" 1>&6
4841 echo "configure:4842: checking for ntohl in sys/param.h" >&5
4842 if eval "test \"`echo '$''{'ac_cv_c_ntohl_sys_param_h'+set}'`\" = set"; then
4843   echo $ac_n "(cached) $ac_c" 1>&6
4844 else
4845   CFLAGS="${save_CFLAGS} -Wall -Werror"
4846      cat > conftest.$ac_ext <<EOF
4847 #line 4848 "configure"
4848 #include "confdefs.h"
4849 #include <sys/param.h>
4850 int main() {
4851 void foo() { int meuh; ntohl(meuh); }
4852 ; return 0; }
4853 EOF
4854 if { (eval echo configure:4855: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4855   rm -rf conftest*
4856   ac_cv_c_ntohl_sys_param_h=yes
4857 else
4858   echo "configure: failed program was:" >&5
4859   cat conftest.$ac_ext >&5
4860   rm -rf conftest*
4861   ac_cv_c_ntohl_sys_param_h=no
4862 fi
4863 rm -f conftest*
4864 fi
4865
4866 echo "$ac_t""$ac_cv_c_ntohl_sys_param_h" 1>&6
4867 if test x"$ac_cv_c_ntohl_sys_param_h" != x"no"; then
4868     cat >> confdefs.h <<\EOF
4869 #define NTOHL_IN_SYS_PARAM_H 1
4870 EOF
4871
4872 fi
4873
4874 echo $ac_n "checking if \$CC accepts -finline-limit""... $ac_c" 1>&6
4875 echo "configure:4876: checking if \$CC accepts -finline-limit" >&5
4876 if eval "test \"`echo '$''{'ac_cv_c_inline_limit'+set}'`\" = set"; then
4877   echo $ac_n "(cached) $ac_c" 1>&6
4878 else
4879   CFLAGS="${save_CFLAGS} -finline-limit-30000"
4880      cat > conftest.$ac_ext <<EOF
4881 #line 4882 "configure"
4882 #include "confdefs.h"
4883
4884 int main() {
4885
4886 ; return 0; }
4887 EOF
4888 if { (eval echo configure:4889: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4889   rm -rf conftest*
4890   ac_cv_c_inline_limit=yes
4891 else
4892   echo "configure: failed program was:" >&5
4893   cat conftest.$ac_ext >&5
4894   rm -rf conftest*
4895   ac_cv_c_inline_limit=no
4896 fi
4897 rm -f conftest*
4898 fi
4899
4900 echo "$ac_t""$ac_cv_c_inline_limit" 1>&6
4901 if test x"$ac_cv_c_inline_limit" != x"no"; then
4902     save_CFLAGS="${save_CFLAGS} -finline-limit-30000"
4903 fi
4904
4905 echo $ac_n "checking if \$CC accepts -Wall -Winline""... $ac_c" 1>&6
4906 echo "configure:4907: checking if \$CC accepts -Wall -Winline" >&5
4907 if eval "test \"`echo '$''{'ac_cv_c_Wall_Winline'+set}'`\" = set"; then
4908   echo $ac_n "(cached) $ac_c" 1>&6
4909 else
4910   CFLAGS="${save_CFLAGS} -Wall -Winline"
4911      cat > conftest.$ac_ext <<EOF
4912 #line 4913 "configure"
4913 #include "confdefs.h"
4914
4915 int main() {
4916
4917 ; return 0; }
4918 EOF
4919 if { (eval echo configure:4920: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4920   rm -rf conftest*
4921   ac_cv_c_Wall_Winline=yes
4922 else
4923   echo "configure: failed program was:" >&5
4924   cat conftest.$ac_ext >&5
4925   rm -rf conftest*
4926   ac_cv_c_Wall_Winline=no
4927 fi
4928 rm -f conftest*
4929 fi
4930
4931 echo "$ac_t""$ac_cv_c_Wall_Winline" 1>&6
4932 if test x"$ac_cv_c_Wall_Winline" != x"no"; then
4933     save_CFLAGS="${save_CFLAGS} -Wall -Winline"
4934 else
4935     echo $ac_n "checking if \$CC accepts -wall -winline""... $ac_c" 1>&6
4936 echo "configure:4937: checking if \$CC accepts -wall -winline" >&5
4937 if eval "test \"`echo '$''{'ac_cv_c_wall_winline'+set}'`\" = set"; then
4938   echo $ac_n "(cached) $ac_c" 1>&6
4939 else
4940   CFLAGS="${save_CFLAGS} -wall -winline"
4941          cat > conftest.$ac_ext <<EOF
4942 #line 4943 "configure"
4943 #include "confdefs.h"
4944
4945 int main() {
4946
4947 ; return 0; }
4948 EOF
4949 if { (eval echo configure:4950: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4950   rm -rf conftest*
4951   ac_cv_c_wall_winline=yes
4952 else
4953   echo "configure: failed program was:" >&5
4954   cat conftest.$ac_ext >&5
4955   rm -rf conftest*
4956   ac_cv_c_wall_winline=no
4957 fi
4958 rm -f conftest*
4959 fi
4960
4961 echo "$ac_t""$ac_cv_c_wall_winline" 1>&6
4962     if test x"$ac_cv_c_wall_winline" != x"no"; then
4963         save_CFLAGS="${save_CFLAGS} -wall -winline"
4964     fi
4965 fi
4966
4967 echo $ac_n "checking if \$CC accepts -pipe""... $ac_c" 1>&6
4968 echo "configure:4969: checking if \$CC accepts -pipe" >&5
4969 if eval "test \"`echo '$''{'ac_cv_c_pipe'+set}'`\" = set"; then
4970   echo $ac_n "(cached) $ac_c" 1>&6
4971 else
4972   CFLAGS="${save_CFLAGS} -pipe"
4973      cat > conftest.$ac_ext <<EOF
4974 #line 4975 "configure"
4975 #include "confdefs.h"
4976
4977 int main() {
4978
4979 ; return 0; }
4980 EOF
4981 if { (eval echo configure:4982: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4982   rm -rf conftest*
4983   ac_cv_c_pipe=yes
4984 else
4985   echo "configure: failed program was:" >&5
4986   cat conftest.$ac_ext >&5
4987   rm -rf conftest*
4988   ac_cv_c_pipe=no
4989 fi
4990 rm -f conftest*
4991 fi
4992
4993 echo "$ac_t""$ac_cv_c_pipe" 1>&6
4994 if test x"$ac_cv_c_pipe" != x"no"; then
4995     save_CFLAGS="${save_CFLAGS} -pipe"
4996 fi
4997
4998 echo $ac_n "checking if \$CC accepts -O3""... $ac_c" 1>&6
4999 echo "configure:5000: checking if \$CC accepts -O3" >&5
5000 if eval "test \"`echo '$''{'ac_cv_c_o3'+set}'`\" = set"; then
5001   echo $ac_n "(cached) $ac_c" 1>&6
5002 else
5003   CFLAGS="${save_CFLAGS} -O3"
5004      cat > conftest.$ac_ext <<EOF
5005 #line 5006 "configure"
5006 #include "confdefs.h"
5007
5008 int main() {
5009
5010 ; return 0; }
5011 EOF
5012 if { (eval echo configure:5013: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5013   rm -rf conftest*
5014   ac_cv_c_o3=yes
5015 else
5016   echo "configure: failed program was:" >&5
5017   cat conftest.$ac_ext >&5
5018   rm -rf conftest*
5019   ac_cv_c_o3=no
5020 fi
5021 rm -f conftest*
5022 fi
5023
5024 echo "$ac_t""$ac_cv_c_o3" 1>&6
5025 if test x"$ac_cv_c_o3" != x"no"; then
5026     CFLAGS_OPTIM="${CFLAGS_OPTIM} -O3"
5027 else
5028     echo $ac_n "checking if \$CC accepts -O2""... $ac_c" 1>&6
5029 echo "configure:5030: checking if \$CC accepts -O2" >&5
5030 if eval "test \"`echo '$''{'ac_cv_c_o2'+set}'`\" = set"; then
5031   echo $ac_n "(cached) $ac_c" 1>&6
5032 else
5033   CFLAGS="${save_CFLAGS} -O2"
5034          cat > conftest.$ac_ext <<EOF
5035 #line 5036 "configure"
5036 #include "confdefs.h"
5037
5038 int main() {
5039
5040 ; return 0; }
5041 EOF
5042 if { (eval echo configure:5043: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5043   rm -rf conftest*
5044   ac_cv_c_o2=yes
5045 else
5046   echo "configure: failed program was:" >&5
5047   cat conftest.$ac_ext >&5
5048   rm -rf conftest*
5049   ac_cv_c_o2=no
5050 fi
5051 rm -f conftest*
5052 fi
5053
5054 echo "$ac_t""$ac_cv_c_o2" 1>&6
5055     if test x"$ac_cv_c_o2" != x"no"; then
5056         CFLAGS_OPTIM="${CFLAGS_OPTIM} -O2"
5057     else
5058         echo $ac_n "checking if \$CC accepts -O""... $ac_c" 1>&6
5059 echo "configure:5060: checking if \$CC accepts -O" >&5
5060 if eval "test \"`echo '$''{'ac_cv_c_o'+set}'`\" = set"; then
5061   echo $ac_n "(cached) $ac_c" 1>&6
5062 else
5063   CFLAGS="${save_CFLAGS} -O"
5064              cat > conftest.$ac_ext <<EOF
5065 #line 5066 "configure"
5066 #include "confdefs.h"
5067
5068 int main() {
5069
5070 ; return 0; }
5071 EOF
5072 if { (eval echo configure:5073: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5073   rm -rf conftest*
5074   ac_cv_c_o=yes
5075 else
5076   echo "configure: failed program was:" >&5
5077   cat conftest.$ac_ext >&5
5078   rm -rf conftest*
5079   ac_cv_c_o=no
5080 fi
5081 rm -f conftest*
5082 fi
5083
5084 echo "$ac_t""$ac_cv_c_o" 1>&6
5085         if test x"$ac_cv_c_o" != x"no"; then
5086             CFLAGS_OPTIM="${CFLAGS_OPTIM} -O"
5087         fi
5088     fi
5089 fi
5090
5091 echo $ac_n "checking if \$CC accepts -ffast-math""... $ac_c" 1>&6
5092 echo "configure:5093: checking if \$CC accepts -ffast-math" >&5
5093 if eval "test \"`echo '$''{'ac_cv_c_fast_math'+set}'`\" = set"; then
5094   echo $ac_n "(cached) $ac_c" 1>&6
5095 else
5096   CFLAGS="${save_CFLAGS} -ffast-math"
5097      cat > conftest.$ac_ext <<EOF
5098 #line 5099 "configure"
5099 #include "confdefs.h"
5100
5101 int main() {
5102
5103 ; return 0; }
5104 EOF
5105 if { (eval echo configure:5106: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5106   rm -rf conftest*
5107   ac_cv_c_fast_math=yes
5108 else
5109   echo "configure: failed program was:" >&5
5110   cat conftest.$ac_ext >&5
5111   rm -rf conftest*
5112   ac_cv_c_fast_math=no
5113 fi
5114 rm -f conftest*
5115 fi
5116
5117 echo "$ac_t""$ac_cv_c_fast_math" 1>&6
5118 if test x"$ac_cv_c_fast_math" != x"no"; then
5119     CFLAGS_OPTIM="${CFLAGS_OPTIM} -ffast-math"
5120 fi
5121
5122 echo $ac_n "checking if \$CC accepts -funroll-loops""... $ac_c" 1>&6
5123 echo "configure:5124: checking if \$CC accepts -funroll-loops" >&5
5124 if eval "test \"`echo '$''{'ac_cv_c_unroll_loops'+set}'`\" = set"; then
5125   echo $ac_n "(cached) $ac_c" 1>&6
5126 else
5127   CFLAGS="${save_CFLAGS} -funroll-loops"
5128      cat > conftest.$ac_ext <<EOF
5129 #line 5130 "configure"
5130 #include "confdefs.h"
5131
5132 int main() {
5133
5134 ; return 0; }
5135 EOF
5136 if { (eval echo configure:5137: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5137   rm -rf conftest*
5138   ac_cv_c_unroll_loops=yes
5139 else
5140   echo "configure: failed program was:" >&5
5141   cat conftest.$ac_ext >&5
5142   rm -rf conftest*
5143   ac_cv_c_unroll_loops=no
5144 fi
5145 rm -f conftest*
5146 fi
5147
5148 echo "$ac_t""$ac_cv_c_unroll_loops" 1>&6
5149 if test x"$ac_cv_c_unroll_loops" != x"no"; then
5150     CFLAGS_OPTIM="${CFLAGS_OPTIM} -funroll-loops"
5151 fi
5152
5153 echo $ac_n "checking if \$CC accepts -fomit-frame-pointer""... $ac_c" 1>&6
5154 echo "configure:5155: checking if \$CC accepts -fomit-frame-pointer" >&5
5155 if eval "test \"`echo '$''{'ac_cv_c_omit_frame_pointer'+set}'`\" = set"; then
5156   echo $ac_n "(cached) $ac_c" 1>&6
5157 else
5158   CFLAGS="${save_CFLAGS} -fomit-frame-pointer"
5159      cat > conftest.$ac_ext <<EOF
5160 #line 5161 "configure"
5161 #include "confdefs.h"
5162
5163 int main() {
5164
5165 ; return 0; }
5166 EOF
5167 if { (eval echo configure:5168: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5168   rm -rf conftest*
5169   ac_cv_c_omit_frame_pointer=yes
5170 else
5171   echo "configure: failed program was:" >&5
5172   cat conftest.$ac_ext >&5
5173   rm -rf conftest*
5174   ac_cv_c_omit_frame_pointer=no
5175 fi
5176 rm -f conftest*
5177 fi
5178
5179 echo "$ac_t""$ac_cv_c_omit_frame_pointer" 1>&6
5180 if test x"$ac_cv_c_omit_frame_pointer" != x"no"; then
5181     CFLAGS_OPTIM_NODEBUG="${CFLAGS_OPTIM_NODEBUG} -fomit-frame-pointer"
5182 fi
5183
5184 echo $ac_n "checking if \$CC accepts -bundle -undefined error""... $ac_c" 1>&6
5185 echo "configure:5186: checking if \$CC accepts -bundle -undefined error" >&5
5186 if eval "test \"`echo '$''{'ac_cv_ld_darwin'+set}'`\" = set"; then
5187   echo $ac_n "(cached) $ac_c" 1>&6
5188 else
5189   CFLAGS="${save_CFLAGS} -bundle -undefined error"
5190      cat > conftest.$ac_ext <<EOF
5191 #line 5192 "configure"
5192 #include "confdefs.h"
5193
5194 int main() {
5195
5196 ; return 0; }
5197 EOF
5198 if { (eval echo configure:5199: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5199   rm -rf conftest*
5200   ac_cv_ld_darwin=yes
5201 else
5202   echo "configure: failed program was:" >&5
5203   cat conftest.$ac_ext >&5
5204   rm -rf conftest*
5205   ac_cv_ld_darwin=no
5206 fi
5207 rm -f conftest*
5208 fi
5209
5210 echo "$ac_t""$ac_cv_ld_darwin" 1>&6
5211 if test x"$ac_cv_ld_darwin" != x"no"; then
5212     PLDFLAGS="${PLDFLAGS} -bundle -undefined error"
5213 fi
5214
5215 echo $ac_n "checking if \$CC accepts -shared""... $ac_c" 1>&6
5216 echo "configure:5217: checking if \$CC accepts -shared" >&5
5217 if eval "test \"`echo '$''{'ac_cv_ld_plugins'+set}'`\" = set"; then
5218   echo $ac_n "(cached) $ac_c" 1>&6
5219 else
5220   CFLAGS="${save_CFLAGS} -shared"
5221      cat > conftest.$ac_ext <<EOF
5222 #line 5223 "configure"
5223 #include "confdefs.h"
5224
5225 int main() {
5226
5227 ; return 0; }
5228 EOF
5229 if { (eval echo configure:5230: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5230   rm -rf conftest*
5231   ac_cv_ld_plugins=yes
5232 else
5233   echo "configure: failed program was:" >&5
5234   cat conftest.$ac_ext >&5
5235   rm -rf conftest*
5236   ac_cv_ld_plugins=no
5237 fi
5238 rm -f conftest*
5239 fi
5240
5241 echo "$ac_t""$ac_cv_ld_plugins" 1>&6
5242 if test x"$ac_cv_ld_plugins" != x"no"; then
5243     PLDFLAGS="${PLDFLAGS} -shared"
5244 fi
5245         
5246 if test x"${SOFLAGS}" = x; then
5247     echo $ac_n "checking for soname setting""... $ac_c" 1>&6
5248 echo "configure:5249: checking for soname setting" >&5
5249 if eval "test \"`echo '$''{'ac_cv_ld_soname'+set}'`\" = set"; then
5250   echo $ac_n "(cached) $ac_c" 1>&6
5251 else
5252   
5253         # Standard
5254         try_SOFLAGS="-Wl,-soname -Wl,"
5255         LDFLAGS="${save_LDFLAGS} ${try_SOFLAGS}foo.so.0"
5256         cat > conftest.$ac_ext <<EOF
5257 #line 5258 "configure"
5258 #include "confdefs.h"
5259
5260 int main() {
5261
5262 ; return 0; }
5263 EOF
5264 if { (eval echo configure:5265: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5265   rm -rf conftest*
5266   ac_cv_ld_soname="${try_SOFLAGS}"
5267 else
5268   echo "configure: failed program was:" >&5
5269   cat conftest.$ac_ext >&5
5270   rm -rf conftest*
5271   
5272             # SunOS
5273             try_SOFLAGS="-Wl,-h -Wl,"
5274             LDFLAGS="${save_LDFLAGS} ${try_SOFLAGS}foo.so.0"
5275             cat > conftest.$ac_ext <<EOF
5276 #line 5277 "configure"
5277 #include "confdefs.h"
5278
5279 int main() {
5280
5281 ; return 0; }
5282 EOF
5283 if { (eval echo configure:5284: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5284   rm -rf conftest*
5285   ac_cv_ld_soname="${try_SOFLAGS}"
5286 else
5287   echo "configure: failed program was:" >&5
5288   cat conftest.$ac_ext >&5
5289   rm -rf conftest*
5290   ac_cv_ld_soname=none
5291 fi
5292 rm -f conftest*
5293         
5294 fi
5295 rm -f conftest*
5296 fi
5297
5298 echo "$ac_t""$ac_cv_ld_soname" 1>&6
5299     if test x"$ac_cv_ld_soname" != x"none"; then
5300         SOFLAGS=$ac_cv_ld_soname
5301     else
5302         echo "
5303 ------------
5304 Your system doesn't seem to have support for dynamic linking. You may
5305 have problems using libdvdcss.
5306 ------------
5307 "
5308     fi
5309 fi
5310
5311 echo $ac_n "checking __attribute__ ((aligned ())) support""... $ac_c" 1>&6
5312 echo "configure:5313: checking __attribute__ ((aligned ())) support" >&5
5313 if eval "test \"`echo '$''{'ac_cv_c_attribute_aligned'+set}'`\" = set"; then
5314   echo $ac_n "(cached) $ac_c" 1>&6
5315 else
5316   ac_cv_c_attribute_aligned=0
5317         CFLAGS="${save_CFLAGS} -Werror"
5318     for ac_cv_c_attr_align_try in 2 4 8 16 32 64; do
5319         cat > conftest.$ac_ext <<EOF
5320 #line 5321 "configure"
5321 #include "confdefs.h"
5322
5323 int main() {
5324 static char c __attribute__ ((aligned($ac_cv_c_attr_align_try))) = 0; return c;
5325 ; return 0; }
5326 EOF
5327 if { (eval echo configure:5328: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5328   rm -rf conftest*
5329   ac_cv_c_attribute_aligned=$ac_cv_c_attr_align_try
5330 else
5331   echo "configure: failed program was:" >&5
5332   cat conftest.$ac_ext >&5
5333 fi
5334 rm -f conftest*
5335     done
5336 fi
5337
5338 echo "$ac_t""$ac_cv_c_attribute_aligned" 1>&6
5339 if test x"$ac_cv_c_attribute_aligned" != x"0"; then
5340     cat >> confdefs.h <<EOF
5341 #define ATTRIBUTE_ALIGNED_MAX $ac_cv_c_attribute_aligned
5342 EOF
5343
5344 fi
5345
5346 CFLAGS="${save_CFLAGS}"
5347 LDFLAGS="${save_LDFLAGS}"
5348
5349 echo $ac_n "checking for boolean_t in sys/types.h""... $ac_c" 1>&6
5350 echo "configure:5351: checking for boolean_t in sys/types.h" >&5
5351 if eval "test \"`echo '$''{'ac_cv_c_boolean_t_sys_types_h'+set}'`\" = set"; then
5352   echo $ac_n "(cached) $ac_c" 1>&6
5353 else
5354   cat > conftest.$ac_ext <<EOF
5355 #line 5356 "configure"
5356 #include "confdefs.h"
5357 #include <sys/types.h>
5358 int main() {
5359 boolean_t foo;
5360 ; return 0; }
5361 EOF
5362 if { (eval echo configure:5363: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5363   rm -rf conftest*
5364   ac_cv_c_boolean_t_sys_types_h=yes
5365 else
5366   echo "configure: failed program was:" >&5
5367   cat conftest.$ac_ext >&5
5368   rm -rf conftest*
5369   ac_cv_c_boolean_t_sys_types_h=no
5370 fi
5371 rm -f conftest*
5372 fi
5373
5374 echo "$ac_t""$ac_cv_c_boolean_t_sys_types_h" 1>&6
5375 if test x"$ac_cv_c_boolean_t_sys_types_h" != x"no"; then
5376     cat >> confdefs.h <<\EOF
5377 #define BOOLEAN_T_IN_SYS_TYPES_H 1
5378 EOF
5379
5380 fi
5381
5382 echo $ac_n "checking for boolean_t in pthread.h""... $ac_c" 1>&6
5383 echo "configure:5384: checking for boolean_t in pthread.h" >&5
5384 if eval "test \"`echo '$''{'ac_cv_c_boolean_t_pthread_h'+set}'`\" = set"; then
5385   echo $ac_n "(cached) $ac_c" 1>&6
5386 else
5387   cat > conftest.$ac_ext <<EOF
5388 #line 5389 "configure"
5389 #include "confdefs.h"
5390 #include <pthread.h>
5391 int main() {
5392 boolean_t foo;
5393 ; return 0; }
5394 EOF
5395 if { (eval echo configure:5396: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5396   rm -rf conftest*
5397   ac_cv_c_boolean_t_pthread_h=yes
5398 else
5399   echo "configure: failed program was:" >&5
5400   cat conftest.$ac_ext >&5
5401   rm -rf conftest*
5402   ac_cv_c_boolean_t_pthread_h=no
5403 fi
5404 rm -f conftest*
5405 fi
5406
5407 echo "$ac_t""$ac_cv_c_boolean_t_pthread_h" 1>&6
5408 if test x"$ac_cv_c_boolean_t_pthread_h" != x"no"; then
5409     cat >> confdefs.h <<\EOF
5410 #define BOOLEAN_T_IN_PTHREAD_H 1
5411 EOF
5412
5413 fi
5414
5415 echo $ac_n "checking for boolean_t in cthreads.h""... $ac_c" 1>&6
5416 echo "configure:5417: checking for boolean_t in cthreads.h" >&5
5417 if eval "test \"`echo '$''{'ac_cv_c_boolean_t_cthreads_h'+set}'`\" = set"; then
5418   echo $ac_n "(cached) $ac_c" 1>&6
5419 else
5420   cat > conftest.$ac_ext <<EOF
5421 #line 5422 "configure"
5422 #include "confdefs.h"
5423 #include <cthreads.h>
5424 int main() {
5425 boolean_t foo;
5426 ; return 0; }
5427 EOF
5428 if { (eval echo configure:5429: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5429   rm -rf conftest*
5430   ac_cv_c_boolean_t_cthreads_h=yes
5431 else
5432   echo "configure: failed program was:" >&5
5433   cat conftest.$ac_ext >&5
5434   rm -rf conftest*
5435   ac_cv_c_boolean_t_cthreads_h=no
5436 fi
5437 rm -f conftest*
5438 fi
5439
5440 echo "$ac_t""$ac_cv_c_boolean_t_cthreads_h" 1>&6
5441 if test x"$ac_cv_c_boolean_t_cthreads_h" != x"no"; then
5442     cat >> confdefs.h <<\EOF
5443 #define BOOLEAN_T_IN_CTHREADS_H 1
5444 EOF
5445
5446 fi
5447
5448 case x"${target_cpu}" in
5449   x)
5450     ARCH=unknown
5451     ;;
5452   *)
5453     ARCH=${target_cpu}
5454     ;;
5455 esac
5456
5457 BUILTINS="${BUILTINS} idct idctclassic motion imdct downmix chroma_i420_rgb chroma_i420_yuy2 chroma_i422_yuy2 chroma_i420_ymga mpeg_adec ac3_adec mpeg_vdec"
5458 PLUGINS="${PLUGINS} mpeg_es mpeg_ps mpeg_ts file udp http ipv4 memcpy lpcm_adec ac3_spdif spudec filter_deinterlace filter_invert filter_wall filter_transform filter_distort fx_scope"
5459
5460 MMX_MODULES="memcpymmx idctmmx motionmmx chroma_i420_rgb_mmx chroma_i420_yuy2_mmx chroma_i422_yuy2_mmx chroma_i420_ymga_mmx"
5461 MMXEXT_MODULES="memcpymmxext idctmmxext motionmmxext"
5462 THREEDNOW_MODULES="memcpy3dn imdct3dn downmix3dn"
5463 SSE_MODULES="imdctsse downmixsse"
5464 ALTIVEC_MODULES="idctaltivec motionaltivec"
5465
5466 echo $ac_n "checking if \$CC groks MMX inline assembly""... $ac_c" 1>&6
5467 echo "configure:5468: checking if \$CC groks MMX inline assembly" >&5
5468 if eval "test \"`echo '$''{'ac_cv_mmx_inline'+set}'`\" = set"; then
5469   echo $ac_n "(cached) $ac_c" 1>&6
5470 else
5471   cat > conftest.$ac_ext <<EOF
5472 #line 5473 "configure"
5473 #include "confdefs.h"
5474
5475 int main() {
5476 void *p;asm volatile("packuswb %%mm1,%%mm2"::"r"(p));
5477 ; return 0; }
5478 EOF
5479 if { (eval echo configure:5480: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5480   rm -rf conftest*
5481   ac_cv_mmx_inline=yes
5482 else
5483   echo "configure: failed program was:" >&5
5484   cat conftest.$ac_ext >&5
5485   rm -rf conftest*
5486   ac_cv_mmx_inline=no
5487 fi
5488 rm -f conftest*
5489 fi
5490
5491 echo "$ac_t""$ac_cv_mmx_inline" 1>&6
5492 if test x"$ac_cv_mmx_inline" != x"no"; then
5493   ACCEL_MODULES="${ACCEL_MODULES} ${MMX_MODULES}"
5494 fi
5495
5496 echo $ac_n "checking if \$CC groks MMX EXT inline assembly""... $ac_c" 1>&6
5497 echo "configure:5498: checking if \$CC groks MMX EXT inline assembly" >&5
5498 if eval "test \"`echo '$''{'ac_cv_mmxext_inline'+set}'`\" = set"; then
5499   echo $ac_n "(cached) $ac_c" 1>&6
5500 else
5501   cat > conftest.$ac_ext <<EOF
5502 #line 5503 "configure"
5503 #include "confdefs.h"
5504
5505 int main() {
5506 void *p;asm volatile("maskmovq %%mm1,%%mm2"::"r"(p));
5507 ; return 0; }
5508 EOF
5509 if { (eval echo configure:5510: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5510   rm -rf conftest*
5511   ac_cv_mmxext_inline=yes
5512 else
5513   echo "configure: failed program was:" >&5
5514   cat conftest.$ac_ext >&5
5515   rm -rf conftest*
5516   ac_cv_mmxext_inline=no
5517 fi
5518 rm -f conftest*
5519 fi
5520
5521 echo "$ac_t""$ac_cv_mmxext_inline" 1>&6
5522 if test x"$ac_cv_mmxext_inline" != x"no"; then
5523   ACCEL_MODULES="${ACCEL_MODULES} ${MMXEXT_MODULES}"
5524 fi
5525
5526 echo $ac_n "checking if \$CC groks 3D Now! inline assembly""... $ac_c" 1>&6
5527 echo "configure:5528: checking if \$CC groks 3D Now! inline assembly" >&5
5528 if eval "test \"`echo '$''{'ac_cv_3dnow_inline'+set}'`\" = set"; then
5529   echo $ac_n "(cached) $ac_c" 1>&6
5530 else
5531   cat > conftest.$ac_ext <<EOF
5532 #line 5533 "configure"
5533 #include "confdefs.h"
5534
5535 int main() {
5536 void *p;asm volatile("pfadd %%mm1,%%mm2"::"r"(p));
5537 ; return 0; }
5538 EOF
5539 if { (eval echo configure:5540: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5540   rm -rf conftest*
5541   ac_cv_3dnow_inline=yes
5542 else
5543   echo "configure: failed program was:" >&5
5544   cat conftest.$ac_ext >&5
5545   rm -rf conftest*
5546   ac_cv_3dnow_inline=no
5547 fi
5548 rm -f conftest*
5549 fi
5550
5551 echo "$ac_t""$ac_cv_3dnow_inline" 1>&6
5552 if test x"$ac_cv_3dnow_inline" != x"no"; then
5553   cat >> confdefs.h <<\EOF
5554 #define CAN_COMPILE_3DNOW 1
5555 EOF
5556
5557   ACCEL_MODULES="${ACCEL_MODULES} ${THREEDNOW_MODULES}"
5558 fi
5559
5560 echo $ac_n "checking if \$CC groks SSE inline assembly""... $ac_c" 1>&6
5561 echo "configure:5562: checking if \$CC groks SSE inline assembly" >&5
5562 if eval "test \"`echo '$''{'ac_cv_sse_inline'+set}'`\" = set"; then
5563   echo $ac_n "(cached) $ac_c" 1>&6
5564 else
5565   cat > conftest.$ac_ext <<EOF
5566 #line 5567 "configure"
5567 #include "confdefs.h"
5568
5569 int main() {
5570 void *p;asm volatile("xorps %%xmm1,%%xmm2"::"r"(p));
5571 ; return 0; }
5572 EOF
5573 if { (eval echo configure:5574: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5574   rm -rf conftest*
5575   ac_cv_sse_inline=yes
5576 else
5577   echo "configure: failed program was:" >&5
5578   cat conftest.$ac_ext >&5
5579   rm -rf conftest*
5580   ac_cv_sse_inline=no
5581 fi
5582 rm -f conftest*
5583 fi
5584
5585 echo "$ac_t""$ac_cv_sse_inline" 1>&6
5586 if test x"$ac_cv_sse_inline" != x"no"; then
5587   cat >> confdefs.h <<\EOF
5588 #define CAN_COMPILE_SSE 1
5589 EOF
5590
5591   ACCEL_MODULES="${ACCEL_MODULES} ${SSE_MODULES}"
5592 fi
5593
5594 # don't try to grok altivec with native mingw32 it doesn't work right now
5595 # we should be able to remove this test with future versions of mingw32
5596 if test x$SYS != xmingw32; then
5597 echo $ac_n "checking if \$CC groks Altivec inline assembly""... $ac_c" 1>&6
5598 echo "configure:5599: checking if \$CC groks Altivec inline assembly" >&5
5599 if eval "test \"`echo '$''{'ac_cv_altivec_inline'+set}'`\" = set"; then
5600   echo $ac_n "(cached) $ac_c" 1>&6
5601 else
5602   cat > conftest.$ac_ext <<EOF
5603 #line 5604 "configure"
5604 #include "confdefs.h"
5605
5606 int main() {
5607 asm volatile("vperm 0,1,2,3");
5608 ; return 0; }
5609 EOF
5610 if { (eval echo configure:5611: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5611   rm -rf conftest*
5612   ac_cv_altivec_inline=yes
5613 else
5614   echo "configure: failed program was:" >&5
5615   cat conftest.$ac_ext >&5
5616   rm -rf conftest*
5617   save_CFLAGS=$CFLAGS
5618           CFLAGS="$CFLAGS -Wa,-m7400"
5619           cat > conftest.$ac_ext <<EOF
5620 #line 5621 "configure"
5621 #include "confdefs.h"
5622
5623 int main() {
5624 asm volatile("vperm 0,1,2,3");
5625 ; return 0; }
5626 EOF
5627 if { (eval echo configure:5628: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5628   rm -rf conftest*
5629   ac_cv_altivec_inline="-Wa,-m7400"
5630 else
5631   echo "configure: failed program was:" >&5
5632   cat conftest.$ac_ext >&5
5633   rm -rf conftest*
5634   ac_cv_altivec_inline=no
5635 fi
5636 rm -f conftest*
5637           CFLAGS=$save_CFLAGS
5638          
5639 fi
5640 rm -f conftest*
5641 fi
5642
5643 echo "$ac_t""$ac_cv_altivec_inline" 1>&6
5644 if test x"$ac_cv_altivec_inline" != x"no"; then
5645   cat >> confdefs.h <<\EOF
5646 #define CAN_COMPILE_ALTIVEC 1
5647 EOF
5648
5649   if test x"$ac_cv_altivec_inline" != x"yes"; then
5650     CFLAGS_IDCTALTIVEC="$CFLAGS_IDCTALTIVEC $ac_cv_altivec_inline"
5651     CFLAGS_MOTIONALTIVEC="$CFLAGS_MOTIONALTIVEC $ac_cv_altivec_inline"
5652     CFLAGS_VLC="$CFLAGS_VLC $ac_cv_altivec_inline"
5653   fi
5654   ACCEL_MODULES="${ACCEL_MODULES} ${ALTIVEC_MODULES}"
5655 fi
5656
5657 echo $ac_n "checking if \$CC groks Altivec C extensions""... $ac_c" 1>&6
5658 echo "configure:5659: checking if \$CC groks Altivec C extensions" >&5
5659 if eval "test \"`echo '$''{'ac_cv_c_altivec'+set}'`\" = set"; then
5660   echo $ac_n "(cached) $ac_c" 1>&6
5661 else
5662   save_CFLAGS=$CFLAGS
5663      CFLAGS="$CFLAGS -faltivec"
5664      # Darwin test
5665      cat > conftest.$ac_ext <<EOF
5666 #line 5667 "configure"
5667 #include "confdefs.h"
5668
5669 int main() {
5670 vec_mtvscr((vector unsigned int)(0));
5671 ; return 0; }
5672 EOF
5673 if { (eval echo configure:5674: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5674   rm -rf conftest*
5675   ac_cv_c_altivec=-faltivec
5676 else
5677   echo "configure: failed program was:" >&5
5678   cat conftest.$ac_ext >&5
5679   rm -rf conftest*
5680   
5681         # Linux/PPC test
5682         CFLAGS="$save_CFLAGS $CFLAGS_IDCTALTIVEC -fvec"
5683         cat > conftest.$ac_ext <<EOF
5684 #line 5685 "configure"
5685 #include "confdefs.h"
5686
5687 int main() {
5688 vec_mtvscr((vector unsigned int)(0));
5689 ; return 0; }
5690 EOF
5691 if { (eval echo configure:5692: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5692   rm -rf conftest*
5693   ac_cv_c_altivec="-fvec"
5694 else
5695   echo "configure: failed program was:" >&5
5696   cat conftest.$ac_ext >&5
5697   rm -rf conftest*
5698   ac_cv_c_altivec=no
5699 fi
5700 rm -f conftest*
5701         
5702 fi
5703 rm -f conftest*
5704      CFLAGS=$save_CFLAGS
5705     
5706 fi
5707
5708 echo "$ac_t""$ac_cv_c_altivec" 1>&6
5709 if test x"$ac_cv_c_altivec" != x"no"; then
5710   cat >> confdefs.h <<\EOF
5711 #define CAN_COMPILE_C_ALTIVEC 1
5712 EOF
5713
5714   CFLAGS_IDCTALTIVEC="$CFLAGS_IDCTALTIVEC $ac_cv_c_altivec"
5715   CFLAGS_MOTIONALTIVEC="$CFLAGS_MOTIONALTIVEC $ac_cv_c_altivec"
5716   CFLAGS_VLC="$CFLAGS_VLC $ac_cv_c_altivec"
5717   ACCEL_MODULES="${ACCEL_MODULES} ${ALTIVEC_MODULES}"
5718 fi
5719
5720 echo $ac_n "checking if linker needs -framework vecLib""... $ac_c" 1>&6
5721 echo "configure:5722: checking if linker needs -framework vecLib" >&5
5722 if eval "test \"`echo '$''{'ac_cv_ld_altivec'+set}'`\" = set"; then
5723   echo $ac_n "(cached) $ac_c" 1>&6
5724 else
5725   save_LDFLAGS=$LDFLAGS
5726      LDFLAGS="$LDFLAGS -framework vecLib"
5727      cat > conftest.$ac_ext <<EOF
5728 #line 5729 "configure"
5729 #include "confdefs.h"
5730
5731 int main() {
5732
5733 ; return 0; }
5734 EOF
5735 if { (eval echo configure:5736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5736   rm -rf conftest*
5737   ac_cv_ld_altivec=yes
5738 else
5739   echo "configure: failed program was:" >&5
5740   cat conftest.$ac_ext >&5
5741   rm -rf conftest*
5742   ac_cv_ld_altivec=no
5743 fi
5744 rm -f conftest*
5745      LDFLAGS=$save_LDFLAGS
5746     
5747 fi
5748
5749 echo "$ac_t""$ac_cv_ld_altivec" 1>&6
5750 if test x"$ac_cv_ld_altivec" != x"no"; then
5751   LIB_IDCTALTIVEC="${LIB_IDCTALTIVEC} -framework vecLib"
5752   LIB_MOTIONALTIVEC="${LIB_MOTIONALTIVEC} -framework vecLib"
5753   LIB="${LIB} -framework vecLib"
5754 fi
5755 fi # end if mingw32
5756
5757 case x$SYS in
5758   xmingw32)
5759     DVD_DEVICE="E:"
5760     VCD_DEVICE="E:"
5761     ;;
5762   *)
5763     DVD_DEVICE="/dev/dvd"
5764     VCD_DEVICE="/dev/cdrom"
5765     ;;
5766 esac
5767
5768 cat >> confdefs.h <<EOF
5769 #define DVD_DEVICE "$DVD_DEVICE"
5770 EOF
5771
5772 cat >> confdefs.h <<EOF
5773 #define VCD_DEVICE "$VCD_DEVICE"
5774 EOF
5775
5776
5777
5778
5779 CAN_BUILD_LIBDVDCSS=0
5780
5781 for ac_hdr in winioctl.h
5782 do
5783 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5784 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5785 echo "configure:5786: checking for $ac_hdr" >&5
5786 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5787   echo $ac_n "(cached) $ac_c" 1>&6
5788 else
5789   cat > conftest.$ac_ext <<EOF
5790 #line 5791 "configure"
5791 #include "confdefs.h"
5792 #include <$ac_hdr>
5793 EOF
5794 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5795 { (eval echo configure:5796: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5796 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5797 if test -z "$ac_err"; then
5798   rm -rf conftest*
5799   eval "ac_cv_header_$ac_safe=yes"
5800 else
5801   echo "$ac_err" >&5
5802   echo "configure: failed program was:" >&5
5803   cat conftest.$ac_ext >&5
5804   rm -rf conftest*
5805   eval "ac_cv_header_$ac_safe=no"
5806 fi
5807 rm -f conftest*
5808 fi
5809 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5810   echo "$ac_t""yes" 1>&6
5811     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5812   cat >> confdefs.h <<EOF
5813 #define $ac_tr_hdr 1
5814 EOF
5815  
5816   CAN_BUILD_LIBDVDCSS="${HAVE_LIBDVDCSS}"
5817
5818 else
5819   echo "$ac_t""no" 1>&6
5820 fi
5821 done
5822
5823
5824 for ac_hdr in sys/ioctl.h
5825 do
5826 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5827 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5828 echo "configure:5829: checking for $ac_hdr" >&5
5829 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5830   echo $ac_n "(cached) $ac_c" 1>&6
5831 else
5832   cat > conftest.$ac_ext <<EOF
5833 #line 5834 "configure"
5834 #include "confdefs.h"
5835 #include <$ac_hdr>
5836 EOF
5837 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5838 { (eval echo configure:5839: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5839 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5840 if test -z "$ac_err"; then
5841   rm -rf conftest*
5842   eval "ac_cv_header_$ac_safe=yes"
5843 else
5844   echo "$ac_err" >&5
5845   echo "configure: failed program was:" >&5
5846   cat conftest.$ac_ext >&5
5847   rm -rf conftest*
5848   eval "ac_cv_header_$ac_safe=no"
5849 fi
5850 rm -f conftest*
5851 fi
5852 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5853   echo "$ac_t""yes" 1>&6
5854     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5855   cat >> confdefs.h <<EOF
5856 #define $ac_tr_hdr 1
5857 EOF
5858  
5859   CAN_BUILD_LIBDVDCSS="${HAVE_LIBDVDCSS}"
5860   for ac_hdr in sys/cdio.h sys/dvdio.h linux/cdrom.h dvd.h
5861 do
5862 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5863 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5864 echo "configure:5865: checking for $ac_hdr" >&5
5865 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5866   echo $ac_n "(cached) $ac_c" 1>&6
5867 else
5868   cat > conftest.$ac_ext <<EOF
5869 #line 5870 "configure"
5870 #include "confdefs.h"
5871 #include <$ac_hdr>
5872 EOF
5873 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5874 { (eval echo configure:5875: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5875 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5876 if test -z "$ac_err"; then
5877   rm -rf conftest*
5878   eval "ac_cv_header_$ac_safe=yes"
5879 else
5880   echo "$ac_err" >&5
5881   echo "configure: failed program was:" >&5
5882   cat conftest.$ac_ext >&5
5883   rm -rf conftest*
5884   eval "ac_cv_header_$ac_safe=no"
5885 fi
5886 rm -f conftest*
5887 fi
5888 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5889   echo "$ac_t""yes" 1>&6
5890     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5891   cat >> confdefs.h <<EOF
5892 #define $ac_tr_hdr 1
5893 EOF
5894  
5895 else
5896   echo "$ac_t""no" 1>&6
5897 fi
5898 done
5899
5900   BSD_DVD_STRUCT=0
5901   LINUX_DVD_STRUCT=0
5902   OPENBSD_DVD_STRUCT=0
5903         cat > conftest.$ac_ext <<EOF
5904 #line 5905 "configure"
5905 #include "confdefs.h"
5906 #include <sys/cdio.h>
5907 EOF
5908 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5909   egrep "dvd_struct" >/dev/null 2>&1; then
5910   rm -rf conftest*
5911   
5912     cat >> confdefs.h <<\EOF
5913 #define DVD_STRUCT_IN_SYS_CDIO_H 1
5914 EOF
5915
5916     cat > conftest.$ac_ext <<EOF
5917 #line 5918 "configure"
5918 #include "confdefs.h"
5919 #include <sys/cdio.h>
5920 EOF
5921 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5922   egrep "struct dvd_struct" >/dev/null 2>&1; then
5923   rm -rf conftest*
5924   
5925                     BSD_DVD_STRUCT=1
5926 else
5927   rm -rf conftest*
5928   LINUX_DVD_STRUCT=1; OPENBSD_DVD_STRUCT=1
5929 fi
5930 rm -f conftest*
5931
5932   
5933 fi
5934 rm -f conftest*
5935
5936         cat > conftest.$ac_ext <<EOF
5937 #line 5938 "configure"
5938 #include "confdefs.h"
5939 #include <sys/dvdio.h>
5940 EOF
5941 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5942   egrep "dvd_struct" >/dev/null 2>&1; then
5943   rm -rf conftest*
5944   
5945     cat >> confdefs.h <<\EOF
5946 #define DVD_STRUCT_IN_SYS_DVDIO_H 1
5947 EOF
5948
5949     cat > conftest.$ac_ext <<EOF
5950 #line 5951 "configure"
5951 #include "confdefs.h"
5952 #include <sys/dvdio.h>
5953 EOF
5954 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5955   egrep "struct dvd_struct" >/dev/null 2>&1; then
5956   rm -rf conftest*
5957   
5958                     BSD_DVD_STRUCT=1
5959 else
5960   rm -rf conftest*
5961   LINUX_DVD_STRUCT=1
5962 fi
5963 rm -f conftest*
5964
5965   
5966 fi
5967 rm -f conftest*
5968
5969         cat > conftest.$ac_ext <<EOF
5970 #line 5971 "configure"
5971 #include "confdefs.h"
5972 #include <linux/cdrom.h>
5973 EOF
5974 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5975   egrep "dvd_struct" >/dev/null 2>&1; then
5976   rm -rf conftest*
5977   
5978     cat >> confdefs.h <<\EOF
5979 #define DVD_STRUCT_IN_LINUX_CDROM_H 1
5980 EOF
5981
5982     LINUX_DVD_STRUCT=1
5983   
5984 fi
5985 rm -f conftest*
5986
5987         NEED_BSDI_LIBDVD=0
5988   cat > conftest.$ac_ext <<EOF
5989 #line 5990 "configure"
5990 #include "confdefs.h"
5991 #include <dvd.h>
5992 EOF
5993 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5994   egrep "dvd_struct" >/dev/null 2>&1; then
5995   rm -rf conftest*
5996   
5997     cat >> confdefs.h <<\EOF
5998 #define DVD_STRUCT_IN_DVD_H 1
5999 EOF
6000
6001     LIB_LIBDVDCSS="${LIB_LIBDVDCSS} -ldvd"
6002     LINUX_DVD_STRUCT=1
6003   
6004 else
6005   rm -rf conftest*
6006   
6007                 for ac_hdr in /sys/dev/scsi/scsi_ioctl.h
6008 do
6009 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6010 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6011 echo "configure:6012: checking for $ac_hdr" >&5
6012 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6013   echo $ac_n "(cached) $ac_c" 1>&6
6014 else
6015   cat > conftest.$ac_ext <<EOF
6016 #line 6017 "configure"
6017 #include "confdefs.h"
6018 #include <$ac_hdr>
6019 EOF
6020 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6021 { (eval echo configure:6022: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6022 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6023 if test -z "$ac_err"; then
6024   rm -rf conftest*
6025   eval "ac_cv_header_$ac_safe=yes"
6026 else
6027   echo "$ac_err" >&5
6028   echo "configure: failed program was:" >&5
6029   cat conftest.$ac_ext >&5
6030   rm -rf conftest*
6031   eval "ac_cv_header_$ac_safe=no"
6032 fi
6033 rm -f conftest*
6034 fi
6035 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6036   echo "$ac_t""yes" 1>&6
6037     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6038   cat >> confdefs.h <<EOF
6039 #define $ac_tr_hdr 1
6040 EOF
6041  
6042       NEED_BSDI_LIBDVD=1
6043       cat >> confdefs.h <<\EOF
6044 #define DVD_STRUCT_IN_BSDI_DVDIOCTL_DVD_H 1
6045 EOF
6046
6047       SRC_DVDCSS_EXTRA="${SRC_DVDCSS_EXTRA} bsdi_dvdioctl.c"
6048       LINUX_DVD_STRUCT=1
6049     
6050 else
6051   echo "$ac_t""no" 1>&6
6052 fi
6053 done
6054
6055   
6056 fi
6057 rm -f conftest*
6058
6059         ac_safe=`echo "sys/scsi/scsi_types.h" | sed 'y%./+-%__p_%'`
6060 echo $ac_n "checking for sys/scsi/scsi_types.h""... $ac_c" 1>&6
6061 echo "configure:6062: checking for sys/scsi/scsi_types.h" >&5
6062 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6063   echo $ac_n "(cached) $ac_c" 1>&6
6064 else
6065   cat > conftest.$ac_ext <<EOF
6066 #line 6067 "configure"
6067 #include "confdefs.h"
6068 #include <sys/scsi/scsi_types.h>
6069 EOF
6070 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6071 { (eval echo configure:6072: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6072 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6073 if test -z "$ac_err"; then
6074   rm -rf conftest*
6075   eval "ac_cv_header_$ac_safe=yes"
6076 else
6077   echo "$ac_err" >&5
6078   echo "configure: failed program was:" >&5
6079   cat conftest.$ac_ext >&5
6080   rm -rf conftest*
6081   eval "ac_cv_header_$ac_safe=no"
6082 fi
6083 rm -f conftest*
6084 fi
6085 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6086   echo "$ac_t""yes" 1>&6
6087   
6088     ac_safe=`echo "sys/scsi/impl/uscsi.h" | sed 'y%./+-%__p_%'`
6089 echo $ac_n "checking for sys/scsi/impl/uscsi.h""... $ac_c" 1>&6
6090 echo "configure:6091: checking for sys/scsi/impl/uscsi.h" >&5
6091 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6092   echo $ac_n "(cached) $ac_c" 1>&6
6093 else
6094   cat > conftest.$ac_ext <<EOF
6095 #line 6096 "configure"
6096 #include "confdefs.h"
6097 #include <sys/scsi/impl/uscsi.h>
6098 EOF
6099 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6100 { (eval echo configure:6101: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6101 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6102 if test -z "$ac_err"; then
6103   rm -rf conftest*
6104   eval "ac_cv_header_$ac_safe=yes"
6105 else
6106   echo "$ac_err" >&5
6107   echo "configure: failed program was:" >&5
6108   cat conftest.$ac_ext >&5
6109   rm -rf conftest*
6110   eval "ac_cv_header_$ac_safe=no"
6111 fi
6112 rm -f conftest*
6113 fi
6114 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6115   echo "$ac_t""yes" 1>&6
6116   
6117       cat >> confdefs.h <<\EOF
6118 #define SOLARIS_USCSI 1
6119 EOF
6120
6121     
6122 else
6123   echo "$ac_t""no" 1>&6
6124 fi
6125
6126   
6127 else
6128   echo "$ac_t""no" 1>&6
6129 fi
6130
6131         ac_safe=`echo "sys/scsi.h" | sed 'y%./+-%__p_%'`
6132 echo $ac_n "checking for sys/scsi.h""... $ac_c" 1>&6
6133 echo "configure:6134: checking for sys/scsi.h" >&5
6134 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6135   echo $ac_n "(cached) $ac_c" 1>&6
6136 else
6137   cat > conftest.$ac_ext <<EOF
6138 #line 6139 "configure"
6139 #include "confdefs.h"
6140 #include <sys/scsi.h>
6141 EOF
6142 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6143 { (eval echo configure:6144: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6144 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6145 if test -z "$ac_err"; then
6146   rm -rf conftest*
6147   eval "ac_cv_header_$ac_safe=yes"
6148 else
6149   echo "$ac_err" >&5
6150   echo "configure: failed program was:" >&5
6151   cat conftest.$ac_ext >&5
6152   rm -rf conftest*
6153   eval "ac_cv_header_$ac_safe=no"
6154 fi
6155 rm -f conftest*
6156 fi
6157 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6158   echo "$ac_t""yes" 1>&6
6159   
6160     cat > conftest.$ac_ext <<EOF
6161 #line 6162 "configure"
6162 #include "confdefs.h"
6163 #include <sys/scsi.h>
6164 EOF
6165 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6166   egrep "sctl_io" >/dev/null 2>&1; then
6167   rm -rf conftest*
6168   
6169       cat >> confdefs.h <<\EOF
6170 #define HPUX_SCTL_IO 1
6171 EOF
6172
6173     
6174 fi
6175 rm -f conftest*
6176
6177   
6178 else
6179   echo "$ac_t""no" 1>&6
6180 fi
6181
6182         if test x$LINUX_DVD_STRUCT = x1; then
6183     cat >> confdefs.h <<\EOF
6184 #define HAVE_LINUX_DVD_STRUCT 1
6185 EOF
6186
6187     if test x$OPENBSD_DVD_STRUCT = x1; then
6188       cat >> confdefs.h <<\EOF
6189 #define HAVE_OPENBSD_DVD_STRUCT 1
6190 EOF
6191
6192     fi
6193   else
6194     if test x$BSD_DVD_STRUCT = x1; then
6195       cat >> confdefs.h <<\EOF
6196 #define HAVE_BSD_DVD_STRUCT 1
6197 EOF
6198
6199     fi
6200   fi
6201
6202 else
6203   echo "$ac_t""no" 1>&6
6204 fi
6205 done
6206
6207
6208 # Check whether --with-tuning or --without-tuning was given.
6209 if test "${with_tuning+set}" = set; then
6210   withval="$with_tuning"
6211   :
6212 fi
6213
6214 if test "x$withval" != "x"; then
6215     TUNING=$withval
6216 else
6217     if test x${target_cpu} = xi686 -o x${target_cpu} = xi586 -o x${target_cpu} = xi486 -o x${target_cpu} = xi386; then TUNING="pentiumpro"
6218     else
6219         if test x${target_cpu} = xpowerpc; then TUNING="750"; fi
6220     fi
6221 fi
6222
6223 # Check whether --enable-release or --disable-release was given.
6224 if test "${enable_release+set}" = set; then
6225   enableval="$enable_release"
6226    if test x$enableval = xyes; then RELEASE=1; fi 
6227 else
6228    VLC_VERSION="${VLC_VERSION}_`date +%Y-%m-%d`";
6229   LIBDVDCSS_VERSION="${LIBDVDCSS_VERSION}_`date +%Y-%m-%d`"; 
6230 fi
6231
6232
6233 if test x${target_cpu} = xi686 -o x${target_cpu} = xi586 -o x${target_cpu} = xx86 -o x${target_cpu} = xi386
6234 then
6235     ARCH="${ARCH} mmx"
6236     BUILTINS="${BUILTINS} ${ACCEL_MODULES}"
6237 fi
6238
6239 # Check whether --enable-altivec or --disable-altivec was given.
6240 if test "${enable_altivec+set}" = set; then
6241   enableval="$enable_altivec"
6242    if test x$enableval = xyes; then ARCH="${ARCH} altivec";
6243     BUILTINS="${BUILTINS} ${ACCEL_MODULES}"; fi 
6244 else
6245    if test x${target_cpu} = xpowerpc; then ARCH="${ARCH} altivec";
6246     BUILTINS="${BUILTINS} ${ACCEL_MODULES}"; fi 
6247 fi
6248
6249
6250 DEBUG=0
6251 # Check whether --enable-debug or --disable-debug was given.
6252 if test "${enable_debug+set}" = set; then
6253   enableval="$enable_debug"
6254    if test x$enableval = xyes; then DEBUG=1; fi 
6255 fi
6256
6257
6258 GPROF=0
6259 # Check whether --enable-gprof or --disable-gprof was given.
6260 if test "${enable_gprof+set}" = set; then
6261   enableval="$enable_gprof"
6262    if test x$enableval = xyes; then GPROF=1; fi 
6263 fi
6264
6265
6266 CPROF=0
6267 # Check whether --enable-cprof or --disable-cprof was given.
6268 if test "${enable_cprof+set}" = set; then
6269   enableval="$enable_cprof"
6270    if test x$enableval = xyes;
6271   then
6272     LIB="${LIB} -lcprof"
6273     CPROF=1
6274   fi
6275
6276 fi
6277
6278
6279 # Check whether --enable-optimizations or --disable-optimizations was given.
6280 if test "${enable_optimizations+set}" = set; then
6281   enableval="$enable_optimizations"
6282    if test x$enableval = xno; then OPTIMS=0; fi 
6283 else
6284    OPTIMS=1 
6285 fi
6286
6287
6288 # Check whether --enable-pth or --disable-pth was given.
6289 if test "${enable_pth+set}" = set; then
6290   enableval="$enable_pth"
6291    if test x$enableval = xyes; then
6292     echo $ac_n "checking for pth_init in -lpth""... $ac_c" 1>&6
6293 echo "configure:6294: checking for pth_init in -lpth" >&5
6294 ac_lib_var=`echo pth'_'pth_init | sed 'y%./+-%__p_%'`
6295 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6296   echo $ac_n "(cached) $ac_c" 1>&6
6297 else
6298   ac_save_LIBS="$LIBS"
6299 LIBS="-lpth  $LIBS"
6300 cat > conftest.$ac_ext <<EOF
6301 #line 6302 "configure"
6302 #include "confdefs.h"
6303 /* Override any gcc2 internal prototype to avoid an error.  */
6304 /* We use char because int might match the return type of a gcc2
6305     builtin and then its argument prototype would still apply.  */
6306 char pth_init();
6307
6308 int main() {
6309 pth_init()
6310 ; return 0; }
6311 EOF
6312 if { (eval echo configure:6313: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6313   rm -rf conftest*
6314   eval "ac_cv_lib_$ac_lib_var=yes"
6315 else
6316   echo "configure: failed program was:" >&5
6317   cat conftest.$ac_ext >&5
6318   rm -rf conftest*
6319   eval "ac_cv_lib_$ac_lib_var=no"
6320 fi
6321 rm -f conftest*
6322 LIBS="$ac_save_LIBS"
6323
6324 fi
6325 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6326   echo "$ac_t""yes" 1>&6
6327     ac_tr_lib=HAVE_LIB`echo pth | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6328     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6329   cat >> confdefs.h <<EOF
6330 #define $ac_tr_lib 1
6331 EOF
6332
6333   LIBS="-lpth $LIBS"
6334
6335 else
6336   echo "$ac_t""no" 1>&6
6337 fi
6338
6339     cat > conftest.$ac_ext <<EOF
6340 #line 6341 "configure"
6341 #include "confdefs.h"
6342 #include <pth.h>
6343 EOF
6344 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6345   egrep "pth_init" >/dev/null 2>&1; then
6346   rm -rf conftest*
6347   
6348       cat >> confdefs.h <<\EOF
6349 #define PTH_INIT_IN_PTH_H 1
6350 EOF
6351
6352     THREAD_LIB="-lpth"
6353     fi
6354 fi
6355 rm -f conftest*
6356
6357
6358 fi
6359
6360
6361 # Check whether --enable-st or --disable-st was given.
6362 if test "${enable_st+set}" = set; then
6363   enableval="$enable_st"
6364    if test x$enableval = xyes; then
6365     echo $ac_n "checking for st_init in -lst""... $ac_c" 1>&6
6366 echo "configure:6367: checking for st_init in -lst" >&5
6367 ac_lib_var=`echo st'_'st_init | sed 'y%./+-%__p_%'`
6368 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6369   echo $ac_n "(cached) $ac_c" 1>&6
6370 else
6371   ac_save_LIBS="$LIBS"
6372 LIBS="-lst  $LIBS"
6373 cat > conftest.$ac_ext <<EOF
6374 #line 6375 "configure"
6375 #include "confdefs.h"
6376 /* Override any gcc2 internal prototype to avoid an error.  */
6377 /* We use char because int might match the return type of a gcc2
6378     builtin and then its argument prototype would still apply.  */
6379 char st_init();
6380
6381 int main() {
6382 st_init()
6383 ; return 0; }
6384 EOF
6385 if { (eval echo configure:6386: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6386   rm -rf conftest*
6387   eval "ac_cv_lib_$ac_lib_var=yes"
6388 else
6389   echo "configure: failed program was:" >&5
6390   cat conftest.$ac_ext >&5
6391   rm -rf conftest*
6392   eval "ac_cv_lib_$ac_lib_var=no"
6393 fi
6394 rm -f conftest*
6395 LIBS="$ac_save_LIBS"
6396
6397 fi
6398 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6399   echo "$ac_t""yes" 1>&6
6400     ac_tr_lib=HAVE_LIB`echo st | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6401     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6402   cat >> confdefs.h <<EOF
6403 #define $ac_tr_lib 1
6404 EOF
6405
6406   LIBS="-lst $LIBS"
6407
6408 else
6409   echo "$ac_t""no" 1>&6
6410 fi
6411
6412     cat > conftest.$ac_ext <<EOF
6413 #line 6414 "configure"
6414 #include "confdefs.h"
6415 #include <st.h>
6416 EOF
6417 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6418   egrep "st_init" >/dev/null 2>&1; then
6419   rm -rf conftest*
6420   
6421       cat >> confdefs.h <<\EOF
6422 #define ST_INIT_IN_ST_H 1
6423 EOF
6424
6425     THREAD_LIB="-lst"
6426     fi
6427 fi
6428 rm -f conftest*
6429
6430
6431 fi
6432
6433
6434 LIB="${LIB} ${THREAD_LIB}"
6435
6436 NEED_LIBDVDCSS=0
6437 STATIC_LIBDVDCSS=0
6438 DUMMY_LIBDVDCSS=0
6439 # Check whether --with-dvdcss or --without-dvdcss was given.
6440 if test "${with_dvdcss+set}" = set; then
6441   withval="$with_dvdcss"
6442    case "x${withval}" in
6443     xlocal-static|xyes)
6444       # local libdvdcss, statically linked
6445       BUILTINS="${BUILTINS} dvd"
6446       if test x${CAN_BUILD_LIBDVDCSS} = x1
6447       then
6448         NEED_LIBDVDCSS=1
6449         STATIC_LIBDVDCSS=1
6450         CFLAGS_DVD="${CFLAGS_DVD} -I../../extras/libdvdcss"
6451         LIB_DVD="${LIB_DVD} lib/libdvdcss.a ${LIB_LIBDVDCSS}"
6452       fi
6453     ;;
6454     xlocal-shared)
6455       # local libdvdcss, dynamically linked
6456       PLUGINS="${PLUGINS} dvd"
6457       if test x${CAN_BUILD_LIBDVDCSS} = x1
6458       then
6459         NEED_LIBDVDCSS=1
6460         CFLAGS_DVD="${CFLAGS_DVD} -I../../extras/libdvdcss"
6461         LIB_DVD="${LIB_DVD} -L../../lib -ldvdcss"
6462       fi
6463     ;;
6464     xno)
6465       # don't use libdvdcss at all, build a DVD module that can dlopen() it
6466       BUILTINS="${BUILTINS} dvd"
6467       DUMMY_LIBDVDCSS=1
6468       SRC_DVD_EXTRA="${SRC_DVD_EXTRA} dummy_dvdcss.c"
6469       CFLAGS_DVD="${CFLAGS_DVD} -DGOD_DAMN_DMCA"
6470       CFLAGS_DVD="${CFLAGS_DVD} -DLIBDVDCSS_VERSION=\"${LIBDVDCSS_VERSION}\""
6471       LIB_DVD="${LIB_DVD} -ldl"
6472     ;;
6473     *)
6474       # existing libdvdcss
6475       PLUGINS="${PLUGINS} dvd"
6476       if test "x$withval" != "xyes"
6477       then
6478         LIB_DVD="${LIB_DVD} -L"$withval"/lib"
6479         CFLAGS_DVD="${CFLAGS_DVD} -I"$withval"/include"
6480       fi
6481       LIB_DVD="${LIB_DVD} -ldvdcss"
6482     esac 
6483 else
6484   # user didn't decide, we choose to use local libdvdcss and link statically
6485   # if libdvdcss is in the archive, or to use the dummy replacement otherwise.
6486    if test x${CAN_BUILD_LIBDVDCSS} = x1
6487     then
6488       BUILTINS="${BUILTINS} dvd"
6489       NEED_LIBDVDCSS=1
6490       STATIC_LIBDVDCSS=1
6491       CFLAGS_DVD="${CFLAGS_DVD} -I../../extras/libdvdcss"
6492       LIB_DVD="${LIB_DVD} lib/libdvdcss.a ${LIB_LIBDVDCSS}"
6493     else
6494       # XXX: no check for libdl is done, don't try this at home !
6495       BUILTINS="${BUILTINS} dvd"
6496       DUMMY_LIBDVDCSS=1
6497       SRC_DVD_EXTRA="${SRC_DVD_EXTRA} dummy_dvdcss.c"
6498       CFLAGS_DVD="${CFLAGS_DVD} -DGOD_DAMN_DMCA"
6499       LIB_DVD="${LIB_DVD} -ldl"
6500     fi 
6501 fi
6502
6503
6504 if test x${DUMMY_LIBDVDCSS} = x1; then STATIC_LIBDVDREAD=1; fi
6505 if test x${STATIC_LIBDVDCSS} = x1; then STATIC_LIBDVDREAD=1; fi
6506 # Check whether --with-dvdread or --without-dvdread was given.
6507 if test "${with_dvdread+set}" = set; then
6508   withval="$with_dvdread"
6509    case "x${withval}" in
6510     xlocal-static|xyes)
6511       if test x${STATIC_LIBDVDREAD} = x1
6512       then
6513         BUILTINS="${BUILTINS} dvdread" 
6514         CFLAGS_DVDREAD="${CFLAGS_DVDREAD} ${CFLAGS_DVD} -I../../extras/libdvdread"
6515         LIB_DVDREAD="${LIB_DVDREAD} lib/libdvdread.a ${LIB_DVD}"
6516       else
6517         { echo "configure: error: Can't link static dvdread with shared dvdcss" 1>&2; exit 1; }
6518       fi
6519     ;;
6520     xno)
6521     ;;
6522     x)
6523       if test x${STATIC_LIBDVDREAD} = x1
6524       then
6525         #BUILTINS="${BUILTINS} dvdread" 
6526         CFLAGS_DVDREAD="${CFLAGS_DVDREAD} ${CFLAGS_DVD} -I../../extras/libdvdread"
6527         LIB_DVDREAD="${LIB_DVDREAD} lib/libdvdread.a ${LIB_DVD}"
6528       else
6529         #PLUGINS="${PLUGINS} dvdread"
6530         CFLAGS_DVDREAD="${CFLAGS_DVDREAD} -I../../extras/libdvdread  ${CFLAGS_DVD}"
6531         LIB_DVDREAD="${LIB_DVDREAD} -Llib -ldvdread ${LIB_DVD}"
6532       fi 
6533     ;;
6534     *)
6535       if test "x$withval" != "xlocal-shared"
6536       then
6537         LIB_DVDREAD="${LIB_DVDREAD} -L"$withval"/lib"
6538         CFLAGS_DVDREAD="${CFLAGS_DVDREAD} -I"$withval"/include"
6539       else
6540         LIB_DVDREAD="${LIB_DVDREAD} -L../../lib"
6541         CFLAGS_DVDREAD="${CFLAGS_DVDREAD} -I../../extras/libdvdread"
6542       fi
6543       if test x${STATIC_LIBDVDCSS} = x1
6544       then
6545         { echo "configure: error: Can't link shared dvdread with static dvdcss" 1>&2; exit 1; }
6546       else
6547         #PLUGINS="${PLUGINS} dvdread"
6548         CFLAGS_DVDREAD="${CFLAGS_DVDREAD} ${CFLAGS_DVD}"
6549         LIB_DVDREAD="${LIB_DVDREAD} -ldvdread ${LIB_DVD}"
6550       fi
6551     esac
6552     if test x${DUMMY_LIBDVDCSS} = x1
6553     then
6554       LIB_LIBDVDREAD="${LIB_LIBDVDREAD} -ldl"
6555     else
6556       LIB_LIBDVDREAD="${LIB_LIBDVDREAD} -L../../lib -ldvdcss"
6557     fi 
6558 fi
6559
6560
6561 # Check whether --enable-vcd or --disable-vcd was given.
6562 if test "${enable_vcd+set}" = set; then
6563   enableval="$enable_vcd"
6564   :
6565 fi
6566
6567
6568 if test x$enable_vcd != xno
6569 then
6570   cat > conftest.$ac_ext <<EOF
6571 #line 6572 "configure"
6572 #include "confdefs.h"
6573 #include <linux/cdrom.h>
6574 EOF
6575 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6576   egrep "cdrom_msf0" >/dev/null 2>&1; then
6577   rm -rf conftest*
6578   
6579     BUILTINS="${BUILTINS} vcd"
6580   
6581 fi
6582 rm -f conftest*
6583
6584 fi
6585
6586 if test x$enable_vcd != xno -a "${SYS}" = "bsdi"
6587 then
6588   BUILTINS="${BUILTINS} vcd"
6589 fi
6590
6591 if test x$enable_vcd != xno -a "${SYS}" = "darwin"
6592 then
6593   BUILTINS="${BUILTINS} vcd"
6594   LIB_VCD="${LIB_VCD} -framework IOKit" 
6595 fi
6596
6597 # Check whether --enable-dummy or --disable-dummy was given.
6598 if test "${enable_dummy+set}" = set; then
6599   enableval="$enable_dummy"
6600   :
6601 fi
6602
6603
6604 if test x$enable_dummy != xno
6605 then
6606   PLUGINS="${PLUGINS} dummy"
6607 fi
6608
6609 # Check whether --enable-logger or --disable-logger was given.
6610 if test "${enable_logger+set}" = set; then
6611   enableval="$enable_logger"
6612   :
6613 fi
6614
6615
6616 if test x$enable_logger != xno
6617 then
6618   PLUGINS="${PLUGINS} logger"
6619 fi
6620
6621 # Check whether --enable-null or --disable-null was given.
6622 if test "${enable_null+set}" = set; then
6623   enableval="$enable_null"
6624   :
6625 fi
6626
6627
6628 if test x$enable_null != xno
6629 then
6630   PLUGINS="${PLUGINS} null"
6631 fi
6632
6633 cat > conftest.$ac_ext <<EOF
6634 #line 6635 "configure"
6635 #include "confdefs.h"
6636 #include <netinet/in.h>
6637 EOF
6638 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6639   egrep "in6_addr" >/dev/null 2>&1; then
6640   rm -rf conftest*
6641   
6642   PLUGINS="${PLUGINS} ipv6"
6643 fi
6644 rm -f conftest*
6645
6646
6647 # Check whether --enable-rc or --disable-rc was given.
6648 if test "${enable_rc+set}" = set; then
6649   enableval="$enable_rc"
6650   :
6651 fi
6652
6653
6654 if test x$enable_rc != xno
6655 then
6656   PLUGINS="${PLUGINS} rc"
6657 fi
6658
6659 # Check whether --with-mad or --without-mad was given.
6660 if test "${with_mad+set}" = set; then
6661   withval="$with_mad"
6662    if test "x$with_val" != "xno"; then
6663       if test -n $with_val; then
6664         CFLAGS_MAD="${CFLAGS_MAD} -I$with_val/include"
6665         LIB_MAD="${LIB_MAD} -L$with_val/lib -lmad"
6666       else
6667         LIB_MAD="${LIB_MAD} -lmad"
6668       fi
6669       save_CFLAGS=$CFLAGS
6670       save_LDFLAGS=$LDFLAGS
6671       CFLAGS="$CFLAGS $CFLAGS_MAD"
6672       LDFLAGS="$LDFLAGS $LIB_MAD"
6673       for ac_hdr in mad.h
6674 do
6675 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6676 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6677 echo "configure:6678: checking for $ac_hdr" >&5
6678 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6679   echo $ac_n "(cached) $ac_c" 1>&6
6680 else
6681   cat > conftest.$ac_ext <<EOF
6682 #line 6683 "configure"
6683 #include "confdefs.h"
6684 #include <$ac_hdr>
6685 EOF
6686 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6687 { (eval echo configure:6688: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6688 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6689 if test -z "$ac_err"; then
6690   rm -rf conftest*
6691   eval "ac_cv_header_$ac_safe=yes"
6692 else
6693   echo "$ac_err" >&5
6694   echo "configure: failed program was:" >&5
6695   cat conftest.$ac_ext >&5
6696   rm -rf conftest*
6697   eval "ac_cv_header_$ac_safe=no"
6698 fi
6699 rm -f conftest*
6700 fi
6701 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6702   echo "$ac_t""yes" 1>&6
6703     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6704   cat >> confdefs.h <<EOF
6705 #define $ac_tr_hdr 1
6706 EOF
6707  
6708 else
6709   echo "$ac_t""no" 1>&6
6710 echo "Cannot find development headers for libmad..."
6711         exit 1
6712       
6713 fi
6714 done
6715
6716       echo $ac_n "checking for mad_bit_init in -lmad""... $ac_c" 1>&6
6717 echo "configure:6718: checking for mad_bit_init in -lmad" >&5
6718 ac_lib_var=`echo mad'_'mad_bit_init | sed 'y%./+-%__p_%'`
6719 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6720   echo $ac_n "(cached) $ac_c" 1>&6
6721 else
6722   ac_save_LIBS="$LIBS"
6723 LIBS="-lmad  $LIBS"
6724 cat > conftest.$ac_ext <<EOF
6725 #line 6726 "configure"
6726 #include "confdefs.h"
6727 /* Override any gcc2 internal prototype to avoid an error.  */
6728 /* We use char because int might match the return type of a gcc2
6729     builtin and then its argument prototype would still apply.  */
6730 char mad_bit_init();
6731
6732 int main() {
6733 mad_bit_init()
6734 ; return 0; }
6735 EOF
6736 if { (eval echo configure:6737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6737   rm -rf conftest*
6738   eval "ac_cv_lib_$ac_lib_var=yes"
6739 else
6740   echo "configure: failed program was:" >&5
6741   cat conftest.$ac_ext >&5
6742   rm -rf conftest*
6743   eval "ac_cv_lib_$ac_lib_var=no"
6744 fi
6745 rm -f conftest*
6746 LIBS="$ac_save_LIBS"
6747
6748 fi
6749 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6750   echo "$ac_t""yes" 1>&6
6751     ac_tr_lib=HAVE_LIB`echo mad | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6752     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6753   cat >> confdefs.h <<EOF
6754 #define $ac_tr_lib 1
6755 EOF
6756
6757   LIBS="-lmad $LIBS"
6758
6759 else
6760   echo "$ac_t""no" 1>&6
6761  echo "Cannot find libmad library..."
6762         exit 1
6763       
6764 fi
6765
6766       CFLAGS=$save_CFLAGS
6767       LDFLAGS=$save_LDFLAGS
6768       PLUGINS="${PLUGINS} mad"
6769     fi 
6770 fi
6771
6772
6773 if test x$SYS = xbeos
6774 then
6775     PLUGINS="${PLUGINS} beos"
6776
6777 else
6778
6779 # Check whether --enable-dsp or --disable-dsp was given.
6780 if test "${enable_dsp+set}" = set; then
6781   enableval="$enable_dsp"
6782   :
6783 fi
6784
6785
6786 if test x$enable_dsp != xno &&
6787   (test x$SYS != xmingw32 || test x$enable_dsp = xyes)
6788 then
6789   for ac_hdr in soundcard.h sys/soundcard.h machine/soundcard.h
6790 do
6791 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6792 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6793 echo "configure:6794: checking for $ac_hdr" >&5
6794 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6795   echo $ac_n "(cached) $ac_c" 1>&6
6796 else
6797   cat > conftest.$ac_ext <<EOF
6798 #line 6799 "configure"
6799 #include "confdefs.h"
6800 #include <$ac_hdr>
6801 EOF
6802 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6803 { (eval echo configure:6804: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6804 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6805 if test -z "$ac_err"; then
6806   rm -rf conftest*
6807   eval "ac_cv_header_$ac_safe=yes"
6808 else
6809   echo "$ac_err" >&5
6810   echo "configure: failed program was:" >&5
6811   cat conftest.$ac_ext >&5
6812   rm -rf conftest*
6813   eval "ac_cv_header_$ac_safe=no"
6814 fi
6815 rm -f conftest*
6816 fi
6817 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6818   echo "$ac_t""yes" 1>&6
6819     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6820   cat >> confdefs.h <<EOF
6821 #define $ac_tr_hdr 1
6822 EOF
6823  
6824     PLUGINS="${PLUGINS} dsp"
6825     echo $ac_n "checking for main in -lossaudio""... $ac_c" 1>&6
6826 echo "configure:6827: checking for main in -lossaudio" >&5
6827 ac_lib_var=`echo ossaudio'_'main | sed 'y%./+-%__p_%'`
6828 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6829   echo $ac_n "(cached) $ac_c" 1>&6
6830 else
6831   ac_save_LIBS="$LIBS"
6832 LIBS="-lossaudio  $LIBS"
6833 cat > conftest.$ac_ext <<EOF
6834 #line 6835 "configure"
6835 #include "confdefs.h"
6836
6837 int main() {
6838 main()
6839 ; return 0; }
6840 EOF
6841 if { (eval echo configure:6842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6842   rm -rf conftest*
6843   eval "ac_cv_lib_$ac_lib_var=yes"
6844 else
6845   echo "configure: failed program was:" >&5
6846   cat conftest.$ac_ext >&5
6847   rm -rf conftest*
6848   eval "ac_cv_lib_$ac_lib_var=no"
6849 fi
6850 rm -f conftest*
6851 LIBS="$ac_save_LIBS"
6852
6853 fi
6854 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6855   echo "$ac_t""yes" 1>&6
6856   LIB_DSP="${LIB_DSP} -lossaudio"
6857 else
6858   echo "$ac_t""no" 1>&6
6859 fi
6860
6861   
6862 else
6863   echo "$ac_t""no" 1>&6
6864 fi
6865 done
6866
6867 fi
6868
6869 # Check whether --enable-esd or --disable-esd was given.
6870 if test "${enable_esd+set}" = set; then
6871   enableval="$enable_esd"
6872   if test x$enable_esd = xyes
6873    then
6874      # Extract the first word of "esd-config", so it can be a program name with args.
6875 set dummy esd-config; ac_word=$2
6876 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6877 echo "configure:6878: checking for $ac_word" >&5
6878 if eval "test \"`echo '$''{'ac_cv_path_ESD_CONFIG'+set}'`\" = set"; then
6879   echo $ac_n "(cached) $ac_c" 1>&6
6880 else
6881   case "$ESD_CONFIG" in
6882   /*)
6883   ac_cv_path_ESD_CONFIG="$ESD_CONFIG" # Let the user override the test with a path.
6884   ;;
6885   ?:/*)                  
6886   ac_cv_path_ESD_CONFIG="$ESD_CONFIG" # Let the user override the test with a dos path.
6887   ;;
6888   *)
6889   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
6890   ac_dummy="$PATH"
6891   for ac_dir in $ac_dummy; do 
6892     test -z "$ac_dir" && ac_dir=.
6893     if test -f $ac_dir/$ac_word; then
6894       ac_cv_path_ESD_CONFIG="$ac_dir/$ac_word"
6895       break
6896     fi
6897   done
6898   IFS="$ac_save_ifs"
6899   test -z "$ac_cv_path_ESD_CONFIG" && ac_cv_path_ESD_CONFIG="no"
6900   ;;
6901 esac
6902 fi
6903 ESD_CONFIG="$ac_cv_path_ESD_CONFIG"
6904 if test -n "$ESD_CONFIG"; then
6905   echo "$ac_t""$ESD_CONFIG" 1>&6
6906 else
6907   echo "$ac_t""no" 1>&6
6908 fi
6909
6910      if test x${ESD_CONFIG} != xno
6911      then
6912        PLUGINS="${PLUGINS} esd"
6913        CFLAGS_ESD="${CFLAGS_ESD} `${ESD_CONFIG} --cflags`"
6914        LIB_ESD="${LIB_ESD} `${ESD_CONFIG} --libs`"
6915      fi
6916    fi
6917 fi
6918
6919
6920 # Check whether --enable-arts or --disable-arts was given.
6921 if test "${enable_arts+set}" = set; then
6922   enableval="$enable_arts"
6923   if test x$enable_arts = xyes
6924    then
6925      # Extract the first word of "artsc-config", so it can be a program name with args.
6926 set dummy artsc-config; ac_word=$2
6927 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6928 echo "configure:6929: checking for $ac_word" >&5
6929 if eval "test \"`echo '$''{'ac_cv_path_ARTS_CONFIG'+set}'`\" = set"; then
6930   echo $ac_n "(cached) $ac_c" 1>&6
6931 else
6932   case "$ARTS_CONFIG" in
6933   /*)
6934   ac_cv_path_ARTS_CONFIG="$ARTS_CONFIG" # Let the user override the test with a path.
6935   ;;
6936   ?:/*)                  
6937   ac_cv_path_ARTS_CONFIG="$ARTS_CONFIG" # Let the user override the test with a dos path.
6938   ;;
6939   *)
6940   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
6941   ac_dummy="$PATH"
6942   for ac_dir in $ac_dummy; do 
6943     test -z "$ac_dir" && ac_dir=.
6944     if test -f $ac_dir/$ac_word; then
6945       ac_cv_path_ARTS_CONFIG="$ac_dir/$ac_word"
6946       break
6947     fi
6948   done
6949   IFS="$ac_save_ifs"
6950   test -z "$ac_cv_path_ARTS_CONFIG" && ac_cv_path_ARTS_CONFIG="no"
6951   ;;
6952 esac
6953 fi
6954 ARTS_CONFIG="$ac_cv_path_ARTS_CONFIG"
6955 if test -n "$ARTS_CONFIG"; then
6956   echo "$ac_t""$ARTS_CONFIG" 1>&6
6957 else
6958   echo "$ac_t""no" 1>&6
6959 fi
6960
6961      if test x${ARTS_CONFIG} != xno
6962      then
6963        PLUGINS="${PLUGINS} arts"
6964        CFLAGS_ARTS="${CFLAGS_ARTS} `${ARTS_CONFIG} --cflags`"
6965        LIB_ARTS="${LIB_ARTS} `${ARTS_CONFIG} --libs `"
6966      fi
6967    fi
6968 fi
6969
6970
6971 # Check whether --enable-macosx or --disable-macosx was given.
6972 if test "${enable_macosx+set}" = set; then
6973   enableval="$enable_macosx"
6974   if test x$enable_macosx = xyes
6975    then
6976      BUILTINS="${BUILTINS} macosx"
6977      LIB_MACOSX="${LIB_MACOSX} -framework CoreAudio -framework Cocoa -framework AGL -framework QuickTime -lobjc"
6978      CFLAGS_MACOSX="${CFLAGS_MACOSX} -ObjC"
6979      LIB="${LIB} -ObjC"
6980    fi
6981 else
6982   for ac_hdr in Cocoa/Cocoa.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  BUILTINS="${BUILTINS} macosx"
7017      LIB_MACOSX="${LIB_MACOSX} -framework CoreAudio -framework Cocoa -framework AGL -framework QuickTime -lobjc"
7018      CFLAGS_MACOSX="${CFLAGS_MACOSX} -ObjC"
7019      LIB="${LIB} -ObjC"
7020    
7021 else
7022   echo "$ac_t""no" 1>&6
7023 fi
7024 done
7025
7026 fi
7027
7028
7029 # Check whether --enable-qnx or --disable-qnx was given.
7030 if test "${enable_qnx+set}" = set; then
7031   enableval="$enable_qnx"
7032   :
7033 fi
7034
7035     if test x$enable_qnx != xno
7036     then
7037       for ac_hdr in Ph.h
7038 do
7039 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7040 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7041 echo "configure:7042: checking for $ac_hdr" >&5
7042 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7043   echo $ac_n "(cached) $ac_c" 1>&6
7044 else
7045   cat > conftest.$ac_ext <<EOF
7046 #line 7047 "configure"
7047 #include "confdefs.h"
7048 #include <$ac_hdr>
7049 EOF
7050 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7051 { (eval echo configure:7052: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7052 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7053 if test -z "$ac_err"; then
7054   rm -rf conftest*
7055   eval "ac_cv_header_$ac_safe=yes"
7056 else
7057   echo "$ac_err" >&5
7058   echo "configure: failed program was:" >&5
7059   cat conftest.$ac_ext >&5
7060   rm -rf conftest*
7061   eval "ac_cv_header_$ac_safe=no"
7062 fi
7063 rm -f conftest*
7064 fi
7065 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7066   echo "$ac_t""yes" 1>&6
7067     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7068   cat >> confdefs.h <<EOF
7069 #define $ac_tr_hdr 1
7070 EOF
7071  
7072         PLUGINS="${PLUGINS} qnx"
7073         LIB_QNX="${LIB_QNX} -lasound -lph"
7074       
7075 else
7076   echo "$ac_t""no" 1>&6
7077 fi
7078 done
7079
7080     fi
7081
7082 # Check whether --enable-a52 or --disable-a52 was given.
7083 if test "${enable_a52+set}" = set; then
7084   enableval="$enable_a52"
7085   :
7086 fi
7087
7088 if test "x$enableval" != "xno" -a x$SYS != xmingw32
7089   then
7090     for ac_hdr in a52dec/a52.h
7091 do
7092 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7093 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7094 echo "configure:7095: checking for $ac_hdr" >&5
7095 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7096   echo $ac_n "(cached) $ac_c" 1>&6
7097 else
7098   cat > conftest.$ac_ext <<EOF
7099 #line 7100 "configure"
7100 #include "confdefs.h"
7101 #include <$ac_hdr>
7102 EOF
7103 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7104 { (eval echo configure:7105: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7105 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7106 if test -z "$ac_err"; then
7107   rm -rf conftest*
7108   eval "ac_cv_header_$ac_safe=yes"
7109 else
7110   echo "$ac_err" >&5
7111   echo "configure: failed program was:" >&5
7112   cat conftest.$ac_ext >&5
7113   rm -rf conftest*
7114   eval "ac_cv_header_$ac_safe=no"
7115 fi
7116 rm -f conftest*
7117 fi
7118 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7119   echo "$ac_t""yes" 1>&6
7120     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7121   cat >> confdefs.h <<EOF
7122 #define $ac_tr_hdr 1
7123 EOF
7124  
7125       BUILTINS="${BUILTINS} a52"
7126       LIB_A52="${LIB_A52} -la52"
7127      
7128 else
7129   echo "$ac_t""no" 1>&6
7130 fi
7131 done
7132
7133 fi
7134
7135 # Check whether --enable-fb or --disable-fb was given.
7136 if test "${enable_fb+set}" = set; then
7137   enableval="$enable_fb"
7138    if test x$enable_fb = xyes
7139     then
7140       PLUGINS="${PLUGINS} fb"
7141     fi 
7142 fi
7143
7144
7145 # Check whether --enable-mga or --disable-mga was given.
7146 if test "${enable_mga+set}" = set; then
7147   enableval="$enable_mga"
7148    if test x$enable_mga = xyes
7149     then
7150       PLUGINS="${PLUGINS} mga xmga"
7151     fi 
7152 fi
7153
7154
7155 # Check whether --with-ggi or --without-ggi was given.
7156 if test "${with_ggi+set}" = set; then
7157   withval="$with_ggi"
7158    if test "x$withval" != "xno"
7159     then
7160       PLUGINS="${PLUGINS} ggi"
7161       if test "x$withval" != "xyes"
7162       then
7163         LIB_GGI="${LIB_GGI} -l$withval"
7164       else
7165         LIB_GGI="${LIB_GGI} -lggi"
7166       fi
7167     fi 
7168 fi
7169
7170
7171 # Check whether --enable-sdl or --disable-sdl was given.
7172 if test "${enable_sdl+set}" = set; then
7173   enableval="$enable_sdl"
7174   :
7175 fi
7176
7177 if test "x$enable_sdl" != "xno"
7178 then
7179   SDL_PATH=$PATH
7180   # Check whether --with-sdl-config-path or --without-sdl-config-path was given.
7181 if test "${with_sdl_config_path+set}" = set; then
7182   withval="$with_sdl_config_path"
7183    if test "x$withval" != "xno"
7184       then
7185         SDL_PATH=$withval:$PATH
7186       fi 
7187 fi
7188
7189   # Extract the first word of "sdl12-config", so it can be a program name with args.
7190 set dummy sdl12-config; ac_word=$2
7191 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7192 echo "configure:7193: checking for $ac_word" >&5
7193 if eval "test \"`echo '$''{'ac_cv_path_SDL12_CONFIG'+set}'`\" = set"; then
7194   echo $ac_n "(cached) $ac_c" 1>&6
7195 else
7196   case "$SDL12_CONFIG" in
7197   /*)
7198   ac_cv_path_SDL12_CONFIG="$SDL12_CONFIG" # Let the user override the test with a path.
7199   ;;
7200   ?:/*)                  
7201   ac_cv_path_SDL12_CONFIG="$SDL12_CONFIG" # Let the user override the test with a dos path.
7202   ;;
7203   *)
7204   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7205   ac_dummy="$SDL_PATH"
7206   for ac_dir in $ac_dummy; do 
7207     test -z "$ac_dir" && ac_dir=.
7208     if test -f $ac_dir/$ac_word; then
7209       ac_cv_path_SDL12_CONFIG="$ac_dir/$ac_word"
7210       break
7211     fi
7212   done
7213   IFS="$ac_save_ifs"
7214   test -z "$ac_cv_path_SDL12_CONFIG" && ac_cv_path_SDL12_CONFIG="no"
7215   ;;
7216 esac
7217 fi
7218 SDL12_CONFIG="$ac_cv_path_SDL12_CONFIG"
7219 if test -n "$SDL12_CONFIG"; then
7220   echo "$ac_t""$SDL12_CONFIG" 1>&6
7221 else
7222   echo "$ac_t""no" 1>&6
7223 fi
7224
7225   SDL_CONFIG=${SDL12_CONFIG}
7226   SDL_HEADER="SDL12/SDL.h"
7227   if test x${SDL_CONFIG} = xno
7228   then
7229     # Extract the first word of "sdl11-config", so it can be a program name with args.
7230 set dummy sdl11-config; ac_word=$2
7231 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7232 echo "configure:7233: checking for $ac_word" >&5
7233 if eval "test \"`echo '$''{'ac_cv_path_SDL11_CONFIG'+set}'`\" = set"; then
7234   echo $ac_n "(cached) $ac_c" 1>&6
7235 else
7236   case "$SDL11_CONFIG" in
7237   /*)
7238   ac_cv_path_SDL11_CONFIG="$SDL11_CONFIG" # Let the user override the test with a path.
7239   ;;
7240   ?:/*)                  
7241   ac_cv_path_SDL11_CONFIG="$SDL11_CONFIG" # Let the user override the test with a dos path.
7242   ;;
7243   *)
7244   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7245   ac_dummy="$SDL_PATH"
7246   for ac_dir in $ac_dummy; do 
7247     test -z "$ac_dir" && ac_dir=.
7248     if test -f $ac_dir/$ac_word; then
7249       ac_cv_path_SDL11_CONFIG="$ac_dir/$ac_word"
7250       break
7251     fi
7252   done
7253   IFS="$ac_save_ifs"
7254   test -z "$ac_cv_path_SDL11_CONFIG" && ac_cv_path_SDL11_CONFIG="no"
7255   ;;
7256 esac
7257 fi
7258 SDL11_CONFIG="$ac_cv_path_SDL11_CONFIG"
7259 if test -n "$SDL11_CONFIG"; then
7260   echo "$ac_t""$SDL11_CONFIG" 1>&6
7261 else
7262   echo "$ac_t""no" 1>&6
7263 fi
7264
7265     SDL_CONFIG=${SDL11_CONFIG}
7266     SDL_HEADER="SDL11/SDL.h"
7267   fi
7268   if test x${SDL_CONFIG} = xno
7269   then
7270     # Extract the first word of "sdl-config", so it can be a program name with args.
7271 set dummy sdl-config; ac_word=$2
7272 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7273 echo "configure:7274: checking for $ac_word" >&5
7274 if eval "test \"`echo '$''{'ac_cv_path_SDL_CONFIG'+set}'`\" = set"; then
7275   echo $ac_n "(cached) $ac_c" 1>&6
7276 else
7277   case "$SDL_CONFIG" in
7278   /*)
7279   ac_cv_path_SDL_CONFIG="$SDL_CONFIG" # Let the user override the test with a path.
7280   ;;
7281   ?:/*)                  
7282   ac_cv_path_SDL_CONFIG="$SDL_CONFIG" # Let the user override the test with a dos path.
7283   ;;
7284   *)
7285   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7286   ac_dummy="$SDL_PATH"
7287   for ac_dir in $ac_dummy; do 
7288     test -z "$ac_dir" && ac_dir=.
7289     if test -f $ac_dir/$ac_word; then
7290       ac_cv_path_SDL_CONFIG="$ac_dir/$ac_word"
7291       break
7292     fi
7293   done
7294   IFS="$ac_save_ifs"
7295   test -z "$ac_cv_path_SDL_CONFIG" && ac_cv_path_SDL_CONFIG="no"
7296   ;;
7297 esac
7298 fi
7299 SDL_CONFIG="$ac_cv_path_SDL_CONFIG"
7300 if test -n "$SDL_CONFIG"; then
7301   echo "$ac_t""$SDL_CONFIG" 1>&6
7302 else
7303   echo "$ac_t""no" 1>&6
7304 fi
7305
7306     SDL_HEADER="SDL/SDL.h"
7307   fi
7308   if test x${SDL_CONFIG} != xno
7309   then
7310     PLUGINS="${PLUGINS} sdl"
7311     CFLAGS_SDL="${CFLAGS_SDL} `${SDL_CONFIG} --cflags`"
7312     LIB_SDL="${LIB_SDL} `${SDL_CONFIG} --libs | sed 's,-rdynamic,,'`"
7313     save_CPPFLAGS=$CPPFLAGS
7314     CPPFLAGS="$CPPFLAGS $CFLAGS_SDL"
7315     for ac_hdr in ${SDL_HEADER}
7316 do
7317 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7318 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7319 echo "configure:7320: checking for $ac_hdr" >&5
7320 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7321   echo $ac_n "(cached) $ac_c" 1>&6
7322 else
7323   cat > conftest.$ac_ext <<EOF
7324 #line 7325 "configure"
7325 #include "confdefs.h"
7326 #include <$ac_hdr>
7327 EOF
7328 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7329 { (eval echo configure:7330: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7330 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7331 if test -z "$ac_err"; then
7332   rm -rf conftest*
7333   eval "ac_cv_header_$ac_safe=yes"
7334 else
7335   echo "$ac_err" >&5
7336   echo "configure: failed program was:" >&5
7337   cat conftest.$ac_ext >&5
7338   rm -rf conftest*
7339   eval "ac_cv_header_$ac_safe=no"
7340 fi
7341 rm -f conftest*
7342 fi
7343 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7344   echo "$ac_t""yes" 1>&6
7345     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7346   cat >> confdefs.h <<EOF
7347 #define $ac_tr_hdr 1
7348 EOF
7349  cat >> confdefs.h <<EOF
7350 #define SDL_INCLUDE_FILE <${SDL_HEADER}>
7351 EOF
7352
7353 else
7354   echo "$ac_t""no" 1>&6
7355 { echo "configure: error: The development package for SDL is not installed. 
7356 Please install it and try again. Alternatively you can also configure with 
7357 --disable-sdl." 1>&2; exit 1; }
7358       
7359 fi
7360 done
7361
7362     CPPFLAGS=$save_CPPFLAGS
7363     if expr 1.1.5 \> `$SDL_CONFIG --version` >/dev/null
7364     then
7365       { echo "configure: error: The development package for SDL is not installed.
7366 Please install it and try again. Alternatively you can also configure with
7367 --disable-sdl." 1>&2; exit 1; }
7368     fi
7369   elif test "x$enable_sdl" =  "xyes"
7370   then
7371     { echo "configure: error: I couldn't find the SDL package. You can download libSDL
7372 from http://www.libsdl.org/, or configure with --disable-sdl. Have a nice day.
7373     " 1>&2; exit 1; }
7374   fi
7375 fi
7376
7377 # Check whether --enable-directx or --disable-directx was given.
7378 if test "${enable_directx+set}" = set; then
7379   enableval="$enable_directx"
7380   :
7381 fi
7382
7383 if test "x$enableval" != "xno"
7384 then
7385   if test x$SYS = xmingw32
7386   then
7387     # Check whether --with-directx-path or --without-directx-path was given.
7388 if test "${with_directx_path+set}" = set; then
7389   withval="$with_directx_path"
7390   :
7391 fi
7392
7393     if test "x$with_directx_path" = "x"
7394     then
7395       for ac_hdr in ddraw.h
7396 do
7397 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7398 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7399 echo "configure:7400: checking for $ac_hdr" >&5
7400 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7401   echo $ac_n "(cached) $ac_c" 1>&6
7402 else
7403   cat > conftest.$ac_ext <<EOF
7404 #line 7405 "configure"
7405 #include "confdefs.h"
7406 #include <$ac_hdr>
7407 EOF
7408 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7409 { (eval echo configure:7410: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7410 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7411 if test -z "$ac_err"; then
7412   rm -rf conftest*
7413   eval "ac_cv_header_$ac_safe=yes"
7414 else
7415   echo "$ac_err" >&5
7416   echo "configure: failed program was:" >&5
7417   cat conftest.$ac_ext >&5
7418   rm -rf conftest*
7419   eval "ac_cv_header_$ac_safe=no"
7420 fi
7421 rm -f conftest*
7422 fi
7423 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7424   echo "$ac_t""yes" 1>&6
7425     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7426   cat >> confdefs.h <<EOF
7427 #define $ac_tr_hdr 1
7428 EOF
7429   PLUGINS="${PLUGINS} directx"
7430         LIB_DIRECTX="${LIB_DIRECTX} -lgdi32" 
7431 else
7432   echo "$ac_t""no" 1>&6
7433 fi
7434 done
7435
7436     else
7437       echo $ac_n "checking for directX headers in ${withval}""... $ac_c" 1>&6
7438 echo "configure:7439: checking for directX headers in ${withval}" >&5
7439       if test -f ${withval}/ddraw.h
7440       then
7441         PLUGINS="${PLUGINS} directx"
7442         LIB_DIRECTX="${LIB_DIRECTX} -L${withval}/lib -lgdi32"
7443         INCLUDE="${INCLUDE} -I${withval}"
7444         echo "$ac_t""yes" 1>&6
7445       else
7446         echo "$ac_t""no" 1>&6
7447         { echo "configure: error: Cannot find ${withval}/ddraw.h!" 1>&2; exit 1; }
7448       fi
7449     fi
7450   fi
7451 fi
7452
7453 # Check whether --enable-waveout or --disable-waveout was given.
7454 if test "${enable_waveout+set}" = set; then
7455   enableval="$enable_waveout"
7456   :
7457 fi
7458
7459 if test "x$enableval" != "xno" -a x$SYS = xmingw32
7460   then
7461     PLUGINS="${PLUGINS} waveout"
7462     LIB_WAVEOUT="-lwinmm"
7463 fi
7464
7465 # Check whether --enable-win32 or --disable-win32 was given.
7466 if test "${enable_win32+set}" = set; then
7467   enableval="$enable_win32"
7468    if test "x$enableval" != "xno"
7469     then
7470       PLUGINS="${PLUGINS} win32"
7471     fi 
7472 fi
7473
7474
7475 # Check whether --with-glide or --without-glide was given.
7476 if test "${with_glide+set}" = set; then
7477   withval="$with_glide"
7478    if test "x$withval" != "xno"
7479     then
7480       PLUGINS="${PLUGINS} glide"
7481       if test "x$withval" != "xyes"
7482       then
7483         LIB_GLIDE="${LIB_GLIDE} -l$withval -lm"
7484       else
7485         LIB_GLIDE="${LIB_GLIDE} -lglide2x -lm"
7486       fi
7487       CFLAGS_GLIDE="${CFLAGS_GLIDE} -I/usr/include/glide"
7488     fi 
7489 fi
7490
7491
7492 # Check whether --enable-ncurses or --disable-ncurses was given.
7493 if test "${enable_ncurses+set}" = set; then
7494   enableval="$enable_ncurses"
7495   if test x$enable_ncurses = xyes; then
7496      PLUGINS="${PLUGINS} ncurses"
7497      LIB_NCURSES="${LIB_NCURSES} -lncurses"
7498    fi
7499 fi
7500
7501
7502 # Check whether --enable-qt or --disable-qt was given.
7503 if test "${enable_qt+set}" = set; then
7504   enableval="$enable_qt"
7505   if test x$enable_qt = xyes; then
7506      PLUGINS="${PLUGINS} qt"
7507      ALIASES="${ALIASES} qvlc"
7508      LIB_QT="${LIB_QT} -lqt -L${QTDIR}/lib"
7509      CFLAGS_QT="${CFLAGS_QT} -I/usr/include/qt -I${QTDIR}/include"
7510      if test -x ${QTDIR}/bin/moc
7511      then
7512        MOC=${QTDIR}/bin/moc
7513      else
7514        MOC=moc
7515      fi
7516    fi
7517 fi
7518
7519
7520 # Check whether --enable-kde or --disable-kde was given.
7521 if test "${enable_kde+set}" = set; then
7522   enableval="$enable_kde"
7523   if test x$enable_kde = xyes; then
7524      PLUGINS="${PLUGINS} kde"
7525      ALIASES="${ALIASES} kvlc"
7526      LIB_KDE="${LIB_KDE} -L${KDEDIR}/lib -lkfile"
7527      CFLAGS_KDE="${CFLAGS_KDE} -I/usr/include/kde -I/usr/include/qt"
7528      CFLAGS_KDE="${CFLAGS_KDE} -I${KDEDIR}/include -I${QTDIR}/include"
7529      if test -x ${QTDIR}/bin/moc
7530      then
7531        MOC=${QTDIR}/bin/moc
7532      else
7533        MOC=moc
7534      fi
7535    fi
7536 fi
7537
7538
7539 # Check whether --enable-gnome or --disable-gnome was given.
7540 if test "${enable_gnome+set}" = set; then
7541   enableval="$enable_gnome"
7542   if test x$enable_gnome = xyes; then
7543     # look for gnome-config
7544     # Extract the first word of "gnome-config", so it can be a program name with args.
7545 set dummy gnome-config; ac_word=$2
7546 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7547 echo "configure:7548: checking for $ac_word" >&5
7548 if eval "test \"`echo '$''{'ac_cv_path_GNOME_CONFIG'+set}'`\" = set"; then
7549   echo $ac_n "(cached) $ac_c" 1>&6
7550 else
7551   case "$GNOME_CONFIG" in
7552   /*)
7553   ac_cv_path_GNOME_CONFIG="$GNOME_CONFIG" # Let the user override the test with a path.
7554   ;;
7555   ?:/*)                  
7556   ac_cv_path_GNOME_CONFIG="$GNOME_CONFIG" # Let the user override the test with a dos path.
7557   ;;
7558   *)
7559   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7560   ac_dummy="$PATH"
7561   for ac_dir in $ac_dummy; do 
7562     test -z "$ac_dir" && ac_dir=.
7563     if test -f $ac_dir/$ac_word; then
7564       ac_cv_path_GNOME_CONFIG="$ac_dir/$ac_word"
7565       break
7566     fi
7567   done
7568   IFS="$ac_save_ifs"
7569   test -z "$ac_cv_path_GNOME_CONFIG" && ac_cv_path_GNOME_CONFIG="no"
7570   ;;
7571 esac
7572 fi
7573 GNOME_CONFIG="$ac_cv_path_GNOME_CONFIG"
7574 if test -n "$GNOME_CONFIG"; then
7575   echo "$ac_t""$GNOME_CONFIG" 1>&6
7576 else
7577   echo "$ac_t""no" 1>&6
7578 fi
7579
7580     if test -x ${GNOME_CONFIG}
7581     then
7582        CFLAGS_GNOME="${CFLAGS_GNOME} `${GNOME_CONFIG} --cflags gtk gnomeui`"
7583        LIB_GNOME="${LIB_GNOME} `${GNOME_CONFIG} --libs gnomeui | sed 's,-rdynamic,,'`"
7584     fi
7585     # now look for the gnome.h header
7586     saved_CPPFLAGS=$CPPFLAGS
7587     CPPFLAGS="$CPPFLAGS $CFLAGS_GNOME"
7588     for ac_hdr in gnome.h
7589 do
7590 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7591 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7592 echo "configure:7593: checking for $ac_hdr" >&5
7593 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7594   echo $ac_n "(cached) $ac_c" 1>&6
7595 else
7596   cat > conftest.$ac_ext <<EOF
7597 #line 7598 "configure"
7598 #include "confdefs.h"
7599 #include <$ac_hdr>
7600 EOF
7601 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7602 { (eval echo configure:7603: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7603 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7604 if test -z "$ac_err"; then
7605   rm -rf conftest*
7606   eval "ac_cv_header_$ac_safe=yes"
7607 else
7608   echo "$ac_err" >&5
7609   echo "configure: failed program was:" >&5
7610   cat conftest.$ac_ext >&5
7611   rm -rf conftest*
7612   eval "ac_cv_header_$ac_safe=no"
7613 fi
7614 rm -f conftest*
7615 fi
7616 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7617   echo "$ac_t""yes" 1>&6
7618     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7619   cat >> confdefs.h <<EOF
7620 #define $ac_tr_hdr 1
7621 EOF
7622  
7623       PLUGINS="${PLUGINS} gnome"
7624       ALIASES="${ALIASES} gnome-vlc"
7625      
7626 else
7627   echo "$ac_t""no" 1>&6
7628 { echo "configure: error: Can't find gnome headers. Please install the gnome
7629 developement librairie or remove the --enable-gnome option" 1>&2; exit 1; }
7630      
7631 fi
7632 done
7633
7634   
7635     CPPFLAGS=$saved_CPPFLAGS
7636   fi
7637 fi
7638
7639
7640 # Check whether --enable-gtk or --disable-gtk was given.
7641 if test "${enable_gtk+set}" = set; then
7642   enableval="$enable_gtk"
7643   :
7644 fi
7645
7646 if test x$enable_gtk != xno
7647 then
7648   GTK_PATH=$PATH
7649   # Check whether --with-gtk-config-path or --without-gtk-config-path was given.
7650 if test "${with_gtk_config_path+set}" = set; then
7651   withval="$with_gtk_config_path"
7652    if test "x$withval" != "xno"
7653       then
7654         GTK_PATH=$withval:$PATH
7655       fi 
7656 fi
7657
7658   # look for gtk-config
7659   # Extract the first word of "gtk12-config", so it can be a program name with args.
7660 set dummy gtk12-config; ac_word=$2
7661 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7662 echo "configure:7663: checking for $ac_word" >&5
7663 if eval "test \"`echo '$''{'ac_cv_path_GTK12_CONFIG'+set}'`\" = set"; then
7664   echo $ac_n "(cached) $ac_c" 1>&6
7665 else
7666   case "$GTK12_CONFIG" in
7667   /*)
7668   ac_cv_path_GTK12_CONFIG="$GTK12_CONFIG" # Let the user override the test with a path.
7669   ;;
7670   ?:/*)                  
7671   ac_cv_path_GTK12_CONFIG="$GTK12_CONFIG" # Let the user override the test with a dos path.
7672   ;;
7673   *)
7674   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7675   ac_dummy="$GTK_PATH"
7676   for ac_dir in $ac_dummy; do 
7677     test -z "$ac_dir" && ac_dir=.
7678     if test -f $ac_dir/$ac_word; then
7679       ac_cv_path_GTK12_CONFIG="$ac_dir/$ac_word"
7680       break
7681     fi
7682   done
7683   IFS="$ac_save_ifs"
7684   test -z "$ac_cv_path_GTK12_CONFIG" && ac_cv_path_GTK12_CONFIG="no"
7685   ;;
7686 esac
7687 fi
7688 GTK12_CONFIG="$ac_cv_path_GTK12_CONFIG"
7689 if test -n "$GTK12_CONFIG"; then
7690   echo "$ac_t""$GTK12_CONFIG" 1>&6
7691 else
7692   echo "$ac_t""no" 1>&6
7693 fi
7694
7695   GTK_CONFIG=${GTK12_CONFIG}
7696   if test x${GTK_CONFIG} = xno
7697   then
7698     # Extract the first word of "gtk-config", so it can be a program name with args.
7699 set dummy gtk-config; ac_word=$2
7700 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7701 echo "configure:7702: checking for $ac_word" >&5
7702 if eval "test \"`echo '$''{'ac_cv_path_GTK_CONFIG'+set}'`\" = set"; then
7703   echo $ac_n "(cached) $ac_c" 1>&6
7704 else
7705   case "$GTK_CONFIG" in
7706   /*)
7707   ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a path.
7708   ;;
7709   ?:/*)                  
7710   ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a dos path.
7711   ;;
7712   *)
7713   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7714   ac_dummy="$GTK_PATH"
7715   for ac_dir in $ac_dummy; do 
7716     test -z "$ac_dir" && ac_dir=.
7717     if test -f $ac_dir/$ac_word; then
7718       ac_cv_path_GTK_CONFIG="$ac_dir/$ac_word"
7719       break
7720     fi
7721   done
7722   IFS="$ac_save_ifs"
7723   test -z "$ac_cv_path_GTK_CONFIG" && ac_cv_path_GTK_CONFIG="no"
7724   ;;
7725 esac
7726 fi
7727 GTK_CONFIG="$ac_cv_path_GTK_CONFIG"
7728 if test -n "$GTK_CONFIG"; then
7729   echo "$ac_t""$GTK_CONFIG" 1>&6
7730 else
7731   echo "$ac_t""no" 1>&6
7732 fi
7733
7734   fi
7735   if test x${GTK_CONFIG} != xno
7736   then
7737     if expr 1.2.0 \> `$GTK_CONFIG --version` >/dev/null
7738     then
7739       { 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; }
7740     fi
7741     CFLAGS_GTK="${CFLAGS_GTK} `${GTK_CONFIG} --cflags gtk`"
7742     LIB_GTK="${LIB_GTK} `${GTK_CONFIG} --libs gtk | sed 's,-rdynamic,,'`"
7743     # now look for the gtk.h header
7744     saved_CPPFLAGS=$CPPFLAGS
7745     CPPFLAGS="$CPPFLAGS $CFLAGS_GTK"
7746     ac_cv_gtk_headers=yes
7747     for ac_hdr in gtk/gtk.h glib.h gdk/gdk.h
7748 do
7749 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7750 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7751 echo "configure:7752: checking for $ac_hdr" >&5
7752 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7753   echo $ac_n "(cached) $ac_c" 1>&6
7754 else
7755   cat > conftest.$ac_ext <<EOF
7756 #line 7757 "configure"
7757 #include "confdefs.h"
7758 #include <$ac_hdr>
7759 EOF
7760 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7761 { (eval echo configure:7762: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7762 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7763 if test -z "$ac_err"; then
7764   rm -rf conftest*
7765   eval "ac_cv_header_$ac_safe=yes"
7766 else
7767   echo "$ac_err" >&5
7768   echo "configure: failed program was:" >&5
7769   cat conftest.$ac_ext >&5
7770   rm -rf conftest*
7771   eval "ac_cv_header_$ac_safe=no"
7772 fi
7773 rm -f conftest*
7774 fi
7775 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7776   echo "$ac_t""yes" 1>&6
7777     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7778   cat >> confdefs.h <<EOF
7779 #define $ac_tr_hdr 1
7780 EOF
7781  
7782 else
7783   echo "$ac_t""no" 1>&6
7784 ac_cv_gtk_headers=no
7785       echo "Cannot find gtk development headers."
7786     
7787 fi
7788 done
7789
7790     if test "x$ac_cv_gtk_headers" = xyes
7791     then
7792       PLUGINS="${PLUGINS} gtk"
7793       ALIASES="${ALIASES} gvlc"
7794     fi
7795     CPPFLAGS=$saved_CPPFLAGS
7796   fi
7797 fi
7798
7799 # Check whether --enable-x11 or --disable-x11 was given.
7800 if test "${enable_x11+set}" = set; then
7801   enableval="$enable_x11"
7802   :
7803 fi
7804
7805 if test x$enable_x11 != xno &&
7806   (test x$SYS != xmingw32 || test x$enable_x11 = xyes); then
7807   if test x$x_includes = xNONE; then
7808     x_includes=/usr/X11R6/include
7809   fi
7810   if test x$x_libraries = xNONE; then
7811     x_libraries=/usr/X11R6/lib
7812   fi
7813   saved_CPPFLAGS=$CPPFLAGS
7814   CPPFLAGS="$CPPFLAGS -I$x_includes"
7815   for ac_hdr in X11/Xlib.h
7816 do
7817 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7818 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7819 echo "configure:7820: checking for $ac_hdr" >&5
7820 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7821   echo $ac_n "(cached) $ac_c" 1>&6
7822 else
7823   cat > conftest.$ac_ext <<EOF
7824 #line 7825 "configure"
7825 #include "confdefs.h"
7826 #include <$ac_hdr>
7827 EOF
7828 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7829 { (eval echo configure:7830: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7830 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7831 if test -z "$ac_err"; then
7832   rm -rf conftest*
7833   eval "ac_cv_header_$ac_safe=yes"
7834 else
7835   echo "$ac_err" >&5
7836   echo "configure: failed program was:" >&5
7837   cat conftest.$ac_ext >&5
7838   rm -rf conftest*
7839   eval "ac_cv_header_$ac_safe=no"
7840 fi
7841 rm -f conftest*
7842 fi
7843 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7844   echo "$ac_t""yes" 1>&6
7845     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7846   cat >> confdefs.h <<EOF
7847 #define $ac_tr_hdr 1
7848 EOF
7849  
7850     PLUGINS="${PLUGINS} x11"
7851     LIB_X11="${LIB_X11} -L$x_libraries -lX11 -lXext"
7852     CFLAGS_X11="${CFLAGS_X11} -I$x_includes"
7853   
7854 else
7855   echo "$ac_t""no" 1>&6
7856 fi
7857 done
7858
7859   CPPFLAGS=$saved_CPPFLAGS
7860 fi
7861
7862 # Check whether --enable-xvideo or --disable-xvideo was given.
7863 if test "${enable_xvideo+set}" = set; then
7864   enableval="$enable_xvideo"
7865   :
7866 fi
7867
7868 if test x$enable_xvideo != xno &&
7869   (test x$SYS != xmingw32 || test x$enable_xvideo = xyes); then
7870   if test x$x_includes = xNONE; then
7871     x_includes=/usr/X11R6/include
7872   fi
7873   if test x$x_libraries = xNONE; then
7874     x_libraries=/usr/X11R6/lib
7875   fi
7876   saved_CPPFLAGS=$CPPFLAGS
7877   CPPFLAGS="$CPPFLAGS -I$x_includes"
7878   for ac_hdr in X11/extensions/Xv.h
7879 do
7880 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7881 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7882 echo "configure:7883: checking for $ac_hdr" >&5
7883 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7884   echo $ac_n "(cached) $ac_c" 1>&6
7885 else
7886   cat > conftest.$ac_ext <<EOF
7887 #line 7888 "configure"
7888 #include "confdefs.h"
7889 #include <$ac_hdr>
7890 EOF
7891 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7892 { (eval echo configure:7893: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7893 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7894 if test -z "$ac_err"; then
7895   rm -rf conftest*
7896   eval "ac_cv_header_$ac_safe=yes"
7897 else
7898   echo "$ac_err" >&5
7899   echo "configure: failed program was:" >&5
7900   cat conftest.$ac_ext >&5
7901   rm -rf conftest*
7902   eval "ac_cv_header_$ac_safe=no"
7903 fi
7904 rm -f conftest*
7905 fi
7906 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7907   echo "$ac_t""yes" 1>&6
7908     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7909   cat >> confdefs.h <<EOF
7910 #define $ac_tr_hdr 1
7911 EOF
7912  
7913     saved_CFLAGS=$CFLAGS
7914     CFLAGS="$CFLAGS -L$x_libraries -lX11 -lXext"
7915     echo $ac_n "checking for XvSetPortAttribute in -lXv_pic""... $ac_c" 1>&6
7916 echo "configure:7917: checking for XvSetPortAttribute in -lXv_pic" >&5
7917 ac_lib_var=`echo Xv_pic'_'XvSetPortAttribute | sed 'y%./+-%__p_%'`
7918 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7919   echo $ac_n "(cached) $ac_c" 1>&6
7920 else
7921   ac_save_LIBS="$LIBS"
7922 LIBS="-lXv_pic  $LIBS"
7923 cat > conftest.$ac_ext <<EOF
7924 #line 7925 "configure"
7925 #include "confdefs.h"
7926 /* Override any gcc2 internal prototype to avoid an error.  */
7927 /* We use char because int might match the return type of a gcc2
7928     builtin and then its argument prototype would still apply.  */
7929 char XvSetPortAttribute();
7930
7931 int main() {
7932 XvSetPortAttribute()
7933 ; return 0; }
7934 EOF
7935 if { (eval echo configure:7936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7936   rm -rf conftest*
7937   eval "ac_cv_lib_$ac_lib_var=yes"
7938 else
7939   echo "configure: failed program was:" >&5
7940   cat conftest.$ac_ext >&5
7941   rm -rf conftest*
7942   eval "ac_cv_lib_$ac_lib_var=no"
7943 fi
7944 rm -f conftest*
7945 LIBS="$ac_save_LIBS"
7946
7947 fi
7948 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7949   echo "$ac_t""yes" 1>&6
7950   # We have Xv_pic, that's good, we can build an xvideo.so plugin !
7951       PLUGINS="${PLUGINS} xvideo"
7952       LIB_XVIDEO="${LIB_XVIDEO} -L$x_libraries -lX11 -lXext -lXv_pic"
7953       CFLAGS_XVIDEO="${CFLAGS_XVIDEO} -I$x_includes"
7954 else
7955   echo "$ac_t""no" 1>&6
7956 # We don't have Xv_pic, let's make xvideo.a as builtin
7957       BUILTINS="${BUILTINS} xvideo"
7958       LIB_XVIDEO="${LIB_XVIDEO} -L$x_libraries -lX11 -lXext -lXv"
7959       CFLAGS_XVIDEO="${CFLAGS_XVIDEO} -I$x_includes"
7960 fi
7961
7962     CFLAGS=$saved_CFLAGS
7963   
7964   CPPFLAGS=$saved_CPPFLAGS
7965 else
7966   echo "$ac_t""no" 1>&6
7967 fi
7968 done
7969
7970 fi
7971
7972 # Check whether --enable-lirc or --disable-lirc was given.
7973 if test "${enable_lirc+set}" = set; then
7974   enableval="$enable_lirc"
7975   :
7976 fi
7977
7978 if test x$enable_lirc = xyes
7979 then
7980   ac_safe=`echo "lirc/lirc_client.h" | sed 'y%./+-%__p_%'`
7981 echo $ac_n "checking for lirc/lirc_client.h""... $ac_c" 1>&6
7982 echo "configure:7983: checking for lirc/lirc_client.h" >&5
7983 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7984   echo $ac_n "(cached) $ac_c" 1>&6
7985 else
7986   cat > conftest.$ac_ext <<EOF
7987 #line 7988 "configure"
7988 #include "confdefs.h"
7989 #include <lirc/lirc_client.h>
7990 EOF
7991 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7992 { (eval echo configure:7993: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7993 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7994 if test -z "$ac_err"; then
7995   rm -rf conftest*
7996   eval "ac_cv_header_$ac_safe=yes"
7997 else
7998   echo "$ac_err" >&5
7999   echo "configure: failed program was:" >&5
8000   cat conftest.$ac_ext >&5
8001   rm -rf conftest*
8002   eval "ac_cv_header_$ac_safe=no"
8003 fi
8004 rm -f conftest*
8005 fi
8006 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8007   echo "$ac_t""yes" 1>&6
8008   echo $ac_n "checking for lirc_init in -llirc_client""... $ac_c" 1>&6
8009 echo "configure:8010: checking for lirc_init in -llirc_client" >&5
8010 ac_lib_var=`echo lirc_client'_'lirc_init | sed 'y%./+-%__p_%'`
8011 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8012   echo $ac_n "(cached) $ac_c" 1>&6
8013 else
8014   ac_save_LIBS="$LIBS"
8015 LIBS="-llirc_client  $LIBS"
8016 cat > conftest.$ac_ext <<EOF
8017 #line 8018 "configure"
8018 #include "confdefs.h"
8019 /* Override any gcc2 internal prototype to avoid an error.  */
8020 /* We use char because int might match the return type of a gcc2
8021     builtin and then its argument prototype would still apply.  */
8022 char lirc_init();
8023
8024 int main() {
8025 lirc_init()
8026 ; return 0; }
8027 EOF
8028 if { (eval echo configure:8029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8029   rm -rf conftest*
8030   eval "ac_cv_lib_$ac_lib_var=yes"
8031 else
8032   echo "configure: failed program was:" >&5
8033   cat conftest.$ac_ext >&5
8034   rm -rf conftest*
8035   eval "ac_cv_lib_$ac_lib_var=no"
8036 fi
8037 rm -f conftest*
8038 LIBS="$ac_save_LIBS"
8039
8040 fi
8041 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8042   echo "$ac_t""yes" 1>&6
8043   have_lirc="true"
8044 else
8045   echo "$ac_t""no" 1>&6
8046 have_lirc="false"
8047 fi
8048
8049 else
8050   echo "$ac_t""no" 1>&6
8051 have_lirc="false"
8052 fi
8053
8054   if test x$have_lirc = xtrue
8055   then
8056     PLUGINS="${PLUGINS} lirc"
8057     LIB_LIRC="${LIB_LIRC} -llirc_client"
8058   fi
8059 fi
8060
8061 # Check whether --enable-alsa or --disable-alsa was given.
8062 if test "${enable_alsa+set}" = set; then
8063   enableval="$enable_alsa"
8064   if test x$enable_alsa = xyes
8065    then
8066      ac_safe=`echo "alsa/asoundlib.h" | sed 'y%./+-%__p_%'`
8067 echo $ac_n "checking for alsa/asoundlib.h""... $ac_c" 1>&6
8068 echo "configure:8069: checking for alsa/asoundlib.h" >&5
8069 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8070   echo $ac_n "(cached) $ac_c" 1>&6
8071 else
8072   cat > conftest.$ac_ext <<EOF
8073 #line 8074 "configure"
8074 #include "confdefs.h"
8075 #include <alsa/asoundlib.h>
8076 EOF
8077 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8078 { (eval echo configure:8079: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8079 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8080 if test -z "$ac_err"; then
8081   rm -rf conftest*
8082   eval "ac_cv_header_$ac_safe=yes"
8083 else
8084   echo "$ac_err" >&5
8085   echo "configure: failed program was:" >&5
8086   cat conftest.$ac_ext >&5
8087   rm -rf conftest*
8088   eval "ac_cv_header_$ac_safe=no"
8089 fi
8090 rm -f conftest*
8091 fi
8092 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8093   echo "$ac_t""yes" 1>&6
8094   echo $ac_n "checking for main in -lasound""... $ac_c" 1>&6
8095 echo "configure:8096: checking for main in -lasound" >&5
8096 ac_lib_var=`echo asound'_'main | sed 'y%./+-%__p_%'`
8097 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8098   echo $ac_n "(cached) $ac_c" 1>&6
8099 else
8100   ac_save_LIBS="$LIBS"
8101 LIBS="-lasound  $LIBS"
8102 cat > conftest.$ac_ext <<EOF
8103 #line 8104 "configure"
8104 #include "confdefs.h"
8105
8106 int main() {
8107 main()
8108 ; return 0; }
8109 EOF
8110 if { (eval echo configure:8111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8111   rm -rf conftest*
8112   eval "ac_cv_lib_$ac_lib_var=yes"
8113 else
8114   echo "configure: failed program was:" >&5
8115   cat conftest.$ac_ext >&5
8116   rm -rf conftest*
8117   eval "ac_cv_lib_$ac_lib_var=no"
8118 fi
8119 rm -f conftest*
8120 LIBS="$ac_save_LIBS"
8121
8122 fi
8123 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8124   echo "$ac_t""yes" 1>&6
8125   have_alsa="true"
8126 else
8127   echo "$ac_t""no" 1>&6
8128 have_alsa="false"
8129 fi
8130
8131 else
8132   echo "$ac_t""no" 1>&6
8133 have_alsa="false"
8134 fi
8135
8136      if test x$have_alsa = xtrue
8137      then
8138        PLUGINS="${PLUGINS} alsa"
8139        LIB_ALSA="${LIB_ALSA} -lasound -lm -ldl"
8140      fi
8141    fi
8142 fi
8143
8144
8145 fi
8146
8147 # Check whether --enable-plugins or --disable-plugins was given.
8148 if test "${enable_plugins+set}" = set; then
8149   enableval="$enable_plugins"
8150   if test x$enable_plugins = xno
8151    then
8152      BUILTINS="${BUILTINS} ${PLUGINS}"
8153      PLUGINS=
8154    fi
8155 fi
8156
8157
8158 DLL_PATH=.
8159 # Check whether --with-dll-path or --without-dll-path was given.
8160 if test "${with_dll_path+set}" = set; then
8161   withval="$with_dll_path"
8162    if test "x$withval" != "xno"
8163     then
8164       DLL_PATH=$withval
8165     fi 
8166 fi
8167
8168
8169 cat >> confdefs.h <<EOF
8170 #define VERSION_MESSAGE "vlc $VLC_VERSION $VLC_CODENAME Copyright 1996-2001 VideoLAN\n"
8171 EOF
8172
8173 cat >> confdefs.h <<EOF
8174 #define COPYRIGHT_MESSAGE "VideoLAN Client - version $VLC_VERSION $VLC_CODENAME - (c) 1996-2002 VideoLAN"
8175 EOF
8176
8177
8178 VLC_SYMBOL="`echo ${VLC_VERSION} | tr .- __`"
8179 cat >> confdefs.h <<EOF
8180 #define MODULE_SUFFIX "__MODULE_$VLC_SYMBOL"
8181 EOF
8182
8183 cat >> confdefs.h <<EOF
8184 #define MODULE_SYMBOL $VLC_SYMBOL
8185 EOF
8186
8187
8188 DATA_PATH="${ac_tool_prefix}/share/videolan"
8189
8190 PLUGIN_PATH="${ac_tool_prefix}/share/videolan"
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
8231
8232
8233
8234
8235
8236
8237
8238
8239
8240
8241
8242
8243
8244
8245
8246
8247
8248
8249
8250
8251
8252
8253
8254
8255
8256
8257
8258
8259
8260
8261
8262
8263
8264
8265
8266
8267
8268
8269
8270
8271
8272
8273
8274
8275
8276
8277
8278
8279
8280
8281
8282
8283
8284
8285 trap '' 1 2 15
8286 cat > confcache <<\EOF
8287 # This file is a shell script that caches the results of configure
8288 # tests run on this system so they can be shared between configure
8289 # scripts and configure runs.  It is not useful on other systems.
8290 # If it contains results you don't want to keep, you may remove or edit it.
8291 #
8292 # By default, configure uses ./config.cache as the cache file,
8293 # creating it if it does not exist already.  You can give configure
8294 # the --cache-file=FILE option to use a different cache file; that is
8295 # what configure does when it calls configure scripts in
8296 # subdirectories, so they share the cache.
8297 # Giving --cache-file=/dev/null disables caching, for debugging configure.
8298 # config.status only pays attention to the cache file if you give it the
8299 # --recheck option to rerun configure.
8300 #
8301 EOF
8302 # The following way of writing the cache mishandles newlines in values,
8303 # but we know of no workaround that is simple, portable, and efficient.
8304 # So, don't put newlines in cache variables' values.
8305 # Ultrix sh set writes to stderr and can't be redirected directly,
8306 # and sets the high bit in the cache file unless we assign to the vars.
8307 (set) 2>&1 |
8308   case `(ac_space=' '; set | grep ac_space) 2>&1` in
8309   *ac_space=\ *)
8310     # `set' does not quote correctly, so add quotes (double-quote substitution
8311     # turns \\\\ into \\, and sed turns \\ into \).
8312     sed -n \
8313       -e "s/'/'\\\\''/g" \
8314       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
8315     ;;
8316   *)
8317     # `set' quotes correctly as required by POSIX, so do not add quotes.
8318     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
8319     ;;
8320   esac >> confcache
8321 if cmp -s $cache_file confcache; then
8322   :
8323 else
8324   if test -w $cache_file; then
8325     echo "updating cache $cache_file"
8326     cat confcache > $cache_file
8327   else
8328     echo "not updating unwritable cache $cache_file"
8329   fi
8330 fi
8331 rm -f confcache
8332
8333 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
8334
8335 test "x$prefix" = xNONE && prefix=$ac_default_prefix
8336 # Let make expand exec_prefix.
8337 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
8338
8339 # Any assignment to VPATH causes Sun make to only execute
8340 # the first set of double-colon rules, so remove it if not needed.
8341 # If there is a colon in the path, we need to keep it.
8342 if test "x$srcdir" = x.; then
8343   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
8344 fi
8345
8346 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
8347
8348 DEFS=-DHAVE_CONFIG_H
8349
8350 # Without the "./", some shells look in PATH for config.status.
8351 : ${CONFIG_STATUS=./config.status}
8352
8353 echo creating $CONFIG_STATUS
8354 rm -f $CONFIG_STATUS
8355 cat > $CONFIG_STATUS <<EOF
8356 #! /bin/sh
8357 # Generated automatically by configure.
8358 # Run this file to recreate the current configuration.
8359 # This directory was configured as follows,
8360 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
8361 #
8362 # $0 $ac_configure_args
8363 #
8364 # Compiler output produced by configure, useful for debugging
8365 # configure, is in ./config.log if it exists.
8366
8367 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
8368 for ac_option
8369 do
8370   case "\$ac_option" in
8371   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
8372     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
8373     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
8374   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
8375     echo "$CONFIG_STATUS generated by autoconf version 2.13"
8376     exit 0 ;;
8377   -help | --help | --hel | --he | --h)
8378     echo "\$ac_cs_usage"; exit 0 ;;
8379   *) echo "\$ac_cs_usage"; exit 1 ;;
8380   esac
8381 done
8382
8383 ac_given_srcdir=$srcdir
8384 ac_given_INSTALL="$INSTALL"
8385
8386 trap 'rm -fr `echo "Makefile.opts po/Makefile.in include/defs.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
8387 EOF
8388 cat >> $CONFIG_STATUS <<EOF
8389
8390 # Protect against being on the right side of a sed subst in config.status.
8391 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
8392  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
8393 $ac_vpsub
8394 $extrasub
8395 s%@SHELL@%$SHELL%g
8396 s%@CFLAGS@%$CFLAGS%g
8397 s%@CPPFLAGS@%$CPPFLAGS%g
8398 s%@CXXFLAGS@%$CXXFLAGS%g
8399 s%@FFLAGS@%$FFLAGS%g
8400 s%@DEFS@%$DEFS%g
8401 s%@LDFLAGS@%$LDFLAGS%g
8402 s%@LIBS@%$LIBS%g
8403 s%@exec_prefix@%$exec_prefix%g
8404 s%@prefix@%$prefix%g
8405 s%@program_transform_name@%$program_transform_name%g
8406 s%@bindir@%$bindir%g
8407 s%@sbindir@%$sbindir%g
8408 s%@libexecdir@%$libexecdir%g
8409 s%@datadir@%$datadir%g
8410 s%@sysconfdir@%$sysconfdir%g
8411 s%@sharedstatedir@%$sharedstatedir%g
8412 s%@localstatedir@%$localstatedir%g
8413 s%@libdir@%$libdir%g
8414 s%@includedir@%$includedir%g
8415 s%@oldincludedir@%$oldincludedir%g
8416 s%@infodir@%$infodir%g
8417 s%@mandir@%$mandir%g
8418 s%@host@%$host%g
8419 s%@host_alias@%$host_alias%g
8420 s%@host_cpu@%$host_cpu%g
8421 s%@host_vendor@%$host_vendor%g
8422 s%@host_os@%$host_os%g
8423 s%@target@%$target%g
8424 s%@target_alias@%$target_alias%g
8425 s%@target_cpu@%$target_cpu%g
8426 s%@target_vendor@%$target_vendor%g
8427 s%@target_os@%$target_os%g
8428 s%@build@%$build%g
8429 s%@build_alias@%$build_alias%g
8430 s%@build_cpu@%$build_cpu%g
8431 s%@build_vendor@%$build_vendor%g
8432 s%@build_os@%$build_os%g
8433 s%@LIBDVDCSS_VERSION@%$LIBDVDCSS_VERSION%g
8434 s%@SET_MAKE@%$SET_MAKE%g
8435 s%@CC@%$CC%g
8436 s%@CPP@%$CPP%g
8437 s%@RANLIB@%$RANLIB%g
8438 s%@ALLOCA@%$ALLOCA%g
8439 s%@GLIBC21@%$GLIBC21%g
8440 s%@LIBICONV@%$LIBICONV%g
8441 s%@USE_NLS@%$USE_NLS%g
8442 s%@MSGFMT@%$MSGFMT%g
8443 s%@GMSGFMT@%$GMSGFMT%g
8444 s%@XGETTEXT@%$XGETTEXT%g
8445 s%@INTLBISON@%$INTLBISON%g
8446 s%@BUILD_INCLUDED_LIBINTL@%$BUILD_INCLUDED_LIBINTL%g
8447 s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
8448 s%@CATALOGS@%$CATALOGS%g
8449 s%@CATOBJEXT@%$CATOBJEXT%g
8450 s%@GMOFILES@%$GMOFILES%g
8451 s%@INTLLIBS@%$INTLLIBS%g
8452 s%@INTLOBJS@%$INTLOBJS%g
8453 s%@POFILES@%$POFILES%g
8454 s%@POSUB@%$POSUB%g
8455 s%@DATADIRNAME@%$DATADIRNAME%g
8456 s%@INSTOBJEXT@%$INSTOBJEXT%g
8457 s%@GENCAT@%$GENCAT%g
8458 s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
8459 s%@INTL_LIBTOOL_SUFFIX_PREFIX@%$INTL_LIBTOOL_SUFFIX_PREFIX%g
8460 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
8461 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
8462 s%@INSTALL_DATA@%$INSTALL_DATA%g
8463 s%@WINDRES@%$WINDRES%g
8464 s%@ESD_CONFIG@%$ESD_CONFIG%g
8465 s%@ARTS_CONFIG@%$ARTS_CONFIG%g
8466 s%@SDL12_CONFIG@%$SDL12_CONFIG%g
8467 s%@SDL11_CONFIG@%$SDL11_CONFIG%g
8468 s%@SDL_CONFIG@%$SDL_CONFIG%g
8469 s%@GNOME_CONFIG@%$GNOME_CONFIG%g
8470 s%@GTK12_CONFIG@%$GTK12_CONFIG%g
8471 s%@GTK_CONFIG@%$GTK_CONFIG%g
8472 s%@DATA_PATH@%$DATA_PATH%g
8473 s%@PLUGIN_PATH@%$PLUGIN_PATH%g
8474 s%@SYS@%$SYS%g
8475 s%@ARCH@%$ARCH%g
8476 s%@PLUGINS@%$PLUGINS%g
8477 s%@BUILTINS@%$BUILTINS%g
8478 s%@ALIASES@%$ALIASES%g
8479 s%@INCLUDE@%$INCLUDE%g
8480 s%@DEBUG@%$DEBUG%g
8481 s%@ASM@%$ASM%g
8482 s%@CPROF@%$CPROF%g
8483 s%@GPROF@%$GPROF%g
8484 s%@OPTIMS@%$OPTIMS%g
8485 s%@TUNING@%$TUNING%g
8486 s%@RELEASE@%$RELEASE%g
8487 s%@MOC@%$MOC%g
8488 s%@DLL_PATH@%$DLL_PATH%g
8489 s%@PACKAGE@%$PACKAGE%g
8490 s%@VERSION@%$VERSION%g
8491 s%@VCD_DEVICE@%$VCD_DEVICE%g
8492 s%@DVD_DEVICE@%$DVD_DEVICE%g
8493 s%@PLDFLAGS@%$PLDFLAGS%g
8494 s%@SOFLAGS@%$SOFLAGS%g
8495 s%@LIB@%$LIB%g
8496 s%@LIB_ALSA@%$LIB_ALSA%g
8497 s%@LIB_ARTS@%$LIB_ARTS%g
8498 s%@LIB_BEOS@%$LIB_BEOS%g
8499 s%@LIB_DARWIN@%$LIB_DARWIN%g
8500 s%@LIB_DIRECTX@%$LIB_DIRECTX%g
8501 s%@LIB_DSP@%$LIB_DSP%g
8502 s%@LIB_DVD@%$LIB_DVD%g
8503 s%@LIB_DVDREAD@%$LIB_DVDREAD%g
8504 s%@LIB_ESD@%$LIB_ESD%g
8505 s%@LIB_FILTER_DISTORT@%$LIB_FILTER_DISTORT%g
8506 s%@LIB_GGI@%$LIB_GGI%g
8507 s%@LIB_GLIDE@%$LIB_GLIDE%g
8508 s%@LIB_GNOME@%$LIB_GNOME%g
8509 s%@LIB_GTK@%$LIB_GTK%g
8510 s%@LIB_IDCTALTIVEC@%$LIB_IDCTALTIVEC%g
8511 s%@LIB_IMDCT@%$LIB_IMDCT%g
8512 s%@LIB_IMDCT3DN@%$LIB_IMDCT3DN%g
8513 s%@LIB_IMDCTSSE@%$LIB_IMDCTSSE%g
8514 s%@LIB_KDE@%$LIB_KDE%g
8515 s%@LIB_A52@%$LIB_A52%g
8516 s%@LIB_LIBDVDCSS@%$LIB_LIBDVDCSS%g
8517 s%@LIB_LIBDVDREAD@%$LIB_LIBDVDREAD%g
8518 s%@LIB_LIRC@%$LIB_LIRC%g
8519 s%@LIB_MACOSX@%$LIB_MACOSX%g
8520 s%@LIB_MAD@%$LIB_MAD%g
8521 s%@LIB_MOTIONALTIVEC@%$LIB_MOTIONALTIVEC%g
8522 s%@LIB_MPEG_TS@%$LIB_MPEG_TS%g
8523 s%@LIB_NCURSES@%$LIB_NCURSES%g
8524 s%@LIB_QNX@%$LIB_QNX%g
8525 s%@LIB_QT@%$LIB_QT%g
8526 s%@LIB_RC@%$LIB_RC%g
8527 s%@LIB_SDL@%$LIB_SDL%g
8528 s%@LIB_VCD@%$LIB_VCD%g
8529 s%@LIB_WAVEOUT@%$LIB_WAVEOUT%g
8530 s%@LIB_WIN32@%$LIB_WIN32%g
8531 s%@LIB_X11@%$LIB_X11%g
8532 s%@LIB_XVIDEO@%$LIB_XVIDEO%g
8533 s%@CFLAGS_VLC@%$CFLAGS_VLC%g
8534 s%@CFLAGS_ARTS@%$CFLAGS_ARTS%g
8535 s%@CFLAGS_DVD@%$CFLAGS_DVD%g
8536 s%@CFLAGS_DVDREAD@%$CFLAGS_DVDREAD%g
8537 s%@CFLAGS_ESD@%$CFLAGS_ESD%g
8538 s%@CFLAGS_GLIDE@%$CFLAGS_GLIDE%g
8539 s%@CFLAGS_GNOME@%$CFLAGS_GNOME%g
8540 s%@CFLAGS_GTK@%$CFLAGS_GTK%g
8541 s%@CFLAGS_KDE@%$CFLAGS_KDE%g
8542 s%@CFLAGS_IDCTALTIVEC@%$CFLAGS_IDCTALTIVEC%g
8543 s%@CFLAGS_LIBDVDCSS@%$CFLAGS_LIBDVDCSS%g
8544 s%@CFLAGS_MACOSX@%$CFLAGS_MACOSX%g
8545 s%@CFLAGS_MAD@%$CFLAGS_MAD%g
8546 s%@CFLAGS_MOTIONALTIVEC@%$CFLAGS_MOTIONALTIVEC%g
8547 s%@CFLAGS_OPTIM@%$CFLAGS_OPTIM%g
8548 s%@CFLAGS_OPTIM_NODEBUG@%$CFLAGS_OPTIM_NODEBUG%g
8549 s%@CFLAGS_QT@%$CFLAGS_QT%g
8550 s%@CFLAGS_SDL@%$CFLAGS_SDL%g
8551 s%@CFLAGS_WIN32@%$CFLAGS_WIN32%g
8552 s%@CFLAGS_X11@%$CFLAGS_X11%g
8553 s%@CFLAGS_XVIDEO@%$CFLAGS_XVIDEO%g
8554 s%@SRC_DVD_EXTRA@%$SRC_DVD_EXTRA%g
8555 s%@SRC_DVDCSS_EXTRA@%$SRC_DVDCSS_EXTRA%g
8556 s%@NEED_GETOPT@%$NEED_GETOPT%g
8557 s%@NEED_LIBDVDCSS@%$NEED_LIBDVDCSS%g
8558
8559 CEOF
8560 EOF
8561
8562 cat >> $CONFIG_STATUS <<\EOF
8563
8564 # Split the substitutions into bite-sized pieces for seds with
8565 # small command number limits, like on Digital OSF/1 and HP-UX.
8566 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
8567 ac_file=1 # Number of current file.
8568 ac_beg=1 # First line for current file.
8569 ac_end=$ac_max_sed_cmds # Line after last line for current file.
8570 ac_more_lines=:
8571 ac_sed_cmds=""
8572 while $ac_more_lines; do
8573   if test $ac_beg -gt 1; then
8574     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
8575   else
8576     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
8577   fi
8578   if test ! -s conftest.s$ac_file; then
8579     ac_more_lines=false
8580     rm -f conftest.s$ac_file
8581   else
8582     if test -z "$ac_sed_cmds"; then
8583       ac_sed_cmds="sed -f conftest.s$ac_file"
8584     else
8585       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
8586     fi
8587     ac_file=`expr $ac_file + 1`
8588     ac_beg=$ac_end
8589     ac_end=`expr $ac_end + $ac_max_sed_cmds`
8590   fi
8591 done
8592 if test -z "$ac_sed_cmds"; then
8593   ac_sed_cmds=cat
8594 fi
8595 EOF
8596
8597 cat >> $CONFIG_STATUS <<EOF
8598
8599 CONFIG_FILES=\${CONFIG_FILES-"Makefile.opts po/Makefile.in"}
8600 EOF
8601 cat >> $CONFIG_STATUS <<\EOF
8602 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
8603   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
8604   case "$ac_file" in
8605   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
8606        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
8607   *) ac_file_in="${ac_file}.in" ;;
8608   esac
8609
8610   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
8611
8612   # Remove last slash and all that follows it.  Not all systems have dirname.
8613   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
8614   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
8615     # The file is in a subdirectory.
8616     test ! -d "$ac_dir" && mkdir "$ac_dir"
8617     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
8618     # A "../" for each directory in $ac_dir_suffix.
8619     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
8620   else
8621     ac_dir_suffix= ac_dots=
8622   fi
8623
8624   case "$ac_given_srcdir" in
8625   .)  srcdir=.
8626       if test -z "$ac_dots"; then top_srcdir=.
8627       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
8628   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
8629   *) # Relative path.
8630     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
8631     top_srcdir="$ac_dots$ac_given_srcdir" ;;
8632   esac
8633
8634   case "$ac_given_INSTALL" in
8635   [/$]*) INSTALL="$ac_given_INSTALL" ;;
8636   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
8637   esac
8638
8639   echo creating "$ac_file"
8640   rm -f "$ac_file"
8641   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
8642   case "$ac_file" in
8643   *Makefile*) ac_comsub="1i\\
8644 # $configure_input" ;;
8645   *) ac_comsub= ;;
8646   esac
8647
8648   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
8649   sed -e "$ac_comsub
8650 s%@configure_input@%$configure_input%g
8651 s%@srcdir@%$srcdir%g
8652 s%@top_srcdir@%$top_srcdir%g
8653 s%@INSTALL@%$INSTALL%g
8654 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
8655 fi; done
8656 rm -f conftest.s*
8657
8658 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
8659 # NAME is the cpp macro being defined and VALUE is the value it is being given.
8660 #
8661 # ac_d sets the value in "#define NAME VALUE" lines.
8662 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
8663 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
8664 ac_dC='\3'
8665 ac_dD='%g'
8666 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
8667 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
8668 ac_uB='\([      ]\)%\1#\2define\3'
8669 ac_uC=' '
8670 ac_uD='\4%g'
8671 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
8672 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
8673 ac_eB='$%\1#\2define\3'
8674 ac_eC=' '
8675 ac_eD='%g'
8676
8677 if test "${CONFIG_HEADERS+set}" != set; then
8678 EOF
8679 cat >> $CONFIG_STATUS <<EOF
8680   CONFIG_HEADERS="include/defs.h"
8681 EOF
8682 cat >> $CONFIG_STATUS <<\EOF
8683 fi
8684 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
8685   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
8686   case "$ac_file" in
8687   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
8688        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
8689   *) ac_file_in="${ac_file}.in" ;;
8690   esac
8691
8692   echo creating $ac_file
8693
8694   rm -f conftest.frag conftest.in conftest.out
8695   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
8696   cat $ac_file_inputs > conftest.in
8697
8698 EOF
8699
8700 # Transform confdefs.h into a sed script conftest.vals that substitutes
8701 # the proper values into config.h.in to produce config.h.  And first:
8702 # Protect against being on the right side of a sed subst in config.status.
8703 # Protect against being in an unquoted here document in config.status.
8704 rm -f conftest.vals
8705 cat > conftest.hdr <<\EOF
8706 s/[\\&%]/\\&/g
8707 s%[\\$`]%\\&%g
8708 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
8709 s%ac_d%ac_u%gp
8710 s%ac_u%ac_e%gp
8711 EOF
8712 sed -n -f conftest.hdr confdefs.h > conftest.vals
8713 rm -f conftest.hdr
8714
8715 # This sed command replaces #undef with comments.  This is necessary, for
8716 # example, in the case of _POSIX_SOURCE, which is predefined and required
8717 # on some systems where configure will not decide to define it.
8718 cat >> conftest.vals <<\EOF
8719 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
8720 EOF
8721
8722 # Break up conftest.vals because some shells have a limit on
8723 # the size of here documents, and old seds have small limits too.
8724
8725 rm -f conftest.tail
8726 while :
8727 do
8728   ac_lines=`grep -c . conftest.vals`
8729   # grep -c gives empty output for an empty file on some AIX systems.
8730   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
8731   # Write a limited-size here document to conftest.frag.
8732   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
8733   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
8734   echo 'CEOF
8735   sed -f conftest.frag conftest.in > conftest.out
8736   rm -f conftest.in
8737   mv conftest.out conftest.in
8738 ' >> $CONFIG_STATUS
8739   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
8740   rm -f conftest.vals
8741   mv conftest.tail conftest.vals
8742 done
8743 rm -f conftest.vals
8744
8745 cat >> $CONFIG_STATUS <<\EOF
8746   rm -f conftest.frag conftest.h
8747   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
8748   cat conftest.in >> conftest.h
8749   rm -f conftest.in
8750   if cmp -s $ac_file conftest.h 2>/dev/null; then
8751     echo "$ac_file is unchanged"
8752     rm -f conftest.h
8753   else
8754     # Remove last slash and all that follows it.  Not all systems have dirname.
8755       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
8756       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
8757       # The file is in a subdirectory.
8758       test ! -d "$ac_dir" && mkdir "$ac_dir"
8759     fi
8760     rm -f $ac_file
8761     mv conftest.h $ac_file
8762   fi
8763 fi; done
8764
8765 EOF
8766 cat >> $CONFIG_STATUS <<EOF
8767
8768
8769 EOF
8770 cat >> $CONFIG_STATUS <<\EOF
8771 for ac_file in $CONFIG_FILES; do
8772         # Support "outfile[:infile[:infile...]]"
8773         case "$ac_file" in
8774           *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
8775         esac
8776         # PO directories have a Makefile.in generated from Makefile.in.in.
8777         case "$ac_file" in */Makefile.in)
8778           # Adjust a relative srcdir.
8779           ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
8780           ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
8781           ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
8782           # In autoconf-2.13 it is called $ac_given_srcdir.
8783           # In autoconf-2.50 it is called $srcdir.
8784           test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
8785           case "$ac_given_srcdir" in
8786             .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
8787             /*) top_srcdir="$ac_given_srcdir" ;;
8788             *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
8789           esac
8790           if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
8791             rm -f "$ac_dir/POTFILES"
8792             test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
8793             sed -e "/^#/d" -e "/^[      ]*\$/d" -e "s,.*,     $top_srcdir/& \\\\," -e "\$s/\(.*\) \\\\/\1/" < "$ac_given_srcdir/$ac_dir/POTFILES.in" > "$ac_dir/POTFILES"
8794             test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
8795             sed -e "/POTFILES =/r $ac_dir/POTFILES" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
8796           fi
8797           ;;
8798         esac
8799       done
8800
8801 exit 0
8802 EOF
8803 chmod +x $CONFIG_STATUS
8804 rm -fr confdefs* $ac_clean_files
8805 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
8806
8807
8808 echo "
8809 global configuration
8810 --------------------
8811 system                : ${SYS}
8812 architecture          : ${ARCH}
8813 optimizations         : ${OPTIMS}
8814 tuning:               : ${TUNING}
8815 release:              : ${RELEASE}"
8816
8817 if test x${HAVE_VLC} = x1
8818 then
8819   echo "
8820 vlc configuration
8821 -----------------
8822 vlc version           : ${VLC_VERSION}
8823 debug mode            : ${DEBUG}
8824 cprof/gprof support   : ${CPROF}/${GPROF}
8825 need builtin getopt   : ${NEED_GETOPT}
8826 built-in modules      :${BUILTINS}
8827 plug-in modules       :${PLUGINS}
8828 vlc aliases           :${ALIASES}"
8829 fi
8830
8831 echo "
8832 libdvdcss configuration
8833 -----------------------
8834 can be built          : ${CAN_BUILD_LIBDVDCSS}
8835 will be built         : ${NEED_LIBDVDCSS}"
8836 if test x${NEED_LIBDVDCSS} = x1
8837 then
8838   echo "need BSDI libdvd      : ${NEED_BSDI_LIBDVD}"
8839   echo "link statically       : ${STATIC_LIBDVDCSS}"
8840 else
8841   echo "use dummy replacement : ${DUMMY_LIBDVDCSS}"
8842 fi
8843
8844 echo "
8845 You may now tune Makefile.opts at your convenience, for instance to choose
8846 which modules get compiled as plugins.
8847 "
8848 if test x${HAVE_VLC} = x1
8849 then
8850   echo "To build vlc and its plugins, type \`make'."
8851 fi
8852 if test x${NEED_LIBDVDCSS} = x1
8853 then
8854   echo "To build libdvdcss only, type \`make libdvdcss'."
8855 fi
8856 echo ""
8857