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