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