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