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