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