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