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