]> git.sesse.net Git - vlc/blob - configure
038571baf7c8296711abccc04bd930db26741803
[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 SSE_MODULES="imdctsse downmixsse"
5656 ALTIVEC_MODULES="idctaltivec motionaltivec memcpyaltivec"
5657
5658 echo $ac_n "checking if \$CC groks MMX inline assembly""... $ac_c" 1>&6
5659 echo "configure:5660: checking if \$CC groks MMX inline assembly" >&5
5660 if eval "test \"`echo '$''{'ac_cv_mmx_inline'+set}'`\" = set"; then
5661   echo $ac_n "(cached) $ac_c" 1>&6
5662 else
5663   cat > conftest.$ac_ext <<EOF
5664 #line 5665 "configure"
5665 #include "confdefs.h"
5666
5667 int main() {
5668 void *p;asm volatile("packuswb %%mm1,%%mm2"::"r"(p));
5669 ; return 0; }
5670 EOF
5671 if { (eval echo configure:5672: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5672   rm -rf conftest*
5673   ac_cv_mmx_inline=yes
5674 else
5675   echo "configure: failed program was:" >&5
5676   cat conftest.$ac_ext >&5
5677   rm -rf conftest*
5678   ac_cv_mmx_inline=no
5679 fi
5680 rm -f conftest*
5681 fi
5682
5683 echo "$ac_t""$ac_cv_mmx_inline" 1>&6
5684 if test x"$ac_cv_mmx_inline" != x"no"; then
5685   ACCEL_MODULES="${ACCEL_MODULES} ${MMX_MODULES}"
5686 fi
5687
5688 echo $ac_n "checking if \$CC groks MMX EXT inline assembly""... $ac_c" 1>&6
5689 echo "configure:5690: checking if \$CC groks MMX EXT inline assembly" >&5
5690 if eval "test \"`echo '$''{'ac_cv_mmxext_inline'+set}'`\" = set"; then
5691   echo $ac_n "(cached) $ac_c" 1>&6
5692 else
5693   cat > conftest.$ac_ext <<EOF
5694 #line 5695 "configure"
5695 #include "confdefs.h"
5696
5697 int main() {
5698 void *p;asm volatile("maskmovq %%mm1,%%mm2"::"r"(p));
5699 ; return 0; }
5700 EOF
5701 if { (eval echo configure:5702: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5702   rm -rf conftest*
5703   ac_cv_mmxext_inline=yes
5704 else
5705   echo "configure: failed program was:" >&5
5706   cat conftest.$ac_ext >&5
5707   rm -rf conftest*
5708   ac_cv_mmxext_inline=no
5709 fi
5710 rm -f conftest*
5711 fi
5712
5713 echo "$ac_t""$ac_cv_mmxext_inline" 1>&6
5714 if test x"$ac_cv_mmxext_inline" != x"no"; then
5715   ACCEL_MODULES="${ACCEL_MODULES} ${MMXEXT_MODULES}"
5716 fi
5717
5718 echo $ac_n "checking if \$CC groks 3D Now! inline assembly""... $ac_c" 1>&6
5719 echo "configure:5720: checking if \$CC groks 3D Now! inline assembly" >&5
5720 if eval "test \"`echo '$''{'ac_cv_3dnow_inline'+set}'`\" = set"; then
5721   echo $ac_n "(cached) $ac_c" 1>&6
5722 else
5723   cat > conftest.$ac_ext <<EOF
5724 #line 5725 "configure"
5725 #include "confdefs.h"
5726
5727 int main() {
5728 void *p;asm volatile("pfadd %%mm1,%%mm2"::"r"(p));
5729 ; return 0; }
5730 EOF
5731 if { (eval echo configure:5732: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5732   rm -rf conftest*
5733   ac_cv_3dnow_inline=yes
5734 else
5735   echo "configure: failed program was:" >&5
5736   cat conftest.$ac_ext >&5
5737   rm -rf conftest*
5738   ac_cv_3dnow_inline=no
5739 fi
5740 rm -f conftest*
5741 fi
5742
5743 echo "$ac_t""$ac_cv_3dnow_inline" 1>&6
5744 if test x"$ac_cv_3dnow_inline" != x"no"; then
5745   cat >> confdefs.h <<\EOF
5746 #define CAN_COMPILE_3DNOW 1
5747 EOF
5748
5749   ACCEL_MODULES="${ACCEL_MODULES} ${THREEDNOW_MODULES}"
5750 fi
5751
5752 echo $ac_n "checking if \$CC groks SSE inline assembly""... $ac_c" 1>&6
5753 echo "configure:5754: checking if \$CC groks SSE inline assembly" >&5
5754 if eval "test \"`echo '$''{'ac_cv_sse_inline'+set}'`\" = set"; then
5755   echo $ac_n "(cached) $ac_c" 1>&6
5756 else
5757   cat > conftest.$ac_ext <<EOF
5758 #line 5759 "configure"
5759 #include "confdefs.h"
5760
5761 int main() {
5762 void *p;asm volatile("xorps %%xmm1,%%xmm2"::"r"(p));
5763 ; return 0; }
5764 EOF
5765 if { (eval echo configure:5766: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5766   rm -rf conftest*
5767   ac_cv_sse_inline=yes
5768 else
5769   echo "configure: failed program was:" >&5
5770   cat conftest.$ac_ext >&5
5771   rm -rf conftest*
5772   ac_cv_sse_inline=no
5773 fi
5774 rm -f conftest*
5775 fi
5776
5777 echo "$ac_t""$ac_cv_sse_inline" 1>&6
5778 if test x"$ac_cv_sse_inline" != x"no"; then
5779   cat >> confdefs.h <<\EOF
5780 #define CAN_COMPILE_SSE 1
5781 EOF
5782
5783   ACCEL_MODULES="${ACCEL_MODULES} ${SSE_MODULES}"
5784 fi
5785
5786 # don't try to grok altivec with native mingw32 it doesn't work right now
5787 # we should be able to remove this test with future versions of mingw32
5788 if test x$SYS != xmingw32; then
5789 echo $ac_n "checking if \$CC groks Altivec inline assembly""... $ac_c" 1>&6
5790 echo "configure:5791: checking if \$CC groks Altivec inline assembly" >&5
5791 if eval "test \"`echo '$''{'ac_cv_altivec_inline'+set}'`\" = set"; then
5792   echo $ac_n "(cached) $ac_c" 1>&6
5793 else
5794   cat > conftest.$ac_ext <<EOF
5795 #line 5796 "configure"
5796 #include "confdefs.h"
5797
5798 int main() {
5799 asm volatile("vperm 0,1,2,3");
5800 ; return 0; }
5801 EOF
5802 if { (eval echo configure:5803: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5803   rm -rf conftest*
5804   ac_cv_altivec_inline=yes
5805 else
5806   echo "configure: failed program was:" >&5
5807   cat conftest.$ac_ext >&5
5808   rm -rf conftest*
5809   save_CFLAGS=$CFLAGS
5810           CFLAGS="$CFLAGS -Wa,-m7400"
5811           cat > conftest.$ac_ext <<EOF
5812 #line 5813 "configure"
5813 #include "confdefs.h"
5814
5815 int main() {
5816 asm volatile("vperm 0,1,2,3");
5817 ; return 0; }
5818 EOF
5819 if { (eval echo configure:5820: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5820   rm -rf conftest*
5821   ac_cv_altivec_inline="-Wa,-m7400"
5822 else
5823   echo "configure: failed program was:" >&5
5824   cat conftest.$ac_ext >&5
5825   rm -rf conftest*
5826   ac_cv_altivec_inline=no
5827 fi
5828 rm -f conftest*
5829           CFLAGS=$save_CFLAGS
5830          
5831 fi
5832 rm -f conftest*
5833 fi
5834
5835 echo "$ac_t""$ac_cv_altivec_inline" 1>&6
5836 if test x"$ac_cv_altivec_inline" != x"no"; then
5837   cat >> confdefs.h <<\EOF
5838 #define CAN_COMPILE_ALTIVEC 1
5839 EOF
5840
5841   if test x"$ac_cv_altivec_inline" != x"yes"; then
5842     CFLAGS_IDCTALTIVEC="$CFLAGS_IDCTALTIVEC $ac_cv_altivec_inline"
5843     CFLAGS_MOTIONALTIVEC="$CFLAGS_MOTIONALTIVEC $ac_cv_altivec_inline"
5844     CFLAGS_VLC="$CFLAGS_VLC $ac_cv_altivec_inline"
5845   fi
5846   ACCEL_MODULES="${ACCEL_MODULES} ${ALTIVEC_MODULES}"
5847 fi
5848
5849 echo $ac_n "checking if \$CC groks Altivec C extensions""... $ac_c" 1>&6
5850 echo "configure:5851: checking if \$CC groks Altivec C extensions" >&5
5851 if eval "test \"`echo '$''{'ac_cv_c_altivec'+set}'`\" = set"; then
5852   echo $ac_n "(cached) $ac_c" 1>&6
5853 else
5854   save_CFLAGS=$CFLAGS
5855      CFLAGS="$CFLAGS -faltivec"
5856      # Darwin test
5857      cat > conftest.$ac_ext <<EOF
5858 #line 5859 "configure"
5859 #include "confdefs.h"
5860
5861 int main() {
5862 vec_mtvscr((vector unsigned int)(0));
5863 ; return 0; }
5864 EOF
5865 if { (eval echo configure:5866: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5866   rm -rf conftest*
5867   ac_cv_c_altivec=-faltivec
5868 else
5869   echo "configure: failed program was:" >&5
5870   cat conftest.$ac_ext >&5
5871   rm -rf conftest*
5872   
5873         # Linux/PPC test
5874         CFLAGS="$save_CFLAGS $CFLAGS_IDCTALTIVEC -fvec"
5875         cat > conftest.$ac_ext <<EOF
5876 #line 5877 "configure"
5877 #include "confdefs.h"
5878
5879 int main() {
5880 vec_mtvscr((vector unsigned int)(0));
5881 ; return 0; }
5882 EOF
5883 if { (eval echo configure:5884: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5884   rm -rf conftest*
5885   ac_cv_c_altivec="-fvec"
5886 else
5887   echo "configure: failed program was:" >&5
5888   cat conftest.$ac_ext >&5
5889   rm -rf conftest*
5890   ac_cv_c_altivec=no
5891 fi
5892 rm -f conftest*
5893         
5894 fi
5895 rm -f conftest*
5896      CFLAGS=$save_CFLAGS
5897     
5898 fi
5899
5900 echo "$ac_t""$ac_cv_c_altivec" 1>&6
5901 if test x"$ac_cv_c_altivec" != x"no"; then
5902   cat >> confdefs.h <<\EOF
5903 #define CAN_COMPILE_C_ALTIVEC 1
5904 EOF
5905
5906   CFLAGS_IDCTALTIVEC="$CFLAGS_IDCTALTIVEC $ac_cv_c_altivec"
5907   CFLAGS_MOTIONALTIVEC="$CFLAGS_MOTIONALTIVEC $ac_cv_c_altivec"
5908   CFLAGS_VLC="$CFLAGS_VLC $ac_cv_c_altivec"
5909   ACCEL_MODULES="${ACCEL_MODULES} ${ALTIVEC_MODULES}"
5910 fi
5911
5912 echo $ac_n "checking if linker needs -framework vecLib""... $ac_c" 1>&6
5913 echo "configure:5914: checking if linker needs -framework vecLib" >&5
5914 if eval "test \"`echo '$''{'ac_cv_ld_altivec'+set}'`\" = set"; then
5915   echo $ac_n "(cached) $ac_c" 1>&6
5916 else
5917   save_LDFLAGS=$LDFLAGS
5918      LDFLAGS="$LDFLAGS -framework vecLib"
5919      cat > conftest.$ac_ext <<EOF
5920 #line 5921 "configure"
5921 #include "confdefs.h"
5922
5923 int main() {
5924
5925 ; return 0; }
5926 EOF
5927 if { (eval echo configure:5928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5928   rm -rf conftest*
5929   ac_cv_ld_altivec=yes
5930 else
5931   echo "configure: failed program was:" >&5
5932   cat conftest.$ac_ext >&5
5933   rm -rf conftest*
5934   ac_cv_ld_altivec=no
5935 fi
5936 rm -f conftest*
5937      LDFLAGS=$save_LDFLAGS
5938     
5939 fi
5940
5941 echo "$ac_t""$ac_cv_ld_altivec" 1>&6
5942 if test x"$ac_cv_ld_altivec" != x"no"; then
5943   LIB_IDCTALTIVEC="${LIB_IDCTALTIVEC} -framework vecLib"
5944   LIB_MOTIONALTIVEC="${LIB_MOTIONALTIVEC} -framework vecLib"
5945   LIB_VLC="${LIB_VLC} -framework vecLib"
5946 fi
5947 fi # end if mingw32
5948
5949 case x$SYS in
5950   xmingw32)
5951     DVD_DEVICE="E:"
5952     VCD_DEVICE="E:"
5953     ;;
5954   *)
5955     DVD_DEVICE="/dev/dvd"
5956     VCD_DEVICE="/dev/cdrom"
5957     ;;
5958 esac
5959
5960 cat >> confdefs.h <<EOF
5961 #define DVD_DEVICE "$DVD_DEVICE"
5962 EOF
5963
5964 cat >> confdefs.h <<EOF
5965 #define VCD_DEVICE "$VCD_DEVICE"
5966 EOF
5967
5968
5969
5970
5971 CAN_BUILD_LIBDVDCSS=0
5972
5973 for ac_hdr in winioctl.h
5974 do
5975 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5976 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5977 echo "configure:5978: checking for $ac_hdr" >&5
5978 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5979   echo $ac_n "(cached) $ac_c" 1>&6
5980 else
5981   cat > conftest.$ac_ext <<EOF
5982 #line 5983 "configure"
5983 #include "confdefs.h"
5984 #include <$ac_hdr>
5985 EOF
5986 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5987 { (eval echo configure:5988: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5988 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5989 if test -z "$ac_err"; then
5990   rm -rf conftest*
5991   eval "ac_cv_header_$ac_safe=yes"
5992 else
5993   echo "$ac_err" >&5
5994   echo "configure: failed program was:" >&5
5995   cat conftest.$ac_ext >&5
5996   rm -rf conftest*
5997   eval "ac_cv_header_$ac_safe=no"
5998 fi
5999 rm -f conftest*
6000 fi
6001 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6002   echo "$ac_t""yes" 1>&6
6003     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6004   cat >> confdefs.h <<EOF
6005 #define $ac_tr_hdr 1
6006 EOF
6007  
6008   CAN_BUILD_LIBDVDCSS="${HAVE_LIBDVDCSS}"
6009
6010 else
6011   echo "$ac_t""no" 1>&6
6012 fi
6013 done
6014
6015
6016 for ac_hdr in sys/ioctl.h
6017 do
6018 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6019 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6020 echo "configure:6021: checking for $ac_hdr" >&5
6021 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6022   echo $ac_n "(cached) $ac_c" 1>&6
6023 else
6024   cat > conftest.$ac_ext <<EOF
6025 #line 6026 "configure"
6026 #include "confdefs.h"
6027 #include <$ac_hdr>
6028 EOF
6029 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6030 { (eval echo configure:6031: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6031 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6032 if test -z "$ac_err"; then
6033   rm -rf conftest*
6034   eval "ac_cv_header_$ac_safe=yes"
6035 else
6036   echo "$ac_err" >&5
6037   echo "configure: failed program was:" >&5
6038   cat conftest.$ac_ext >&5
6039   rm -rf conftest*
6040   eval "ac_cv_header_$ac_safe=no"
6041 fi
6042 rm -f conftest*
6043 fi
6044 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6045   echo "$ac_t""yes" 1>&6
6046     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6047   cat >> confdefs.h <<EOF
6048 #define $ac_tr_hdr 1
6049 EOF
6050  
6051   CAN_BUILD_LIBDVDCSS="${HAVE_LIBDVDCSS}"
6052   for ac_hdr in sys/cdio.h sys/dvdio.h linux/cdrom.h dvd.h
6053 do
6054 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6055 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6056 echo "configure:6057: checking for $ac_hdr" >&5
6057 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6058   echo $ac_n "(cached) $ac_c" 1>&6
6059 else
6060   cat > conftest.$ac_ext <<EOF
6061 #line 6062 "configure"
6062 #include "confdefs.h"
6063 #include <$ac_hdr>
6064 EOF
6065 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6066 { (eval echo configure:6067: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6067 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6068 if test -z "$ac_err"; then
6069   rm -rf conftest*
6070   eval "ac_cv_header_$ac_safe=yes"
6071 else
6072   echo "$ac_err" >&5
6073   echo "configure: failed program was:" >&5
6074   cat conftest.$ac_ext >&5
6075   rm -rf conftest*
6076   eval "ac_cv_header_$ac_safe=no"
6077 fi
6078 rm -f conftest*
6079 fi
6080 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6081   echo "$ac_t""yes" 1>&6
6082     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6083   cat >> confdefs.h <<EOF
6084 #define $ac_tr_hdr 1
6085 EOF
6086  
6087 else
6088   echo "$ac_t""no" 1>&6
6089 fi
6090 done
6091
6092   BSD_DVD_STRUCT=0
6093   LINUX_DVD_STRUCT=0
6094   OPENBSD_DVD_STRUCT=0
6095         cat > conftest.$ac_ext <<EOF
6096 #line 6097 "configure"
6097 #include "confdefs.h"
6098 #include <sys/cdio.h>
6099 EOF
6100 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6101   egrep "dvd_struct" >/dev/null 2>&1; then
6102   rm -rf conftest*
6103   
6104     cat >> confdefs.h <<\EOF
6105 #define DVD_STRUCT_IN_SYS_CDIO_H 1
6106 EOF
6107
6108     cat > conftest.$ac_ext <<EOF
6109 #line 6110 "configure"
6110 #include "confdefs.h"
6111 #include <sys/cdio.h>
6112 EOF
6113 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6114   egrep "struct dvd_struct" >/dev/null 2>&1; then
6115   rm -rf conftest*
6116   
6117                     BSD_DVD_STRUCT=1
6118 else
6119   rm -rf conftest*
6120   LINUX_DVD_STRUCT=1; OPENBSD_DVD_STRUCT=1
6121 fi
6122 rm -f conftest*
6123
6124   
6125 fi
6126 rm -f conftest*
6127
6128         cat > conftest.$ac_ext <<EOF
6129 #line 6130 "configure"
6130 #include "confdefs.h"
6131 #include <sys/dvdio.h>
6132 EOF
6133 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6134   egrep "dvd_struct" >/dev/null 2>&1; then
6135   rm -rf conftest*
6136   
6137     cat >> confdefs.h <<\EOF
6138 #define DVD_STRUCT_IN_SYS_DVDIO_H 1
6139 EOF
6140
6141     cat > conftest.$ac_ext <<EOF
6142 #line 6143 "configure"
6143 #include "confdefs.h"
6144 #include <sys/dvdio.h>
6145 EOF
6146 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6147   egrep "struct dvd_struct" >/dev/null 2>&1; then
6148   rm -rf conftest*
6149   
6150                     BSD_DVD_STRUCT=1
6151 else
6152   rm -rf conftest*
6153   LINUX_DVD_STRUCT=1
6154 fi
6155 rm -f conftest*
6156
6157   
6158 fi
6159 rm -f conftest*
6160
6161         cat > conftest.$ac_ext <<EOF
6162 #line 6163 "configure"
6163 #include "confdefs.h"
6164 #include <linux/cdrom.h>
6165 EOF
6166 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6167   egrep "dvd_struct" >/dev/null 2>&1; then
6168   rm -rf conftest*
6169   
6170     cat >> confdefs.h <<\EOF
6171 #define DVD_STRUCT_IN_LINUX_CDROM_H 1
6172 EOF
6173
6174     LINUX_DVD_STRUCT=1
6175   
6176 fi
6177 rm -f conftest*
6178
6179         NEED_BSDI_LIBDVD=0
6180   cat > conftest.$ac_ext <<EOF
6181 #line 6182 "configure"
6182 #include "confdefs.h"
6183 #include <dvd.h>
6184 EOF
6185 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6186   egrep "dvd_struct" >/dev/null 2>&1; then
6187   rm -rf conftest*
6188   
6189     cat >> confdefs.h <<\EOF
6190 #define DVD_STRUCT_IN_DVD_H 1
6191 EOF
6192
6193     LIB_LIBDVDCSS="${LIB_LIBDVDCSS} -ldvd"
6194     LINUX_DVD_STRUCT=1
6195   
6196 else
6197   rm -rf conftest*
6198   
6199                 for ac_hdr in /sys/dev/scsi/scsi_ioctl.h
6200 do
6201 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6202 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6203 echo "configure:6204: checking for $ac_hdr" >&5
6204 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6205   echo $ac_n "(cached) $ac_c" 1>&6
6206 else
6207   cat > conftest.$ac_ext <<EOF
6208 #line 6209 "configure"
6209 #include "confdefs.h"
6210 #include <$ac_hdr>
6211 EOF
6212 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6213 { (eval echo configure:6214: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6214 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6215 if test -z "$ac_err"; then
6216   rm -rf conftest*
6217   eval "ac_cv_header_$ac_safe=yes"
6218 else
6219   echo "$ac_err" >&5
6220   echo "configure: failed program was:" >&5
6221   cat conftest.$ac_ext >&5
6222   rm -rf conftest*
6223   eval "ac_cv_header_$ac_safe=no"
6224 fi
6225 rm -f conftest*
6226 fi
6227 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6228   echo "$ac_t""yes" 1>&6
6229     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6230   cat >> confdefs.h <<EOF
6231 #define $ac_tr_hdr 1
6232 EOF
6233  
6234       NEED_BSDI_LIBDVD=1
6235       cat >> confdefs.h <<\EOF
6236 #define DVD_STRUCT_IN_BSDI_DVDIOCTL_DVD_H 1
6237 EOF
6238
6239       SRC_DVDCSS_EXTRA="${SRC_DVDCSS_EXTRA} bsdi_dvdioctl.c"
6240       LINUX_DVD_STRUCT=1
6241     
6242 else
6243   echo "$ac_t""no" 1>&6
6244 fi
6245 done
6246
6247   
6248 fi
6249 rm -f conftest*
6250
6251         ac_safe=`echo "sys/scsi/scsi_types.h" | sed 'y%./+-%__p_%'`
6252 echo $ac_n "checking for sys/scsi/scsi_types.h""... $ac_c" 1>&6
6253 echo "configure:6254: checking for sys/scsi/scsi_types.h" >&5
6254 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6255   echo $ac_n "(cached) $ac_c" 1>&6
6256 else
6257   cat > conftest.$ac_ext <<EOF
6258 #line 6259 "configure"
6259 #include "confdefs.h"
6260 #include <sys/scsi/scsi_types.h>
6261 EOF
6262 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6263 { (eval echo configure:6264: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6264 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6265 if test -z "$ac_err"; then
6266   rm -rf conftest*
6267   eval "ac_cv_header_$ac_safe=yes"
6268 else
6269   echo "$ac_err" >&5
6270   echo "configure: failed program was:" >&5
6271   cat conftest.$ac_ext >&5
6272   rm -rf conftest*
6273   eval "ac_cv_header_$ac_safe=no"
6274 fi
6275 rm -f conftest*
6276 fi
6277 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6278   echo "$ac_t""yes" 1>&6
6279   
6280     ac_safe=`echo "sys/scsi/impl/uscsi.h" | sed 'y%./+-%__p_%'`
6281 echo $ac_n "checking for sys/scsi/impl/uscsi.h""... $ac_c" 1>&6
6282 echo "configure:6283: checking for sys/scsi/impl/uscsi.h" >&5
6283 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6284   echo $ac_n "(cached) $ac_c" 1>&6
6285 else
6286   cat > conftest.$ac_ext <<EOF
6287 #line 6288 "configure"
6288 #include "confdefs.h"
6289 #include <sys/scsi/impl/uscsi.h>
6290 EOF
6291 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6292 { (eval echo configure:6293: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6293 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6294 if test -z "$ac_err"; then
6295   rm -rf conftest*
6296   eval "ac_cv_header_$ac_safe=yes"
6297 else
6298   echo "$ac_err" >&5
6299   echo "configure: failed program was:" >&5
6300   cat conftest.$ac_ext >&5
6301   rm -rf conftest*
6302   eval "ac_cv_header_$ac_safe=no"
6303 fi
6304 rm -f conftest*
6305 fi
6306 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6307   echo "$ac_t""yes" 1>&6
6308   
6309       cat >> confdefs.h <<\EOF
6310 #define SOLARIS_USCSI 1
6311 EOF
6312
6313     
6314 else
6315   echo "$ac_t""no" 1>&6
6316 fi
6317
6318   
6319 else
6320   echo "$ac_t""no" 1>&6
6321 fi
6322
6323         ac_safe=`echo "sys/scsi.h" | sed 'y%./+-%__p_%'`
6324 echo $ac_n "checking for sys/scsi.h""... $ac_c" 1>&6
6325 echo "configure:6326: checking for sys/scsi.h" >&5
6326 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6327   echo $ac_n "(cached) $ac_c" 1>&6
6328 else
6329   cat > conftest.$ac_ext <<EOF
6330 #line 6331 "configure"
6331 #include "confdefs.h"
6332 #include <sys/scsi.h>
6333 EOF
6334 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6335 { (eval echo configure:6336: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6336 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6337 if test -z "$ac_err"; then
6338   rm -rf conftest*
6339   eval "ac_cv_header_$ac_safe=yes"
6340 else
6341   echo "$ac_err" >&5
6342   echo "configure: failed program was:" >&5
6343   cat conftest.$ac_ext >&5
6344   rm -rf conftest*
6345   eval "ac_cv_header_$ac_safe=no"
6346 fi
6347 rm -f conftest*
6348 fi
6349 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6350   echo "$ac_t""yes" 1>&6
6351   
6352     cat > conftest.$ac_ext <<EOF
6353 #line 6354 "configure"
6354 #include "confdefs.h"
6355 #include <sys/scsi.h>
6356 EOF
6357 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6358   egrep "sctl_io" >/dev/null 2>&1; then
6359   rm -rf conftest*
6360   
6361       cat >> confdefs.h <<\EOF
6362 #define HPUX_SCTL_IO 1
6363 EOF
6364
6365     
6366 fi
6367 rm -f conftest*
6368
6369   
6370 else
6371   echo "$ac_t""no" 1>&6
6372 fi
6373
6374         if test x$LINUX_DVD_STRUCT = x1; then
6375     cat >> confdefs.h <<\EOF
6376 #define HAVE_LINUX_DVD_STRUCT 1
6377 EOF
6378
6379     if test x$OPENBSD_DVD_STRUCT = x1; then
6380       cat >> confdefs.h <<\EOF
6381 #define HAVE_OPENBSD_DVD_STRUCT 1
6382 EOF
6383
6384     fi
6385   else
6386     if test x$BSD_DVD_STRUCT = x1; then
6387       cat >> confdefs.h <<\EOF
6388 #define HAVE_BSD_DVD_STRUCT 1
6389 EOF
6390
6391     fi
6392   fi
6393
6394 else
6395   echo "$ac_t""no" 1>&6
6396 fi
6397 done
6398
6399
6400 # Check whether --with- or --without- was given.
6401 if test "${with_+set}" = set; then
6402   withval="$with_"
6403   :
6404 fi
6405
6406 # Check whether --with- or --without- was given.
6407 if test "${with_+set}" = set; then
6408   withval="$with_"
6409   :
6410 fi
6411
6412
6413 # Check whether --with-tuning or --without-tuning was given.
6414 if test "${with_tuning+set}" = set; then
6415   withval="$with_tuning"
6416   :
6417 fi
6418
6419 if test "x$withval" != "x"; then
6420     TUNING=$withval
6421 else
6422     if test x${target_cpu} = xi686 -o x${target_cpu} = xi586 -o x${target_cpu} = xi486 -o x${target_cpu} = xi386; then TUNING="pentiumpro"
6423     else
6424         if test x${target_cpu} = xpowerpc; then TUNING="750"; fi
6425     fi
6426 fi
6427
6428 if test x${target_cpu} = xi686 -o x${target_cpu} = xi586 -o x${target_cpu} = xx86 -o x${target_cpu} = xi386
6429 then
6430     ARCH="${ARCH} mmx"
6431     BUILTINS="${BUILTINS} ${ACCEL_MODULES}"
6432 fi
6433
6434 # Check whether --enable-optimizations or --disable-optimizations was given.
6435 if test "${enable_optimizations+set}" = set; then
6436   enableval="$enable_optimizations"
6437    if test x$enableval = xno; then OPTIMS=0; fi 
6438 else
6439    OPTIMS=1 
6440 fi
6441
6442
6443 # Check whether --enable-altivec or --disable-altivec was given.
6444 if test "${enable_altivec+set}" = set; then
6445   enableval="$enable_altivec"
6446    if test x$enableval = xyes; then ARCH="${ARCH} altivec";
6447     BUILTINS="${BUILTINS} ${ACCEL_MODULES}"; fi 
6448 else
6449    if test x${target_cpu} = xpowerpc; then ARCH="${ARCH} altivec";
6450     BUILTINS="${BUILTINS} ${ACCEL_MODULES}"; fi 
6451 fi
6452
6453
6454 DEBUG=0
6455 # Check whether --enable-debug or --disable-debug was given.
6456 if test "${enable_debug+set}" = set; then
6457   enableval="$enable_debug"
6458    if test x$enableval = xyes; then DEBUG=1; fi 
6459 fi
6460
6461
6462 # Check whether --enable-release or --disable-release was given.
6463 if test "${enable_release+set}" = set; then
6464   enableval="$enable_release"
6465    if test x$enableval = xyes; then RELEASE=1; fi 
6466 else
6467    VLC_VERSION="${VLC_VERSION}_`date +%Y-%m-%d`";
6468   LIBDVDCSS_VERSION="${LIBDVDCSS_VERSION}_`date +%Y-%m-%d`"; 
6469 fi
6470
6471
6472
6473 # Check whether --with- or --without- was given.
6474 if test "${with_+set}" = set; then
6475   withval="$with_"
6476   :
6477 fi
6478
6479
6480 NEED_LIBDVDCSS=0
6481 STATIC_LIBDVDCSS=0
6482 DUMMY_LIBDVDCSS=0
6483 # Check whether --with-dvdcss or --without-dvdcss was given.
6484 if test "${with_dvdcss+set}" = set; then
6485   withval="$with_dvdcss"
6486    case "x${withval}" in
6487     xlocal-static|xyes)
6488       # local libdvdcss, statically linked
6489       BUILTINS="${BUILTINS} dvd"
6490       if test x${CAN_BUILD_LIBDVDCSS} = x1
6491       then
6492         NEED_LIBDVDCSS=1
6493         STATIC_LIBDVDCSS=1
6494         CFLAGS_DVD="${CFLAGS_DVD} -I../../extras/libdvdcss"
6495         LIB_DVD="${LIB_DVD} lib/libdvdcss.a ${LIB_LIBDVDCSS}"
6496       fi
6497     ;;
6498     xlocal-shared)
6499       # local libdvdcss, dynamically linked
6500       PLUGINS="${PLUGINS} dvd"
6501       if test x${CAN_BUILD_LIBDVDCSS} = x1
6502       then
6503         NEED_LIBDVDCSS=1
6504         CFLAGS_DVD="${CFLAGS_DVD} -I../../extras/libdvdcss"
6505         LIB_DVD="${LIB_DVD} -L../../lib -ldvdcss"
6506       fi
6507     ;;
6508     xno)
6509       # don't use libdvdcss at all, build a DVD module that can dlopen() it
6510       PLUGINS="${PLUGINS} dvd"
6511       DUMMY_LIBDVDCSS=1
6512       SRC_DVD_EXTRA="${SRC_DVD_EXTRA} dummy_dvdcss.c"
6513       CFLAGS_DVD="${CFLAGS_DVD} -DGOD_DAMN_DMCA"
6514       CFLAGS_DVD="${CFLAGS_DVD} -DLIBDVDCSS_VERSION=\"${LIBDVDCSS_VERSION}\""
6515       LIB_DVD="${LIB_DVD} -ldl"
6516     ;;
6517     *)
6518       # existing libdvdcss
6519       PLUGINS="${PLUGINS} dvd"
6520       if test "x$withval" != "xyes"
6521       then
6522         LIB_DVD="${LIB_DVD} -L"$withval"/lib"
6523         CFLAGS_DVD="${CFLAGS_DVD} -I"$withval"/include"
6524       fi
6525       LIB_DVD="${LIB_DVD} -ldvdcss"
6526     esac 
6527 else
6528   # user didn't decide, we choose to use local libdvdcss and link statically
6529   # if libdvdcss is in the archive, or to use the dummy replacement otherwise.
6530    if test x${CAN_BUILD_LIBDVDCSS} = x1
6531     then
6532       BUILTINS="${BUILTINS} dvd"
6533       NEED_LIBDVDCSS=1
6534       STATIC_LIBDVDCSS=1
6535       CFLAGS_DVD="${CFLAGS_DVD} -I../../extras/libdvdcss"
6536       LIB_DVD="${LIB_DVD} lib/libdvdcss.a ${LIB_LIBDVDCSS}"
6537     else
6538       # XXX: no check for libdl is done, don't try this at home !
6539       PLUGINS="${PLUGINS} dvd"
6540       DUMMY_LIBDVDCSS=1
6541       SRC_DVD_EXTRA="${SRC_DVD_EXTRA} dummy_dvdcss.c"
6542       CFLAGS_DVD="${CFLAGS_DVD} -DGOD_DAMN_DMCA"
6543       LIB_DVD="${LIB_DVD} -ldl"
6544     fi 
6545 fi
6546
6547
6548 if test x${DUMMY_LIBDVDCSS} = x1; then STATIC_LIBDVDREAD=1; fi
6549 if test x${STATIC_LIBDVDCSS} = x1; then STATIC_LIBDVDREAD=1; fi
6550 # Check whether --with-dvdread or --without-dvdread was given.
6551 if test "${with_dvdread+set}" = set; then
6552   withval="$with_dvdread"
6553    case "x${withval}" in
6554     xlocal-static|xyes)
6555       if test x${STATIC_LIBDVDREAD} = x1
6556       then
6557         BUILTINS="${BUILTINS} dvdread" 
6558         CFLAGS_DVDREAD="${CFLAGS_DVDREAD} ${CFLAGS_DVD} -I../../extras/libdvdread"
6559         LIB_DVDREAD="${LIB_DVDREAD} lib/libdvdread.a ${LIB_DVD}"
6560       else
6561         { echo "configure: error: Can't link static dvdread with shared dvdcss" 1>&2; exit 1; }
6562       fi
6563     ;;
6564     xno)
6565     ;;
6566     x)
6567       if test x${STATIC_LIBDVDREAD} = x1
6568       then
6569         #BUILTINS="${BUILTINS} dvdread" 
6570         CFLAGS_DVDREAD="${CFLAGS_DVDREAD} ${CFLAGS_DVD} -I../../extras/libdvdread"
6571         LIB_DVDREAD="${LIB_DVDREAD} lib/libdvdread.a ${LIB_DVD}"
6572       else
6573         #PLUGINS="${PLUGINS} dvdread"
6574         CFLAGS_DVDREAD="${CFLAGS_DVDREAD} -I../../extras/libdvdread  ${CFLAGS_DVD}"
6575         LIB_DVDREAD="${LIB_DVDREAD} -Llib -ldvdread ${LIB_DVD}"
6576       fi 
6577     ;;
6578     *)
6579       if test "x$withval" != "xlocal-shared"
6580       then
6581         LIB_DVDREAD="${LIB_DVDREAD} -L"$withval"/lib"
6582         CFLAGS_DVDREAD="${CFLAGS_DVDREAD} -I"$withval"/include"
6583       else
6584         LIB_DVDREAD="${LIB_DVDREAD} -L../../lib"
6585         CFLAGS_DVDREAD="${CFLAGS_DVDREAD} -I../../extras/libdvdread"
6586       fi
6587       if test x${STATIC_LIBDVDCSS} = x1
6588       then
6589         { echo "configure: error: Can't link shared dvdread with static dvdcss" 1>&2; exit 1; }
6590       else
6591         #PLUGINS="${PLUGINS} dvdread"
6592         CFLAGS_DVDREAD="${CFLAGS_DVDREAD} ${CFLAGS_DVD}"
6593         LIB_DVDREAD="${LIB_DVDREAD} -ldvdread ${LIB_DVD}"
6594       fi
6595     esac
6596     if test x${DUMMY_LIBDVDCSS} = x1
6597     then
6598       LIB_LIBDVDREAD="${LIB_LIBDVDREAD} -ldl"
6599     else
6600       LIB_LIBDVDREAD="${LIB_LIBDVDREAD} -L../../lib -ldvdcss"
6601     fi 
6602 fi
6603
6604
6605 # Check whether --enable-vcd or --disable-vcd was given.
6606 if test "${enable_vcd+set}" = set; then
6607   enableval="$enable_vcd"
6608   :
6609 fi
6610
6611
6612 if test x$enable_vcd != xno
6613 then
6614   cat > conftest.$ac_ext <<EOF
6615 #line 6616 "configure"
6616 #include "confdefs.h"
6617 #include <linux/cdrom.h>
6618 EOF
6619 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6620   egrep "cdrom_msf0" >/dev/null 2>&1; then
6621   rm -rf conftest*
6622   
6623     PLUGINS="${PLUGINS} vcd"
6624   
6625 fi
6626 rm -f conftest*
6627
6628
6629   if test "x${SYS}" = "xbsdi"
6630   then
6631     PLUGINS="${PLUGINS} vcd"
6632   fi
6633
6634   if test "x${SYS}" = "xdarwin"
6635   then
6636     PLUGINS="${PLUGINS} vcd"
6637     LIB_VCD="${LIB_VCD} -framework IOKit -framework CoreFoundation" 
6638   fi
6639 fi
6640
6641 # Check whether --enable-satellite or --disable-satellite was given.
6642 if test "${enable_satellite+set}" = set; then
6643   enableval="$enable_satellite"
6644    if test x$enable_satellite = xyes
6645     then
6646       BUILTINS="${BUILTINS} satellite"
6647       cat >> confdefs.h <<\EOF
6648 #define HAVE_SATELLITE 1
6649 EOF
6650
6651     fi
6652 fi
6653
6654
6655 echo $ac_n "checking for inet_pton""... $ac_c" 1>&6
6656 echo "configure:6657: checking for inet_pton" >&5
6657 if eval "test \"`echo '$''{'ac_cv_func_inet_pton'+set}'`\" = set"; then
6658   echo $ac_n "(cached) $ac_c" 1>&6
6659 else
6660   cat > conftest.$ac_ext <<EOF
6661 #line 6662 "configure"
6662 #include "confdefs.h"
6663 /* System header to define __stub macros and hopefully few prototypes,
6664     which can conflict with char inet_pton(); below.  */
6665 #include <assert.h>
6666 /* Override any gcc2 internal prototype to avoid an error.  */
6667 /* We use char because int might match the return type of a gcc2
6668     builtin and then its argument prototype would still apply.  */
6669 char inet_pton();
6670
6671 int main() {
6672
6673 /* The GNU C library defines this for functions which it implements
6674     to always fail with ENOSYS.  Some functions are actually named
6675     something starting with __ and the normal name is an alias.  */
6676 #if defined (__stub_inet_pton) || defined (__stub___inet_pton)
6677 choke me
6678 #else
6679 inet_pton();
6680 #endif
6681
6682 ; return 0; }
6683 EOF
6684 if { (eval echo configure:6685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6685   rm -rf conftest*
6686   eval "ac_cv_func_inet_pton=yes"
6687 else
6688   echo "configure: failed program was:" >&5
6689   cat conftest.$ac_ext >&5
6690   rm -rf conftest*
6691   eval "ac_cv_func_inet_pton=no"
6692 fi
6693 rm -f conftest*
6694 fi
6695
6696 if eval "test \"`echo '$ac_cv_func_'inet_pton`\" = yes"; then
6697   echo "$ac_t""yes" 1>&6
6698   PLUGINS="${PLUGINS} ipv6"
6699 else
6700   echo "$ac_t""no" 1>&6
6701 fi
6702
6703
6704
6705 # Check whether --with- or --without- was given.
6706 if test "${with_+set}" = set; then
6707   withval="$with_"
6708   :
6709 fi
6710
6711
6712 # Check whether --enable-mad or --disable-mad was given.
6713 if test "${enable_mad+set}" = set; then
6714   enableval="$enable_mad"
6715   :
6716 fi
6717
6718 if test x$enable_mad = xyes
6719 then
6720   PLUGINS="${PLUGINS} mad"
6721   LIB_MAD="${LIB_MAD} -lmad"
6722   # Check whether --with-mad or --without-mad was given.
6723 if test "${with_mad+set}" = set; then
6724   withval="$with_mad"
6725    if test "x$with_val" != "xno" -a "x$with_val" != "x"
6726       then
6727         CFLAGS_MAD="${CFLAGS_MAD} -I$with_val/include"
6728         LIB_MAD="${LIB_MAD} -L$with_val/lib"
6729       fi 
6730 fi
6731
6732   save_CFLAGS=$CFLAGS
6733   save_LDFLAGS=$LDFLAGS
6734   CFLAGS="$CFLAGS $CFLAGS_MAD"
6735   LDFLAGS="$LDFLAGS $LIB_MAD"
6736   for ac_hdr in mad.h
6737 do
6738 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6739 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6740 echo "configure:6741: checking for $ac_hdr" >&5
6741 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6742   echo $ac_n "(cached) $ac_c" 1>&6
6743 else
6744   cat > conftest.$ac_ext <<EOF
6745 #line 6746 "configure"
6746 #include "confdefs.h"
6747 #include <$ac_hdr>
6748 EOF
6749 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6750 { (eval echo configure:6751: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6751 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6752 if test -z "$ac_err"; then
6753   rm -rf conftest*
6754   eval "ac_cv_header_$ac_safe=yes"
6755 else
6756   echo "$ac_err" >&5
6757   echo "configure: failed program was:" >&5
6758   cat conftest.$ac_ext >&5
6759   rm -rf conftest*
6760   eval "ac_cv_header_$ac_safe=no"
6761 fi
6762 rm -f conftest*
6763 fi
6764 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6765   echo "$ac_t""yes" 1>&6
6766     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6767   cat >> confdefs.h <<EOF
6768 #define $ac_tr_hdr 1
6769 EOF
6770  
6771 else
6772   echo "$ac_t""no" 1>&6
6773 echo "Cannot find development headers for libmad..."
6774     exit 1
6775   
6776 fi
6777 done
6778
6779   echo $ac_n "checking for mad_bit_init in -lmad""... $ac_c" 1>&6
6780 echo "configure:6781: checking for mad_bit_init in -lmad" >&5
6781 ac_lib_var=`echo mad'_'mad_bit_init | sed 'y%./+-%__p_%'`
6782 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6783   echo $ac_n "(cached) $ac_c" 1>&6
6784 else
6785   ac_save_LIBS="$LIBS"
6786 LIBS="-lmad  $LIBS"
6787 cat > conftest.$ac_ext <<EOF
6788 #line 6789 "configure"
6789 #include "confdefs.h"
6790 /* Override any gcc2 internal prototype to avoid an error.  */
6791 /* We use char because int might match the return type of a gcc2
6792     builtin and then its argument prototype would still apply.  */
6793 char mad_bit_init();
6794
6795 int main() {
6796 mad_bit_init()
6797 ; return 0; }
6798 EOF
6799 if { (eval echo configure:6800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6800   rm -rf conftest*
6801   eval "ac_cv_lib_$ac_lib_var=yes"
6802 else
6803   echo "configure: failed program was:" >&5
6804   cat conftest.$ac_ext >&5
6805   rm -rf conftest*
6806   eval "ac_cv_lib_$ac_lib_var=no"
6807 fi
6808 rm -f conftest*
6809 LIBS="$ac_save_LIBS"
6810
6811 fi
6812 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6813   echo "$ac_t""yes" 1>&6
6814     ac_tr_lib=HAVE_LIB`echo mad | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6815     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6816   cat >> confdefs.h <<EOF
6817 #define $ac_tr_lib 1
6818 EOF
6819
6820   LIBS="-lmad $LIBS"
6821
6822 else
6823   echo "$ac_t""no" 1>&6
6824  echo "Cannot find libmad library..."
6825     exit 1
6826   
6827 fi
6828
6829   CFLAGS=$save_CFLAGS
6830   LDFLAGS=$save_LDFLAGS
6831 fi
6832
6833 if test x$SYS = xbeos
6834 then
6835     PLUGINS="${PLUGINS} beos"
6836
6837 else
6838
6839 # Check whether --enable-a52 or --disable-a52 was given.
6840 if test "${enable_a52+set}" = set; then
6841   enableval="$enable_a52"
6842   :
6843 fi
6844
6845 if test "x$enableval" != "xno" -a x$SYS != xmingw32
6846   then
6847     for ac_hdr in a52dec/a52.h
6848 do
6849 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6850 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6851 echo "configure:6852: checking for $ac_hdr" >&5
6852 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6853   echo $ac_n "(cached) $ac_c" 1>&6
6854 else
6855   cat > conftest.$ac_ext <<EOF
6856 #line 6857 "configure"
6857 #include "confdefs.h"
6858 #include <$ac_hdr>
6859 EOF
6860 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6861 { (eval echo configure:6862: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6862 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6863 if test -z "$ac_err"; then
6864   rm -rf conftest*
6865   eval "ac_cv_header_$ac_safe=yes"
6866 else
6867   echo "$ac_err" >&5
6868   echo "configure: failed program was:" >&5
6869   cat conftest.$ac_ext >&5
6870   rm -rf conftest*
6871   eval "ac_cv_header_$ac_safe=no"
6872 fi
6873 rm -f conftest*
6874 fi
6875 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6876   echo "$ac_t""yes" 1>&6
6877     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6878   cat >> confdefs.h <<EOF
6879 #define $ac_tr_hdr 1
6880 EOF
6881  
6882       BUILTINS="${BUILTINS} a52"
6883       LIB_A52="${LIB_A52} -la52 -lm"
6884      
6885 else
6886   echo "$ac_t""no" 1>&6
6887 fi
6888 done
6889
6890 fi
6891
6892
6893 # Check whether --with- or --without- was given.
6894 if test "${with_+set}" = set; then
6895   withval="$with_"
6896   :
6897 fi
6898
6899
6900 # Check whether --enable-x11 or --disable-x11 was given.
6901 if test "${enable_x11+set}" = set; then
6902   enableval="$enable_x11"
6903   :
6904 fi
6905
6906 if test x$enable_x11 != xno &&
6907   (test x$SYS != xmingw32 || test x$enable_x11 = xyes); then
6908   if test x$x_includes = xNONE; then
6909     x_includes=/usr/X11R6/include
6910   fi
6911   if test x$x_libraries = xNONE; then
6912     x_libraries=/usr/X11R6/lib
6913   fi
6914   saved_CPPFLAGS=$CPPFLAGS
6915   CPPFLAGS="$CPPFLAGS -I$x_includes"
6916   for ac_hdr in X11/Xlib.h
6917 do
6918 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6919 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6920 echo "configure:6921: checking for $ac_hdr" >&5
6921 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6922   echo $ac_n "(cached) $ac_c" 1>&6
6923 else
6924   cat > conftest.$ac_ext <<EOF
6925 #line 6926 "configure"
6926 #include "confdefs.h"
6927 #include <$ac_hdr>
6928 EOF
6929 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6930 { (eval echo configure:6931: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6931 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6932 if test -z "$ac_err"; then
6933   rm -rf conftest*
6934   eval "ac_cv_header_$ac_safe=yes"
6935 else
6936   echo "$ac_err" >&5
6937   echo "configure: failed program was:" >&5
6938   cat conftest.$ac_ext >&5
6939   rm -rf conftest*
6940   eval "ac_cv_header_$ac_safe=no"
6941 fi
6942 rm -f conftest*
6943 fi
6944 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6945   echo "$ac_t""yes" 1>&6
6946     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6947   cat >> confdefs.h <<EOF
6948 #define $ac_tr_hdr 1
6949 EOF
6950  
6951     PLUGINS="${PLUGINS} x11"
6952     LIB_X11="${LIB_X11} -L$x_libraries -lX11 -lXext"
6953     CFLAGS_X11="${CFLAGS_X11} -I$x_includes"
6954   
6955 else
6956   echo "$ac_t""no" 1>&6
6957 fi
6958 done
6959
6960   CPPFLAGS=$saved_CPPFLAGS
6961 fi
6962
6963 # Check whether --enable-xvideo or --disable-xvideo was given.
6964 if test "${enable_xvideo+set}" = set; then
6965   enableval="$enable_xvideo"
6966   :
6967 fi
6968
6969 if test x$enable_xvideo != xno &&
6970   (test x$SYS != xmingw32 || test x$enable_xvideo = xyes); then
6971   if test x$x_includes = xNONE; then
6972     x_includes=/usr/X11R6/include
6973   fi
6974   if test x$x_libraries = xNONE; then
6975     x_libraries=/usr/X11R6/lib
6976   fi
6977   saved_CPPFLAGS=$CPPFLAGS
6978   CPPFLAGS="$CPPFLAGS -I$x_includes"
6979   for ac_hdr in X11/extensions/Xv.h
6980 do
6981 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6982 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6983 echo "configure:6984: checking for $ac_hdr" >&5
6984 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6985   echo $ac_n "(cached) $ac_c" 1>&6
6986 else
6987   cat > conftest.$ac_ext <<EOF
6988 #line 6989 "configure"
6989 #include "confdefs.h"
6990 #include <$ac_hdr>
6991 EOF
6992 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6993 { (eval echo configure:6994: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6994 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6995 if test -z "$ac_err"; then
6996   rm -rf conftest*
6997   eval "ac_cv_header_$ac_safe=yes"
6998 else
6999   echo "$ac_err" >&5
7000   echo "configure: failed program was:" >&5
7001   cat conftest.$ac_ext >&5
7002   rm -rf conftest*
7003   eval "ac_cv_header_$ac_safe=no"
7004 fi
7005 rm -f conftest*
7006 fi
7007 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7008   echo "$ac_t""yes" 1>&6
7009     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7010   cat >> confdefs.h <<EOF
7011 #define $ac_tr_hdr 1
7012 EOF
7013  
7014     saved_CFLAGS=$CFLAGS
7015     CFLAGS="$CFLAGS -L$x_libraries -lX11 -lXext"
7016     echo $ac_n "checking for XvSetPortAttribute in -lXv_pic""... $ac_c" 1>&6
7017 echo "configure:7018: checking for XvSetPortAttribute in -lXv_pic" >&5
7018 ac_lib_var=`echo Xv_pic'_'XvSetPortAttribute | sed 'y%./+-%__p_%'`
7019 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7020   echo $ac_n "(cached) $ac_c" 1>&6
7021 else
7022   ac_save_LIBS="$LIBS"
7023 LIBS="-lXv_pic  $LIBS"
7024 cat > conftest.$ac_ext <<EOF
7025 #line 7026 "configure"
7026 #include "confdefs.h"
7027 /* Override any gcc2 internal prototype to avoid an error.  */
7028 /* We use char because int might match the return type of a gcc2
7029     builtin and then its argument prototype would still apply.  */
7030 char XvSetPortAttribute();
7031
7032 int main() {
7033 XvSetPortAttribute()
7034 ; return 0; }
7035 EOF
7036 if { (eval echo configure:7037: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7037   rm -rf conftest*
7038   eval "ac_cv_lib_$ac_lib_var=yes"
7039 else
7040   echo "configure: failed program was:" >&5
7041   cat conftest.$ac_ext >&5
7042   rm -rf conftest*
7043   eval "ac_cv_lib_$ac_lib_var=no"
7044 fi
7045 rm -f conftest*
7046 LIBS="$ac_save_LIBS"
7047
7048 fi
7049 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7050   echo "$ac_t""yes" 1>&6
7051   # We have Xv_pic, that's good, we can build an xvideo.so plugin !
7052       PLUGINS="${PLUGINS} xvideo"
7053       LIB_XVIDEO="${LIB_XVIDEO} -L$x_libraries -lX11 -lXext -lXv_pic"
7054       CFLAGS_XVIDEO="${CFLAGS_XVIDEO} -I$x_includes"
7055 else
7056   echo "$ac_t""no" 1>&6
7057 # We don't have Xv_pic, let's make xvideo.a as builtin
7058       BUILTINS="${BUILTINS} xvideo"
7059       LIB_XVIDEO="${LIB_XVIDEO} -L$x_libraries -lX11 -lXext -lXv"
7060       CFLAGS_XVIDEO="${CFLAGS_XVIDEO} -I$x_includes"
7061 fi
7062
7063     CFLAGS=$saved_CFLAGS
7064   
7065   CPPFLAGS=$saved_CPPFLAGS
7066 else
7067   echo "$ac_t""no" 1>&6
7068 fi
7069 done
7070
7071 fi
7072
7073 # Check whether --enable-sdl or --disable-sdl was given.
7074 if test "${enable_sdl+set}" = set; then
7075   enableval="$enable_sdl"
7076   :
7077 fi
7078
7079 if test "x$enable_sdl" != "xno"
7080 then
7081   SDL_PATH=$PATH
7082   # Check whether --with-sdl-config-path or --without-sdl-config-path was given.
7083 if test "${with_sdl_config_path+set}" = set; then
7084   withval="$with_sdl_config_path"
7085    if test "x$withval" != "xno"
7086       then
7087         SDL_PATH=$withval:$PATH
7088       fi 
7089 fi
7090
7091   # Extract the first word of "sdl12-config", so it can be a program name with args.
7092 set dummy sdl12-config; ac_word=$2
7093 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7094 echo "configure:7095: checking for $ac_word" >&5
7095 if eval "test \"`echo '$''{'ac_cv_path_SDL12_CONFIG'+set}'`\" = set"; then
7096   echo $ac_n "(cached) $ac_c" 1>&6
7097 else
7098   case "$SDL12_CONFIG" in
7099   /*)
7100   ac_cv_path_SDL12_CONFIG="$SDL12_CONFIG" # Let the user override the test with a path.
7101   ;;
7102   ?:/*)                  
7103   ac_cv_path_SDL12_CONFIG="$SDL12_CONFIG" # Let the user override the test with a dos path.
7104   ;;
7105   *)
7106   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7107   ac_dummy="$SDL_PATH"
7108   for ac_dir in $ac_dummy; do 
7109     test -z "$ac_dir" && ac_dir=.
7110     if test -f $ac_dir/$ac_word; then
7111       ac_cv_path_SDL12_CONFIG="$ac_dir/$ac_word"
7112       break
7113     fi
7114   done
7115   IFS="$ac_save_ifs"
7116   test -z "$ac_cv_path_SDL12_CONFIG" && ac_cv_path_SDL12_CONFIG="no"
7117   ;;
7118 esac
7119 fi
7120 SDL12_CONFIG="$ac_cv_path_SDL12_CONFIG"
7121 if test -n "$SDL12_CONFIG"; then
7122   echo "$ac_t""$SDL12_CONFIG" 1>&6
7123 else
7124   echo "$ac_t""no" 1>&6
7125 fi
7126
7127   SDL_CONFIG=${SDL12_CONFIG}
7128   SDL_HEADER="SDL12/SDL.h"
7129   if test x${SDL_CONFIG} = xno
7130   then
7131     # Extract the first word of "sdl11-config", so it can be a program name with args.
7132 set dummy sdl11-config; ac_word=$2
7133 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7134 echo "configure:7135: checking for $ac_word" >&5
7135 if eval "test \"`echo '$''{'ac_cv_path_SDL11_CONFIG'+set}'`\" = set"; then
7136   echo $ac_n "(cached) $ac_c" 1>&6
7137 else
7138   case "$SDL11_CONFIG" in
7139   /*)
7140   ac_cv_path_SDL11_CONFIG="$SDL11_CONFIG" # Let the user override the test with a path.
7141   ;;
7142   ?:/*)                  
7143   ac_cv_path_SDL11_CONFIG="$SDL11_CONFIG" # Let the user override the test with a dos path.
7144   ;;
7145   *)
7146   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7147   ac_dummy="$SDL_PATH"
7148   for ac_dir in $ac_dummy; do 
7149     test -z "$ac_dir" && ac_dir=.
7150     if test -f $ac_dir/$ac_word; then
7151       ac_cv_path_SDL11_CONFIG="$ac_dir/$ac_word"
7152       break
7153     fi
7154   done
7155   IFS="$ac_save_ifs"
7156   test -z "$ac_cv_path_SDL11_CONFIG" && ac_cv_path_SDL11_CONFIG="no"
7157   ;;
7158 esac
7159 fi
7160 SDL11_CONFIG="$ac_cv_path_SDL11_CONFIG"
7161 if test -n "$SDL11_CONFIG"; then
7162   echo "$ac_t""$SDL11_CONFIG" 1>&6
7163 else
7164   echo "$ac_t""no" 1>&6
7165 fi
7166
7167     SDL_CONFIG=${SDL11_CONFIG}
7168     SDL_HEADER="SDL11/SDL.h"
7169   fi
7170   if test x${SDL_CONFIG} = xno
7171   then
7172     # Extract the first word of "sdl-config", so it can be a program name with args.
7173 set dummy sdl-config; ac_word=$2
7174 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7175 echo "configure:7176: checking for $ac_word" >&5
7176 if eval "test \"`echo '$''{'ac_cv_path_SDL_CONFIG'+set}'`\" = set"; then
7177   echo $ac_n "(cached) $ac_c" 1>&6
7178 else
7179   case "$SDL_CONFIG" in
7180   /*)
7181   ac_cv_path_SDL_CONFIG="$SDL_CONFIG" # Let the user override the test with a path.
7182   ;;
7183   ?:/*)                  
7184   ac_cv_path_SDL_CONFIG="$SDL_CONFIG" # Let the user override the test with a dos path.
7185   ;;
7186   *)
7187   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7188   ac_dummy="$SDL_PATH"
7189   for ac_dir in $ac_dummy; do 
7190     test -z "$ac_dir" && ac_dir=.
7191     if test -f $ac_dir/$ac_word; then
7192       ac_cv_path_SDL_CONFIG="$ac_dir/$ac_word"
7193       break
7194     fi
7195   done
7196   IFS="$ac_save_ifs"
7197   test -z "$ac_cv_path_SDL_CONFIG" && ac_cv_path_SDL_CONFIG="no"
7198   ;;
7199 esac
7200 fi
7201 SDL_CONFIG="$ac_cv_path_SDL_CONFIG"
7202 if test -n "$SDL_CONFIG"; then
7203   echo "$ac_t""$SDL_CONFIG" 1>&6
7204 else
7205   echo "$ac_t""no" 1>&6
7206 fi
7207
7208     SDL_HEADER="SDL/SDL.h"
7209   fi
7210   if test x${SDL_CONFIG} != xno
7211   then
7212     PLUGINS="${PLUGINS} sdl"
7213     CFLAGS_SDL="${CFLAGS_SDL} `${SDL_CONFIG} --cflags`"
7214     LIB_SDL="${LIB_SDL} `${SDL_CONFIG} --libs | sed 's,-rdynamic,,'`"
7215     save_CPPFLAGS=$CPPFLAGS
7216     CPPFLAGS="$CPPFLAGS $CFLAGS_SDL"
7217     for ac_hdr in ${SDL_HEADER}
7218 do
7219 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7220 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7221 echo "configure:7222: checking for $ac_hdr" >&5
7222 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7223   echo $ac_n "(cached) $ac_c" 1>&6
7224 else
7225   cat > conftest.$ac_ext <<EOF
7226 #line 7227 "configure"
7227 #include "confdefs.h"
7228 #include <$ac_hdr>
7229 EOF
7230 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7231 { (eval echo configure:7232: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7232 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7233 if test -z "$ac_err"; then
7234   rm -rf conftest*
7235   eval "ac_cv_header_$ac_safe=yes"
7236 else
7237   echo "$ac_err" >&5
7238   echo "configure: failed program was:" >&5
7239   cat conftest.$ac_ext >&5
7240   rm -rf conftest*
7241   eval "ac_cv_header_$ac_safe=no"
7242 fi
7243 rm -f conftest*
7244 fi
7245 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7246   echo "$ac_t""yes" 1>&6
7247     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7248   cat >> confdefs.h <<EOF
7249 #define $ac_tr_hdr 1
7250 EOF
7251  cat >> confdefs.h <<EOF
7252 #define SDL_INCLUDE_FILE <${SDL_HEADER}>
7253 EOF
7254
7255 else
7256   echo "$ac_t""no" 1>&6
7257 { echo "configure: error: The development package for SDL is not installed. 
7258 Please install it and try again. Alternatively you can also configure with 
7259 --disable-sdl." 1>&2; exit 1; }
7260       
7261 fi
7262 done
7263
7264     CPPFLAGS=$save_CPPFLAGS
7265     if expr 1.1.5 \> `$SDL_CONFIG --version` >/dev/null
7266     then
7267       { echo "configure: error: The development package for SDL is not installed.
7268 Please install it and try again. Alternatively you can also configure with
7269 --disable-sdl." 1>&2; exit 1; }
7270     fi
7271   elif test "x$enable_sdl" =  "xyes"
7272   then
7273     { echo "configure: error: I couldn't find the SDL package. You can download libSDL
7274 from http://www.libsdl.org/, or configure with --disable-sdl. Have a nice day.
7275     " 1>&2; exit 1; }
7276   fi
7277 fi
7278
7279 # Check whether --enable-directx or --disable-directx was given.
7280 if test "${enable_directx+set}" = set; then
7281   enableval="$enable_directx"
7282   :
7283 fi
7284
7285 if test "x$enableval" != "xno"
7286 then
7287   if test x$SYS = xmingw32
7288   then
7289     # Check whether --with-directx or --without-directx was given.
7290 if test "${with_directx+set}" = set; then
7291   withval="$with_directx"
7292   :
7293 fi
7294
7295     if test "x$with_directx" = "x"
7296     then
7297       for ac_hdr in ddraw.h
7298 do
7299 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7300 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7301 echo "configure:7302: checking for $ac_hdr" >&5
7302 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7303   echo $ac_n "(cached) $ac_c" 1>&6
7304 else
7305   cat > conftest.$ac_ext <<EOF
7306 #line 7307 "configure"
7307 #include "confdefs.h"
7308 #include <$ac_hdr>
7309 EOF
7310 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7311 { (eval echo configure:7312: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7312 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7313 if test -z "$ac_err"; then
7314   rm -rf conftest*
7315   eval "ac_cv_header_$ac_safe=yes"
7316 else
7317   echo "$ac_err" >&5
7318   echo "configure: failed program was:" >&5
7319   cat conftest.$ac_ext >&5
7320   rm -rf conftest*
7321   eval "ac_cv_header_$ac_safe=no"
7322 fi
7323 rm -f conftest*
7324 fi
7325 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7326   echo "$ac_t""yes" 1>&6
7327     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7328   cat >> confdefs.h <<EOF
7329 #define $ac_tr_hdr 1
7330 EOF
7331   PLUGINS="${PLUGINS} directx"
7332         LIB_DIRECTX="${LIB_DIRECTX} -lgdi32" 
7333 else
7334   echo "$ac_t""no" 1>&6
7335 fi
7336 done
7337
7338     else
7339       echo $ac_n "checking for directX headers in ${withval}""... $ac_c" 1>&6
7340 echo "configure:7341: checking for directX headers in ${withval}" >&5
7341       if test -f ${withval}/ddraw.h
7342       then
7343         PLUGINS="${PLUGINS} directx"
7344         LIB_DIRECTX="${LIB_DIRECTX} -L${withval}/lib -lgdi32"
7345         INCLUDE="${INCLUDE} -I${withval}"
7346         echo "$ac_t""yes" 1>&6
7347       else
7348         echo "$ac_t""no" 1>&6
7349         { echo "configure: error: Cannot find ${withval}/ddraw.h!" 1>&2; exit 1; }
7350       fi
7351     fi
7352   fi
7353 fi
7354
7355 # Check whether --enable-fb or --disable-fb was given.
7356 if test "${enable_fb+set}" = set; then
7357   enableval="$enable_fb"
7358   :
7359 fi
7360
7361     if test x$enable_fb != xno
7362     then
7363       for ac_hdr in linux/fb.h
7364 do
7365 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7366 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7367 echo "configure:7368: checking for $ac_hdr" >&5
7368 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7369   echo $ac_n "(cached) $ac_c" 1>&6
7370 else
7371   cat > conftest.$ac_ext <<EOF
7372 #line 7373 "configure"
7373 #include "confdefs.h"
7374 #include <$ac_hdr>
7375 EOF
7376 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7377 { (eval echo configure:7378: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7378 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7379 if test -z "$ac_err"; then
7380   rm -rf conftest*
7381   eval "ac_cv_header_$ac_safe=yes"
7382 else
7383   echo "$ac_err" >&5
7384   echo "configure: failed program was:" >&5
7385   cat conftest.$ac_ext >&5
7386   rm -rf conftest*
7387   eval "ac_cv_header_$ac_safe=no"
7388 fi
7389 rm -f conftest*
7390 fi
7391 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7392   echo "$ac_t""yes" 1>&6
7393     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7394   cat >> confdefs.h <<EOF
7395 #define $ac_tr_hdr 1
7396 EOF
7397  
7398         PLUGINS="${PLUGINS} fb"
7399       
7400 else
7401   echo "$ac_t""no" 1>&6
7402 fi
7403 done
7404
7405     fi
7406
7407 # Check whether --enable-mga or --disable-mga was given.
7408 if test "${enable_mga+set}" = set; then
7409   enableval="$enable_mga"
7410    if test x$enable_mga = xyes
7411     then
7412       PLUGINS="${PLUGINS} mga xmga"
7413     fi 
7414 fi
7415
7416
7417 # Check whether --enable-ggi or --disable-ggi was given.
7418 if test "${enable_ggi+set}" = set; then
7419   enableval="$enable_ggi"
7420   :
7421 fi
7422
7423 if test x$enable_ggi = xyes
7424 then
7425   PLUGINS="${PLUGINS} ggi"
7426   LIB_GGI="${LIB_GGI} -lggi"
7427   # Check whether --with-ggi or --without-ggi was given.
7428 if test "${with_ggi+set}" = set; then
7429   withval="$with_ggi"
7430    if test "x$with_val" != "xno" -a "x$with_val" != "x"
7431       then
7432         CFLAGS_GGI="${CFLAGS_GGI} -I$with_val/include"
7433         LIB_GGI="${LIB_GGI} -L$with_val/lib"
7434       fi 
7435 fi
7436
7437 fi
7438
7439 # Check whether --enable-glide or --disable-glide was given.
7440 if test "${enable_glide+set}" = set; then
7441   enableval="$enable_glide"
7442   :
7443 fi
7444
7445 if test x$enable_glide = xyes
7446 then
7447   PLUGINS="${PLUGINS} glide"
7448   LIB_GLIDE="${LIB_GLIDE} -lglide2x -lm"
7449   CFLAGS_GLIDE="${CFLAGS_GLIDE} -I/usr/include/glide"
7450   # Check whether --with-glide or --without-glide was given.
7451 if test "${with_glide+set}" = set; then
7452   withval="$with_glide"
7453    if test "x$with_val" != "xno" -a "x$with_val" != "x"
7454       then
7455         CFLAGS_GLIDE="${CFLAGS_GLIDE} -I$with_val/include"
7456         LIB_GLIDE="${LIB_GLIDE} -L$with_val/lib"
7457       fi 
7458 fi
7459
7460 fi
7461
7462 # Check whether --enable-aa or --disable-aa was given.
7463 if test "${enable_aa+set}" = set; then
7464   enableval="$enable_aa"
7465   :
7466 fi
7467
7468 if test x$enable_aa = xyes
7469 then
7470   ac_safe=`echo "aalib.h" | sed 'y%./+-%__p_%'`
7471 echo $ac_n "checking for aalib.h""... $ac_c" 1>&6
7472 echo "configure:7473: checking for aalib.h" >&5
7473 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7474   echo $ac_n "(cached) $ac_c" 1>&6
7475 else
7476   cat > conftest.$ac_ext <<EOF
7477 #line 7478 "configure"
7478 #include "confdefs.h"
7479 #include <aalib.h>
7480 EOF
7481 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7482 { (eval echo configure:7483: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7483 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7484 if test -z "$ac_err"; then
7485   rm -rf conftest*
7486   eval "ac_cv_header_$ac_safe=yes"
7487 else
7488   echo "$ac_err" >&5
7489   echo "configure: failed program was:" >&5
7490   cat conftest.$ac_ext >&5
7491   rm -rf conftest*
7492   eval "ac_cv_header_$ac_safe=no"
7493 fi
7494 rm -f conftest*
7495 fi
7496 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7497   echo "$ac_t""yes" 1>&6
7498   have_aa="true"
7499 else
7500   echo "$ac_t""no" 1>&6
7501 have_aa="false"
7502 fi
7503
7504   if test x$have_aa = xtrue
7505   then
7506     PLUGINS="${PLUGINS} aa"
7507     LIB_AA="${LIB_AA} -laa"
7508   fi
7509 fi
7510
7511
7512 # Check whether --with- or --without- was given.
7513 if test "${with_+set}" = set; then
7514   withval="$with_"
7515   :
7516 fi
7517
7518
7519 # Check whether --enable-dsp or --disable-dsp was given.
7520 if test "${enable_dsp+set}" = set; then
7521   enableval="$enable_dsp"
7522   :
7523 fi
7524
7525
7526 if test x$enable_dsp != xno &&
7527   (test x$SYS != xmingw32 || test x$enable_dsp = xyes)
7528 then
7529   for ac_hdr in soundcard.h sys/soundcard.h machine/soundcard.h
7530 do
7531 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7532 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7533 echo "configure:7534: checking for $ac_hdr" >&5
7534 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7535   echo $ac_n "(cached) $ac_c" 1>&6
7536 else
7537   cat > conftest.$ac_ext <<EOF
7538 #line 7539 "configure"
7539 #include "confdefs.h"
7540 #include <$ac_hdr>
7541 EOF
7542 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7543 { (eval echo configure:7544: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7544 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7545 if test -z "$ac_err"; then
7546   rm -rf conftest*
7547   eval "ac_cv_header_$ac_safe=yes"
7548 else
7549   echo "$ac_err" >&5
7550   echo "configure: failed program was:" >&5
7551   cat conftest.$ac_ext >&5
7552   rm -rf conftest*
7553   eval "ac_cv_header_$ac_safe=no"
7554 fi
7555 rm -f conftest*
7556 fi
7557 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7558   echo "$ac_t""yes" 1>&6
7559     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7560   cat >> confdefs.h <<EOF
7561 #define $ac_tr_hdr 1
7562 EOF
7563  
7564     PLUGINS="${PLUGINS} dsp"
7565     echo $ac_n "checking for main in -lossaudio""... $ac_c" 1>&6
7566 echo "configure:7567: checking for main in -lossaudio" >&5
7567 ac_lib_var=`echo ossaudio'_'main | sed 'y%./+-%__p_%'`
7568 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7569   echo $ac_n "(cached) $ac_c" 1>&6
7570 else
7571   ac_save_LIBS="$LIBS"
7572 LIBS="-lossaudio  $LIBS"
7573 cat > conftest.$ac_ext <<EOF
7574 #line 7575 "configure"
7575 #include "confdefs.h"
7576
7577 int main() {
7578 main()
7579 ; return 0; }
7580 EOF
7581 if { (eval echo configure:7582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7582   rm -rf conftest*
7583   eval "ac_cv_lib_$ac_lib_var=yes"
7584 else
7585   echo "configure: failed program was:" >&5
7586   cat conftest.$ac_ext >&5
7587   rm -rf conftest*
7588   eval "ac_cv_lib_$ac_lib_var=no"
7589 fi
7590 rm -f conftest*
7591 LIBS="$ac_save_LIBS"
7592
7593 fi
7594 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7595   echo "$ac_t""yes" 1>&6
7596   LIB_DSP="${LIB_DSP} -lossaudio"
7597 else
7598   echo "$ac_t""no" 1>&6
7599 fi
7600
7601   
7602 else
7603   echo "$ac_t""no" 1>&6
7604 fi
7605 done
7606
7607 fi
7608
7609 # Check whether --enable-esd or --disable-esd was given.
7610 if test "${enable_esd+set}" = set; then
7611   enableval="$enable_esd"
7612   if test x$enable_esd = xyes
7613    then
7614      # Extract the first word of "esd-config", so it can be a program name with args.
7615 set dummy esd-config; ac_word=$2
7616 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7617 echo "configure:7618: checking for $ac_word" >&5
7618 if eval "test \"`echo '$''{'ac_cv_path_ESD_CONFIG'+set}'`\" = set"; then
7619   echo $ac_n "(cached) $ac_c" 1>&6
7620 else
7621   case "$ESD_CONFIG" in
7622   /*)
7623   ac_cv_path_ESD_CONFIG="$ESD_CONFIG" # Let the user override the test with a path.
7624   ;;
7625   ?:/*)                  
7626   ac_cv_path_ESD_CONFIG="$ESD_CONFIG" # Let the user override the test with a dos path.
7627   ;;
7628   *)
7629   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7630   ac_dummy="$PATH"
7631   for ac_dir in $ac_dummy; do 
7632     test -z "$ac_dir" && ac_dir=.
7633     if test -f $ac_dir/$ac_word; then
7634       ac_cv_path_ESD_CONFIG="$ac_dir/$ac_word"
7635       break
7636     fi
7637   done
7638   IFS="$ac_save_ifs"
7639   test -z "$ac_cv_path_ESD_CONFIG" && ac_cv_path_ESD_CONFIG="no"
7640   ;;
7641 esac
7642 fi
7643 ESD_CONFIG="$ac_cv_path_ESD_CONFIG"
7644 if test -n "$ESD_CONFIG"; then
7645   echo "$ac_t""$ESD_CONFIG" 1>&6
7646 else
7647   echo "$ac_t""no" 1>&6
7648 fi
7649
7650      if test x${ESD_CONFIG} != xno
7651      then
7652        PLUGINS="${PLUGINS} esd"
7653        CFLAGS_ESD="${CFLAGS_ESD} `${ESD_CONFIG} --cflags`"
7654        LIB_ESD="${LIB_ESD} `${ESD_CONFIG} --libs`"
7655      fi
7656    fi
7657 fi
7658
7659
7660 # Check whether --enable-arts or --disable-arts was given.
7661 if test "${enable_arts+set}" = set; then
7662   enableval="$enable_arts"
7663   if test x$enable_arts = xyes
7664    then
7665      # Extract the first word of "artsc-config", so it can be a program name with args.
7666 set dummy artsc-config; ac_word=$2
7667 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7668 echo "configure:7669: checking for $ac_word" >&5
7669 if eval "test \"`echo '$''{'ac_cv_path_ARTS_CONFIG'+set}'`\" = set"; then
7670   echo $ac_n "(cached) $ac_c" 1>&6
7671 else
7672   case "$ARTS_CONFIG" in
7673   /*)
7674   ac_cv_path_ARTS_CONFIG="$ARTS_CONFIG" # Let the user override the test with a path.
7675   ;;
7676   ?:/*)                  
7677   ac_cv_path_ARTS_CONFIG="$ARTS_CONFIG" # Let the user override the test with a dos path.
7678   ;;
7679   *)
7680   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7681   ac_dummy="$PATH"
7682   for ac_dir in $ac_dummy; do 
7683     test -z "$ac_dir" && ac_dir=.
7684     if test -f $ac_dir/$ac_word; then
7685       ac_cv_path_ARTS_CONFIG="$ac_dir/$ac_word"
7686       break
7687     fi
7688   done
7689   IFS="$ac_save_ifs"
7690   test -z "$ac_cv_path_ARTS_CONFIG" && ac_cv_path_ARTS_CONFIG="no"
7691   ;;
7692 esac
7693 fi
7694 ARTS_CONFIG="$ac_cv_path_ARTS_CONFIG"
7695 if test -n "$ARTS_CONFIG"; then
7696   echo "$ac_t""$ARTS_CONFIG" 1>&6
7697 else
7698   echo "$ac_t""no" 1>&6
7699 fi
7700
7701      if test x${ARTS_CONFIG} != xno
7702      then
7703        PLUGINS="${PLUGINS} arts"
7704        CFLAGS_ARTS="${CFLAGS_ARTS} `${ARTS_CONFIG} --cflags`"
7705        LIB_ARTS="${LIB_ARTS} `${ARTS_CONFIG} --libs `"
7706      fi
7707    fi
7708 fi
7709
7710
7711 # Check whether --enable-alsa or --disable-alsa was given.
7712 if test "${enable_alsa+set}" = set; then
7713   enableval="$enable_alsa"
7714   if test x$enable_alsa = xyes
7715    then
7716      ac_safe=`echo "alsa/asoundlib.h" | sed 'y%./+-%__p_%'`
7717 echo $ac_n "checking for alsa/asoundlib.h""... $ac_c" 1>&6
7718 echo "configure:7719: checking for alsa/asoundlib.h" >&5
7719 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7720   echo $ac_n "(cached) $ac_c" 1>&6
7721 else
7722   cat > conftest.$ac_ext <<EOF
7723 #line 7724 "configure"
7724 #include "confdefs.h"
7725 #include <alsa/asoundlib.h>
7726 EOF
7727 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7728 { (eval echo configure:7729: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7729 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7730 if test -z "$ac_err"; then
7731   rm -rf conftest*
7732   eval "ac_cv_header_$ac_safe=yes"
7733 else
7734   echo "$ac_err" >&5
7735   echo "configure: failed program was:" >&5
7736   cat conftest.$ac_ext >&5
7737   rm -rf conftest*
7738   eval "ac_cv_header_$ac_safe=no"
7739 fi
7740 rm -f conftest*
7741 fi
7742 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7743   echo "$ac_t""yes" 1>&6
7744   echo $ac_n "checking for main in -lasound""... $ac_c" 1>&6
7745 echo "configure:7746: checking for main in -lasound" >&5
7746 ac_lib_var=`echo asound'_'main | sed 'y%./+-%__p_%'`
7747 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7748   echo $ac_n "(cached) $ac_c" 1>&6
7749 else
7750   ac_save_LIBS="$LIBS"
7751 LIBS="-lasound  $LIBS"
7752 cat > conftest.$ac_ext <<EOF
7753 #line 7754 "configure"
7754 #include "confdefs.h"
7755
7756 int main() {
7757 main()
7758 ; return 0; }
7759 EOF
7760 if { (eval echo configure:7761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7761   rm -rf conftest*
7762   eval "ac_cv_lib_$ac_lib_var=yes"
7763 else
7764   echo "configure: failed program was:" >&5
7765   cat conftest.$ac_ext >&5
7766   rm -rf conftest*
7767   eval "ac_cv_lib_$ac_lib_var=no"
7768 fi
7769 rm -f conftest*
7770 LIBS="$ac_save_LIBS"
7771
7772 fi
7773 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7774   echo "$ac_t""yes" 1>&6
7775   have_alsa="true"
7776 else
7777   echo "$ac_t""no" 1>&6
7778 have_alsa="false"
7779 fi
7780
7781 else
7782   echo "$ac_t""no" 1>&6
7783 have_alsa="false"
7784 fi
7785
7786      if test x$have_alsa = xtrue
7787      then
7788        PLUGINS="${PLUGINS} alsa"
7789        LIB_ALSA="${LIB_ALSA} -lasound -lm -ldl"
7790      fi
7791    fi
7792 fi
7793
7794
7795 # Check whether --enable-waveout or --disable-waveout was given.
7796 if test "${enable_waveout+set}" = set; then
7797   enableval="$enable_waveout"
7798   :
7799 fi
7800
7801 if test "x$enableval" != "xno" -a x$SYS = xmingw32
7802   then
7803     PLUGINS="${PLUGINS} waveout"
7804     LIB_WAVEOUT="-lwinmm"
7805 fi
7806
7807
7808 # Check whether --with- or --without- was given.
7809 if test "${with_+set}" = set; then
7810   withval="$with_"
7811   :
7812 fi
7813
7814
7815 # Check whether --enable-gtk or --disable-gtk was given.
7816 if test "${enable_gtk+set}" = set; then
7817   enableval="$enable_gtk"
7818   :
7819 fi
7820
7821 if test x$enable_gtk != xno
7822 then
7823   GTK_PATH=$PATH
7824   # Check whether --with-gtk-config-path or --without-gtk-config-path was given.
7825 if test "${with_gtk_config_path+set}" = set; then
7826   withval="$with_gtk_config_path"
7827    if test "x$withval" != "xno"
7828       then
7829         GTK_PATH=$withval:$PATH
7830       fi 
7831 fi
7832
7833   # look for gtk-config
7834   # Extract the first word of "gtk12-config", so it can be a program name with args.
7835 set dummy gtk12-config; ac_word=$2
7836 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7837 echo "configure:7838: checking for $ac_word" >&5
7838 if eval "test \"`echo '$''{'ac_cv_path_GTK12_CONFIG'+set}'`\" = set"; then
7839   echo $ac_n "(cached) $ac_c" 1>&6
7840 else
7841   case "$GTK12_CONFIG" in
7842   /*)
7843   ac_cv_path_GTK12_CONFIG="$GTK12_CONFIG" # Let the user override the test with a path.
7844   ;;
7845   ?:/*)                  
7846   ac_cv_path_GTK12_CONFIG="$GTK12_CONFIG" # Let the user override the test with a dos path.
7847   ;;
7848   *)
7849   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7850   ac_dummy="$GTK_PATH"
7851   for ac_dir in $ac_dummy; do 
7852     test -z "$ac_dir" && ac_dir=.
7853     if test -f $ac_dir/$ac_word; then
7854       ac_cv_path_GTK12_CONFIG="$ac_dir/$ac_word"
7855       break
7856     fi
7857   done
7858   IFS="$ac_save_ifs"
7859   test -z "$ac_cv_path_GTK12_CONFIG" && ac_cv_path_GTK12_CONFIG="no"
7860   ;;
7861 esac
7862 fi
7863 GTK12_CONFIG="$ac_cv_path_GTK12_CONFIG"
7864 if test -n "$GTK12_CONFIG"; then
7865   echo "$ac_t""$GTK12_CONFIG" 1>&6
7866 else
7867   echo "$ac_t""no" 1>&6
7868 fi
7869
7870   GTK_CONFIG=${GTK12_CONFIG}
7871   if test x${GTK_CONFIG} = xno
7872   then
7873     # Extract the first word of "gtk-config", so it can be a program name with args.
7874 set dummy gtk-config; ac_word=$2
7875 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7876 echo "configure:7877: checking for $ac_word" >&5
7877 if eval "test \"`echo '$''{'ac_cv_path_GTK_CONFIG'+set}'`\" = set"; then
7878   echo $ac_n "(cached) $ac_c" 1>&6
7879 else
7880   case "$GTK_CONFIG" in
7881   /*)
7882   ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a path.
7883   ;;
7884   ?:/*)                  
7885   ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a dos path.
7886   ;;
7887   *)
7888   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7889   ac_dummy="$GTK_PATH"
7890   for ac_dir in $ac_dummy; do 
7891     test -z "$ac_dir" && ac_dir=.
7892     if test -f $ac_dir/$ac_word; then
7893       ac_cv_path_GTK_CONFIG="$ac_dir/$ac_word"
7894       break
7895     fi
7896   done
7897   IFS="$ac_save_ifs"
7898   test -z "$ac_cv_path_GTK_CONFIG" && ac_cv_path_GTK_CONFIG="no"
7899   ;;
7900 esac
7901 fi
7902 GTK_CONFIG="$ac_cv_path_GTK_CONFIG"
7903 if test -n "$GTK_CONFIG"; then
7904   echo "$ac_t""$GTK_CONFIG" 1>&6
7905 else
7906   echo "$ac_t""no" 1>&6
7907 fi
7908
7909   fi
7910   if test x${GTK_CONFIG} != xno
7911   then
7912     if expr 1.2.0 \> `$GTK_CONFIG --version` >/dev/null
7913     then
7914       { 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; }
7915     fi
7916     CFLAGS_GTK="${CFLAGS_GTK} `${GTK_CONFIG} --cflags gtk`"
7917     LIB_GTK="${LIB_GTK} `${GTK_CONFIG} --libs gtk | sed 's,-rdynamic,,'`"
7918     # now look for the gtk.h header
7919     saved_CPPFLAGS=$CPPFLAGS
7920     CPPFLAGS="$CPPFLAGS $CFLAGS_GTK"
7921     ac_cv_gtk_headers=yes
7922     for ac_hdr in gtk/gtk.h glib.h gdk/gdk.h
7923 do
7924 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7925 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7926 echo "configure:7927: checking for $ac_hdr" >&5
7927 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7928   echo $ac_n "(cached) $ac_c" 1>&6
7929 else
7930   cat > conftest.$ac_ext <<EOF
7931 #line 7932 "configure"
7932 #include "confdefs.h"
7933 #include <$ac_hdr>
7934 EOF
7935 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7936 { (eval echo configure:7937: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7937 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7938 if test -z "$ac_err"; then
7939   rm -rf conftest*
7940   eval "ac_cv_header_$ac_safe=yes"
7941 else
7942   echo "$ac_err" >&5
7943   echo "configure: failed program was:" >&5
7944   cat conftest.$ac_ext >&5
7945   rm -rf conftest*
7946   eval "ac_cv_header_$ac_safe=no"
7947 fi
7948 rm -f conftest*
7949 fi
7950 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7951   echo "$ac_t""yes" 1>&6
7952     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7953   cat >> confdefs.h <<EOF
7954 #define $ac_tr_hdr 1
7955 EOF
7956  
7957 else
7958   echo "$ac_t""no" 1>&6
7959 ac_cv_gtk_headers=no
7960       echo "Cannot find gtk development headers."
7961     
7962 fi
7963 done
7964
7965     if test "x$ac_cv_gtk_headers" = xyes
7966     then
7967       PLUGINS="${PLUGINS} gtk"
7968       ALIASES="${ALIASES} gvlc"
7969     fi
7970     CPPFLAGS=$saved_CPPFLAGS
7971   fi
7972 fi
7973
7974 # Check whether --enable-gnome or --disable-gnome was given.
7975 if test "${enable_gnome+set}" = set; then
7976   enableval="$enable_gnome"
7977   if test x$enable_gnome = xyes; then
7978     # look for gnome-config
7979     # Extract the first word of "gnome-config", so it can be a program name with args.
7980 set dummy gnome-config; ac_word=$2
7981 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7982 echo "configure:7983: checking for $ac_word" >&5
7983 if eval "test \"`echo '$''{'ac_cv_path_GNOME_CONFIG'+set}'`\" = set"; then
7984   echo $ac_n "(cached) $ac_c" 1>&6
7985 else
7986   case "$GNOME_CONFIG" in
7987   /*)
7988   ac_cv_path_GNOME_CONFIG="$GNOME_CONFIG" # Let the user override the test with a path.
7989   ;;
7990   ?:/*)                  
7991   ac_cv_path_GNOME_CONFIG="$GNOME_CONFIG" # Let the user override the test with a dos path.
7992   ;;
7993   *)
7994   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7995   ac_dummy="$PATH"
7996   for ac_dir in $ac_dummy; do 
7997     test -z "$ac_dir" && ac_dir=.
7998     if test -f $ac_dir/$ac_word; then
7999       ac_cv_path_GNOME_CONFIG="$ac_dir/$ac_word"
8000       break
8001     fi
8002   done
8003   IFS="$ac_save_ifs"
8004   test -z "$ac_cv_path_GNOME_CONFIG" && ac_cv_path_GNOME_CONFIG="no"
8005   ;;
8006 esac
8007 fi
8008 GNOME_CONFIG="$ac_cv_path_GNOME_CONFIG"
8009 if test -n "$GNOME_CONFIG"; then
8010   echo "$ac_t""$GNOME_CONFIG" 1>&6
8011 else
8012   echo "$ac_t""no" 1>&6
8013 fi
8014
8015     if test -x ${GNOME_CONFIG}
8016     then
8017        CFLAGS_GNOME="${CFLAGS_GNOME} `${GNOME_CONFIG} --cflags gtk gnomeui`"
8018        LIB_GNOME="${LIB_GNOME} `${GNOME_CONFIG} --libs gnomeui | sed 's,-rdynamic,,'`"
8019     fi
8020     # now look for the gnome.h header
8021     saved_CPPFLAGS=$CPPFLAGS
8022     CPPFLAGS="$CPPFLAGS $CFLAGS_GNOME"
8023     for ac_hdr in gnome.h
8024 do
8025 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8026 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8027 echo "configure:8028: checking for $ac_hdr" >&5
8028 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8029   echo $ac_n "(cached) $ac_c" 1>&6
8030 else
8031   cat > conftest.$ac_ext <<EOF
8032 #line 8033 "configure"
8033 #include "confdefs.h"
8034 #include <$ac_hdr>
8035 EOF
8036 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8037 { (eval echo configure:8038: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8038 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8039 if test -z "$ac_err"; then
8040   rm -rf conftest*
8041   eval "ac_cv_header_$ac_safe=yes"
8042 else
8043   echo "$ac_err" >&5
8044   echo "configure: failed program was:" >&5
8045   cat conftest.$ac_ext >&5
8046   rm -rf conftest*
8047   eval "ac_cv_header_$ac_safe=no"
8048 fi
8049 rm -f conftest*
8050 fi
8051 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8052   echo "$ac_t""yes" 1>&6
8053     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8054   cat >> confdefs.h <<EOF
8055 #define $ac_tr_hdr 1
8056 EOF
8057  
8058       PLUGINS="${PLUGINS} gnome"
8059       ALIASES="${ALIASES} gnome-vlc"
8060      
8061 else
8062   echo "$ac_t""no" 1>&6
8063 { echo "configure: error: Can't find gnome headers. Please install the gnome
8064 developement librairie or remove the --enable-gnome option" 1>&2; exit 1; }
8065      
8066 fi
8067 done
8068
8069   
8070     CPPFLAGS=$saved_CPPFLAGS
8071   fi
8072 fi
8073
8074
8075 # Check whether --enable-qt or --disable-qt was given.
8076 if test "${enable_qt+set}" = set; then
8077   enableval="$enable_qt"
8078   if test x$enable_qt = xyes; then
8079      PLUGINS="${PLUGINS} qt"
8080      ALIASES="${ALIASES} qvlc"
8081      LIB_QT="${LIB_QT} -lqt -L${QTDIR}/lib"
8082      CFLAGS_QT="${CFLAGS_QT} -I/usr/include/qt -I${QTDIR}/include"
8083      if test -x ${QTDIR}/bin/moc
8084      then
8085        MOC=${QTDIR}/bin/moc
8086      else
8087        MOC=moc
8088      fi
8089    fi
8090 fi
8091
8092
8093 # Check whether --enable-kde or --disable-kde was given.
8094 if test "${enable_kde+set}" = set; then
8095   enableval="$enable_kde"
8096   if test x$enable_kde = xyes; then
8097      PLUGINS="${PLUGINS} kde"
8098      ALIASES="${ALIASES} kvlc"
8099      LIB_KDE="${LIB_KDE} -L${KDEDIR}/lib -lkfile"
8100      CFLAGS_KDE="${CFLAGS_KDE} -I/usr/include/kde -I/usr/include/qt"
8101      CFLAGS_KDE="${CFLAGS_KDE} -I${KDEDIR}/include -I${QTDIR}/include"
8102      if test -x ${QTDIR}/bin/moc
8103      then
8104        MOC=${QTDIR}/bin/moc
8105      else
8106        MOC=moc
8107      fi
8108    fi
8109 fi
8110
8111
8112 # Check whether --enable-macosx or --disable-macosx was given.
8113 if test "${enable_macosx+set}" = set; then
8114   enableval="$enable_macosx"
8115   if test x$enable_macosx = xyes
8116    then
8117      BUILTINS="${BUILTINS} macosx"
8118      LIB_MACOSX="${LIB_MACOSX} -framework CoreAudio -framework AudioToolbox -framework Cocoa -framework AGL -framework QuickTime -lobjc"
8119      CFLAGS_MACOSX="${CFLAGS_MACOSX} -ObjC"
8120      LIB_COMMON="${LIB_COMMON} -ObjC"
8121    fi
8122 else
8123   for ac_hdr in Cocoa/Cocoa.h
8124 do
8125 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8126 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8127 echo "configure:8128: checking for $ac_hdr" >&5
8128 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8129   echo $ac_n "(cached) $ac_c" 1>&6
8130 else
8131   cat > conftest.$ac_ext <<EOF
8132 #line 8133 "configure"
8133 #include "confdefs.h"
8134 #include <$ac_hdr>
8135 EOF
8136 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8137 { (eval echo configure:8138: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8138 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8139 if test -z "$ac_err"; then
8140   rm -rf conftest*
8141   eval "ac_cv_header_$ac_safe=yes"
8142 else
8143   echo "$ac_err" >&5
8144   echo "configure: failed program was:" >&5
8145   cat conftest.$ac_ext >&5
8146   rm -rf conftest*
8147   eval "ac_cv_header_$ac_safe=no"
8148 fi
8149 rm -f conftest*
8150 fi
8151 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8152   echo "$ac_t""yes" 1>&6
8153     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8154   cat >> confdefs.h <<EOF
8155 #define $ac_tr_hdr 1
8156 EOF
8157  BUILTINS="${BUILTINS} macosx"
8158      LIB_MACOSX="${LIB_MACOSX} -framework CoreAudio -framework AudioToolbox -framework Cocoa -framework AGL -framework QuickTime -lobjc"
8159      CFLAGS_MACOSX="${CFLAGS_MACOSX} -ObjC"
8160      LIB_COMMON="${LIB_COMMON} -ObjC"
8161    
8162 else
8163   echo "$ac_t""no" 1>&6
8164 fi
8165 done
8166
8167 fi
8168
8169
8170 # Check whether --enable-qnx or --disable-qnx was given.
8171 if test "${enable_qnx+set}" = set; then
8172   enableval="$enable_qnx"
8173   :
8174 fi
8175
8176     if test x$enable_qnx != xno
8177     then
8178       for ac_hdr in Ph.h
8179 do
8180 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8181 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8182 echo "configure:8183: checking for $ac_hdr" >&5
8183 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8184   echo $ac_n "(cached) $ac_c" 1>&6
8185 else
8186   cat > conftest.$ac_ext <<EOF
8187 #line 8188 "configure"
8188 #include "confdefs.h"
8189 #include <$ac_hdr>
8190 EOF
8191 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8192 { (eval echo configure:8193: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8193 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8194 if test -z "$ac_err"; then
8195   rm -rf conftest*
8196   eval "ac_cv_header_$ac_safe=yes"
8197 else
8198   echo "$ac_err" >&5
8199   echo "configure: failed program was:" >&5
8200   cat conftest.$ac_ext >&5
8201   rm -rf conftest*
8202   eval "ac_cv_header_$ac_safe=no"
8203 fi
8204 rm -f conftest*
8205 fi
8206 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8207   echo "$ac_t""yes" 1>&6
8208     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8209   cat >> confdefs.h <<EOF
8210 #define $ac_tr_hdr 1
8211 EOF
8212  
8213         PLUGINS="${PLUGINS} qnx"
8214         LIB_QNX="${LIB_QNX} -lasound -lph"
8215       
8216 else
8217   echo "$ac_t""no" 1>&6
8218 fi
8219 done
8220
8221     fi
8222
8223 # Check whether --enable-win32 or --disable-win32 was given.
8224 if test "${enable_win32+set}" = set; then
8225   enableval="$enable_win32"
8226    if test "x$enableval" != "xno"
8227     then
8228       PLUGINS="${PLUGINS} win32"
8229     fi 
8230 fi
8231
8232
8233 # Check whether --enable-ncurses or --disable-ncurses was given.
8234 if test "${enable_ncurses+set}" = set; then
8235   enableval="$enable_ncurses"
8236   if test x$enable_ncurses = xyes; then
8237      PLUGINS="${PLUGINS} ncurses"
8238      LIB_NCURSES="${LIB_NCURSES} -lncurses"
8239    fi
8240 fi
8241
8242
8243 # Check whether --enable-lirc or --disable-lirc was given.
8244 if test "${enable_lirc+set}" = set; then
8245   enableval="$enable_lirc"
8246   :
8247 fi
8248
8249 if test x$enable_lirc = xyes
8250 then
8251   ac_safe=`echo "lirc/lirc_client.h" | sed 'y%./+-%__p_%'`
8252 echo $ac_n "checking for lirc/lirc_client.h""... $ac_c" 1>&6
8253 echo "configure:8254: checking for lirc/lirc_client.h" >&5
8254 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8255   echo $ac_n "(cached) $ac_c" 1>&6
8256 else
8257   cat > conftest.$ac_ext <<EOF
8258 #line 8259 "configure"
8259 #include "confdefs.h"
8260 #include <lirc/lirc_client.h>
8261 EOF
8262 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8263 { (eval echo configure:8264: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8264 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8265 if test -z "$ac_err"; then
8266   rm -rf conftest*
8267   eval "ac_cv_header_$ac_safe=yes"
8268 else
8269   echo "$ac_err" >&5
8270   echo "configure: failed program was:" >&5
8271   cat conftest.$ac_ext >&5
8272   rm -rf conftest*
8273   eval "ac_cv_header_$ac_safe=no"
8274 fi
8275 rm -f conftest*
8276 fi
8277 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8278   echo "$ac_t""yes" 1>&6
8279   echo $ac_n "checking for lirc_init in -llirc_client""... $ac_c" 1>&6
8280 echo "configure:8281: checking for lirc_init in -llirc_client" >&5
8281 ac_lib_var=`echo lirc_client'_'lirc_init | sed 'y%./+-%__p_%'`
8282 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8283   echo $ac_n "(cached) $ac_c" 1>&6
8284 else
8285   ac_save_LIBS="$LIBS"
8286 LIBS="-llirc_client  $LIBS"
8287 cat > conftest.$ac_ext <<EOF
8288 #line 8289 "configure"
8289 #include "confdefs.h"
8290 /* Override any gcc2 internal prototype to avoid an error.  */
8291 /* We use char because int might match the return type of a gcc2
8292     builtin and then its argument prototype would still apply.  */
8293 char lirc_init();
8294
8295 int main() {
8296 lirc_init()
8297 ; return 0; }
8298 EOF
8299 if { (eval echo configure:8300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8300   rm -rf conftest*
8301   eval "ac_cv_lib_$ac_lib_var=yes"
8302 else
8303   echo "configure: failed program was:" >&5
8304   cat conftest.$ac_ext >&5
8305   rm -rf conftest*
8306   eval "ac_cv_lib_$ac_lib_var=no"
8307 fi
8308 rm -f conftest*
8309 LIBS="$ac_save_LIBS"
8310
8311 fi
8312 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8313   echo "$ac_t""yes" 1>&6
8314   have_lirc="true"
8315 else
8316   echo "$ac_t""no" 1>&6
8317 have_lirc="false"
8318 fi
8319
8320 else
8321   echo "$ac_t""no" 1>&6
8322 have_lirc="false"
8323 fi
8324
8325   if test x$have_lirc = xtrue
8326   then
8327     PLUGINS="${PLUGINS} lirc"
8328     LIB_LIRC="${LIB_LIRC} -llirc_client"
8329   fi
8330 fi
8331
8332 fi
8333
8334 # Check whether --with- or --without- was given.
8335 if test "${with_+set}" = set; then
8336   withval="$with_"
8337   :
8338 fi
8339
8340
8341 # Check whether --with-words or --without-words was given.
8342 if test "${with_words+set}" = set; then
8343   withval="$with_words"
8344   :
8345 fi
8346
8347   case "x$withval" in
8348     xbig)
8349       ac_cv_c_bigendian=yes
8350       ;;
8351     xlittle)
8352       ac_cv_c_bigendian=no
8353       ;;
8354     *)
8355                   echo $ac_n "checking whether the byte order is big-endian""... $ac_c" 1>&6
8356 echo "configure:8357: checking whether the byte order is big-endian" >&5
8357 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
8358   echo $ac_n "(cached) $ac_c" 1>&6
8359 else
8360   ac_cv_c_bigendian=unknown
8361         cat >conftest.c <<EOF
8362         short am[] = { 0x4249, 0x4765, 0x6e44, 0x6961, 0x6e53, 0x7953, 0 };
8363         short ai[] = { 0x694c, 0x5454, 0x656c, 0x6e45, 0x6944, 0x6e61, 0 };
8364         void _a(void) { char*s = (char*)am; s = (char *)ai; }
8365         short ei[] = { 0x89D3, 0xe3e3, 0x8593, 0x95c5, 0x89c4, 0x9581, 0 };
8366         short em[] = { 0xc2c9, 0xc785, 0x95c4, 0x8981, 0x95e2, 0xa8e2, 0 };
8367         void _e(void) { char*s = (char*)em; s = (char*)ei; }
8368         int main(void) { _a(); _e(); return 0; }
8369 EOF
8370         
8371         if test -f conftest.c
8372         then 
8373           if ${CC-cc} conftest.c -o conftest.o >config.log 2>&1 \
8374               && test -f conftest.o
8375           then
8376             if test "`strings conftest.o | grep BIGenDianSyS`"
8377             then
8378               ac_cv_c_bigendian=yes
8379             fi
8380             if test "`strings conftest.o | grep LiTTleEnDian`"
8381             then
8382               ac_cv_c_bigendian=no
8383             fi
8384           fi
8385         fi
8386       
8387 fi
8388
8389 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
8390       if test x$ac_cv_c_bigendian = xunknown
8391       then
8392         { echo "configure: error: Could not guess endianness, please use --with-words" 1>&2; exit 1; }
8393       fi
8394       ;;
8395   esac
8396 if test $ac_cv_c_bigendian = yes
8397 then
8398   cat >> confdefs.h <<\EOF
8399 #define WORDS_BIGENDIAN 1
8400 EOF
8401
8402 fi
8403
8404 DLL_PATH=.
8405 # Check whether --with-dll-path or --without-dll-path was given.
8406 if test "${with_dll_path+set}" = set; then
8407   withval="$with_dll_path"
8408    if test "x$withval" != "xno"
8409     then
8410       DLL_PATH=$withval
8411     fi 
8412 fi
8413
8414
8415 GPROF=0
8416 # Check whether --enable-gprof or --disable-gprof was given.
8417 if test "${enable_gprof+set}" = set; then
8418   enableval="$enable_gprof"
8419    if test x$enableval = xyes; then GPROF=1; fi 
8420 fi
8421
8422
8423 CPROF=0
8424 # Check whether --enable-cprof or --disable-cprof was given.
8425 if test "${enable_cprof+set}" = set; then
8426   enableval="$enable_cprof"
8427    if test x$enableval = xyes;
8428   then
8429     LIB_COMMON="${LIB_COMMON} -lcprof"
8430     CPROF=1
8431   fi
8432
8433 fi
8434
8435
8436 # Check whether --enable-pth or --disable-pth was given.
8437 if test "${enable_pth+set}" = set; then
8438   enableval="$enable_pth"
8439    if test x$enableval = xyes; then
8440     echo $ac_n "checking for pth_init in -lpth""... $ac_c" 1>&6
8441 echo "configure:8442: checking for pth_init in -lpth" >&5
8442 ac_lib_var=`echo pth'_'pth_init | sed 'y%./+-%__p_%'`
8443 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8444   echo $ac_n "(cached) $ac_c" 1>&6
8445 else
8446   ac_save_LIBS="$LIBS"
8447 LIBS="-lpth  $LIBS"
8448 cat > conftest.$ac_ext <<EOF
8449 #line 8450 "configure"
8450 #include "confdefs.h"
8451 /* Override any gcc2 internal prototype to avoid an error.  */
8452 /* We use char because int might match the return type of a gcc2
8453     builtin and then its argument prototype would still apply.  */
8454 char pth_init();
8455
8456 int main() {
8457 pth_init()
8458 ; return 0; }
8459 EOF
8460 if { (eval echo configure:8461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8461   rm -rf conftest*
8462   eval "ac_cv_lib_$ac_lib_var=yes"
8463 else
8464   echo "configure: failed program was:" >&5
8465   cat conftest.$ac_ext >&5
8466   rm -rf conftest*
8467   eval "ac_cv_lib_$ac_lib_var=no"
8468 fi
8469 rm -f conftest*
8470 LIBS="$ac_save_LIBS"
8471
8472 fi
8473 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8474   echo "$ac_t""yes" 1>&6
8475     ac_tr_lib=HAVE_LIB`echo pth | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8476     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8477   cat >> confdefs.h <<EOF
8478 #define $ac_tr_lib 1
8479 EOF
8480
8481   LIBS="-lpth $LIBS"
8482
8483 else
8484   echo "$ac_t""no" 1>&6
8485 fi
8486
8487     cat > conftest.$ac_ext <<EOF
8488 #line 8489 "configure"
8489 #include "confdefs.h"
8490 #include <pth.h>
8491 EOF
8492 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8493   egrep "pth_init" >/dev/null 2>&1; then
8494   rm -rf conftest*
8495   
8496       cat >> confdefs.h <<\EOF
8497 #define PTH_INIT_IN_PTH_H 1
8498 EOF
8499
8500     THREAD_LIB="-lpth"
8501     fi
8502 fi
8503 rm -f conftest*
8504
8505
8506 fi
8507
8508
8509 # Check whether --enable-st or --disable-st was given.
8510 if test "${enable_st+set}" = set; then
8511   enableval="$enable_st"
8512    if test x$enableval = xyes; then
8513     echo $ac_n "checking for st_init in -lst""... $ac_c" 1>&6
8514 echo "configure:8515: checking for st_init in -lst" >&5
8515 ac_lib_var=`echo st'_'st_init | sed 'y%./+-%__p_%'`
8516 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8517   echo $ac_n "(cached) $ac_c" 1>&6
8518 else
8519   ac_save_LIBS="$LIBS"
8520 LIBS="-lst  $LIBS"
8521 cat > conftest.$ac_ext <<EOF
8522 #line 8523 "configure"
8523 #include "confdefs.h"
8524 /* Override any gcc2 internal prototype to avoid an error.  */
8525 /* We use char because int might match the return type of a gcc2
8526     builtin and then its argument prototype would still apply.  */
8527 char st_init();
8528
8529 int main() {
8530 st_init()
8531 ; return 0; }
8532 EOF
8533 if { (eval echo configure:8534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8534   rm -rf conftest*
8535   eval "ac_cv_lib_$ac_lib_var=yes"
8536 else
8537   echo "configure: failed program was:" >&5
8538   cat conftest.$ac_ext >&5
8539   rm -rf conftest*
8540   eval "ac_cv_lib_$ac_lib_var=no"
8541 fi
8542 rm -f conftest*
8543 LIBS="$ac_save_LIBS"
8544
8545 fi
8546 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8547   echo "$ac_t""yes" 1>&6
8548     ac_tr_lib=HAVE_LIB`echo st | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8549     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8550   cat >> confdefs.h <<EOF
8551 #define $ac_tr_lib 1
8552 EOF
8553
8554   LIBS="-lst $LIBS"
8555
8556 else
8557   echo "$ac_t""no" 1>&6
8558 fi
8559
8560     cat > conftest.$ac_ext <<EOF
8561 #line 8562 "configure"
8562 #include "confdefs.h"
8563 #include <st.h>
8564 EOF
8565 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8566   egrep "st_init" >/dev/null 2>&1; then
8567   rm -rf conftest*
8568   
8569       cat >> confdefs.h <<\EOF
8570 #define ST_INIT_IN_ST_H 1
8571 EOF
8572
8573     THREAD_LIB="-lst"
8574     fi
8575 fi
8576 rm -f conftest*
8577
8578
8579 fi
8580
8581
8582 LIB_COMMON="${LIB_COMMON} ${THREAD_LIB}"
8583
8584 # Check whether --enable-plugins or --disable-plugins was given.
8585 if test "${enable_plugins+set}" = set; then
8586   enableval="$enable_plugins"
8587   if test x$enable_plugins = xno
8588    then
8589      BUILTINS="${BUILTINS} ${PLUGINS}"
8590      PLUGINS=
8591    fi
8592 fi
8593
8594
8595 if test x$ac_cv_header_dlfcn_h = xno -a x$ac_cv_header_image_h = xno -a x$SYS != xmingw32
8596 then
8597   echo "*** Your system doesn't have plug-in support. All plug-ins will be compiled"
8598   echo "as built-in"
8599   BUILTINS="${BUILTINS} ${PLUGINS}"
8600   PLUGINS=
8601 fi
8602
8603 cat >> confdefs.h <<EOF
8604 #define VERSION_MESSAGE "vlc $VLC_VERSION $VLC_CODENAME Copyright 1996-2001 VideoLAN\n"
8605 EOF
8606
8607 cat >> confdefs.h <<EOF
8608 #define COPYRIGHT_MESSAGE "VideoLAN Client - version $VLC_VERSION $VLC_CODENAME - (c) 1996-2002 VideoLAN"
8609 EOF
8610
8611
8612 VLC_SYMBOL="`echo ${VLC_VERSION} | tr .- __`"
8613 cat >> confdefs.h <<EOF
8614 #define MODULE_SUFFIX "__MODULE_$VLC_SYMBOL"
8615 EOF
8616
8617 cat >> confdefs.h <<EOF
8618 #define MODULE_SYMBOL $VLC_SYMBOL
8619 EOF
8620
8621
8622 DATA_PATH="${ac_tool_prefix}/share/videolan"
8623
8624 PLUGIN_PATH="${ac_tool_prefix}/share/videolan"
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
8708
8709
8710
8711
8712
8713
8714
8715
8716
8717
8718
8719
8720
8721
8722
8723
8724
8725
8726
8727 trap '' 1 2 15
8728 cat > confcache <<\EOF
8729 # This file is a shell script that caches the results of configure
8730 # tests run on this system so they can be shared between configure
8731 # scripts and configure runs.  It is not useful on other systems.
8732 # If it contains results you don't want to keep, you may remove or edit it.
8733 #
8734 # By default, configure uses ./config.cache as the cache file,
8735 # creating it if it does not exist already.  You can give configure
8736 # the --cache-file=FILE option to use a different cache file; that is
8737 # what configure does when it calls configure scripts in
8738 # subdirectories, so they share the cache.
8739 # Giving --cache-file=/dev/null disables caching, for debugging configure.
8740 # config.status only pays attention to the cache file if you give it the
8741 # --recheck option to rerun configure.
8742 #
8743 EOF
8744 # The following way of writing the cache mishandles newlines in values,
8745 # but we know of no workaround that is simple, portable, and efficient.
8746 # So, don't put newlines in cache variables' values.
8747 # Ultrix sh set writes to stderr and can't be redirected directly,
8748 # and sets the high bit in the cache file unless we assign to the vars.
8749 (set) 2>&1 |
8750   case `(ac_space=' '; set | grep ac_space) 2>&1` in
8751   *ac_space=\ *)
8752     # `set' does not quote correctly, so add quotes (double-quote substitution
8753     # turns \\\\ into \\, and sed turns \\ into \).
8754     sed -n \
8755       -e "s/'/'\\\\''/g" \
8756       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
8757     ;;
8758   *)
8759     # `set' quotes correctly as required by POSIX, so do not add quotes.
8760     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
8761     ;;
8762   esac >> confcache
8763 if cmp -s $cache_file confcache; then
8764   :
8765 else
8766   if test -w $cache_file; then
8767     echo "updating cache $cache_file"
8768     cat confcache > $cache_file
8769   else
8770     echo "not updating unwritable cache $cache_file"
8771   fi
8772 fi
8773 rm -f confcache
8774
8775 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
8776
8777 test "x$prefix" = xNONE && prefix=$ac_default_prefix
8778 # Let make expand exec_prefix.
8779 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
8780
8781 # Any assignment to VPATH causes Sun make to only execute
8782 # the first set of double-colon rules, so remove it if not needed.
8783 # If there is a colon in the path, we need to keep it.
8784 if test "x$srcdir" = x.; then
8785   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
8786 fi
8787
8788 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
8789
8790 DEFS=-DHAVE_CONFIG_H
8791
8792 # Without the "./", some shells look in PATH for config.status.
8793 : ${CONFIG_STATUS=./config.status}
8794
8795 echo creating $CONFIG_STATUS
8796 rm -f $CONFIG_STATUS
8797 cat > $CONFIG_STATUS <<EOF
8798 #! /bin/sh
8799 # Generated automatically by configure.
8800 # Run this file to recreate the current configuration.
8801 # This directory was configured as follows,
8802 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
8803 #
8804 # $0 $ac_configure_args
8805 #
8806 # Compiler output produced by configure, useful for debugging
8807 # configure, is in ./config.log if it exists.
8808
8809 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
8810 for ac_option
8811 do
8812   case "\$ac_option" in
8813   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
8814     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
8815     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
8816   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
8817     echo "$CONFIG_STATUS generated by autoconf version 2.13"
8818     exit 0 ;;
8819   -help | --help | --hel | --he | --h)
8820     echo "\$ac_cs_usage"; exit 0 ;;
8821   *) echo "\$ac_cs_usage"; exit 1 ;;
8822   esac
8823 done
8824
8825 ac_given_srcdir=$srcdir
8826 ac_given_INSTALL="$INSTALL"
8827
8828 trap 'rm -fr `echo "Makefile.opts po/Makefile.in include/defs.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
8829 EOF
8830 cat >> $CONFIG_STATUS <<EOF
8831
8832 # Protect against being on the right side of a sed subst in config.status.
8833 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
8834  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
8835 $ac_vpsub
8836 $extrasub
8837 s%@SHELL@%$SHELL%g
8838 s%@CFLAGS@%$CFLAGS%g
8839 s%@CPPFLAGS@%$CPPFLAGS%g
8840 s%@CXXFLAGS@%$CXXFLAGS%g
8841 s%@FFLAGS@%$FFLAGS%g
8842 s%@DEFS@%$DEFS%g
8843 s%@LDFLAGS@%$LDFLAGS%g
8844 s%@LIBS@%$LIBS%g
8845 s%@exec_prefix@%$exec_prefix%g
8846 s%@prefix@%$prefix%g
8847 s%@program_transform_name@%$program_transform_name%g
8848 s%@bindir@%$bindir%g
8849 s%@sbindir@%$sbindir%g
8850 s%@libexecdir@%$libexecdir%g
8851 s%@datadir@%$datadir%g
8852 s%@sysconfdir@%$sysconfdir%g
8853 s%@sharedstatedir@%$sharedstatedir%g
8854 s%@localstatedir@%$localstatedir%g
8855 s%@libdir@%$libdir%g
8856 s%@includedir@%$includedir%g
8857 s%@oldincludedir@%$oldincludedir%g
8858 s%@infodir@%$infodir%g
8859 s%@mandir@%$mandir%g
8860 s%@host@%$host%g
8861 s%@host_alias@%$host_alias%g
8862 s%@host_cpu@%$host_cpu%g
8863 s%@host_vendor@%$host_vendor%g
8864 s%@host_os@%$host_os%g
8865 s%@target@%$target%g
8866 s%@target_alias@%$target_alias%g
8867 s%@target_cpu@%$target_cpu%g
8868 s%@target_vendor@%$target_vendor%g
8869 s%@target_os@%$target_os%g
8870 s%@build@%$build%g
8871 s%@build_alias@%$build_alias%g
8872 s%@build_cpu@%$build_cpu%g
8873 s%@build_vendor@%$build_vendor%g
8874 s%@build_os@%$build_os%g
8875 s%@LIBDVDCSS_VERSION@%$LIBDVDCSS_VERSION%g
8876 s%@SET_MAKE@%$SET_MAKE%g
8877 s%@CC@%$CC%g
8878 s%@CPP@%$CPP%g
8879 s%@RANLIB@%$RANLIB%g
8880 s%@GMAKE@%$GMAKE%g
8881 s%@ALLOCA@%$ALLOCA%g
8882 s%@GLIBC21@%$GLIBC21%g
8883 s%@LIBICONV@%$LIBICONV%g
8884 s%@USE_NLS@%$USE_NLS%g
8885 s%@MSGFMT@%$MSGFMT%g
8886 s%@GMSGFMT@%$GMSGFMT%g
8887 s%@XGETTEXT@%$XGETTEXT%g
8888 s%@INTLBISON@%$INTLBISON%g
8889 s%@BUILD_INCLUDED_LIBINTL@%$BUILD_INCLUDED_LIBINTL%g
8890 s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
8891 s%@CATALOGS@%$CATALOGS%g
8892 s%@CATOBJEXT@%$CATOBJEXT%g
8893 s%@GMOFILES@%$GMOFILES%g
8894 s%@INTLLIBS@%$INTLLIBS%g
8895 s%@INTLOBJS@%$INTLOBJS%g
8896 s%@POFILES@%$POFILES%g
8897 s%@POSUB@%$POSUB%g
8898 s%@DATADIRNAME@%$DATADIRNAME%g
8899 s%@INSTOBJEXT@%$INSTOBJEXT%g
8900 s%@GENCAT@%$GENCAT%g
8901 s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
8902 s%@INTL_LIBTOOL_SUFFIX_PREFIX@%$INTL_LIBTOOL_SUFFIX_PREFIX%g
8903 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
8904 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
8905 s%@INSTALL_DATA@%$INSTALL_DATA%g
8906 s%@WINDRES@%$WINDRES%g
8907 s%@SDL12_CONFIG@%$SDL12_CONFIG%g
8908 s%@SDL11_CONFIG@%$SDL11_CONFIG%g
8909 s%@SDL_CONFIG@%$SDL_CONFIG%g
8910 s%@ESD_CONFIG@%$ESD_CONFIG%g
8911 s%@ARTS_CONFIG@%$ARTS_CONFIG%g
8912 s%@GTK12_CONFIG@%$GTK12_CONFIG%g
8913 s%@GTK_CONFIG@%$GTK_CONFIG%g
8914 s%@GNOME_CONFIG@%$GNOME_CONFIG%g
8915 s%@DATA_PATH@%$DATA_PATH%g
8916 s%@PLUGIN_PATH@%$PLUGIN_PATH%g
8917 s%@SYS@%$SYS%g
8918 s%@ARCH@%$ARCH%g
8919 s%@PLUGINS@%$PLUGINS%g
8920 s%@BUILTINS@%$BUILTINS%g
8921 s%@ALIASES@%$ALIASES%g
8922 s%@INCLUDE@%$INCLUDE%g
8923 s%@DEBUG@%$DEBUG%g
8924 s%@ASM@%$ASM%g
8925 s%@CPROF@%$CPROF%g
8926 s%@GPROF@%$GPROF%g
8927 s%@OPTIMS@%$OPTIMS%g
8928 s%@TUNING@%$TUNING%g
8929 s%@RELEASE@%$RELEASE%g
8930 s%@MOC@%$MOC%g
8931 s%@DLL_PATH@%$DLL_PATH%g
8932 s%@PACKAGE@%$PACKAGE%g
8933 s%@VERSION@%$VERSION%g
8934 s%@VCD_DEVICE@%$VCD_DEVICE%g
8935 s%@DVD_DEVICE@%$DVD_DEVICE%g
8936 s%@PLDFLAGS@%$PLDFLAGS%g
8937 s%@SOFLAGS@%$SOFLAGS%g
8938 s%@LIB_COMMON@%$LIB_COMMON%g
8939 s%@LIB_VLC@%$LIB_VLC%g
8940 s%@LIB_A52@%$LIB_A52%g
8941 s%@LIB_AA@%$LIB_AA%g
8942 s%@LIB_ALSA@%$LIB_ALSA%g
8943 s%@LIB_ARTS@%$LIB_ARTS%g
8944 s%@LIB_BEOS@%$LIB_BEOS%g
8945 s%@LIB_CHROMA_I420_RGB@%$LIB_CHROMA_I420_RGB%g
8946 s%@LIB_DARWIN@%$LIB_DARWIN%g
8947 s%@LIB_DIRECTX@%$LIB_DIRECTX%g
8948 s%@LIB_DSP@%$LIB_DSP%g
8949 s%@LIB_DVD@%$LIB_DVD%g
8950 s%@LIB_DVDREAD@%$LIB_DVDREAD%g
8951 s%@LIB_ESD@%$LIB_ESD%g
8952 s%@LIB_FILTER_DISTORT@%$LIB_FILTER_DISTORT%g
8953 s%@LIB_GGI@%$LIB_GGI%g
8954 s%@LIB_GLIDE@%$LIB_GLIDE%g
8955 s%@LIB_GNOME@%$LIB_GNOME%g
8956 s%@LIB_GTK@%$LIB_GTK%g
8957 s%@LIB_IDCTALTIVEC@%$LIB_IDCTALTIVEC%g
8958 s%@LIB_IMDCT@%$LIB_IMDCT%g
8959 s%@LIB_IMDCT3DN@%$LIB_IMDCT3DN%g
8960 s%@LIB_IMDCTSSE@%$LIB_IMDCTSSE%g
8961 s%@LIB_IPV4@%$LIB_IPV4%g
8962 s%@LIB_IPV6@%$LIB_IPV6%g
8963 s%@LIB_KDE@%$LIB_KDE%g
8964 s%@LIB_LIBDVDCSS@%$LIB_LIBDVDCSS%g
8965 s%@LIB_LIBDVDREAD@%$LIB_LIBDVDREAD%g
8966 s%@LIB_LIRC@%$LIB_LIRC%g
8967 s%@LIB_MACOSX@%$LIB_MACOSX%g
8968 s%@LIB_MAD@%$LIB_MAD%g
8969 s%@LIB_MOTIONALTIVEC@%$LIB_MOTIONALTIVEC%g
8970 s%@LIB_MPEG_TS@%$LIB_MPEG_TS%g
8971 s%@LIB_NCURSES@%$LIB_NCURSES%g
8972 s%@LIB_QNX@%$LIB_QNX%g
8973 s%@LIB_QT@%$LIB_QT%g
8974 s%@LIB_RC@%$LIB_RC%g
8975 s%@LIB_SDL@%$LIB_SDL%g
8976 s%@LIB_VCD@%$LIB_VCD%g
8977 s%@LIB_WAVEOUT@%$LIB_WAVEOUT%g
8978 s%@LIB_WIN32@%$LIB_WIN32%g
8979 s%@LIB_X11@%$LIB_X11%g
8980 s%@LIB_XVIDEO@%$LIB_XVIDEO%g
8981 s%@CFLAGS_COMMON@%$CFLAGS_COMMON%g
8982 s%@CFLAGS_VLC@%$CFLAGS_VLC%g
8983 s%@CFLAGS_ARTS@%$CFLAGS_ARTS%g
8984 s%@CFLAGS_DVD@%$CFLAGS_DVD%g
8985 s%@CFLAGS_DVDREAD@%$CFLAGS_DVDREAD%g
8986 s%@CFLAGS_ESD@%$CFLAGS_ESD%g
8987 s%@CFLAGS_GLIDE@%$CFLAGS_GLIDE%g
8988 s%@CFLAGS_GNOME@%$CFLAGS_GNOME%g
8989 s%@CFLAGS_GTK@%$CFLAGS_GTK%g
8990 s%@CFLAGS_KDE@%$CFLAGS_KDE%g
8991 s%@CFLAGS_IDCTALTIVEC@%$CFLAGS_IDCTALTIVEC%g
8992 s%@CFLAGS_LIBDVDCSS@%$CFLAGS_LIBDVDCSS%g
8993 s%@CFLAGS_MACOSX@%$CFLAGS_MACOSX%g
8994 s%@CFLAGS_MAD@%$CFLAGS_MAD%g
8995 s%@CFLAGS_MOTIONALTIVEC@%$CFLAGS_MOTIONALTIVEC%g
8996 s%@CFLAGS_OPTIM@%$CFLAGS_OPTIM%g
8997 s%@CFLAGS_OPTIM_NODEBUG@%$CFLAGS_OPTIM_NODEBUG%g
8998 s%@CFLAGS_QT@%$CFLAGS_QT%g
8999 s%@CFLAGS_SDL@%$CFLAGS_SDL%g
9000 s%@CFLAGS_WIN32@%$CFLAGS_WIN32%g
9001 s%@CFLAGS_X11@%$CFLAGS_X11%g
9002 s%@CFLAGS_XVIDEO@%$CFLAGS_XVIDEO%g
9003 s%@SRC_DVD_EXTRA@%$SRC_DVD_EXTRA%g
9004 s%@SRC_DVDCSS_EXTRA@%$SRC_DVDCSS_EXTRA%g
9005 s%@NEED_GETOPT@%$NEED_GETOPT%g
9006 s%@NEED_LIBDVDCSS@%$NEED_LIBDVDCSS%g
9007
9008 CEOF
9009 EOF
9010
9011 cat >> $CONFIG_STATUS <<\EOF
9012
9013 # Split the substitutions into bite-sized pieces for seds with
9014 # small command number limits, like on Digital OSF/1 and HP-UX.
9015 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
9016 ac_file=1 # Number of current file.
9017 ac_beg=1 # First line for current file.
9018 ac_end=$ac_max_sed_cmds # Line after last line for current file.
9019 ac_more_lines=:
9020 ac_sed_cmds=""
9021 while $ac_more_lines; do
9022   if test $ac_beg -gt 1; then
9023     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
9024   else
9025     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
9026   fi
9027   if test ! -s conftest.s$ac_file; then
9028     ac_more_lines=false
9029     rm -f conftest.s$ac_file
9030   else
9031     if test -z "$ac_sed_cmds"; then
9032       ac_sed_cmds="sed -f conftest.s$ac_file"
9033     else
9034       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
9035     fi
9036     ac_file=`expr $ac_file + 1`
9037     ac_beg=$ac_end
9038     ac_end=`expr $ac_end + $ac_max_sed_cmds`
9039   fi
9040 done
9041 if test -z "$ac_sed_cmds"; then
9042   ac_sed_cmds=cat
9043 fi
9044 EOF
9045
9046 cat >> $CONFIG_STATUS <<EOF
9047
9048 CONFIG_FILES=\${CONFIG_FILES-"Makefile.opts po/Makefile.in"}
9049 EOF
9050 cat >> $CONFIG_STATUS <<\EOF
9051 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
9052   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9053   case "$ac_file" in
9054   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9055        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9056   *) ac_file_in="${ac_file}.in" ;;
9057   esac
9058
9059   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
9060
9061   # Remove last slash and all that follows it.  Not all systems have dirname.
9062   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9063   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9064     # The file is in a subdirectory.
9065     test ! -d "$ac_dir" && mkdir "$ac_dir"
9066     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
9067     # A "../" for each directory in $ac_dir_suffix.
9068     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
9069   else
9070     ac_dir_suffix= ac_dots=
9071   fi
9072
9073   case "$ac_given_srcdir" in
9074   .)  srcdir=.
9075       if test -z "$ac_dots"; then top_srcdir=.
9076       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
9077   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
9078   *) # Relative path.
9079     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
9080     top_srcdir="$ac_dots$ac_given_srcdir" ;;
9081   esac
9082
9083   case "$ac_given_INSTALL" in
9084   [/$]*) INSTALL="$ac_given_INSTALL" ;;
9085   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
9086   esac
9087
9088   echo creating "$ac_file"
9089   rm -f "$ac_file"
9090   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
9091   case "$ac_file" in
9092   *Makefile*) ac_comsub="1i\\
9093 # $configure_input" ;;
9094   *) ac_comsub= ;;
9095   esac
9096
9097   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9098   sed -e "$ac_comsub
9099 s%@configure_input@%$configure_input%g
9100 s%@srcdir@%$srcdir%g
9101 s%@top_srcdir@%$top_srcdir%g
9102 s%@INSTALL@%$INSTALL%g
9103 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
9104 fi; done
9105 rm -f conftest.s*
9106
9107 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
9108 # NAME is the cpp macro being defined and VALUE is the value it is being given.
9109 #
9110 # ac_d sets the value in "#define NAME VALUE" lines.
9111 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
9112 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
9113 ac_dC='\3'
9114 ac_dD='%g'
9115 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
9116 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
9117 ac_uB='\([      ]\)%\1#\2define\3'
9118 ac_uC=' '
9119 ac_uD='\4%g'
9120 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
9121 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
9122 ac_eB='$%\1#\2define\3'
9123 ac_eC=' '
9124 ac_eD='%g'
9125
9126 if test "${CONFIG_HEADERS+set}" != set; then
9127 EOF
9128 cat >> $CONFIG_STATUS <<EOF
9129   CONFIG_HEADERS="include/defs.h"
9130 EOF
9131 cat >> $CONFIG_STATUS <<\EOF
9132 fi
9133 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
9134   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9135   case "$ac_file" in
9136   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9137        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9138   *) ac_file_in="${ac_file}.in" ;;
9139   esac
9140
9141   echo creating $ac_file
9142
9143   rm -f conftest.frag conftest.in conftest.out
9144   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9145   cat $ac_file_inputs > conftest.in
9146
9147 EOF
9148
9149 # Transform confdefs.h into a sed script conftest.vals that substitutes
9150 # the proper values into config.h.in to produce config.h.  And first:
9151 # Protect against being on the right side of a sed subst in config.status.
9152 # Protect against being in an unquoted here document in config.status.
9153 rm -f conftest.vals
9154 cat > conftest.hdr <<\EOF
9155 s/[\\&%]/\\&/g
9156 s%[\\$`]%\\&%g
9157 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
9158 s%ac_d%ac_u%gp
9159 s%ac_u%ac_e%gp
9160 EOF
9161 sed -n -f conftest.hdr confdefs.h > conftest.vals
9162 rm -f conftest.hdr
9163
9164 # This sed command replaces #undef with comments.  This is necessary, for
9165 # example, in the case of _POSIX_SOURCE, which is predefined and required
9166 # on some systems where configure will not decide to define it.
9167 cat >> conftest.vals <<\EOF
9168 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
9169 EOF
9170
9171 # Break up conftest.vals because some shells have a limit on
9172 # the size of here documents, and old seds have small limits too.
9173
9174 rm -f conftest.tail
9175 while :
9176 do
9177   ac_lines=`grep -c . conftest.vals`
9178   # grep -c gives empty output for an empty file on some AIX systems.
9179   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
9180   # Write a limited-size here document to conftest.frag.
9181   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
9182   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
9183   echo 'CEOF
9184   sed -f conftest.frag conftest.in > conftest.out
9185   rm -f conftest.in
9186   mv conftest.out conftest.in
9187 ' >> $CONFIG_STATUS
9188   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
9189   rm -f conftest.vals
9190   mv conftest.tail conftest.vals
9191 done
9192 rm -f conftest.vals
9193
9194 cat >> $CONFIG_STATUS <<\EOF
9195   rm -f conftest.frag conftest.h
9196   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
9197   cat conftest.in >> conftest.h
9198   rm -f conftest.in
9199   if cmp -s $ac_file conftest.h 2>/dev/null; then
9200     echo "$ac_file is unchanged"
9201     rm -f conftest.h
9202   else
9203     # Remove last slash and all that follows it.  Not all systems have dirname.
9204       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9205       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9206       # The file is in a subdirectory.
9207       test ! -d "$ac_dir" && mkdir "$ac_dir"
9208     fi
9209     rm -f $ac_file
9210     mv conftest.h $ac_file
9211   fi
9212 fi; done
9213
9214 EOF
9215 cat >> $CONFIG_STATUS <<EOF
9216
9217
9218 EOF
9219 cat >> $CONFIG_STATUS <<\EOF
9220 for ac_file in $CONFIG_FILES; do
9221         # Support "outfile[:infile[:infile...]]"
9222         case "$ac_file" in
9223           *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9224         esac
9225         # PO directories have a Makefile.in generated from Makefile.in.in.
9226         case "$ac_file" in */Makefile.in)
9227           # Adjust a relative srcdir.
9228           ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
9229           ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
9230           ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
9231           # In autoconf-2.13 it is called $ac_given_srcdir.
9232           # In autoconf-2.50 it is called $srcdir.
9233           test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
9234           case "$ac_given_srcdir" in
9235             .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
9236             /*) top_srcdir="$ac_given_srcdir" ;;
9237             *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
9238           esac
9239           if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
9240             rm -f "$ac_dir/POTFILES"
9241             test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
9242             sed -e "/^#/d" -e "/^[      ]*\$/d" -e "s,.*,     $top_srcdir/& \\\\," -e "\$s/\(.*\) \\\\/\1/" < "$ac_given_srcdir/$ac_dir/POTFILES.in" > "$ac_dir/POTFILES"
9243             test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
9244             sed -e "/POTFILES =/r $ac_dir/POTFILES" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
9245           fi
9246           ;;
9247         esac
9248       done
9249
9250 exit 0
9251 EOF
9252 chmod +x $CONFIG_STATUS
9253 rm -fr confdefs* $ac_clean_files
9254 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
9255
9256
9257 echo "
9258 global configuration
9259 --------------------
9260 system                : ${SYS}
9261 architecture          : ${ARCH}
9262 optimizations         : ${OPTIMS}
9263 tuning:               : ${TUNING}
9264 release:              : ${RELEASE}"
9265
9266 if test x${HAVE_VLC} = x1
9267 then
9268   echo "
9269 vlc configuration
9270 -----------------
9271 vlc version           : ${VLC_VERSION}
9272 debug mode            : ${DEBUG}
9273 cprof/gprof support   : ${CPROF}/${GPROF}
9274 need builtin getopt   : ${NEED_GETOPT}
9275 built-in modules      :${BUILTINS}
9276 plug-in modules       :${PLUGINS}
9277 vlc aliases           :${ALIASES}"
9278 fi
9279
9280 echo "
9281 libdvdcss configuration
9282 -----------------------
9283 can be built          : ${CAN_BUILD_LIBDVDCSS}
9284 will be built         : ${NEED_LIBDVDCSS}"
9285 if test x${NEED_LIBDVDCSS} = x1
9286 then
9287   echo "need BSDI libdvd      : ${NEED_BSDI_LIBDVD}"
9288   echo "link statically       : ${STATIC_LIBDVDCSS}"
9289 else
9290   echo "use dummy replacement : ${DUMMY_LIBDVDCSS}"
9291 fi
9292
9293 echo "
9294 You may now tune Makefile.opts at your convenience, for instance to choose
9295 which modules get compiled as plugins.
9296 "
9297 if test x${HAVE_VLC} = x1
9298 then
9299   echo "To build vlc and its plugins, type \`$VLC_MAKE'."
9300 fi
9301 if test x${NEED_LIBDVDCSS} = x1
9302 then
9303   echo "To build libdvdcss only, type \`$VLC_MAKE libdvdcss'."
9304 fi
9305 echo ""
9306