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