]> git.sesse.net Git - vlc/blob - configure
567d5555335a8ef4824e277959a75c63ea17afd2
[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   LIB_FILTER_DISTORT="${LIB_FILTER_DISTORT} -lm"
4434 else
4435   echo "$ac_t""no" 1>&6
4436 fi
4437
4438 echo $ac_n "checking for pow in -lm""... $ac_c" 1>&6
4439 echo "configure:4440: checking for pow in -lm" >&5
4440 ac_lib_var=`echo m'_'pow | sed 'y%./+-%__p_%'`
4441 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4442   echo $ac_n "(cached) $ac_c" 1>&6
4443 else
4444   ac_save_LIBS="$LIBS"
4445 LIBS="-lm  $LIBS"
4446 cat > conftest.$ac_ext <<EOF
4447 #line 4448 "configure"
4448 #include "confdefs.h"
4449 /* Override any gcc2 internal prototype to avoid an error.  */
4450 /* We use char because int might match the return type of a gcc2
4451     builtin and then its argument prototype would still apply.  */
4452 char pow();
4453
4454 int main() {
4455 pow()
4456 ; return 0; }
4457 EOF
4458 if { (eval echo configure:4459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4459   rm -rf conftest*
4460   eval "ac_cv_lib_$ac_lib_var=yes"
4461 else
4462   echo "configure: failed program was:" >&5
4463   cat conftest.$ac_ext >&5
4464   rm -rf conftest*
4465   eval "ac_cv_lib_$ac_lib_var=no"
4466 fi
4467 rm -f conftest*
4468 LIBS="$ac_save_LIBS"
4469
4470 fi
4471 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4472   echo "$ac_t""yes" 1>&6
4473   LIB_IMDCT="${LIB_IMDCT} -lm"
4474   LIB_IMDCT3DN="${LIB_IMDCT3DN} -lm"
4475   LIB_IMDCTSSE="${LIB_IMDCTSSE} -lm"
4476
4477 else
4478   echo "$ac_t""no" 1>&6
4479 fi
4480
4481
4482 THREAD_LIB=error
4483 if test "x${THREAD_LIB}" = xerror; then
4484   echo $ac_n "checking for pthread_attr_init in -lpthread""... $ac_c" 1>&6
4485 echo "configure:4486: checking for pthread_attr_init in -lpthread" >&5
4486 ac_lib_var=`echo pthread'_'pthread_attr_init | sed 'y%./+-%__p_%'`
4487 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4488   echo $ac_n "(cached) $ac_c" 1>&6
4489 else
4490   ac_save_LIBS="$LIBS"
4491 LIBS="-lpthread  $LIBS"
4492 cat > conftest.$ac_ext <<EOF
4493 #line 4494 "configure"
4494 #include "confdefs.h"
4495 /* Override any gcc2 internal prototype to avoid an error.  */
4496 /* We use char because int might match the return type of a gcc2
4497     builtin and then its argument prototype would still apply.  */
4498 char pthread_attr_init();
4499
4500 int main() {
4501 pthread_attr_init()
4502 ; return 0; }
4503 EOF
4504 if { (eval echo configure:4505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4505   rm -rf conftest*
4506   eval "ac_cv_lib_$ac_lib_var=yes"
4507 else
4508   echo "configure: failed program was:" >&5
4509   cat conftest.$ac_ext >&5
4510   rm -rf conftest*
4511   eval "ac_cv_lib_$ac_lib_var=no"
4512 fi
4513 rm -f conftest*
4514 LIBS="$ac_save_LIBS"
4515
4516 fi
4517 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4518   echo "$ac_t""yes" 1>&6
4519   THREAD_LIB="-lpthread"
4520 else
4521   echo "$ac_t""no" 1>&6
4522 fi
4523
4524 fi
4525 if test "x${THREAD_LIB}" = xerror; then
4526   echo $ac_n "checking for pthread_attr_init in -lpthreads""... $ac_c" 1>&6
4527 echo "configure:4528: checking for pthread_attr_init in -lpthreads" >&5
4528 ac_lib_var=`echo pthreads'_'pthread_attr_init | sed 'y%./+-%__p_%'`
4529 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4530   echo $ac_n "(cached) $ac_c" 1>&6
4531 else
4532   ac_save_LIBS="$LIBS"
4533 LIBS="-lpthreads  $LIBS"
4534 cat > conftest.$ac_ext <<EOF
4535 #line 4536 "configure"
4536 #include "confdefs.h"
4537 /* Override any gcc2 internal prototype to avoid an error.  */
4538 /* We use char because int might match the return type of a gcc2
4539     builtin and then its argument prototype would still apply.  */
4540 char pthread_attr_init();
4541
4542 int main() {
4543 pthread_attr_init()
4544 ; return 0; }
4545 EOF
4546 if { (eval echo configure:4547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4547   rm -rf conftest*
4548   eval "ac_cv_lib_$ac_lib_var=yes"
4549 else
4550   echo "configure: failed program was:" >&5
4551   cat conftest.$ac_ext >&5
4552   rm -rf conftest*
4553   eval "ac_cv_lib_$ac_lib_var=no"
4554 fi
4555 rm -f conftest*
4556 LIBS="$ac_save_LIBS"
4557
4558 fi
4559 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4560   echo "$ac_t""yes" 1>&6
4561   THREAD_LIB="-lpthreads"
4562 else
4563   echo "$ac_t""no" 1>&6
4564 fi
4565
4566 fi
4567 if test "x${THREAD_LIB}" = xerror; then
4568   echo $ac_n "checking for pthread_attr_init in -lc_r""... $ac_c" 1>&6
4569 echo "configure:4570: checking for pthread_attr_init in -lc_r" >&5
4570 ac_lib_var=`echo c_r'_'pthread_attr_init | sed 'y%./+-%__p_%'`
4571 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4572   echo $ac_n "(cached) $ac_c" 1>&6
4573 else
4574   ac_save_LIBS="$LIBS"
4575 LIBS="-lc_r  $LIBS"
4576 cat > conftest.$ac_ext <<EOF
4577 #line 4578 "configure"
4578 #include "confdefs.h"
4579 /* Override any gcc2 internal prototype to avoid an error.  */
4580 /* We use char because int might match the return type of a gcc2
4581     builtin and then its argument prototype would still apply.  */
4582 char pthread_attr_init();
4583
4584 int main() {
4585 pthread_attr_init()
4586 ; return 0; }
4587 EOF
4588 if { (eval echo configure:4589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4589   rm -rf conftest*
4590   eval "ac_cv_lib_$ac_lib_var=yes"
4591 else
4592   echo "configure: failed program was:" >&5
4593   cat conftest.$ac_ext >&5
4594   rm -rf conftest*
4595   eval "ac_cv_lib_$ac_lib_var=no"
4596 fi
4597 rm -f conftest*
4598 LIBS="$ac_save_LIBS"
4599
4600 fi
4601 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4602   echo "$ac_t""yes" 1>&6
4603   THREAD_LIB="-lc_r"
4604 else
4605   echo "$ac_t""no" 1>&6
4606 fi
4607
4608 fi
4609 if test "x${THREAD_LIB}" = xerror; then
4610   echo $ac_n "checking for pthread_attr_init""... $ac_c" 1>&6
4611 echo "configure:4612: checking for pthread_attr_init" >&5
4612 if eval "test \"`echo '$''{'ac_cv_func_pthread_attr_init'+set}'`\" = set"; then
4613   echo $ac_n "(cached) $ac_c" 1>&6
4614 else
4615   cat > conftest.$ac_ext <<EOF
4616 #line 4617 "configure"
4617 #include "confdefs.h"
4618 /* System header to define __stub macros and hopefully few prototypes,
4619     which can conflict with char pthread_attr_init(); below.  */
4620 #include <assert.h>
4621 /* Override any gcc2 internal prototype to avoid an error.  */
4622 /* We use char because int might match the return type of a gcc2
4623     builtin and then its argument prototype would still apply.  */
4624 char pthread_attr_init();
4625
4626 int main() {
4627
4628 /* The GNU C library defines this for functions which it implements
4629     to always fail with ENOSYS.  Some functions are actually named
4630     something starting with __ and the normal name is an alias.  */
4631 #if defined (__stub_pthread_attr_init) || defined (__stub___pthread_attr_init)
4632 choke me
4633 #else
4634 pthread_attr_init();
4635 #endif
4636
4637 ; return 0; }
4638 EOF
4639 if { (eval echo configure:4640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4640   rm -rf conftest*
4641   eval "ac_cv_func_pthread_attr_init=yes"
4642 else
4643   echo "configure: failed program was:" >&5
4644   cat conftest.$ac_ext >&5
4645   rm -rf conftest*
4646   eval "ac_cv_func_pthread_attr_init=no"
4647 fi
4648 rm -f conftest*
4649 fi
4650
4651 if eval "test \"`echo '$ac_cv_func_'pthread_attr_init`\" = yes"; then
4652   echo "$ac_t""yes" 1>&6
4653   :
4654 else
4655   echo "$ac_t""no" 1>&6
4656 fi
4657
4658   THREAD_LIB=""
4659 fi
4660
4661 echo $ac_n "checking for cthread_fork in -lthreads""... $ac_c" 1>&6
4662 echo "configure:4663: checking for cthread_fork in -lthreads" >&5
4663 ac_lib_var=`echo threads'_'cthread_fork | sed 'y%./+-%__p_%'`
4664 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4665   echo $ac_n "(cached) $ac_c" 1>&6
4666 else
4667   ac_save_LIBS="$LIBS"
4668 LIBS="-lthreads  $LIBS"
4669 cat > conftest.$ac_ext <<EOF
4670 #line 4671 "configure"
4671 #include "confdefs.h"
4672 /* Override any gcc2 internal prototype to avoid an error.  */
4673 /* We use char because int might match the return type of a gcc2
4674     builtin and then its argument prototype would still apply.  */
4675 char cthread_fork();
4676
4677 int main() {
4678 cthread_fork()
4679 ; return 0; }
4680 EOF
4681 if { (eval echo configure:4682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4682   rm -rf conftest*
4683   eval "ac_cv_lib_$ac_lib_var=yes"
4684 else
4685   echo "configure: failed program was:" >&5
4686   cat conftest.$ac_ext >&5
4687   rm -rf conftest*
4688   eval "ac_cv_lib_$ac_lib_var=no"
4689 fi
4690 rm -f conftest*
4691 LIBS="$ac_save_LIBS"
4692
4693 fi
4694 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4695   echo "$ac_t""yes" 1>&6
4696   THREAD_LIB="-lthreads"
4697 else
4698   echo "$ac_t""no" 1>&6
4699 fi
4700
4701
4702 cat > conftest.$ac_ext <<EOF
4703 #line 4704 "configure"
4704 #include "confdefs.h"
4705 #include <pthread.h>
4706 EOF
4707 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4708   egrep "pthread_cond_t" >/dev/null 2>&1; then
4709   rm -rf conftest*
4710   
4711   cat >> confdefs.h <<\EOF
4712 #define PTHREAD_COND_T_IN_PTHREAD_H 1
4713 EOF
4714
4715 fi
4716 rm -f conftest*
4717
4718 cat > conftest.$ac_ext <<EOF
4719 #line 4720 "configure"
4720 #include "confdefs.h"
4721 #include <strings.h>
4722 EOF
4723 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4724   egrep "strncasecmp" >/dev/null 2>&1; then
4725   rm -rf conftest*
4726   
4727   cat >> confdefs.h <<\EOF
4728 #define STRNCASECMP_IN_STRINGS_H 1
4729 EOF
4730
4731 fi
4732 rm -f conftest*
4733
4734
4735 for ac_hdr in stddef.h getopt.h strings.h
4736 do
4737 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4738 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4739 echo "configure:4740: checking for $ac_hdr" >&5
4740 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4741   echo $ac_n "(cached) $ac_c" 1>&6
4742 else
4743   cat > conftest.$ac_ext <<EOF
4744 #line 4745 "configure"
4745 #include "confdefs.h"
4746 #include <$ac_hdr>
4747 EOF
4748 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4749 { (eval echo configure:4750: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4750 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4751 if test -z "$ac_err"; then
4752   rm -rf conftest*
4753   eval "ac_cv_header_$ac_safe=yes"
4754 else
4755   echo "$ac_err" >&5
4756   echo "configure: failed program was:" >&5
4757   cat conftest.$ac_ext >&5
4758   rm -rf conftest*
4759   eval "ac_cv_header_$ac_safe=no"
4760 fi
4761 rm -f conftest*
4762 fi
4763 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4764   echo "$ac_t""yes" 1>&6
4765     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4766   cat >> confdefs.h <<EOF
4767 #define $ac_tr_hdr 1
4768 EOF
4769  
4770 else
4771   echo "$ac_t""no" 1>&6
4772 fi
4773 done
4774
4775 for ac_hdr in sys/sockio.h fcntl.h sys/time.h sys/times.h
4776 do
4777 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4778 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4779 echo "configure:4780: checking for $ac_hdr" >&5
4780 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4781   echo $ac_n "(cached) $ac_c" 1>&6
4782 else
4783   cat > conftest.$ac_ext <<EOF
4784 #line 4785 "configure"
4785 #include "confdefs.h"
4786 #include <$ac_hdr>
4787 EOF
4788 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4789 { (eval echo configure:4790: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4790 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4791 if test -z "$ac_err"; then
4792   rm -rf conftest*
4793   eval "ac_cv_header_$ac_safe=yes"
4794 else
4795   echo "$ac_err" >&5
4796   echo "configure: failed program was:" >&5
4797   cat conftest.$ac_ext >&5
4798   rm -rf conftest*
4799   eval "ac_cv_header_$ac_safe=no"
4800 fi
4801 rm -f conftest*
4802 fi
4803 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4804   echo "$ac_t""yes" 1>&6
4805     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4806   cat >> confdefs.h <<EOF
4807 #define $ac_tr_hdr 1
4808 EOF
4809  
4810 else
4811   echo "$ac_t""no" 1>&6
4812 fi
4813 done
4814
4815 for ac_hdr in sys/soundcard.h machine/soundcard.h
4816 do
4817 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4818 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4819 echo "configure:4820: checking for $ac_hdr" >&5
4820 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4821   echo $ac_n "(cached) $ac_c" 1>&6
4822 else
4823   cat > conftest.$ac_ext <<EOF
4824 #line 4825 "configure"
4825 #include "confdefs.h"
4826 #include <$ac_hdr>
4827 EOF
4828 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4829 { (eval echo configure:4830: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4830 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4831 if test -z "$ac_err"; then
4832   rm -rf conftest*
4833   eval "ac_cv_header_$ac_safe=yes"
4834 else
4835   echo "$ac_err" >&5
4836   echo "configure: failed program was:" >&5
4837   cat conftest.$ac_ext >&5
4838   rm -rf conftest*
4839   eval "ac_cv_header_$ac_safe=no"
4840 fi
4841 rm -f conftest*
4842 fi
4843 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4844   echo "$ac_t""yes" 1>&6
4845     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4846   cat >> confdefs.h <<EOF
4847 #define $ac_tr_hdr 1
4848 EOF
4849  
4850 else
4851   echo "$ac_t""no" 1>&6
4852 fi
4853 done
4854
4855 for ac_hdr in dlfcn.h image.h
4856 do
4857 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4858 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4859 echo "configure:4860: checking for $ac_hdr" >&5
4860 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4861   echo $ac_n "(cached) $ac_c" 1>&6
4862 else
4863   cat > conftest.$ac_ext <<EOF
4864 #line 4865 "configure"
4865 #include "confdefs.h"
4866 #include <$ac_hdr>
4867 EOF
4868 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4869 { (eval echo configure:4870: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4870 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4871 if test -z "$ac_err"; then
4872   rm -rf conftest*
4873   eval "ac_cv_header_$ac_safe=yes"
4874 else
4875   echo "$ac_err" >&5
4876   echo "configure: failed program was:" >&5
4877   cat conftest.$ac_ext >&5
4878   rm -rf conftest*
4879   eval "ac_cv_header_$ac_safe=no"
4880 fi
4881 rm -f conftest*
4882 fi
4883 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4884   echo "$ac_t""yes" 1>&6
4885     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4886   cat >> confdefs.h <<EOF
4887 #define $ac_tr_hdr 1
4888 EOF
4889  
4890 else
4891   echo "$ac_t""no" 1>&6
4892 fi
4893 done
4894
4895 for ac_hdr in arpa/inet.h net/if.h netinet/in.h sys/socket.h
4896 do
4897 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4898 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4899 echo "configure:4900: checking for $ac_hdr" >&5
4900 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4901   echo $ac_n "(cached) $ac_c" 1>&6
4902 else
4903   cat > conftest.$ac_ext <<EOF
4904 #line 4905 "configure"
4905 #include "confdefs.h"
4906 #include <$ac_hdr>
4907 EOF
4908 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4909 { (eval echo configure:4910: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4910 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4911 if test -z "$ac_err"; then
4912   rm -rf conftest*
4913   eval "ac_cv_header_$ac_safe=yes"
4914 else
4915   echo "$ac_err" >&5
4916   echo "configure: failed program was:" >&5
4917   cat conftest.$ac_ext >&5
4918   rm -rf conftest*
4919   eval "ac_cv_header_$ac_safe=no"
4920 fi
4921 rm -f conftest*
4922 fi
4923 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4924   echo "$ac_t""yes" 1>&6
4925     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4926   cat >> confdefs.h <<EOF
4927 #define $ac_tr_hdr 1
4928 EOF
4929  
4930 else
4931   echo "$ac_t""no" 1>&6
4932 fi
4933 done
4934
4935 for ac_hdr in machine/param.h
4936 do
4937 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4938 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4939 echo "configure:4940: checking for $ac_hdr" >&5
4940 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4941   echo $ac_n "(cached) $ac_c" 1>&6
4942 else
4943   cat > conftest.$ac_ext <<EOF
4944 #line 4945 "configure"
4945 #include "confdefs.h"
4946 #include <$ac_hdr>
4947 EOF
4948 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4949 { (eval echo configure:4950: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4950 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4951 if test -z "$ac_err"; then
4952   rm -rf conftest*
4953   eval "ac_cv_header_$ac_safe=yes"
4954 else
4955   echo "$ac_err" >&5
4956   echo "configure: failed program was:" >&5
4957   cat conftest.$ac_ext >&5
4958   rm -rf conftest*
4959   eval "ac_cv_header_$ac_safe=no"
4960 fi
4961 rm -f conftest*
4962 fi
4963 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4964   echo "$ac_t""yes" 1>&6
4965     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4966   cat >> confdefs.h <<EOF
4967 #define $ac_tr_hdr 1
4968 EOF
4969  
4970 else
4971   echo "$ac_t""no" 1>&6
4972 fi
4973 done
4974
4975
4976 for ac_hdr in cthreads.h pthread.h kernel/scheduler.h kernel/OS.h
4977 do
4978 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4979 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4980 echo "configure:4981: checking for $ac_hdr" >&5
4981 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4982   echo $ac_n "(cached) $ac_c" 1>&6
4983 else
4984   cat > conftest.$ac_ext <<EOF
4985 #line 4986 "configure"
4986 #include "confdefs.h"
4987 #include <$ac_hdr>
4988 EOF
4989 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4990 { (eval echo configure:4991: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4991 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4992 if test -z "$ac_err"; then
4993   rm -rf conftest*
4994   eval "ac_cv_header_$ac_safe=yes"
4995 else
4996   echo "$ac_err" >&5
4997   echo "configure: failed program was:" >&5
4998   cat conftest.$ac_ext >&5
4999   rm -rf conftest*
5000   eval "ac_cv_header_$ac_safe=no"
5001 fi
5002 rm -f conftest*
5003 fi
5004 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5005   echo "$ac_t""yes" 1>&6
5006     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5007   cat >> confdefs.h <<EOF
5008 #define $ac_tr_hdr 1
5009 EOF
5010  
5011 else
5012   echo "$ac_t""no" 1>&6
5013 fi
5014 done
5015
5016
5017 echo $ac_n "checking for ntohl in sys/param.h""... $ac_c" 1>&6
5018 echo "configure:5019: checking for ntohl in sys/param.h" >&5
5019 if eval "test \"`echo '$''{'ac_cv_c_ntohl_sys_param_h'+set}'`\" = set"; then
5020   echo $ac_n "(cached) $ac_c" 1>&6
5021 else
5022   CFLAGS="${save_CFLAGS} -Wall -Werror"
5023      cat > conftest.$ac_ext <<EOF
5024 #line 5025 "configure"
5025 #include "confdefs.h"
5026 #include <sys/param.h>
5027 int main() {
5028 void foo() { int meuh; ntohl(meuh); }
5029 ; return 0; }
5030 EOF
5031 if { (eval echo configure:5032: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5032   rm -rf conftest*
5033   ac_cv_c_ntohl_sys_param_h=yes
5034 else
5035   echo "configure: failed program was:" >&5
5036   cat conftest.$ac_ext >&5
5037   rm -rf conftest*
5038   ac_cv_c_ntohl_sys_param_h=no
5039 fi
5040 rm -f conftest*
5041 fi
5042
5043 echo "$ac_t""$ac_cv_c_ntohl_sys_param_h" 1>&6
5044 if test x"$ac_cv_c_ntohl_sys_param_h" != x"no"; then
5045     cat >> confdefs.h <<\EOF
5046 #define NTOHL_IN_SYS_PARAM_H 1
5047 EOF
5048
5049 fi
5050
5051 echo $ac_n "checking if \$CC accepts -finline-limit""... $ac_c" 1>&6
5052 echo "configure:5053: checking if \$CC accepts -finline-limit" >&5
5053 if eval "test \"`echo '$''{'ac_cv_c_inline_limit'+set}'`\" = set"; then
5054   echo $ac_n "(cached) $ac_c" 1>&6
5055 else
5056   CFLAGS="${save_CFLAGS} -finline-limit-30000"
5057      cat > conftest.$ac_ext <<EOF
5058 #line 5059 "configure"
5059 #include "confdefs.h"
5060
5061 int main() {
5062
5063 ; return 0; }
5064 EOF
5065 if { (eval echo configure:5066: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5066   rm -rf conftest*
5067   ac_cv_c_inline_limit=yes
5068 else
5069   echo "configure: failed program was:" >&5
5070   cat conftest.$ac_ext >&5
5071   rm -rf conftest*
5072   ac_cv_c_inline_limit=no
5073 fi
5074 rm -f conftest*
5075 fi
5076
5077 echo "$ac_t""$ac_cv_c_inline_limit" 1>&6
5078 if test x"$ac_cv_c_inline_limit" != x"no"; then
5079     save_CFLAGS="${save_CFLAGS} -finline-limit-30000"
5080 fi
5081
5082 echo $ac_n "checking if \$CC accepts -bundle -undefined error""... $ac_c" 1>&6
5083 echo "configure:5084: checking if \$CC accepts -bundle -undefined error" >&5
5084 if eval "test \"`echo '$''{'ac_cv_ld_darwin'+set}'`\" = set"; then
5085   echo $ac_n "(cached) $ac_c" 1>&6
5086 else
5087   CFLAGS="${save_CFLAGS} -bundle -undefined error"
5088      cat > conftest.$ac_ext <<EOF
5089 #line 5090 "configure"
5090 #include "confdefs.h"
5091
5092 int main() {
5093
5094 ; return 0; }
5095 EOF
5096 if { (eval echo configure:5097: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5097   rm -rf conftest*
5098   ac_cv_ld_darwin=yes
5099 else
5100   echo "configure: failed program was:" >&5
5101   cat conftest.$ac_ext >&5
5102   rm -rf conftest*
5103   ac_cv_ld_darwin=no
5104 fi
5105 rm -f conftest*
5106 fi
5107
5108 echo "$ac_t""$ac_cv_ld_darwin" 1>&6
5109 if test x"$ac_cv_ld_darwin" != x"no"; then
5110     PLCFLAGS="${PLCFLAGS} -bundle -undefined error"
5111 fi
5112
5113 echo $ac_n "checking if \$CC accepts -shared""... $ac_c" 1>&6
5114 echo "configure:5115: checking if \$CC accepts -shared" >&5
5115 if eval "test \"`echo '$''{'ac_cv_ld_plugins'+set}'`\" = set"; then
5116   echo $ac_n "(cached) $ac_c" 1>&6
5117 else
5118   CFLAGS="${save_CFLAGS} -shared"
5119      cat > conftest.$ac_ext <<EOF
5120 #line 5121 "configure"
5121 #include "confdefs.h"
5122
5123 int main() {
5124
5125 ; return 0; }
5126 EOF
5127 if { (eval echo configure:5128: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5128   rm -rf conftest*
5129   ac_cv_ld_plugins=yes
5130 else
5131   echo "configure: failed program was:" >&5
5132   cat conftest.$ac_ext >&5
5133   rm -rf conftest*
5134   ac_cv_ld_plugins=no
5135 fi
5136 rm -f conftest*
5137 fi
5138
5139 echo "$ac_t""$ac_cv_ld_plugins" 1>&6
5140 if test x"$ac_cv_ld_plugins" != x"no"; then
5141     PLCFLAGS="${PLCFLAGS} -shared"
5142 fi
5143         
5144 if test x"${SOFLAGS}" = x; then
5145     echo $ac_n "checking for soname setting""... $ac_c" 1>&6
5146 echo "configure:5147: checking for soname setting" >&5
5147 if eval "test \"`echo '$''{'ac_cv_ld_soname'+set}'`\" = set"; then
5148   echo $ac_n "(cached) $ac_c" 1>&6
5149 else
5150   
5151         # Standard
5152         try_SOFLAGS="-Wl,-soname -Wl,"
5153         LDFLAGS="${save_LDFLAGS} ${try_SOFLAGS}foo.so.0"
5154         cat > conftest.$ac_ext <<EOF
5155 #line 5156 "configure"
5156 #include "confdefs.h"
5157
5158 int main() {
5159
5160 ; return 0; }
5161 EOF
5162 if { (eval echo configure:5163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5163   rm -rf conftest*
5164   ac_cv_ld_soname="${try_SOFLAGS}"
5165 else
5166   echo "configure: failed program was:" >&5
5167   cat conftest.$ac_ext >&5
5168   rm -rf conftest*
5169   
5170             # SunOS
5171             try_SOFLAGS="-Wl,-h -Wl,"
5172             LDFLAGS="${save_LDFLAGS} ${try_SOFLAGS}foo.so.0"
5173             cat > conftest.$ac_ext <<EOF
5174 #line 5175 "configure"
5175 #include "confdefs.h"
5176
5177 int main() {
5178
5179 ; return 0; }
5180 EOF
5181 if { (eval echo configure:5182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5182   rm -rf conftest*
5183   ac_cv_ld_soname="${try_SOFLAGS}"
5184 else
5185   echo "configure: failed program was:" >&5
5186   cat conftest.$ac_ext >&5
5187   rm -rf conftest*
5188   ac_cv_ld_soname=none
5189 fi
5190 rm -f conftest*
5191         
5192 fi
5193 rm -f conftest*
5194 fi
5195
5196 echo "$ac_t""$ac_cv_ld_soname" 1>&6
5197     if test x"$ac_cv_ld_soname" != x"none"; then
5198         SOFLAGS=$ac_cv_ld_soname
5199     else
5200         echo "
5201 ------------
5202 Your system doesn't seem to have support for dynamic linking. You may
5203 have problems using libdvdcss.
5204 ------------
5205 "
5206     fi
5207 fi
5208
5209 echo $ac_n "checking __attribute__ ((aligned ())) support""... $ac_c" 1>&6
5210 echo "configure:5211: checking __attribute__ ((aligned ())) support" >&5
5211 if eval "test \"`echo '$''{'ac_cv_c_attribute_aligned'+set}'`\" = set"; then
5212   echo $ac_n "(cached) $ac_c" 1>&6
5213 else
5214   ac_cv_c_attribute_aligned=0
5215         CFLAGS="${save_CFLAGS} -Werror"
5216     for ac_cv_c_attr_align_try in 2 4 8 16 32 64; do
5217         cat > conftest.$ac_ext <<EOF
5218 #line 5219 "configure"
5219 #include "confdefs.h"
5220
5221 int main() {
5222 static char c __attribute__ ((aligned($ac_cv_c_attr_align_try))) = 0; return c;
5223 ; return 0; }
5224 EOF
5225 if { (eval echo configure:5226: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5226   rm -rf conftest*
5227   ac_cv_c_attribute_aligned=$ac_cv_c_attr_align_try
5228 else
5229   echo "configure: failed program was:" >&5
5230   cat conftest.$ac_ext >&5
5231 fi
5232 rm -f conftest*
5233     done
5234 fi
5235
5236 echo "$ac_t""$ac_cv_c_attribute_aligned" 1>&6
5237 if test x"$ac_cv_c_attribute_aligned" != x"0"; then
5238     cat >> confdefs.h <<EOF
5239 #define ATTRIBUTE_ALIGNED_MAX $ac_cv_c_attribute_aligned
5240 EOF
5241
5242 fi
5243
5244 CFLAGS="${save_CFLAGS}"
5245 LDFLAGS="${save_LDFLAGS}"
5246
5247 echo $ac_n "checking for boolean_t in sys/types.h""... $ac_c" 1>&6
5248 echo "configure:5249: checking for boolean_t in sys/types.h" >&5
5249 if eval "test \"`echo '$''{'ac_cv_c_boolean_t_sys_types_h'+set}'`\" = set"; then
5250   echo $ac_n "(cached) $ac_c" 1>&6
5251 else
5252   cat > conftest.$ac_ext <<EOF
5253 #line 5254 "configure"
5254 #include "confdefs.h"
5255 #include <sys/types.h>
5256 int main() {
5257 boolean_t foo;
5258 ; return 0; }
5259 EOF
5260 if { (eval echo configure:5261: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5261   rm -rf conftest*
5262   ac_cv_c_boolean_t_sys_types_h=yes
5263 else
5264   echo "configure: failed program was:" >&5
5265   cat conftest.$ac_ext >&5
5266   rm -rf conftest*
5267   ac_cv_c_boolean_t_sys_types_h=no
5268 fi
5269 rm -f conftest*
5270 fi
5271
5272 echo "$ac_t""$ac_cv_c_boolean_t_sys_types_h" 1>&6
5273 if test x"$ac_cv_c_boolean_t_sys_types_h" != x"no"; then
5274     cat >> confdefs.h <<\EOF
5275 #define BOOLEAN_T_IN_SYS_TYPES_H 1
5276 EOF
5277
5278 fi
5279
5280 echo $ac_n "checking for boolean_t in pthread.h""... $ac_c" 1>&6
5281 echo "configure:5282: checking for boolean_t in pthread.h" >&5
5282 if eval "test \"`echo '$''{'ac_cv_c_boolean_t_pthread_h'+set}'`\" = set"; then
5283   echo $ac_n "(cached) $ac_c" 1>&6
5284 else
5285   cat > conftest.$ac_ext <<EOF
5286 #line 5287 "configure"
5287 #include "confdefs.h"
5288 #include <pthread.h>
5289 int main() {
5290 boolean_t foo;
5291 ; return 0; }
5292 EOF
5293 if { (eval echo configure:5294: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5294   rm -rf conftest*
5295   ac_cv_c_boolean_t_pthread_h=yes
5296 else
5297   echo "configure: failed program was:" >&5
5298   cat conftest.$ac_ext >&5
5299   rm -rf conftest*
5300   ac_cv_c_boolean_t_pthread_h=no
5301 fi
5302 rm -f conftest*
5303 fi
5304
5305 echo "$ac_t""$ac_cv_c_boolean_t_pthread_h" 1>&6
5306 if test x"$ac_cv_c_boolean_t_pthread_h" != x"no"; then
5307     cat >> confdefs.h <<\EOF
5308 #define BOOLEAN_T_IN_PTHREAD_H 1
5309 EOF
5310
5311 fi
5312
5313 echo $ac_n "checking for boolean_t in cthreads.h""... $ac_c" 1>&6
5314 echo "configure:5315: checking for boolean_t in cthreads.h" >&5
5315 if eval "test \"`echo '$''{'ac_cv_c_boolean_t_cthreads_h'+set}'`\" = set"; then
5316   echo $ac_n "(cached) $ac_c" 1>&6
5317 else
5318   cat > conftest.$ac_ext <<EOF
5319 #line 5320 "configure"
5320 #include "confdefs.h"
5321 #include <cthreads.h>
5322 int main() {
5323 boolean_t foo;
5324 ; return 0; }
5325 EOF
5326 if { (eval echo configure:5327: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5327   rm -rf conftest*
5328   ac_cv_c_boolean_t_cthreads_h=yes
5329 else
5330   echo "configure: failed program was:" >&5
5331   cat conftest.$ac_ext >&5
5332   rm -rf conftest*
5333   ac_cv_c_boolean_t_cthreads_h=no
5334 fi
5335 rm -f conftest*
5336 fi
5337
5338 echo "$ac_t""$ac_cv_c_boolean_t_cthreads_h" 1>&6
5339 if test x"$ac_cv_c_boolean_t_cthreads_h" != x"no"; then
5340     cat >> confdefs.h <<\EOF
5341 #define BOOLEAN_T_IN_CTHREADS_H 1
5342 EOF
5343
5344 fi
5345
5346 echo $ac_n "checking for working const""... $ac_c" 1>&6
5347 echo "configure:5348: checking for working const" >&5
5348 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
5349   echo $ac_n "(cached) $ac_c" 1>&6
5350 else
5351   cat > conftest.$ac_ext <<EOF
5352 #line 5353 "configure"
5353 #include "confdefs.h"
5354
5355 int main() {
5356
5357 /* Ultrix mips cc rejects this.  */
5358 typedef int charset[2]; const charset x;
5359 /* SunOS 4.1.1 cc rejects this.  */
5360 char const *const *ccp;
5361 char **p;
5362 /* NEC SVR4.0.2 mips cc rejects this.  */
5363 struct point {int x, y;};
5364 static struct point const zero = {0,0};
5365 /* AIX XL C 1.02.0.0 rejects this.
5366    It does not let you subtract one const X* pointer from another in an arm
5367    of an if-expression whose if-part is not a constant expression */
5368 const char *g = "string";
5369 ccp = &g + (g ? g-g : 0);
5370 /* HPUX 7.0 cc rejects these. */
5371 ++ccp;
5372 p = (char**) ccp;
5373 ccp = (char const *const *) p;
5374 { /* SCO 3.2v4 cc rejects this.  */
5375   char *t;
5376   char const *s = 0 ? (char *) 0 : (char const *) 0;
5377
5378   *t++ = 0;
5379 }
5380 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
5381   int x[] = {25, 17};
5382   const int *foo = &x[0];
5383   ++foo;
5384 }
5385 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
5386   typedef const int *iptr;
5387   iptr p = 0;
5388   ++p;
5389 }
5390 { /* AIX XL C 1.02.0.0 rejects this saying
5391      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
5392   struct s { int j; const int *ap[3]; };
5393   struct s *b; b->j = 5;
5394 }
5395 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
5396   const int foo = 10;
5397 }
5398
5399 ; return 0; }
5400 EOF
5401 if { (eval echo configure:5402: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5402   rm -rf conftest*
5403   ac_cv_c_const=yes
5404 else
5405   echo "configure: failed program was:" >&5
5406   cat conftest.$ac_ext >&5
5407   rm -rf conftest*
5408   ac_cv_c_const=no
5409 fi
5410 rm -f conftest*
5411 fi
5412
5413 echo "$ac_t""$ac_cv_c_const" 1>&6
5414 if test $ac_cv_c_const = no; then
5415   cat >> confdefs.h <<\EOF
5416 #define const 
5417 EOF
5418
5419 fi
5420
5421 echo $ac_n "checking for size_t""... $ac_c" 1>&6
5422 echo "configure:5423: checking for size_t" >&5
5423 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
5424   echo $ac_n "(cached) $ac_c" 1>&6
5425 else
5426   cat > conftest.$ac_ext <<EOF
5427 #line 5428 "configure"
5428 #include "confdefs.h"
5429 #include <sys/types.h>
5430 #if STDC_HEADERS
5431 #include <stdlib.h>
5432 #include <stddef.h>
5433 #endif
5434 EOF
5435 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5436   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
5437   rm -rf conftest*
5438   ac_cv_type_size_t=yes
5439 else
5440   rm -rf conftest*
5441   ac_cv_type_size_t=no
5442 fi
5443 rm -f conftest*
5444
5445 fi
5446 echo "$ac_t""$ac_cv_type_size_t" 1>&6
5447 if test $ac_cv_type_size_t = no; then
5448   cat >> confdefs.h <<\EOF
5449 #define size_t unsigned
5450 EOF
5451
5452 fi
5453
5454 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
5455 echo "configure:5456: checking whether time.h and sys/time.h may both be included" >&5
5456 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
5457   echo $ac_n "(cached) $ac_c" 1>&6
5458 else
5459   cat > conftest.$ac_ext <<EOF
5460 #line 5461 "configure"
5461 #include "confdefs.h"
5462 #include <sys/types.h>
5463 #include <sys/time.h>
5464 #include <time.h>
5465 int main() {
5466 struct tm *tp;
5467 ; return 0; }
5468 EOF
5469 if { (eval echo configure:5470: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5470   rm -rf conftest*
5471   ac_cv_header_time=yes
5472 else
5473   echo "configure: failed program was:" >&5
5474   cat conftest.$ac_ext >&5
5475   rm -rf conftest*
5476   ac_cv_header_time=no
5477 fi
5478 rm -f conftest*
5479 fi
5480
5481 echo "$ac_t""$ac_cv_header_time" 1>&6
5482 if test $ac_cv_header_time = yes; then
5483   cat >> confdefs.h <<\EOF
5484 #define TIME_WITH_SYS_TIME 1
5485 EOF
5486
5487 fi
5488
5489
5490
5491 ARCH=${target_cpu}
5492
5493 BUILTINS="${BUILTINS} mpeg_es mpeg_ps mpeg_ts memcpy idct idctclassic motion imdct downmix mpeg_adec lpcm_adec ac3_adec mpeg_vdec"
5494 PLUGINS="${PLUGINS} ac3_spdif spudec chroma_yv12_rgb8 filter_bob filter_invert filter_wall filter_transform filter_distort"
5495
5496 MMX_MODULES="memcpymmx idctmmx motionmmx"
5497 MMXEXT_MODULES="memcpymmxext idctmmxext motionmmxext"
5498 THREEDNOW_MODULES="memcpy3dn imdct3dn downmix3dn"
5499 SSE_MODULES="imdctsse downmixsse"
5500 ALTIVEC_MODULES="idctaltivec motionaltivec"
5501
5502 echo $ac_n "checking if \$CC groks MMX inline assembly""... $ac_c" 1>&6
5503 echo "configure:5504: checking if \$CC groks MMX inline assembly" >&5
5504 if eval "test \"`echo '$''{'ac_cv_mmx_inline'+set}'`\" = set"; then
5505   echo $ac_n "(cached) $ac_c" 1>&6
5506 else
5507   cat > conftest.$ac_ext <<EOF
5508 #line 5509 "configure"
5509 #include "confdefs.h"
5510
5511 int main() {
5512 void *p;asm volatile("packuswb %%mm1,%%mm2"::"r"(p));
5513 ; return 0; }
5514 EOF
5515 if { (eval echo configure:5516: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5516   rm -rf conftest*
5517   ac_cv_mmx_inline=yes
5518 else
5519   echo "configure: failed program was:" >&5
5520   cat conftest.$ac_ext >&5
5521   rm -rf conftest*
5522   ac_cv_mmx_inline=no
5523 fi
5524 rm -f conftest*
5525 fi
5526
5527 echo "$ac_t""$ac_cv_mmx_inline" 1>&6
5528 if test x"$ac_cv_mmx_inline" != x"no"; then
5529   ACCEL_MODULES="${ACCEL_MODULES} ${MMX_MODULES}"
5530 fi
5531
5532 echo $ac_n "checking if \$CC groks MMX EXT inline assembly""... $ac_c" 1>&6
5533 echo "configure:5534: checking if \$CC groks MMX EXT inline assembly" >&5
5534 if eval "test \"`echo '$''{'ac_cv_mmxext_inline'+set}'`\" = set"; then
5535   echo $ac_n "(cached) $ac_c" 1>&6
5536 else
5537   cat > conftest.$ac_ext <<EOF
5538 #line 5539 "configure"
5539 #include "confdefs.h"
5540
5541 int main() {
5542 void *p;asm volatile("maskmovq %%mm1,%%mm2"::"r"(p));
5543 ; return 0; }
5544 EOF
5545 if { (eval echo configure:5546: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5546   rm -rf conftest*
5547   ac_cv_mmxext_inline=yes
5548 else
5549   echo "configure: failed program was:" >&5
5550   cat conftest.$ac_ext >&5
5551   rm -rf conftest*
5552   ac_cv_mmxext_inline=no
5553 fi
5554 rm -f conftest*
5555 fi
5556
5557 echo "$ac_t""$ac_cv_mmxext_inline" 1>&6
5558 if test x"$ac_cv_mmxext_inline" != x"no"; then
5559   ACCEL_MODULES="${ACCEL_MODULES} ${MMXEXT_MODULES}"
5560 fi
5561
5562 echo $ac_n "checking if \$CC groks 3D Now! inline assembly""... $ac_c" 1>&6
5563 echo "configure:5564: checking if \$CC groks 3D Now! inline assembly" >&5
5564 if eval "test \"`echo '$''{'ac_cv_3dnow_inline'+set}'`\" = set"; then
5565   echo $ac_n "(cached) $ac_c" 1>&6
5566 else
5567   cat > conftest.$ac_ext <<EOF
5568 #line 5569 "configure"
5569 #include "confdefs.h"
5570
5571 int main() {
5572 void *p;asm volatile("pfadd %%mm1,%%mm2"::"r"(p));
5573 ; return 0; }
5574 EOF
5575 if { (eval echo configure:5576: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5576   rm -rf conftest*
5577   ac_cv_3dnow_inline=yes
5578 else
5579   echo "configure: failed program was:" >&5
5580   cat conftest.$ac_ext >&5
5581   rm -rf conftest*
5582   ac_cv_3dnow_inline=no
5583 fi
5584 rm -f conftest*
5585 fi
5586
5587 echo "$ac_t""$ac_cv_3dnow_inline" 1>&6
5588 if test x"$ac_cv_3dnow_inline" != x"no"; then
5589   cat >> confdefs.h <<\EOF
5590 #define CAN_COMPILE_3DNOW 1
5591 EOF
5592
5593   ACCEL_MODULES="${ACCEL_MODULES} ${THREEDNOW_MODULES}"
5594 fi
5595
5596 echo $ac_n "checking if \$CC groks SSE inline assembly""... $ac_c" 1>&6
5597 echo "configure:5598: checking if \$CC groks SSE inline assembly" >&5
5598 if eval "test \"`echo '$''{'ac_cv_sse_inline'+set}'`\" = set"; then
5599   echo $ac_n "(cached) $ac_c" 1>&6
5600 else
5601   cat > conftest.$ac_ext <<EOF
5602 #line 5603 "configure"
5603 #include "confdefs.h"
5604
5605 int main() {
5606 void *p;asm volatile("xorps %%xmm1,%%xmm2"::"r"(p));
5607 ; return 0; }
5608 EOF
5609 if { (eval echo configure:5610: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5610   rm -rf conftest*
5611   ac_cv_sse_inline=yes
5612 else
5613   echo "configure: failed program was:" >&5
5614   cat conftest.$ac_ext >&5
5615   rm -rf conftest*
5616   ac_cv_sse_inline=no
5617 fi
5618 rm -f conftest*
5619 fi
5620
5621 echo "$ac_t""$ac_cv_sse_inline" 1>&6
5622 if test x"$ac_cv_sse_inline" != x"no"; then
5623   cat >> confdefs.h <<\EOF
5624 #define CAN_COMPILE_SSE 1
5625 EOF
5626
5627   ACCEL_MODULES="${ACCEL_MODULES} ${SSE_MODULES}"
5628 fi
5629
5630 echo $ac_n "checking if \$CC groks Altivec inline assembly""... $ac_c" 1>&6
5631 echo "configure:5632: checking if \$CC groks Altivec inline assembly" >&5
5632 if eval "test \"`echo '$''{'ac_cv_altivec_inline'+set}'`\" = set"; then
5633   echo $ac_n "(cached) $ac_c" 1>&6
5634 else
5635   cat > conftest.$ac_ext <<EOF
5636 #line 5637 "configure"
5637 #include "confdefs.h"
5638
5639 int main() {
5640 asm volatile("vperm 0,1,2,3");
5641 ; return 0; }
5642 EOF
5643 if { (eval echo configure:5644: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5644   rm -rf conftest*
5645   ac_cv_altivec_inline=yes
5646 else
5647   echo "configure: failed program was:" >&5
5648   cat conftest.$ac_ext >&5
5649   rm -rf conftest*
5650   save_CFLAGS=$CFLAGS
5651           CFLAGS="$CFLAGS -Wa,-m7400"
5652           cat > conftest.$ac_ext <<EOF
5653 #line 5654 "configure"
5654 #include "confdefs.h"
5655
5656 int main() {
5657 asm volatile("vperm 0,1,2,3");
5658 ; return 0; }
5659 EOF
5660 if { (eval echo configure:5661: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5661   rm -rf conftest*
5662   ac_cv_altivec_inline="-Wa,-m7400"
5663 else
5664   echo "configure: failed program was:" >&5
5665   cat conftest.$ac_ext >&5
5666   rm -rf conftest*
5667   ac_cv_altivec_inline=no
5668 fi
5669 rm -f conftest*
5670           CFLAGS=$save_CFLAGS
5671          
5672 fi
5673 rm -f conftest*
5674 fi
5675
5676 echo "$ac_t""$ac_cv_altivec_inline" 1>&6
5677 if test x"$ac_cv_altivec_inline" != x"no"; then
5678   cat >> confdefs.h <<\EOF
5679 #define CAN_COMPILE_ALTIVEC 1
5680 EOF
5681
5682   if test x"$ac_cv_altivec_inline" != x"yes"; then
5683     CFLAGS_ALTIVEC="$CFLAGS_ALTIVEC $ac_cv_altivec_inline"
5684   fi
5685   ACCEL_MODULES="${ACCEL_MODULES} ${ALTIVEC_MODULES}"
5686 fi
5687
5688 echo $ac_n "checking if \$CC groks Altivec C extensions""... $ac_c" 1>&6
5689 echo "configure:5690: checking if \$CC groks Altivec C extensions" >&5
5690 if eval "test \"`echo '$''{'ac_cv_c_altivec'+set}'`\" = set"; then
5691   echo $ac_n "(cached) $ac_c" 1>&6
5692 else
5693   save_CFLAGS=$CFLAGS
5694      CFLAGS="$CFLAGS -faltivec"
5695      # Darwin test
5696      cat > conftest.$ac_ext <<EOF
5697 #line 5698 "configure"
5698 #include "confdefs.h"
5699
5700 int main() {
5701 vec_mtvscr((vector unsigned int)(0));
5702 ; return 0; }
5703 EOF
5704 if { (eval echo configure:5705: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5705   rm -rf conftest*
5706   ac_cv_c_altivec=-faltivec
5707 else
5708   echo "configure: failed program was:" >&5
5709   cat conftest.$ac_ext >&5
5710   rm -rf conftest*
5711   
5712         # Linux/PPC test
5713         CFLAGS="$save_CFLAGS $CFLAGS_ALTIVEC -fvec"
5714         cat > conftest.$ac_ext <<EOF
5715 #line 5716 "configure"
5716 #include "confdefs.h"
5717
5718 int main() {
5719 vec_mtvscr((vector unsigned int)(0));
5720 ; return 0; }
5721 EOF
5722 if { (eval echo configure:5723: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5723   rm -rf conftest*
5724   ac_cv_c_altivec="-fvec"
5725 else
5726   echo "configure: failed program was:" >&5
5727   cat conftest.$ac_ext >&5
5728   rm -rf conftest*
5729   ac_cv_c_altivec=no
5730 fi
5731 rm -f conftest*
5732         
5733 fi
5734 rm -f conftest*
5735      CFLAGS=$save_CFLAGS
5736     
5737 fi
5738
5739 echo "$ac_t""$ac_cv_c_altivec" 1>&6
5740 if test x"$ac_cv_c_altivec" != x"no"; then
5741   cat >> confdefs.h <<\EOF
5742 #define CAN_COMPILE_C_ALTIVEC 1
5743 EOF
5744
5745   CFLAGS_ALTIVEC="$CFLAGS_ALTIVEC $ac_cv_c_altivec"
5746   ACCEL_MODULES="${ACCEL_MODULES} ${ALTIVEC_MODULES}"
5747 fi
5748
5749 echo $ac_n "checking if linker needs -framework vecLib""... $ac_c" 1>&6
5750 echo "configure:5751: checking if linker needs -framework vecLib" >&5
5751 if eval "test \"`echo '$''{'ac_cv_ld_altivec'+set}'`\" = set"; then
5752   echo $ac_n "(cached) $ac_c" 1>&6
5753 else
5754   save_LDFLAGS=$LDFLAGS
5755      LDFLAGS="$LDFLAGS -framework vecLib"
5756      cat > conftest.$ac_ext <<EOF
5757 #line 5758 "configure"
5758 #include "confdefs.h"
5759
5760 int main() {
5761
5762 ; return 0; }
5763 EOF
5764 if { (eval echo configure:5765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5765   rm -rf conftest*
5766   ac_cv_ld_altivec=yes
5767 else
5768   echo "configure: failed program was:" >&5
5769   cat conftest.$ac_ext >&5
5770   rm -rf conftest*
5771   ac_cv_ld_altivec=no
5772 fi
5773 rm -f conftest*
5774      LDFLAGS=$save_LDFLAGS
5775     
5776 fi
5777
5778 echo "$ac_t""$ac_cv_ld_altivec" 1>&6
5779 if test x"$ac_cv_ld_altivec" != x"no"; then
5780   LIB_ALTIVEC="-framework vecLib"
5781 fi
5782
5783 case ${target_os} in
5784   linux*)
5785     SYS=linux
5786     ;;
5787   bsdi*)
5788     SYS=bsdi
5789     ;;
5790   darwin*)
5791     SYS=darwin
5792     ;;
5793   *mingw32*)
5794     SYS=mingw32
5795     ;;
5796   *nto*)
5797     SYS=nto
5798     LIB_X11="${LIB_X11} -lsocket"
5799     LIB_XVIDEO="${LIB_XVIDEO} -lsocket"
5800     ;;
5801   *)
5802     SYS=${target_os}
5803     ;;
5804 esac
5805
5806 if test $SYS = mingw32; then
5807 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
5808 set dummy ${ac_tool_prefix}windres; ac_word=$2
5809 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5810 echo "configure:5811: checking for $ac_word" >&5
5811 if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
5812   echo $ac_n "(cached) $ac_c" 1>&6
5813 else
5814   if test -n "$WINDRES"; then
5815   ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
5816 else
5817   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
5818   ac_dummy="$PATH"
5819   for ac_dir in $ac_dummy; do
5820     test -z "$ac_dir" && ac_dir=.
5821     if test -f $ac_dir/$ac_word; then
5822       ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
5823       break
5824     fi
5825   done
5826   IFS="$ac_save_ifs"
5827 fi
5828 fi
5829 WINDRES="$ac_cv_prog_WINDRES"
5830 if test -n "$WINDRES"; then
5831   echo "$ac_t""$WINDRES" 1>&6
5832 else
5833   echo "$ac_t""no" 1>&6
5834 fi
5835
5836
5837 if test -z "$ac_cv_prog_WINDRES"; then
5838 if test -n "$ac_tool_prefix"; then
5839   # Extract the first word of "windres", so it can be a program name with args.
5840 set dummy windres; ac_word=$2
5841 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5842 echo "configure:5843: checking for $ac_word" >&5
5843 if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
5844   echo $ac_n "(cached) $ac_c" 1>&6
5845 else
5846   if test -n "$WINDRES"; then
5847   ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
5848 else
5849   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
5850   ac_dummy="$PATH"
5851   for ac_dir in $ac_dummy; do
5852     test -z "$ac_dir" && ac_dir=.
5853     if test -f $ac_dir/$ac_word; then
5854       ac_cv_prog_WINDRES="windres"
5855       break
5856     fi
5857   done
5858   IFS="$ac_save_ifs"
5859   test -z "$ac_cv_prog_WINDRES" && ac_cv_prog_WINDRES=":"
5860 fi
5861 fi
5862 WINDRES="$ac_cv_prog_WINDRES"
5863 if test -n "$WINDRES"; then
5864   echo "$ac_t""$WINDRES" 1>&6
5865 else
5866   echo "$ac_t""no" 1>&6
5867 fi
5868
5869 else
5870   WINDRES=":"
5871 fi
5872 fi
5873
5874 LIB_MPEG_TS="-lws2_32"
5875 LIB_RC="-lws2_32"
5876 fi
5877
5878
5879 CAN_BUILD_LIBDVDCSS=0
5880
5881 for ac_hdr in winioctl.h
5882 do
5883 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5884 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5885 echo "configure:5886: checking for $ac_hdr" >&5
5886 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5887   echo $ac_n "(cached) $ac_c" 1>&6
5888 else
5889   cat > conftest.$ac_ext <<EOF
5890 #line 5891 "configure"
5891 #include "confdefs.h"
5892 #include <$ac_hdr>
5893 EOF
5894 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5895 { (eval echo configure:5896: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5896 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5897 if test -z "$ac_err"; then
5898   rm -rf conftest*
5899   eval "ac_cv_header_$ac_safe=yes"
5900 else
5901   echo "$ac_err" >&5
5902   echo "configure: failed program was:" >&5
5903   cat conftest.$ac_ext >&5
5904   rm -rf conftest*
5905   eval "ac_cv_header_$ac_safe=no"
5906 fi
5907 rm -f conftest*
5908 fi
5909 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5910   echo "$ac_t""yes" 1>&6
5911     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5912   cat >> confdefs.h <<EOF
5913 #define $ac_tr_hdr 1
5914 EOF
5915  
5916   CAN_BUILD_LIBDVDCSS="${HAVE_LIBDVDCSS}"
5917
5918 else
5919   echo "$ac_t""no" 1>&6
5920 fi
5921 done
5922
5923
5924 for ac_hdr in sys/ioctl.h
5925 do
5926 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5927 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5928 echo "configure:5929: checking for $ac_hdr" >&5
5929 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5930   echo $ac_n "(cached) $ac_c" 1>&6
5931 else
5932   cat > conftest.$ac_ext <<EOF
5933 #line 5934 "configure"
5934 #include "confdefs.h"
5935 #include <$ac_hdr>
5936 EOF
5937 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5938 { (eval echo configure:5939: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5939 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5940 if test -z "$ac_err"; then
5941   rm -rf conftest*
5942   eval "ac_cv_header_$ac_safe=yes"
5943 else
5944   echo "$ac_err" >&5
5945   echo "configure: failed program was:" >&5
5946   cat conftest.$ac_ext >&5
5947   rm -rf conftest*
5948   eval "ac_cv_header_$ac_safe=no"
5949 fi
5950 rm -f conftest*
5951 fi
5952 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5953   echo "$ac_t""yes" 1>&6
5954     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5955   cat >> confdefs.h <<EOF
5956 #define $ac_tr_hdr 1
5957 EOF
5958  
5959   CAN_BUILD_LIBDVDCSS="${HAVE_LIBDVDCSS}"
5960   for ac_hdr in sys/cdio.h sys/dvdio.h linux/cdrom.h dvd.h
5961 do
5962 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5963 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5964 echo "configure:5965: checking for $ac_hdr" >&5
5965 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5966   echo $ac_n "(cached) $ac_c" 1>&6
5967 else
5968   cat > conftest.$ac_ext <<EOF
5969 #line 5970 "configure"
5970 #include "confdefs.h"
5971 #include <$ac_hdr>
5972 EOF
5973 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5974 { (eval echo configure:5975: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5975 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5976 if test -z "$ac_err"; then
5977   rm -rf conftest*
5978   eval "ac_cv_header_$ac_safe=yes"
5979 else
5980   echo "$ac_err" >&5
5981   echo "configure: failed program was:" >&5
5982   cat conftest.$ac_ext >&5
5983   rm -rf conftest*
5984   eval "ac_cv_header_$ac_safe=no"
5985 fi
5986 rm -f conftest*
5987 fi
5988 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5989   echo "$ac_t""yes" 1>&6
5990     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5991   cat >> confdefs.h <<EOF
5992 #define $ac_tr_hdr 1
5993 EOF
5994  
5995 else
5996   echo "$ac_t""no" 1>&6
5997 fi
5998 done
5999
6000   BSD_DVD_STRUCT=0
6001   LINUX_DVD_STRUCT=0
6002   OPENBSD_DVD_STRUCT=0
6003         cat > conftest.$ac_ext <<EOF
6004 #line 6005 "configure"
6005 #include "confdefs.h"
6006 #include <sys/cdio.h>
6007 EOF
6008 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6009   egrep "dvd_struct" >/dev/null 2>&1; then
6010   rm -rf conftest*
6011   
6012     cat >> confdefs.h <<\EOF
6013 #define DVD_STRUCT_IN_SYS_CDIO_H 1
6014 EOF
6015
6016     cat > conftest.$ac_ext <<EOF
6017 #line 6018 "configure"
6018 #include "confdefs.h"
6019 #include <sys/cdio.h>
6020 EOF
6021 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6022   egrep "struct dvd_struct" >/dev/null 2>&1; then
6023   rm -rf conftest*
6024   
6025                     BSD_DVD_STRUCT=1
6026 else
6027   rm -rf conftest*
6028   LINUX_DVD_STRUCT=1; OPENBSD_DVD_STRUCT=1
6029 fi
6030 rm -f conftest*
6031
6032   
6033 fi
6034 rm -f conftest*
6035
6036         cat > conftest.$ac_ext <<EOF
6037 #line 6038 "configure"
6038 #include "confdefs.h"
6039 #include <sys/dvdio.h>
6040 EOF
6041 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6042   egrep "dvd_struct" >/dev/null 2>&1; then
6043   rm -rf conftest*
6044   
6045     cat >> confdefs.h <<\EOF
6046 #define DVD_STRUCT_IN_SYS_DVDIO_H 1
6047 EOF
6048
6049     cat > conftest.$ac_ext <<EOF
6050 #line 6051 "configure"
6051 #include "confdefs.h"
6052 #include <sys/dvdio.h>
6053 EOF
6054 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6055   egrep "struct dvd_struct" >/dev/null 2>&1; then
6056   rm -rf conftest*
6057   
6058                     BSD_DVD_STRUCT=1
6059 else
6060   rm -rf conftest*
6061   LINUX_DVD_STRUCT=1
6062 fi
6063 rm -f conftest*
6064
6065   
6066 fi
6067 rm -f conftest*
6068
6069         cat > conftest.$ac_ext <<EOF
6070 #line 6071 "configure"
6071 #include "confdefs.h"
6072 #include <linux/cdrom.h>
6073 EOF
6074 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6075   egrep "dvd_struct" >/dev/null 2>&1; then
6076   rm -rf conftest*
6077   
6078     cat >> confdefs.h <<\EOF
6079 #define DVD_STRUCT_IN_LINUX_CDROM_H 1
6080 EOF
6081
6082     LINUX_DVD_STRUCT=1
6083   
6084 fi
6085 rm -f conftest*
6086
6087         NEED_BSDI_LIBDVD=0
6088   cat > conftest.$ac_ext <<EOF
6089 #line 6090 "configure"
6090 #include "confdefs.h"
6091 #include <dvd.h>
6092 EOF
6093 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6094   egrep "dvd_struct" >/dev/null 2>&1; then
6095   rm -rf conftest*
6096   
6097     cat >> confdefs.h <<\EOF
6098 #define DVD_STRUCT_IN_DVD_H 1
6099 EOF
6100
6101     LIB_LIBDVDCSS="${LIB_LIBDVDCSS} -ldvd"
6102     LINUX_DVD_STRUCT=1
6103   
6104 else
6105   rm -rf conftest*
6106   
6107                 for ac_hdr in /sys/dev/scsi/scsi_ioctl.h
6108 do
6109 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6110 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6111 echo "configure:6112: checking for $ac_hdr" >&5
6112 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6113   echo $ac_n "(cached) $ac_c" 1>&6
6114 else
6115   cat > conftest.$ac_ext <<EOF
6116 #line 6117 "configure"
6117 #include "confdefs.h"
6118 #include <$ac_hdr>
6119 EOF
6120 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6121 { (eval echo configure:6122: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6122 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6123 if test -z "$ac_err"; then
6124   rm -rf conftest*
6125   eval "ac_cv_header_$ac_safe=yes"
6126 else
6127   echo "$ac_err" >&5
6128   echo "configure: failed program was:" >&5
6129   cat conftest.$ac_ext >&5
6130   rm -rf conftest*
6131   eval "ac_cv_header_$ac_safe=no"
6132 fi
6133 rm -f conftest*
6134 fi
6135 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6136   echo "$ac_t""yes" 1>&6
6137     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6138   cat >> confdefs.h <<EOF
6139 #define $ac_tr_hdr 1
6140 EOF
6141  
6142       NEED_BSDI_LIBDVD=1
6143       cat >> confdefs.h <<\EOF
6144 #define DVD_STRUCT_IN_BSDI_DVDIOCTL_DVD_H 1
6145 EOF
6146
6147       OBJ_LIBDVDCSS="${OBJ_LIBDVDCSS} bsdi_dvdioctl.o"
6148       LINUX_DVD_STRUCT=1
6149     
6150 else
6151   echo "$ac_t""no" 1>&6
6152 fi
6153 done
6154
6155   
6156 fi
6157 rm -f conftest*
6158
6159         ac_safe=`echo "sys/scsi/scsi_types.h" | sed 'y%./+-%__p_%'`
6160 echo $ac_n "checking for sys/scsi/scsi_types.h""... $ac_c" 1>&6
6161 echo "configure:6162: checking for sys/scsi/scsi_types.h" >&5
6162 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6163   echo $ac_n "(cached) $ac_c" 1>&6
6164 else
6165   cat > conftest.$ac_ext <<EOF
6166 #line 6167 "configure"
6167 #include "confdefs.h"
6168 #include <sys/scsi/scsi_types.h>
6169 EOF
6170 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6171 { (eval echo configure:6172: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6172 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6173 if test -z "$ac_err"; then
6174   rm -rf conftest*
6175   eval "ac_cv_header_$ac_safe=yes"
6176 else
6177   echo "$ac_err" >&5
6178   echo "configure: failed program was:" >&5
6179   cat conftest.$ac_ext >&5
6180   rm -rf conftest*
6181   eval "ac_cv_header_$ac_safe=no"
6182 fi
6183 rm -f conftest*
6184 fi
6185 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6186   echo "$ac_t""yes" 1>&6
6187   
6188     ac_safe=`echo "sys/scsi/impl/uscsi.h" | sed 'y%./+-%__p_%'`
6189 echo $ac_n "checking for sys/scsi/impl/uscsi.h""... $ac_c" 1>&6
6190 echo "configure:6191: checking for sys/scsi/impl/uscsi.h" >&5
6191 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6192   echo $ac_n "(cached) $ac_c" 1>&6
6193 else
6194   cat > conftest.$ac_ext <<EOF
6195 #line 6196 "configure"
6196 #include "confdefs.h"
6197 #include <sys/scsi/impl/uscsi.h>
6198 EOF
6199 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6200 { (eval echo configure:6201: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6201 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6202 if test -z "$ac_err"; then
6203   rm -rf conftest*
6204   eval "ac_cv_header_$ac_safe=yes"
6205 else
6206   echo "$ac_err" >&5
6207   echo "configure: failed program was:" >&5
6208   cat conftest.$ac_ext >&5
6209   rm -rf conftest*
6210   eval "ac_cv_header_$ac_safe=no"
6211 fi
6212 rm -f conftest*
6213 fi
6214 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6215   echo "$ac_t""yes" 1>&6
6216   
6217       cat >> confdefs.h <<\EOF
6218 #define SOLARIS_USCSI 1
6219 EOF
6220
6221     
6222 else
6223   echo "$ac_t""no" 1>&6
6224 fi
6225
6226   
6227 else
6228   echo "$ac_t""no" 1>&6
6229 fi
6230
6231         ac_safe=`echo "sys/scsi.h" | sed 'y%./+-%__p_%'`
6232 echo $ac_n "checking for sys/scsi.h""... $ac_c" 1>&6
6233 echo "configure:6234: checking for sys/scsi.h" >&5
6234 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6235   echo $ac_n "(cached) $ac_c" 1>&6
6236 else
6237   cat > conftest.$ac_ext <<EOF
6238 #line 6239 "configure"
6239 #include "confdefs.h"
6240 #include <sys/scsi.h>
6241 EOF
6242 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6243 { (eval echo configure:6244: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6244 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6245 if test -z "$ac_err"; then
6246   rm -rf conftest*
6247   eval "ac_cv_header_$ac_safe=yes"
6248 else
6249   echo "$ac_err" >&5
6250   echo "configure: failed program was:" >&5
6251   cat conftest.$ac_ext >&5
6252   rm -rf conftest*
6253   eval "ac_cv_header_$ac_safe=no"
6254 fi
6255 rm -f conftest*
6256 fi
6257 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6258   echo "$ac_t""yes" 1>&6
6259   
6260     cat > conftest.$ac_ext <<EOF
6261 #line 6262 "configure"
6262 #include "confdefs.h"
6263 #include <sys/scsi.h>
6264 EOF
6265 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6266   egrep "sctl_io" >/dev/null 2>&1; then
6267   rm -rf conftest*
6268   
6269       cat >> confdefs.h <<\EOF
6270 #define HPUX_SCTL_IO 1
6271 EOF
6272
6273     
6274 fi
6275 rm -f conftest*
6276
6277   
6278 else
6279   echo "$ac_t""no" 1>&6
6280 fi
6281
6282         if test x$LINUX_DVD_STRUCT = x1; then
6283     cat >> confdefs.h <<\EOF
6284 #define HAVE_LINUX_DVD_STRUCT 1
6285 EOF
6286
6287     if test x$OPENBSD_DVD_STRUCT = x1; then
6288       cat >> confdefs.h <<\EOF
6289 #define HAVE_OPENBSD_DVD_STRUCT 1
6290 EOF
6291
6292     fi
6293   else
6294     if test x$BSD_DVD_STRUCT = x1; then
6295       cat >> confdefs.h <<\EOF
6296 #define HAVE_BSD_DVD_STRUCT 1
6297 EOF
6298
6299     fi
6300   fi
6301
6302 else
6303   echo "$ac_t""no" 1>&6
6304 fi
6305 done
6306
6307
6308
6309 # Check whether --with-tuning or --without-tuning was given.
6310 if test "${with_tuning+set}" = set; then
6311   withval="$with_tuning"
6312   :
6313 fi
6314
6315 if test "x$withval" != "x"; then
6316     TUNING=$withval
6317 else
6318     if test x${target_cpu} = xi686 -o x${target_cpu} = xi586 -o x${target_cpu} = xi486 -o x${target_cpu} = xi386; then TUNING="pentiumpro"
6319     else
6320         if test x${target_cpu} = xpowerpc; then TUNING="750"; fi
6321     fi
6322 fi
6323
6324 # Check whether --enable-release or --disable-release was given.
6325 if test "${enable_release+set}" = set; then
6326   enableval="$enable_release"
6327    if test x$enableval = xyes; then RELEASE=1; fi 
6328 else
6329    VLC_VERSION="${VLC_VERSION}_`date +%Y-%m-%d`";
6330   LIBDVDCSS_VERSION="${LIBDVDCSS_VERSION}_`date +%Y-%m-%d`"; 
6331 fi
6332
6333
6334 # Check whether --enable-mmx or --disable-mmx was given.
6335 if test "${enable_mmx+set}" = set; then
6336   enableval="$enable_mmx"
6337    if test x$enableval = xyes; then ARCH="${ARCH} mmx";
6338     BUILTINS="${BUILTINS} ${ACCEL_MODULES}"; fi 
6339 else
6340    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";
6341     BUILTINS="${BUILTINS} ${ACCEL_MODULES}"; fi 
6342 fi
6343
6344
6345 # Check whether --enable-altivec or --disable-altivec was given.
6346 if test "${enable_altivec+set}" = set; then
6347   enableval="$enable_altivec"
6348    if test x$enableval = xyes; then ARCH="${ARCH} altivec";
6349     BUILTINS="${BUILTINS} ${ACCEL_MODULES}"; fi 
6350 else
6351    if test x${target_cpu} = xpowerpc; then ARCH="${ARCH} altivec";
6352     BUILTINS="${BUILTINS} ${ACCEL_MODULES}"; fi 
6353 fi
6354
6355
6356 DEBUG=0
6357 # Check whether --enable-debug or --disable-debug was given.
6358 if test "${enable_debug+set}" = set; then
6359   enableval="$enable_debug"
6360    if test x$enableval = xyes; then DEBUG=1; fi 
6361 fi
6362
6363
6364 TRACE=0
6365 # Check whether --enable-trace or --disable-trace was given.
6366 if test "${enable_trace+set}" = set; then
6367   enableval="$enable_trace"
6368    if test x$enableval = xyes; then TRACE=1; fi 
6369 fi
6370
6371
6372 GPROF=0
6373 # Check whether --enable-gprof or --disable-gprof was given.
6374 if test "${enable_gprof+set}" = set; then
6375   enableval="$enable_gprof"
6376    if test x$enableval = xyes; then GPROF=1; fi 
6377 fi
6378
6379
6380 CPROF=0
6381 # Check whether --enable-cprof or --disable-cprof was given.
6382 if test "${enable_cprof+set}" = set; then
6383   enableval="$enable_cprof"
6384    if test x$enableval = xyes;
6385   then
6386     LIB="${LIB} -lcprof"
6387     CPROF=1
6388   fi
6389
6390 fi
6391
6392
6393 # Check whether --enable-optimizations or --disable-optimizations was given.
6394 if test "${enable_optimizations+set}" = set; then
6395   enableval="$enable_optimizations"
6396    if test x$enableval = xno; then OPTIMS=0; fi 
6397 else
6398    OPTIMS=1 
6399 fi
6400
6401
6402 # Check whether --enable-pth or --disable-pth was given.
6403 if test "${enable_pth+set}" = set; then
6404   enableval="$enable_pth"
6405    if test x$enableval = xyes; then
6406     echo $ac_n "checking for pth_init in -lpth""... $ac_c" 1>&6
6407 echo "configure:6408: checking for pth_init in -lpth" >&5
6408 ac_lib_var=`echo pth'_'pth_init | sed 'y%./+-%__p_%'`
6409 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6410   echo $ac_n "(cached) $ac_c" 1>&6
6411 else
6412   ac_save_LIBS="$LIBS"
6413 LIBS="-lpth  $LIBS"
6414 cat > conftest.$ac_ext <<EOF
6415 #line 6416 "configure"
6416 #include "confdefs.h"
6417 /* Override any gcc2 internal prototype to avoid an error.  */
6418 /* We use char because int might match the return type of a gcc2
6419     builtin and then its argument prototype would still apply.  */
6420 char pth_init();
6421
6422 int main() {
6423 pth_init()
6424 ; return 0; }
6425 EOF
6426 if { (eval echo configure:6427: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6427   rm -rf conftest*
6428   eval "ac_cv_lib_$ac_lib_var=yes"
6429 else
6430   echo "configure: failed program was:" >&5
6431   cat conftest.$ac_ext >&5
6432   rm -rf conftest*
6433   eval "ac_cv_lib_$ac_lib_var=no"
6434 fi
6435 rm -f conftest*
6436 LIBS="$ac_save_LIBS"
6437
6438 fi
6439 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6440   echo "$ac_t""yes" 1>&6
6441     ac_tr_lib=HAVE_LIB`echo pth | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6442     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6443   cat >> confdefs.h <<EOF
6444 #define $ac_tr_lib 1
6445 EOF
6446
6447   LIBS="-lpth $LIBS"
6448
6449 else
6450   echo "$ac_t""no" 1>&6
6451 fi
6452
6453     cat > conftest.$ac_ext <<EOF
6454 #line 6455 "configure"
6455 #include "confdefs.h"
6456 #include <pth.h>
6457 EOF
6458 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6459   egrep "pth_init" >/dev/null 2>&1; then
6460   rm -rf conftest*
6461   
6462       cat >> confdefs.h <<\EOF
6463 #define PTH_INIT_IN_PTH_H 1
6464 EOF
6465
6466     THREAD_LIB="-lpth"
6467     fi
6468 fi
6469 rm -f conftest*
6470
6471
6472 fi
6473
6474
6475 LIB="${LIB} ${THREAD_LIB}"
6476
6477 NEED_LIBDVDCSS=0
6478 STATIC_LIBDVDCSS=0
6479 DUMMY_LIBDVDCSS=0
6480 # Check whether --with-dvdcss or --without-dvdcss was given.
6481 if test "${with_dvdcss+set}" = set; then
6482   withval="$with_dvdcss"
6483    case "x${withval}" in
6484     xlocal-static|xyes)
6485       # local libdvdcss, statically linked
6486       if test x${CAN_BUILD_LIBDVDCSS} = x1
6487       then
6488         NEED_LIBDVDCSS=1
6489         STATIC_LIBDVDCSS=1
6490         BUILTINS="${BUILTINS} dvd"
6491         CFLAGS_DVD="${CFLAGS_DVD} -I../../extras/libdvdcss"
6492         LIB_DVD="${LIB_DVD} lib/libdvdcss.a ${LIB_LIBDVDCSS}"
6493         LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} ../../lib/libdvdcss.a ${LIB_LIBDVDCSS}"
6494       fi
6495     ;;
6496     xlocal-shared)
6497       # local libdvdcss, dynamically linked
6498       if test x${CAN_BUILD_LIBDVDCSS} = x1
6499       then
6500         NEED_LIBDVDCSS=1
6501         BUILTINS="${BUILTINS} dvd"
6502         CFLAGS_DVD="${CFLAGS_DVD} -I../../extras/libdvdcss"
6503         LIB_DVD="${LIB_DVD} -Llib -ldvdcss"
6504         LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} -L../../lib -ldvdcss"
6505       fi
6506     ;;
6507     xno)
6508       # don't use libdvdcss at all, build a DVD module that can dlopen() it
6509       DUMMY_LIBDVDCSS=1
6510       BUILTINS="${BUILTINS} dvd"
6511       OBJ_DVD="${OBJ_DVD} dummy_dvdcss.o"
6512       CFLAGS_DVD="${CFLAGS_DVD} -DGOD_DAMN_DMCA"
6513       CFLAGS_DVD="${CFLAGS_DVD} -DLIBDVDCSS_VERSION=\"${LIBDVDCSS_VERSION}\""
6514       LIB_DVD="${LIB_DVD} -ldl"
6515       LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} -ldl"
6516     ;;
6517     *)
6518       # existing libdvdcss
6519       BUILTINS="${BUILTINS} dvd"
6520       if test "x$withval" != "xyes"
6521       then
6522         LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} -L"$withval"/lib"
6523         CFLAGS_DVD="${CFLAGS_DVD} -I"$withval"/include"
6524       fi
6525       LIB_DVD="${LIB_DVD} -ldvdcss"
6526       LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} -ldvdcss"
6527     esac 
6528 else
6529   # user didn't decide, we choose to use local libdvdcss and link statically
6530   # if libdvdcss is in the archive, or to use the dummy replacement otherwise.
6531    if test x${CAN_BUILD_LIBDVDCSS} = x1
6532     then
6533       NEED_LIBDVDCSS=1
6534       STATIC_LIBDVDCSS=1
6535       BUILTINS="${BUILTINS} dvd"
6536       CFLAGS_DVD="${CFLAGS_DVD} -I../../extras/libdvdcss"
6537       LIB_DVD="${LIB_DVD} lib/libdvdcss.a ${LIB_LIBDVDCSS}"
6538       LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} ../../lib/libdvdcss.a ${LIB_LIBDVDCSS}"
6539     else
6540       # XXX: no check for libdl is done, don't try this at home !
6541       DUMMY_LIBDVDCSS=1
6542       BUILTINS="${BUILTINS} dvd"
6543       OBJ_DVD="${OBJ_DVD} dummy_dvdcss.o"
6544       CFLAGS_DVD="${CFLAGS_DVD} -DGOD_DAMN_DMCA"
6545       LIB_DVD="${LIB_DVD} -ldl"
6546       LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} -ldl"
6547     fi 
6548 fi
6549
6550
6551 # Check whether --enable-dvdread or --disable-dvdread was given.
6552 if test "${enable_dvdread+set}" = set; then
6553   enableval="$enable_dvdread"
6554    if test x$enableval = xyes
6555   then
6556     NEED_LIBDVDCSS=1
6557     STATIC_LIBDVDCSS=1
6558     BUILTINS="${BUILTINS} dvdread" 
6559     CFLAGS_DVDREAD="${CFLAGS_DVDREAD} -I../../extras/libdvdread"
6560     LIB_DVDREAD="${LIB_DVDREAD} lib/libdvdread.a lib/libdvdcss.a"
6561   fi 
6562 fi
6563
6564
6565 # Check whether --enable-vcd or --disable-vcd was given.
6566 if test "${enable_vcd+set}" = set; then
6567   enableval="$enable_vcd"
6568   :
6569 fi
6570
6571
6572 if test x$enable_vcd != xno
6573 then
6574   cat > conftest.$ac_ext <<EOF
6575 #line 6576 "configure"
6576 #include "confdefs.h"
6577 #include <linux/cdrom.h>
6578 EOF
6579 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6580   egrep "cdrom_msf0" >/dev/null 2>&1; then
6581   rm -rf conftest*
6582   
6583     BUILTINS="${BUILTINS} vcd"
6584   
6585 fi
6586 rm -f conftest*
6587
6588 fi
6589
6590 if test x$enable_vcd != xno -a "${SYS}" = "bsdi"
6591 then
6592   BUILTINS="${BUILTINS} vcd"
6593 fi
6594
6595 # Check whether --enable-dummy or --disable-dummy was given.
6596 if test "${enable_dummy+set}" = set; then
6597   enableval="$enable_dummy"
6598   :
6599 fi
6600
6601
6602 if test x$enable_dummy != xno
6603 then
6604   BUILTINS="${BUILTINS} dummy"
6605 fi
6606
6607 # Check whether --enable-null or --disable-null was given.
6608 if test "${enable_null+set}" = set; then
6609   enableval="$enable_null"
6610   :
6611 fi
6612
6613
6614 if test x$enable_null != xno
6615 then
6616   BUILTINS="${BUILTINS} null"
6617 fi
6618
6619 # Check whether --enable-rc or --disable-rc was given.
6620 if test "${enable_rc+set}" = set; then
6621   enableval="$enable_rc"
6622   :
6623 fi
6624
6625
6626 if test x$enable_rc != xno
6627 then
6628   BUILTINS="${BUILTINS} rc"
6629 fi
6630
6631 # Check whether --with-mad or --without-mad was given.
6632 if test "${with_mad+set}" = set; then
6633   withval="$with_mad"
6634    if test "x$with_val" != "xno"; then
6635       if test -n $with_val; then
6636             CFLAGS_MAD="-I$with_val/include"
6637         LIB_MAD="-L$with_val/lib -lmad"
6638       else
6639         LIB_MAD="-lmad"
6640       fi
6641       save_CFLAGS=$CFLAGS
6642       save_LDFLAGS=$LDFLAGS
6643       CFLAGS="$CFLAGS $CFLAGS_MAD"
6644       LDFLAGS="$LDFLAGS $LIB_MAD"
6645       for ac_hdr in mad.h
6646 do
6647 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6648 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6649 echo "configure:6650: checking for $ac_hdr" >&5
6650 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6651   echo $ac_n "(cached) $ac_c" 1>&6
6652 else
6653   cat > conftest.$ac_ext <<EOF
6654 #line 6655 "configure"
6655 #include "confdefs.h"
6656 #include <$ac_hdr>
6657 EOF
6658 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6659 { (eval echo configure:6660: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6660 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6661 if test -z "$ac_err"; then
6662   rm -rf conftest*
6663   eval "ac_cv_header_$ac_safe=yes"
6664 else
6665   echo "$ac_err" >&5
6666   echo "configure: failed program was:" >&5
6667   cat conftest.$ac_ext >&5
6668   rm -rf conftest*
6669   eval "ac_cv_header_$ac_safe=no"
6670 fi
6671 rm -f conftest*
6672 fi
6673 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6674   echo "$ac_t""yes" 1>&6
6675     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6676   cat >> confdefs.h <<EOF
6677 #define $ac_tr_hdr 1
6678 EOF
6679  
6680 else
6681   echo "$ac_t""no" 1>&6
6682 echo "Cannot find development headers for libmad..."
6683         exit 1
6684       
6685 fi
6686 done
6687
6688       echo $ac_n "checking for mad_bit_init in -lmad""... $ac_c" 1>&6
6689 echo "configure:6690: checking for mad_bit_init in -lmad" >&5
6690 ac_lib_var=`echo mad'_'mad_bit_init | sed 'y%./+-%__p_%'`
6691 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6692   echo $ac_n "(cached) $ac_c" 1>&6
6693 else
6694   ac_save_LIBS="$LIBS"
6695 LIBS="-lmad  $LIBS"
6696 cat > conftest.$ac_ext <<EOF
6697 #line 6698 "configure"
6698 #include "confdefs.h"
6699 /* Override any gcc2 internal prototype to avoid an error.  */
6700 /* We use char because int might match the return type of a gcc2
6701     builtin and then its argument prototype would still apply.  */
6702 char mad_bit_init();
6703
6704 int main() {
6705 mad_bit_init()
6706 ; return 0; }
6707 EOF
6708 if { (eval echo configure:6709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6709   rm -rf conftest*
6710   eval "ac_cv_lib_$ac_lib_var=yes"
6711 else
6712   echo "configure: failed program was:" >&5
6713   cat conftest.$ac_ext >&5
6714   rm -rf conftest*
6715   eval "ac_cv_lib_$ac_lib_var=no"
6716 fi
6717 rm -f conftest*
6718 LIBS="$ac_save_LIBS"
6719
6720 fi
6721 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6722   echo "$ac_t""yes" 1>&6
6723     ac_tr_lib=HAVE_LIB`echo mad | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6724     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6725   cat >> confdefs.h <<EOF
6726 #define $ac_tr_lib 1
6727 EOF
6728
6729   LIBS="-lmad $LIBS"
6730
6731 else
6732   echo "$ac_t""no" 1>&6
6733  echo "Cannot find libmad library..."
6734         exit 1
6735       
6736 fi
6737
6738       CFLAGS=$save_CFLAGS
6739       LDFLAGS=$save_LDFLAGS
6740       PLUGINS="${PLUGINS} mad"
6741     fi 
6742 fi
6743
6744
6745 if test x$SYS = xbeos
6746 then
6747     LIB="${LIB} -lbe"
6748     BUILTINS="${BUILTINS} beos"
6749     LIB_BEOS="${LIB_BEOS} -lbe -lgame -lroot -ltracker"
6750     PLCFLAGS="${PLCFLAGS} -nostart"
6751
6752 else
6753
6754 # Check whether --enable-dsp or --disable-dsp was given.
6755 if test "${enable_dsp+set}" = set; then
6756   enableval="$enable_dsp"
6757   :
6758 fi
6759
6760
6761 if test x$enable_dsp != xno &&
6762   (test $SYS != mingw32 || test x$enable_dsp = xyes)
6763 then
6764   if test -c /dev/dsp
6765   then
6766     PLUGINS="${PLUGINS} dsp"
6767   fi
6768 fi
6769
6770 # Check whether --enable-esd or --disable-esd was given.
6771 if test "${enable_esd+set}" = set; then
6772   enableval="$enable_esd"
6773   if test x$enable_esd = xyes
6774    then
6775      # Extract the first word of "esd-config", so it can be a program name with args.
6776 set dummy esd-config; ac_word=$2
6777 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6778 echo "configure:6779: checking for $ac_word" >&5
6779 if eval "test \"`echo '$''{'ac_cv_path_ESD_CONFIG'+set}'`\" = set"; then
6780   echo $ac_n "(cached) $ac_c" 1>&6
6781 else
6782   case "$ESD_CONFIG" in
6783   /*)
6784   ac_cv_path_ESD_CONFIG="$ESD_CONFIG" # Let the user override the test with a path.
6785   ;;
6786   ?:/*)                  
6787   ac_cv_path_ESD_CONFIG="$ESD_CONFIG" # Let the user override the test with a dos path.
6788   ;;
6789   *)
6790   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
6791   ac_dummy="$PATH"
6792   for ac_dir in $ac_dummy; do 
6793     test -z "$ac_dir" && ac_dir=.
6794     if test -f $ac_dir/$ac_word; then
6795       ac_cv_path_ESD_CONFIG="$ac_dir/$ac_word"
6796       break
6797     fi
6798   done
6799   IFS="$ac_save_ifs"
6800   test -z "$ac_cv_path_ESD_CONFIG" && ac_cv_path_ESD_CONFIG="no"
6801   ;;
6802 esac
6803 fi
6804 ESD_CONFIG="$ac_cv_path_ESD_CONFIG"
6805 if test -n "$ESD_CONFIG"; then
6806   echo "$ac_t""$ESD_CONFIG" 1>&6
6807 else
6808   echo "$ac_t""no" 1>&6
6809 fi
6810
6811      if test x${ESD_CONFIG} != xno
6812      then
6813        PLUGINS="${PLUGINS} esd"
6814        CFLAGS_ESD="`${ESD_CONFIG} --cflags`"
6815        LIB_ESD="`${ESD_CONFIG} --libs`"
6816      fi
6817    fi
6818 fi
6819
6820
6821 # Check whether --enable-arts or --disable-arts was given.
6822 if test "${enable_arts+set}" = set; then
6823   enableval="$enable_arts"
6824   if test x$enable_arts = xyes
6825    then
6826      # Extract the first word of "artsc-config", so it can be a program name with args.
6827 set dummy artsc-config; ac_word=$2
6828 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6829 echo "configure:6830: checking for $ac_word" >&5
6830 if eval "test \"`echo '$''{'ac_cv_path_ARTS_CONFIG'+set}'`\" = set"; then
6831   echo $ac_n "(cached) $ac_c" 1>&6
6832 else
6833   case "$ARTS_CONFIG" in
6834   /*)
6835   ac_cv_path_ARTS_CONFIG="$ARTS_CONFIG" # Let the user override the test with a path.
6836   ;;
6837   ?:/*)                  
6838   ac_cv_path_ARTS_CONFIG="$ARTS_CONFIG" # Let the user override the test with a dos path.
6839   ;;
6840   *)
6841   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
6842   ac_dummy="$PATH"
6843   for ac_dir in $ac_dummy; do 
6844     test -z "$ac_dir" && ac_dir=.
6845     if test -f $ac_dir/$ac_word; then
6846       ac_cv_path_ARTS_CONFIG="$ac_dir/$ac_word"
6847       break
6848     fi
6849   done
6850   IFS="$ac_save_ifs"
6851   test -z "$ac_cv_path_ARTS_CONFIG" && ac_cv_path_ARTS_CONFIG="no"
6852   ;;
6853 esac
6854 fi
6855 ARTS_CONFIG="$ac_cv_path_ARTS_CONFIG"
6856 if test -n "$ARTS_CONFIG"; then
6857   echo "$ac_t""$ARTS_CONFIG" 1>&6
6858 else
6859   echo "$ac_t""no" 1>&6
6860 fi
6861
6862      if test x${ARTS_CONFIG} != xno
6863      then
6864        PLUGINS="${PLUGINS} arts"
6865        CFLAGS_ARTS="`${ARTS_CONFIG} --cflags`"
6866        LIB_ARTS="`${ARTS_CONFIG} --libs `"
6867      fi
6868    fi
6869 fi
6870
6871
6872 # Check whether --enable-macosx or --disable-macosx was given.
6873 if test "${enable_macosx+set}" = set; then
6874   enableval="$enable_macosx"
6875   if test x$enable_macosx = xyes
6876    then
6877      BUILTINS="${BUILTINS} macosx"
6878      LIB_MACOSX="-framework CoreAudio -framework Cocoa -framework AGL -framework QuickTime"
6879      LIB="${LIB} -ObjC"
6880    fi
6881 else
6882   for ac_hdr in Cocoa/Cocoa.h
6883 do
6884 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6885 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6886 echo "configure:6887: checking for $ac_hdr" >&5
6887 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6888   echo $ac_n "(cached) $ac_c" 1>&6
6889 else
6890   cat > conftest.$ac_ext <<EOF
6891 #line 6892 "configure"
6892 #include "confdefs.h"
6893 #include <$ac_hdr>
6894 EOF
6895 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6896 { (eval echo configure:6897: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6897 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6898 if test -z "$ac_err"; then
6899   rm -rf conftest*
6900   eval "ac_cv_header_$ac_safe=yes"
6901 else
6902   echo "$ac_err" >&5
6903   echo "configure: failed program was:" >&5
6904   cat conftest.$ac_ext >&5
6905   rm -rf conftest*
6906   eval "ac_cv_header_$ac_safe=no"
6907 fi
6908 rm -f conftest*
6909 fi
6910 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6911   echo "$ac_t""yes" 1>&6
6912     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6913   cat >> confdefs.h <<EOF
6914 #define $ac_tr_hdr 1
6915 EOF
6916  BUILTINS="${BUILTINS} macosx"
6917      LIB_MACOSX="-framework CoreAudio -framework Cocoa -framework AGL -framework QuickTime"
6918      LIB="${LIB} -ObjC"
6919    
6920 else
6921   echo "$ac_t""no" 1>&6
6922 fi
6923 done
6924
6925 fi
6926
6927
6928 # Check whether --enable-qnx or --disable-qnx was given.
6929 if test "${enable_qnx+set}" = set; then
6930   enableval="$enable_qnx"
6931   :
6932 fi
6933
6934     if test x$enable_qnx != xno
6935     then
6936       for ac_hdr in Ph.h
6937 do
6938 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6939 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6940 echo "configure:6941: checking for $ac_hdr" >&5
6941 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6942   echo $ac_n "(cached) $ac_c" 1>&6
6943 else
6944   cat > conftest.$ac_ext <<EOF
6945 #line 6946 "configure"
6946 #include "confdefs.h"
6947 #include <$ac_hdr>
6948 EOF
6949 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6950 { (eval echo configure:6951: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6951 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6952 if test -z "$ac_err"; then
6953   rm -rf conftest*
6954   eval "ac_cv_header_$ac_safe=yes"
6955 else
6956   echo "$ac_err" >&5
6957   echo "configure: failed program was:" >&5
6958   cat conftest.$ac_ext >&5
6959   rm -rf conftest*
6960   eval "ac_cv_header_$ac_safe=no"
6961 fi
6962 rm -f conftest*
6963 fi
6964 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6965   echo "$ac_t""yes" 1>&6
6966     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6967   cat >> confdefs.h <<EOF
6968 #define $ac_tr_hdr 1
6969 EOF
6970  
6971         PLUGINS="${PLUGINS} qnx"
6972         LIB_QNX="-lasound -lph"
6973       
6974 else
6975   echo "$ac_t""no" 1>&6
6976 fi
6977 done
6978
6979     fi
6980
6981 # Check whether --enable-fb or --disable-fb was given.
6982 if test "${enable_fb+set}" = set; then
6983   enableval="$enable_fb"
6984    if test x$enable_fb = xyes
6985     then
6986       PLUGINS="${PLUGINS} fb"
6987     fi 
6988 fi
6989
6990
6991 # Check whether --with-ggi or --without-ggi was given.
6992 if test "${with_ggi+set}" = set; then
6993   withval="$with_ggi"
6994    if test "x$withval" != "xno"
6995     then
6996       PLUGINS="${PLUGINS} ggi"
6997       if test "x$withval" != "xyes"
6998       then
6999         LIB_GGI="-l"$withval
7000       else
7001         LIB_GGI="-lggi"
7002       fi
7003     fi 
7004 fi
7005
7006
7007 # Check whether --enable-sdl or --disable-sdl was given.
7008 if test "${enable_sdl+set}" = set; then
7009   enableval="$enable_sdl"
7010   :
7011 fi
7012
7013 if test "x$enable_sdl" != "xno"
7014 then
7015   SDL_PATH=$PATH
7016   # Check whether --with-sdl-config-path or --without-sdl-config-path was given.
7017 if test "${with_sdl_config_path+set}" = set; then
7018   withval="$with_sdl_config_path"
7019    if test "x$withval" != "xno"
7020       then
7021         SDL_PATH=$withval:$PATH
7022       fi 
7023 fi
7024
7025   # Extract the first word of "sdl12-config", so it can be a program name with args.
7026 set dummy sdl12-config; ac_word=$2
7027 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7028 echo "configure:7029: checking for $ac_word" >&5
7029 if eval "test \"`echo '$''{'ac_cv_path_SDL12_CONFIG'+set}'`\" = set"; then
7030   echo $ac_n "(cached) $ac_c" 1>&6
7031 else
7032   case "$SDL12_CONFIG" in
7033   /*)
7034   ac_cv_path_SDL12_CONFIG="$SDL12_CONFIG" # Let the user override the test with a path.
7035   ;;
7036   ?:/*)                  
7037   ac_cv_path_SDL12_CONFIG="$SDL12_CONFIG" # Let the user override the test with a dos path.
7038   ;;
7039   *)
7040   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7041   ac_dummy="$SDL_PATH"
7042   for ac_dir in $ac_dummy; do 
7043     test -z "$ac_dir" && ac_dir=.
7044     if test -f $ac_dir/$ac_word; then
7045       ac_cv_path_SDL12_CONFIG="$ac_dir/$ac_word"
7046       break
7047     fi
7048   done
7049   IFS="$ac_save_ifs"
7050   test -z "$ac_cv_path_SDL12_CONFIG" && ac_cv_path_SDL12_CONFIG="no"
7051   ;;
7052 esac
7053 fi
7054 SDL12_CONFIG="$ac_cv_path_SDL12_CONFIG"
7055 if test -n "$SDL12_CONFIG"; then
7056   echo "$ac_t""$SDL12_CONFIG" 1>&6
7057 else
7058   echo "$ac_t""no" 1>&6
7059 fi
7060
7061   SDL_CONFIG=${SDL12_CONFIG}
7062   SDL_HEADER="SDL12/SDL.h"
7063   if test x${SDL_CONFIG} = xno
7064   then
7065     # Extract the first word of "sdl11-config", so it can be a program name with args.
7066 set dummy sdl11-config; ac_word=$2
7067 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7068 echo "configure:7069: checking for $ac_word" >&5
7069 if eval "test \"`echo '$''{'ac_cv_path_SDL11_CONFIG'+set}'`\" = set"; then
7070   echo $ac_n "(cached) $ac_c" 1>&6
7071 else
7072   case "$SDL11_CONFIG" in
7073   /*)
7074   ac_cv_path_SDL11_CONFIG="$SDL11_CONFIG" # Let the user override the test with a path.
7075   ;;
7076   ?:/*)                  
7077   ac_cv_path_SDL11_CONFIG="$SDL11_CONFIG" # Let the user override the test with a dos path.
7078   ;;
7079   *)
7080   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7081   ac_dummy="$SDL_PATH"
7082   for ac_dir in $ac_dummy; do 
7083     test -z "$ac_dir" && ac_dir=.
7084     if test -f $ac_dir/$ac_word; then
7085       ac_cv_path_SDL11_CONFIG="$ac_dir/$ac_word"
7086       break
7087     fi
7088   done
7089   IFS="$ac_save_ifs"
7090   test -z "$ac_cv_path_SDL11_CONFIG" && ac_cv_path_SDL11_CONFIG="no"
7091   ;;
7092 esac
7093 fi
7094 SDL11_CONFIG="$ac_cv_path_SDL11_CONFIG"
7095 if test -n "$SDL11_CONFIG"; then
7096   echo "$ac_t""$SDL11_CONFIG" 1>&6
7097 else
7098   echo "$ac_t""no" 1>&6
7099 fi
7100
7101     SDL_CONFIG=${SDL11_CONFIG}
7102     SDL_HEADER="SDL11/SDL.h"
7103   fi
7104   if test x${SDL_CONFIG} = xno
7105   then
7106     # Extract the first word of "sdl-config", so it can be a program name with args.
7107 set dummy sdl-config; ac_word=$2
7108 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7109 echo "configure:7110: checking for $ac_word" >&5
7110 if eval "test \"`echo '$''{'ac_cv_path_SDL_CONFIG'+set}'`\" = set"; then
7111   echo $ac_n "(cached) $ac_c" 1>&6
7112 else
7113   case "$SDL_CONFIG" in
7114   /*)
7115   ac_cv_path_SDL_CONFIG="$SDL_CONFIG" # Let the user override the test with a path.
7116   ;;
7117   ?:/*)                  
7118   ac_cv_path_SDL_CONFIG="$SDL_CONFIG" # Let the user override the test with a dos path.
7119   ;;
7120   *)
7121   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7122   ac_dummy="$SDL_PATH"
7123   for ac_dir in $ac_dummy; do 
7124     test -z "$ac_dir" && ac_dir=.
7125     if test -f $ac_dir/$ac_word; then
7126       ac_cv_path_SDL_CONFIG="$ac_dir/$ac_word"
7127       break
7128     fi
7129   done
7130   IFS="$ac_save_ifs"
7131   test -z "$ac_cv_path_SDL_CONFIG" && ac_cv_path_SDL_CONFIG="no"
7132   ;;
7133 esac
7134 fi
7135 SDL_CONFIG="$ac_cv_path_SDL_CONFIG"
7136 if test -n "$SDL_CONFIG"; then
7137   echo "$ac_t""$SDL_CONFIG" 1>&6
7138 else
7139   echo "$ac_t""no" 1>&6
7140 fi
7141
7142     SDL_HEADER="SDL/SDL.h"
7143   fi
7144   if test x${SDL_CONFIG} != xno
7145   then
7146     PLUGINS="${PLUGINS} sdl"
7147     CFLAGS_SDL="`${SDL_CONFIG} --cflags`"
7148     LIB_SDL="`${SDL_CONFIG} --libs | sed 's,-rdynamic,,'`"
7149     save_CPPFLAGS=$CPPFLAGS
7150     CPPFLAGS="$CPPFLAGS $CFLAGS_SDL"
7151     for ac_hdr in ${SDL_HEADER}
7152 do
7153 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7154 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7155 echo "configure:7156: checking for $ac_hdr" >&5
7156 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7157   echo $ac_n "(cached) $ac_c" 1>&6
7158 else
7159   cat > conftest.$ac_ext <<EOF
7160 #line 7161 "configure"
7161 #include "confdefs.h"
7162 #include <$ac_hdr>
7163 EOF
7164 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7165 { (eval echo configure:7166: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7166 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7167 if test -z "$ac_err"; then
7168   rm -rf conftest*
7169   eval "ac_cv_header_$ac_safe=yes"
7170 else
7171   echo "$ac_err" >&5
7172   echo "configure: failed program was:" >&5
7173   cat conftest.$ac_ext >&5
7174   rm -rf conftest*
7175   eval "ac_cv_header_$ac_safe=no"
7176 fi
7177 rm -f conftest*
7178 fi
7179 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7180   echo "$ac_t""yes" 1>&6
7181     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7182   cat >> confdefs.h <<EOF
7183 #define $ac_tr_hdr 1
7184 EOF
7185  cat >> confdefs.h <<EOF
7186 #define SDL_INCLUDE_FILE <${SDL_HEADER}>
7187 EOF
7188
7189 else
7190   echo "$ac_t""no" 1>&6
7191 { echo "configure: error: The development package for SDL is not installed. 
7192 Please install it and try again. Alternatively you can also configure with 
7193 --disable-sdl." 1>&2; exit 1; }
7194       
7195 fi
7196 done
7197
7198     CPPFLAGS=$save_CPPFLAGS
7199     if expr 1.1.5 \> `$SDL_CONFIG --version` >/dev/null
7200     then
7201       { echo "configure: error: The development package for SDL is not installed.
7202 Please install it and try again. Alternatively you can also configure with
7203 --disable-sdl." 1>&2; exit 1; }
7204     fi
7205   elif test "x$enable_sdl" =  "xyes"
7206   then
7207     { echo "configure: error: I couldn't find the SDL package. You can download libSDL
7208 from http://www.libsdl.org/, or configure with --disable-sdl. Have a nice day.
7209     " 1>&2; exit 1; }
7210   fi
7211 fi
7212
7213 # Check whether --enable-directx or --disable-directx was given.
7214 if test "${enable_directx+set}" = set; then
7215   enableval="$enable_directx"
7216   :
7217 fi
7218
7219 if test "x$enableval" != "xno"
7220 then
7221   if test $SYS = mingw32
7222   then
7223     # Check whether --with-directx-path or --without-directx-path was given.
7224 if test "${with_directx_path+set}" = set; then
7225   withval="$with_directx_path"
7226   :
7227 fi
7228
7229     if test "x$with_directx_path" = "x"
7230     then
7231       for ac_hdr in directx.h
7232 do
7233 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7234 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7235 echo "configure:7236: checking for $ac_hdr" >&5
7236 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7237   echo $ac_n "(cached) $ac_c" 1>&6
7238 else
7239   cat > conftest.$ac_ext <<EOF
7240 #line 7241 "configure"
7241 #include "confdefs.h"
7242 #include <$ac_hdr>
7243 EOF
7244 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7245 { (eval echo configure:7246: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7246 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7247 if test -z "$ac_err"; then
7248   rm -rf conftest*
7249   eval "ac_cv_header_$ac_safe=yes"
7250 else
7251   echo "$ac_err" >&5
7252   echo "configure: failed program was:" >&5
7253   cat conftest.$ac_ext >&5
7254   rm -rf conftest*
7255   eval "ac_cv_header_$ac_safe=no"
7256 fi
7257 rm -f conftest*
7258 fi
7259 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7260   echo "$ac_t""yes" 1>&6
7261     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7262   cat >> confdefs.h <<EOF
7263 #define $ac_tr_hdr 1
7264 EOF
7265   PLUGINS="${PLUGINS} directx"
7266         LIB_DIRECTX="-lgdi32 -ldxguid" 
7267 else
7268   echo "$ac_t""no" 1>&6
7269 fi
7270 done
7271
7272     else
7273       echo $ac_n "checking for directX headers in ${withval}""... $ac_c" 1>&6
7274 echo "configure:7275: checking for directX headers in ${withval}" >&5
7275       if test -f ${withval}/include/directx.h
7276       then
7277         PLUGINS="${PLUGINS} directx"
7278         LIB_DIRECTX="-L${withval}/lib -lgdi32 -ldxguid"
7279         INCLUDE="${INCLUDE} -I${withval}/include"
7280         echo "$ac_t""yes" 1>&6
7281       else
7282         echo "$ac_t""no" 1>&6
7283         { echo "configure: error: Cannot find ${withval}/include/directx.h!" 1>&2; exit 1; }
7284       fi
7285     fi
7286   fi
7287 fi
7288
7289 # Check whether --with-glide or --without-glide was given.
7290 if test "${with_glide+set}" = set; then
7291   withval="$with_glide"
7292    if test "x$withval" != "xno"
7293     then
7294       PLUGINS="${PLUGINS} glide"
7295       if test "x$withval" != "xyes"
7296       then
7297         LIB_GLIDE="-l"$withval" -lm"
7298       else
7299         LIB_GLIDE="-lglide2x -lm"
7300       fi
7301     fi 
7302 fi
7303
7304
7305 # Check whether --enable-ncurses or --disable-ncurses was given.
7306 if test "${enable_ncurses+set}" = set; then
7307   enableval="$enable_ncurses"
7308   if test x$enable_ncurses = xyes; then
7309      PLUGINS="${PLUGINS} ncurses"
7310      LIB_NCURSES="-lncurses"
7311    fi
7312 fi
7313
7314
7315 # Check whether --enable-qt or --disable-qt was given.
7316 if test "${enable_qt+set}" = set; then
7317   enableval="$enable_qt"
7318   if test x$enable_qt = xyes; then
7319      PLUGINS="${PLUGINS} qt"
7320      ALIASES="${ALIASES} qvlc"
7321      LIB_QT="-lqt -L${QTDIR}/lib"
7322      if test -x ${QTDIR}/bin/moc
7323      then
7324        MOC=${QTDIR}/bin/moc
7325      else
7326        MOC=moc
7327      fi
7328    fi
7329 fi
7330
7331
7332 # Check whether --enable-kde or --disable-kde was given.
7333 if test "${enable_kde+set}" = set; then
7334   enableval="$enable_kde"
7335   if test x$enable_kde = xyes; then
7336      PLUGINS="${PLUGINS} kde"
7337      ALIASES="${ALIASES} kvlc"
7338      LIB_KDE="-L${KDEDIR}/lib -lkfile"
7339      if test -x ${QTDIR}/bin/moc
7340      then
7341        MOC=${QTDIR}/bin/moc
7342      else
7343        MOC=moc
7344      fi
7345    fi
7346 fi
7347
7348
7349 # Check whether --enable-gnome or --disable-gnome was given.
7350 if test "${enable_gnome+set}" = set; then
7351   enableval="$enable_gnome"
7352   if test x$enable_gnome = xyes; then
7353     # look for gnome-config
7354     # Extract the first word of "gnome-config", so it can be a program name with args.
7355 set dummy gnome-config; ac_word=$2
7356 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7357 echo "configure:7358: checking for $ac_word" >&5
7358 if eval "test \"`echo '$''{'ac_cv_path_GNOME_CONFIG'+set}'`\" = set"; then
7359   echo $ac_n "(cached) $ac_c" 1>&6
7360 else
7361   case "$GNOME_CONFIG" in
7362   /*)
7363   ac_cv_path_GNOME_CONFIG="$GNOME_CONFIG" # Let the user override the test with a path.
7364   ;;
7365   ?:/*)                  
7366   ac_cv_path_GNOME_CONFIG="$GNOME_CONFIG" # Let the user override the test with a dos path.
7367   ;;
7368   *)
7369   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7370   ac_dummy="$PATH"
7371   for ac_dir in $ac_dummy; do 
7372     test -z "$ac_dir" && ac_dir=.
7373     if test -f $ac_dir/$ac_word; then
7374       ac_cv_path_GNOME_CONFIG="$ac_dir/$ac_word"
7375       break
7376     fi
7377   done
7378   IFS="$ac_save_ifs"
7379   test -z "$ac_cv_path_GNOME_CONFIG" && ac_cv_path_GNOME_CONFIG="no"
7380   ;;
7381 esac
7382 fi
7383 GNOME_CONFIG="$ac_cv_path_GNOME_CONFIG"
7384 if test -n "$GNOME_CONFIG"; then
7385   echo "$ac_t""$GNOME_CONFIG" 1>&6
7386 else
7387   echo "$ac_t""no" 1>&6
7388 fi
7389
7390     if test -x ${GNOME_CONFIG}
7391     then
7392        CFLAGS_GNOME="`${GNOME_CONFIG} --cflags gnomeui`"
7393        LIB_GNOME="`${GNOME_CONFIG} --libs gnomeui | sed 's,-rdynamic,,'`"
7394     fi
7395     # now look for the gnome.h header
7396     saved_CPPFLAGS=$CPPFLAGS
7397     CPPFLAGS="$CPPFLAGS $CFLAGS_GNOME"
7398     for ac_hdr in gnome.h
7399 do
7400 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7401 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7402 echo "configure:7403: checking for $ac_hdr" >&5
7403 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7404   echo $ac_n "(cached) $ac_c" 1>&6
7405 else
7406   cat > conftest.$ac_ext <<EOF
7407 #line 7408 "configure"
7408 #include "confdefs.h"
7409 #include <$ac_hdr>
7410 EOF
7411 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7412 { (eval echo configure:7413: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7413 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7414 if test -z "$ac_err"; then
7415   rm -rf conftest*
7416   eval "ac_cv_header_$ac_safe=yes"
7417 else
7418   echo "$ac_err" >&5
7419   echo "configure: failed program was:" >&5
7420   cat conftest.$ac_ext >&5
7421   rm -rf conftest*
7422   eval "ac_cv_header_$ac_safe=no"
7423 fi
7424 rm -f conftest*
7425 fi
7426 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7427   echo "$ac_t""yes" 1>&6
7428     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7429   cat >> confdefs.h <<EOF
7430 #define $ac_tr_hdr 1
7431 EOF
7432  
7433       PLUGINS="${PLUGINS} gnome"
7434       ALIASES="${ALIASES} gnome-vlc"
7435      
7436 else
7437   echo "$ac_t""no" 1>&6
7438 { echo "configure: error: Can't find gnome headers. Please install the gnome
7439 developement librairie or remove the --enable-gnome option" 1>&2; exit 1; }
7440      
7441 fi
7442 done
7443
7444   
7445     CPPFLAGS=$saved_CPPFLAGS
7446   fi
7447 fi
7448
7449
7450 # Check whether --enable-gtk or --disable-gtk was given.
7451 if test "${enable_gtk+set}" = set; then
7452   enableval="$enable_gtk"
7453   :
7454 fi
7455
7456 if test x$enable_gtk != xno
7457 then
7458   GTK_PATH=$PATH
7459   # Check whether --with-gtk-config-path or --without-gtk-config-path was given.
7460 if test "${with_gtk_config_path+set}" = set; then
7461   withval="$with_gtk_config_path"
7462    if test "x$withval" != "xno"
7463       then
7464         GTK_PATH=$withval:$PATH
7465       fi 
7466 fi
7467
7468   # look for gtk-config
7469   # Extract the first word of "gtk-config", so it can be a program name with args.
7470 set dummy gtk-config; ac_word=$2
7471 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7472 echo "configure:7473: checking for $ac_word" >&5
7473 if eval "test \"`echo '$''{'ac_cv_path_GTK_CONFIG'+set}'`\" = set"; then
7474   echo $ac_n "(cached) $ac_c" 1>&6
7475 else
7476   case "$GTK_CONFIG" in
7477   /*)
7478   ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a path.
7479   ;;
7480   ?:/*)                  
7481   ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a dos path.
7482   ;;
7483   *)
7484   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7485   ac_dummy="$GTK_PATH"
7486   for ac_dir in $ac_dummy; do 
7487     test -z "$ac_dir" && ac_dir=.
7488     if test -f $ac_dir/$ac_word; then
7489       ac_cv_path_GTK_CONFIG="$ac_dir/$ac_word"
7490       break
7491     fi
7492   done
7493   IFS="$ac_save_ifs"
7494   test -z "$ac_cv_path_GTK_CONFIG" && ac_cv_path_GTK_CONFIG="no"
7495   ;;
7496 esac
7497 fi
7498 GTK_CONFIG="$ac_cv_path_GTK_CONFIG"
7499 if test -n "$GTK_CONFIG"; then
7500   echo "$ac_t""$GTK_CONFIG" 1>&6
7501 else
7502   echo "$ac_t""no" 1>&6
7503 fi
7504
7505   if test -x ${GTK_CONFIG}
7506   then
7507     CFLAGS_GTK="`${GTK_CONFIG} --cflags gtk`"
7508     LIB_GTK="`${GTK_CONFIG} --libs gtk | sed 's,-rdynamic,,'`"
7509   fi
7510   # now look for the gtk.h header
7511   saved_CPPFLAGS=$CPPFLAGS
7512   CPPFLAGS="$CPPFLAGS $CFLAGS_GTK"
7513   FOUND=
7514   for ac_hdr in gtk/gtk.h glib.h gdk/gdk.h
7515 do
7516 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7517 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7518 echo "configure:7519: checking for $ac_hdr" >&5
7519 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7520   echo $ac_n "(cached) $ac_c" 1>&6
7521 else
7522   cat > conftest.$ac_ext <<EOF
7523 #line 7524 "configure"
7524 #include "confdefs.h"
7525 #include <$ac_hdr>
7526 EOF
7527 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7528 { (eval echo configure:7529: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7529 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7530 if test -z "$ac_err"; then
7531   rm -rf conftest*
7532   eval "ac_cv_header_$ac_safe=yes"
7533 else
7534   echo "$ac_err" >&5
7535   echo "configure: failed program was:" >&5
7536   cat conftest.$ac_ext >&5
7537   rm -rf conftest*
7538   eval "ac_cv_header_$ac_safe=no"
7539 fi
7540 rm -f conftest*
7541 fi
7542 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7543   echo "$ac_t""yes" 1>&6
7544     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7545   cat >> confdefs.h <<EOF
7546 #define $ac_tr_hdr 1
7547 EOF
7548  
7549 else
7550   echo "$ac_t""no" 1>&6
7551 FOUND=no
7552         echo "Cannot find gtk development headers."
7553   
7554 fi
7555 done
7556
7557   if test -z $FOUND; then
7558     PLUGINS="${PLUGINS} gtk"
7559     ALIASES="${ALIASES} gvlc"
7560   fi
7561   CPPFLAGS=$saved_CPPFLAGS
7562 fi
7563
7564 # Check whether --enable-x11 or --disable-x11 was given.
7565 if test "${enable_x11+set}" = set; then
7566   enableval="$enable_x11"
7567   :
7568 fi
7569
7570 if test x$enable_x11 != xno &&
7571   (test $SYS != mingw32 || test x$enable_x11 = xyes); then
7572   if test x$x_includes = xNONE; then
7573     x_includes=/usr/X11R6/include
7574   fi
7575   if test x$x_libraries = xNONE; then
7576     x_libraries=/usr/X11R6/lib
7577   fi
7578   saved_CPPFLAGS=$CPPFLAGS
7579   CPPFLAGS="$CPPFLAGS -I$x_includes"
7580   for ac_hdr in X11/Xlib.h
7581 do
7582 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7583 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7584 echo "configure:7585: checking for $ac_hdr" >&5
7585 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7586   echo $ac_n "(cached) $ac_c" 1>&6
7587 else
7588   cat > conftest.$ac_ext <<EOF
7589 #line 7590 "configure"
7590 #include "confdefs.h"
7591 #include <$ac_hdr>
7592 EOF
7593 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7594 { (eval echo configure:7595: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7595 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7596 if test -z "$ac_err"; then
7597   rm -rf conftest*
7598   eval "ac_cv_header_$ac_safe=yes"
7599 else
7600   echo "$ac_err" >&5
7601   echo "configure: failed program was:" >&5
7602   cat conftest.$ac_ext >&5
7603   rm -rf conftest*
7604   eval "ac_cv_header_$ac_safe=no"
7605 fi
7606 rm -f conftest*
7607 fi
7608 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7609   echo "$ac_t""yes" 1>&6
7610     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7611   cat >> confdefs.h <<EOF
7612 #define $ac_tr_hdr 1
7613 EOF
7614  
7615     #PLUGINS="${PLUGINS} x11"
7616     LIB_X11="-L$x_libraries -lX11 -lXext"
7617     CFLAGS_X11="-I$x_includes"
7618   
7619   CPPFLAGS=$saved_CPPFLAGS
7620 else
7621   echo "$ac_t""no" 1>&6
7622 fi
7623 done
7624
7625 fi
7626
7627 # Check whether --enable-xvideo or --disable-xvideo was given.
7628 if test "${enable_xvideo+set}" = set; then
7629   enableval="$enable_xvideo"
7630   :
7631 fi
7632
7633 if test x$enable_xvideo != xno &&
7634   (test $SYS != mingw32 || test x$enable_xvideo = xyes); then
7635   if test x$x_includes = xNONE; then
7636     x_includes=/usr/X11R6/include
7637   fi
7638   if test x$x_libraries = xNONE; then
7639     x_libraries=/usr/X11R6/lib
7640   fi
7641   saved_CPPFLAGS=$CPPFLAGS
7642   CPPFLAGS="$CPPFLAGS -I$x_includes"
7643   for ac_hdr in X11/extensions/Xv.h
7644 do
7645 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7646 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7647 echo "configure:7648: checking for $ac_hdr" >&5
7648 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7649   echo $ac_n "(cached) $ac_c" 1>&6
7650 else
7651   cat > conftest.$ac_ext <<EOF
7652 #line 7653 "configure"
7653 #include "confdefs.h"
7654 #include <$ac_hdr>
7655 EOF
7656 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7657 { (eval echo configure:7658: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7658 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7659 if test -z "$ac_err"; then
7660   rm -rf conftest*
7661   eval "ac_cv_header_$ac_safe=yes"
7662 else
7663   echo "$ac_err" >&5
7664   echo "configure: failed program was:" >&5
7665   cat conftest.$ac_ext >&5
7666   rm -rf conftest*
7667   eval "ac_cv_header_$ac_safe=no"
7668 fi
7669 rm -f conftest*
7670 fi
7671 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7672   echo "$ac_t""yes" 1>&6
7673     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7674   cat >> confdefs.h <<EOF
7675 #define $ac_tr_hdr 1
7676 EOF
7677  
7678     BUILTINS="${BUILTINS} xvideo"
7679     LIB_XVIDEO="-L$x_libraries -lX11 -lXext -lXv"
7680     CFLAGS_XVIDEO="-I$x_includes"
7681   
7682   CPPFLAGS=$saved_CPPFLAGS
7683 else
7684   echo "$ac_t""no" 1>&6
7685 fi
7686 done
7687
7688 fi
7689
7690 # Check whether --enable-alsa or --disable-alsa was given.
7691 if test "${enable_alsa+set}" = set; then
7692   enableval="$enable_alsa"
7693   if test x$enable_alsa = xyes
7694    then
7695      ac_safe=`echo "alsa/asoundlib.h" | sed 'y%./+-%__p_%'`
7696 echo $ac_n "checking for alsa/asoundlib.h""... $ac_c" 1>&6
7697 echo "configure:7698: checking for alsa/asoundlib.h" >&5
7698 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7699   echo $ac_n "(cached) $ac_c" 1>&6
7700 else
7701   cat > conftest.$ac_ext <<EOF
7702 #line 7703 "configure"
7703 #include "confdefs.h"
7704 #include <alsa/asoundlib.h>
7705 EOF
7706 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7707 { (eval echo configure:7708: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7708 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7709 if test -z "$ac_err"; then
7710   rm -rf conftest*
7711   eval "ac_cv_header_$ac_safe=yes"
7712 else
7713   echo "$ac_err" >&5
7714   echo "configure: failed program was:" >&5
7715   cat conftest.$ac_ext >&5
7716   rm -rf conftest*
7717   eval "ac_cv_header_$ac_safe=no"
7718 fi
7719 rm -f conftest*
7720 fi
7721 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7722   echo "$ac_t""yes" 1>&6
7723   echo $ac_n "checking for main in -lasound""... $ac_c" 1>&6
7724 echo "configure:7725: checking for main in -lasound" >&5
7725 ac_lib_var=`echo asound'_'main | sed 'y%./+-%__p_%'`
7726 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7727   echo $ac_n "(cached) $ac_c" 1>&6
7728 else
7729   ac_save_LIBS="$LIBS"
7730 LIBS="-lasound  $LIBS"
7731 cat > conftest.$ac_ext <<EOF
7732 #line 7733 "configure"
7733 #include "confdefs.h"
7734
7735 int main() {
7736 main()
7737 ; return 0; }
7738 EOF
7739 if { (eval echo configure:7740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7740   rm -rf conftest*
7741   eval "ac_cv_lib_$ac_lib_var=yes"
7742 else
7743   echo "configure: failed program was:" >&5
7744   cat conftest.$ac_ext >&5
7745   rm -rf conftest*
7746   eval "ac_cv_lib_$ac_lib_var=no"
7747 fi
7748 rm -f conftest*
7749 LIBS="$ac_save_LIBS"
7750
7751 fi
7752 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7753   echo "$ac_t""yes" 1>&6
7754   have_alsa="true"
7755 else
7756   echo "$ac_t""no" 1>&6
7757 have_alsa="false"
7758 fi
7759
7760 else
7761   echo "$ac_t""no" 1>&6
7762 have_alsa="false"
7763 fi
7764
7765      if test x$have_alsa = xtrue
7766      then
7767        PLUGINS="${PLUGINS} alsa"
7768        LIB_ALSA="-lasound"
7769      fi
7770    fi
7771 fi
7772
7773
7774 fi
7775
7776 # Check whether --enable-plugins or --disable-plugins was given.
7777 if test "${enable_plugins+set}" = set; then
7778   enableval="$enable_plugins"
7779   if test x$enable_plugins = xno
7780    then
7781      BUILTINS="${BUILTINS} ${PLUGINS}"
7782      PLUGINS=
7783    fi
7784 fi
7785
7786
7787 DLL_PATH=.
7788 # Check whether --with-dll-path or --without-dll-path was given.
7789 if test "${with_dll_path+set}" = set; then
7790   withval="$with_dll_path"
7791    if test "x$withval" != "xno"
7792     then
7793       DLL_PATH=$withval
7794     fi 
7795 fi
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
7874
7875 trap '' 1 2 15
7876 cat > confcache <<\EOF
7877 # This file is a shell script that caches the results of configure
7878 # tests run on this system so they can be shared between configure
7879 # scripts and configure runs.  It is not useful on other systems.
7880 # If it contains results you don't want to keep, you may remove or edit it.
7881 #
7882 # By default, configure uses ./config.cache as the cache file,
7883 # creating it if it does not exist already.  You can give configure
7884 # the --cache-file=FILE option to use a different cache file; that is
7885 # what configure does when it calls configure scripts in
7886 # subdirectories, so they share the cache.
7887 # Giving --cache-file=/dev/null disables caching, for debugging configure.
7888 # config.status only pays attention to the cache file if you give it the
7889 # --recheck option to rerun configure.
7890 #
7891 EOF
7892 # The following way of writing the cache mishandles newlines in values,
7893 # but we know of no workaround that is simple, portable, and efficient.
7894 # So, don't put newlines in cache variables' values.
7895 # Ultrix sh set writes to stderr and can't be redirected directly,
7896 # and sets the high bit in the cache file unless we assign to the vars.
7897 (set) 2>&1 |
7898   case `(ac_space=' '; set | grep ac_space) 2>&1` in
7899   *ac_space=\ *)
7900     # `set' does not quote correctly, so add quotes (double-quote substitution
7901     # turns \\\\ into \\, and sed turns \\ into \).
7902     sed -n \
7903       -e "s/'/'\\\\''/g" \
7904       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
7905     ;;
7906   *)
7907     # `set' quotes correctly as required by POSIX, so do not add quotes.
7908     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
7909     ;;
7910   esac >> confcache
7911 if cmp -s $cache_file confcache; then
7912   :
7913 else
7914   if test -w $cache_file; then
7915     echo "updating cache $cache_file"
7916     cat confcache > $cache_file
7917   else
7918     echo "not updating unwritable cache $cache_file"
7919   fi
7920 fi
7921 rm -f confcache
7922
7923 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
7924
7925 test "x$prefix" = xNONE && prefix=$ac_default_prefix
7926 # Let make expand exec_prefix.
7927 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7928
7929 # Any assignment to VPATH causes Sun make to only execute
7930 # the first set of double-colon rules, so remove it if not needed.
7931 # If there is a colon in the path, we need to keep it.
7932 if test "x$srcdir" = x.; then
7933   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
7934 fi
7935
7936 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
7937
7938 DEFS=-DHAVE_CONFIG_H
7939
7940 # Without the "./", some shells look in PATH for config.status.
7941 : ${CONFIG_STATUS=./config.status}
7942
7943 echo creating $CONFIG_STATUS
7944 rm -f $CONFIG_STATUS
7945 cat > $CONFIG_STATUS <<EOF
7946 #! /bin/sh
7947 # Generated automatically by configure.
7948 # Run this file to recreate the current configuration.
7949 # This directory was configured as follows,
7950 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7951 #
7952 # $0 $ac_configure_args
7953 #
7954 # Compiler output produced by configure, useful for debugging
7955 # configure, is in ./config.log if it exists.
7956
7957 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
7958 for ac_option
7959 do
7960   case "\$ac_option" in
7961   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
7962     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
7963     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
7964   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
7965     echo "$CONFIG_STATUS generated by autoconf version 2.13"
7966     exit 0 ;;
7967   -help | --help | --hel | --he | --h)
7968     echo "\$ac_cs_usage"; exit 0 ;;
7969   *) echo "\$ac_cs_usage"; exit 1 ;;
7970   esac
7971 done
7972
7973 ac_given_srcdir=$srcdir
7974 ac_given_INSTALL="$INSTALL"
7975
7976 trap 'rm -fr `echo "Makefile.opts include/config.h po/Makefile.in include/defs.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
7977 EOF
7978 cat >> $CONFIG_STATUS <<EOF
7979
7980 # Protect against being on the right side of a sed subst in config.status.
7981 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
7982  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
7983 $ac_vpsub
7984 $extrasub
7985 s%@SHELL@%$SHELL%g
7986 s%@CFLAGS@%$CFLAGS%g
7987 s%@CPPFLAGS@%$CPPFLAGS%g
7988 s%@CXXFLAGS@%$CXXFLAGS%g
7989 s%@FFLAGS@%$FFLAGS%g
7990 s%@DEFS@%$DEFS%g
7991 s%@LDFLAGS@%$LDFLAGS%g
7992 s%@LIBS@%$LIBS%g
7993 s%@exec_prefix@%$exec_prefix%g
7994 s%@prefix@%$prefix%g
7995 s%@program_transform_name@%$program_transform_name%g
7996 s%@bindir@%$bindir%g
7997 s%@sbindir@%$sbindir%g
7998 s%@libexecdir@%$libexecdir%g
7999 s%@datadir@%$datadir%g
8000 s%@sysconfdir@%$sysconfdir%g
8001 s%@sharedstatedir@%$sharedstatedir%g
8002 s%@localstatedir@%$localstatedir%g
8003 s%@libdir@%$libdir%g
8004 s%@includedir@%$includedir%g
8005 s%@oldincludedir@%$oldincludedir%g
8006 s%@infodir@%$infodir%g
8007 s%@mandir@%$mandir%g
8008 s%@host@%$host%g
8009 s%@host_alias@%$host_alias%g
8010 s%@host_cpu@%$host_cpu%g
8011 s%@host_vendor@%$host_vendor%g
8012 s%@host_os@%$host_os%g
8013 s%@target@%$target%g
8014 s%@target_alias@%$target_alias%g
8015 s%@target_cpu@%$target_cpu%g
8016 s%@target_vendor@%$target_vendor%g
8017 s%@target_os@%$target_os%g
8018 s%@build@%$build%g
8019 s%@build_alias@%$build_alias%g
8020 s%@build_cpu@%$build_cpu%g
8021 s%@build_vendor@%$build_vendor%g
8022 s%@build_os@%$build_os%g
8023 s%@VLC_VERSION@%$VLC_VERSION%g
8024 s%@VLC_CODENAME@%$VLC_CODENAME%g
8025 s%@LIBDVDCSS_VERSION@%$LIBDVDCSS_VERSION%g
8026 s%@SET_MAKE@%$SET_MAKE%g
8027 s%@CC@%$CC%g
8028 s%@CPP@%$CPP%g
8029 s%@RANLIB@%$RANLIB%g
8030 s%@ALLOCA@%$ALLOCA%g
8031 s%@GLIBC21@%$GLIBC21%g
8032 s%@LIBICONV@%$LIBICONV%g
8033 s%@USE_NLS@%$USE_NLS%g
8034 s%@MSGFMT@%$MSGFMT%g
8035 s%@GMSGFMT@%$GMSGFMT%g
8036 s%@XGETTEXT@%$XGETTEXT%g
8037 s%@INTLBISON@%$INTLBISON%g
8038 s%@BUILD_INCLUDED_LIBINTL@%$BUILD_INCLUDED_LIBINTL%g
8039 s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
8040 s%@CATALOGS@%$CATALOGS%g
8041 s%@CATOBJEXT@%$CATOBJEXT%g
8042 s%@GMOFILES@%$GMOFILES%g
8043 s%@INTLLIBS@%$INTLLIBS%g
8044 s%@INTLOBJS@%$INTLOBJS%g
8045 s%@POFILES@%$POFILES%g
8046 s%@POSUB@%$POSUB%g
8047 s%@DATADIRNAME@%$DATADIRNAME%g
8048 s%@INSTOBJEXT@%$INSTOBJEXT%g
8049 s%@GENCAT@%$GENCAT%g
8050 s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
8051 s%@INTL_LIBTOOL_SUFFIX_PREFIX@%$INTL_LIBTOOL_SUFFIX_PREFIX%g
8052 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
8053 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
8054 s%@INSTALL_DATA@%$INSTALL_DATA%g
8055 s%@WINDRES@%$WINDRES%g
8056 s%@ESD_CONFIG@%$ESD_CONFIG%g
8057 s%@ARTS_CONFIG@%$ARTS_CONFIG%g
8058 s%@SDL12_CONFIG@%$SDL12_CONFIG%g
8059 s%@SDL11_CONFIG@%$SDL11_CONFIG%g
8060 s%@SDL_CONFIG@%$SDL_CONFIG%g
8061 s%@GNOME_CONFIG@%$GNOME_CONFIG%g
8062 s%@GTK_CONFIG@%$GTK_CONFIG%g
8063 s%@SYS@%$SYS%g
8064 s%@ARCH@%$ARCH%g
8065 s%@PLUGINS@%$PLUGINS%g
8066 s%@BUILTINS@%$BUILTINS%g
8067 s%@ALIASES@%$ALIASES%g
8068 s%@DEFINE@%$DEFINE%g
8069 s%@INCLUDE@%$INCLUDE%g
8070 s%@DEBUG@%$DEBUG%g
8071 s%@ASM@%$ASM%g
8072 s%@TRACE@%$TRACE%g
8073 s%@CPROF@%$CPROF%g
8074 s%@GPROF@%$GPROF%g
8075 s%@OPTIMS@%$OPTIMS%g
8076 s%@TUNING@%$TUNING%g
8077 s%@RELEASE@%$RELEASE%g
8078 s%@MOC@%$MOC%g
8079 s%@DLL_PATH@%$DLL_PATH%g
8080 s%@PACKAGE@%$PACKAGE%g
8081 s%@VERSION@%$VERSION%g
8082 s%@LCFLAGS@%$LCFLAGS%g
8083 s%@PLCFLAGS@%$PLCFLAGS%g
8084 s%@SOFLAGS@%$SOFLAGS%g
8085 s%@LIB@%$LIB%g
8086 s%@LIB_ALSA@%$LIB_ALSA%g
8087 s%@LIB_ALTIVEC@%$LIB_ALTIVEC%g
8088 s%@LIB_ARTS@%$LIB_ARTS%g
8089 s%@LIB_BEOS@%$LIB_BEOS%g
8090 s%@LIB_DARWIN@%$LIB_DARWIN%g
8091 s%@LIB_DIRECTX@%$LIB_DIRECTX%g
8092 s%@LIB_DVD@%$LIB_DVD%g
8093 s%@LIB_DVD_PLUGIN@%$LIB_DVD_PLUGIN%g
8094 s%@LIB_DVDREAD@%$LIB_DVDREAD%g
8095 s%@LIB_DVDREAD_PLUGIN@%$LIB_DVDREAD_PLUGIN%g
8096 s%@LIB_ESD@%$LIB_ESD%g
8097 s%@LIB_FILTER_DISTORT@%$LIB_FILTER_DISTORT%g
8098 s%@LIB_GGI@%$LIB_GGI%g
8099 s%@LIB_GLIDE@%$LIB_GLIDE%g
8100 s%@LIB_GNOME@%$LIB_GNOME%g
8101 s%@LIB_GTK@%$LIB_GTK%g
8102 s%@LIB_IMDCT@%$LIB_IMDCT%g
8103 s%@LIB_IMDCT3DN@%$LIB_IMDCT3DN%g
8104 s%@LIB_IMDCTSSE@%$LIB_IMDCTSSE%g
8105 s%@LIB_KDE@%$LIB_KDE%g
8106 s%@LIB_LIBDVDCSS@%$LIB_LIBDVDCSS%g
8107 s%@LIB_MACOSX@%$LIB_MACOSX%g
8108 s%@LIB_MAD@%$LIB_MAD%g
8109 s%@LIB_MPEG_TS@%$LIB_MPEG_TS%g
8110 s%@LIB_NCURSES@%$LIB_NCURSES%g
8111 s%@LIB_QNX@%$LIB_QNX%g
8112 s%@LIB_QT@%$LIB_QT%g
8113 s%@LIB_RC@%$LIB_RC%g
8114 s%@LIB_SDL@%$LIB_SDL%g
8115 s%@LIB_X11@%$LIB_X11%g
8116 s%@LIB_XVIDEO@%$LIB_XVIDEO%g
8117 s%@CFLAGS_VLC@%$CFLAGS_VLC%g
8118 s%@CFLAGS_ALTIVEC@%$CFLAGS_ALTIVEC%g
8119 s%@CFLAGS_DVD@%$CFLAGS_DVD%g
8120 s%@CFLAGS_DVDREAD@%$CFLAGS_DVDREAD%g
8121 s%@CFLAGS_LIBDVDCSS@%$CFLAGS_LIBDVDCSS%g
8122 s%@CFLAGS_ARTS@%$CFLAGS_ARTS%g
8123 s%@CFLAGS_ESD@%$CFLAGS_ESD%g
8124 s%@CFLAGS_GTK@%$CFLAGS_GTK%g
8125 s%@CFLAGS_MAD@%$CFLAGS_MAD%g
8126 s%@CFLAGS_SDL@%$CFLAGS_SDL%g
8127 s%@CFLAGS_X11@%$CFLAGS_X11%g
8128 s%@CFLAGS_XVIDEO@%$CFLAGS_XVIDEO%g
8129 s%@OBJ_DVD@%$OBJ_DVD%g
8130 s%@OBJ_LIBDVDCSS@%$OBJ_LIBDVDCSS%g
8131 s%@NEED_GETOPT@%$NEED_GETOPT%g
8132 s%@NEED_LIBDVDCSS@%$NEED_LIBDVDCSS%g
8133
8134 CEOF
8135 EOF
8136
8137 cat >> $CONFIG_STATUS <<\EOF
8138
8139 # Split the substitutions into bite-sized pieces for seds with
8140 # small command number limits, like on Digital OSF/1 and HP-UX.
8141 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
8142 ac_file=1 # Number of current file.
8143 ac_beg=1 # First line for current file.
8144 ac_end=$ac_max_sed_cmds # Line after last line for current file.
8145 ac_more_lines=:
8146 ac_sed_cmds=""
8147 while $ac_more_lines; do
8148   if test $ac_beg -gt 1; then
8149     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
8150   else
8151     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
8152   fi
8153   if test ! -s conftest.s$ac_file; then
8154     ac_more_lines=false
8155     rm -f conftest.s$ac_file
8156   else
8157     if test -z "$ac_sed_cmds"; then
8158       ac_sed_cmds="sed -f conftest.s$ac_file"
8159     else
8160       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
8161     fi
8162     ac_file=`expr $ac_file + 1`
8163     ac_beg=$ac_end
8164     ac_end=`expr $ac_end + $ac_max_sed_cmds`
8165   fi
8166 done
8167 if test -z "$ac_sed_cmds"; then
8168   ac_sed_cmds=cat
8169 fi
8170 EOF
8171
8172 cat >> $CONFIG_STATUS <<EOF
8173
8174 CONFIG_FILES=\${CONFIG_FILES-"Makefile.opts include/config.h po/Makefile.in"}
8175 EOF
8176 cat >> $CONFIG_STATUS <<\EOF
8177 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
8178   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
8179   case "$ac_file" in
8180   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
8181        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
8182   *) ac_file_in="${ac_file}.in" ;;
8183   esac
8184
8185   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
8186
8187   # Remove last slash and all that follows it.  Not all systems have dirname.
8188   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
8189   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
8190     # The file is in a subdirectory.
8191     test ! -d "$ac_dir" && mkdir "$ac_dir"
8192     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
8193     # A "../" for each directory in $ac_dir_suffix.
8194     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
8195   else
8196     ac_dir_suffix= ac_dots=
8197   fi
8198
8199   case "$ac_given_srcdir" in
8200   .)  srcdir=.
8201       if test -z "$ac_dots"; then top_srcdir=.
8202       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
8203   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
8204   *) # Relative path.
8205     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
8206     top_srcdir="$ac_dots$ac_given_srcdir" ;;
8207   esac
8208
8209   case "$ac_given_INSTALL" in
8210   [/$]*) INSTALL="$ac_given_INSTALL" ;;
8211   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
8212   esac
8213
8214   echo creating "$ac_file"
8215   rm -f "$ac_file"
8216   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
8217   case "$ac_file" in
8218   *Makefile*) ac_comsub="1i\\
8219 # $configure_input" ;;
8220   *) ac_comsub= ;;
8221   esac
8222
8223   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
8224   sed -e "$ac_comsub
8225 s%@configure_input@%$configure_input%g
8226 s%@srcdir@%$srcdir%g
8227 s%@top_srcdir@%$top_srcdir%g
8228 s%@INSTALL@%$INSTALL%g
8229 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
8230 fi; done
8231 rm -f conftest.s*
8232
8233 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
8234 # NAME is the cpp macro being defined and VALUE is the value it is being given.
8235 #
8236 # ac_d sets the value in "#define NAME VALUE" lines.
8237 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
8238 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
8239 ac_dC='\3'
8240 ac_dD='%g'
8241 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
8242 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
8243 ac_uB='\([      ]\)%\1#\2define\3'
8244 ac_uC=' '
8245 ac_uD='\4%g'
8246 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
8247 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
8248 ac_eB='$%\1#\2define\3'
8249 ac_eC=' '
8250 ac_eD='%g'
8251
8252 if test "${CONFIG_HEADERS+set}" != set; then
8253 EOF
8254 cat >> $CONFIG_STATUS <<EOF
8255   CONFIG_HEADERS="include/defs.h"
8256 EOF
8257 cat >> $CONFIG_STATUS <<\EOF
8258 fi
8259 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
8260   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
8261   case "$ac_file" in
8262   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
8263        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
8264   *) ac_file_in="${ac_file}.in" ;;
8265   esac
8266
8267   echo creating $ac_file
8268
8269   rm -f conftest.frag conftest.in conftest.out
8270   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
8271   cat $ac_file_inputs > conftest.in
8272
8273 EOF
8274
8275 # Transform confdefs.h into a sed script conftest.vals that substitutes
8276 # the proper values into config.h.in to produce config.h.  And first:
8277 # Protect against being on the right side of a sed subst in config.status.
8278 # Protect against being in an unquoted here document in config.status.
8279 rm -f conftest.vals
8280 cat > conftest.hdr <<\EOF
8281 s/[\\&%]/\\&/g
8282 s%[\\$`]%\\&%g
8283 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
8284 s%ac_d%ac_u%gp
8285 s%ac_u%ac_e%gp
8286 EOF
8287 sed -n -f conftest.hdr confdefs.h > conftest.vals
8288 rm -f conftest.hdr
8289
8290 # This sed command replaces #undef with comments.  This is necessary, for
8291 # example, in the case of _POSIX_SOURCE, which is predefined and required
8292 # on some systems where configure will not decide to define it.
8293 cat >> conftest.vals <<\EOF
8294 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
8295 EOF
8296
8297 # Break up conftest.vals because some shells have a limit on
8298 # the size of here documents, and old seds have small limits too.
8299
8300 rm -f conftest.tail
8301 while :
8302 do
8303   ac_lines=`grep -c . conftest.vals`
8304   # grep -c gives empty output for an empty file on some AIX systems.
8305   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
8306   # Write a limited-size here document to conftest.frag.
8307   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
8308   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
8309   echo 'CEOF
8310   sed -f conftest.frag conftest.in > conftest.out
8311   rm -f conftest.in
8312   mv conftest.out conftest.in
8313 ' >> $CONFIG_STATUS
8314   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
8315   rm -f conftest.vals
8316   mv conftest.tail conftest.vals
8317 done
8318 rm -f conftest.vals
8319
8320 cat >> $CONFIG_STATUS <<\EOF
8321   rm -f conftest.frag conftest.h
8322   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
8323   cat conftest.in >> conftest.h
8324   rm -f conftest.in
8325   if cmp -s $ac_file conftest.h 2>/dev/null; then
8326     echo "$ac_file is unchanged"
8327     rm -f conftest.h
8328   else
8329     # Remove last slash and all that follows it.  Not all systems have dirname.
8330       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
8331       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
8332       # The file is in a subdirectory.
8333       test ! -d "$ac_dir" && mkdir "$ac_dir"
8334     fi
8335     rm -f $ac_file
8336     mv conftest.h $ac_file
8337   fi
8338 fi; done
8339
8340 EOF
8341 cat >> $CONFIG_STATUS <<EOF
8342
8343
8344 EOF
8345 cat >> $CONFIG_STATUS <<\EOF
8346 for ac_file in $CONFIG_FILES; do
8347         # Support "outfile[:infile[:infile...]]"
8348         case "$ac_file" in
8349           *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
8350         esac
8351         # PO directories have a Makefile.in generated from Makefile.in.in.
8352         case "$ac_file" in */Makefile.in)
8353           # Adjust a relative srcdir.
8354           ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
8355           ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
8356           ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
8357           # In autoconf-2.13 it is called $ac_given_srcdir.
8358           # In autoconf-2.50 it is called $srcdir.
8359           test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
8360           case "$ac_given_srcdir" in
8361             .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
8362             /*) top_srcdir="$ac_given_srcdir" ;;
8363             *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
8364           esac
8365           if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
8366             rm -f "$ac_dir/POTFILES"
8367             test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
8368             sed -e "/^#/d" -e "/^[      ]*\$/d" -e "s,.*,     $top_srcdir/& \\\\," -e "\$s/\(.*\) \\\\/\1/" < "$ac_given_srcdir/$ac_dir/POTFILES.in" > "$ac_dir/POTFILES"
8369             test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
8370             sed -e "/POTFILES =/r $ac_dir/POTFILES" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
8371           fi
8372           ;;
8373         esac
8374       done
8375
8376 exit 0
8377 EOF
8378 chmod +x $CONFIG_STATUS
8379 rm -fr confdefs* $ac_clean_files
8380 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
8381
8382
8383 echo "
8384 global configuration
8385 --------------------
8386 system                : ${SYS}
8387 architecture          : ${ARCH}
8388 optimizations         : ${OPTIMS}
8389 tuning:               : ${TUNING}
8390 release:              : ${RELEASE}"
8391
8392 if test x${HAVE_VLC} = x1
8393 then
8394   echo "
8395 vlc configuration
8396 -----------------
8397 vlc version           : ${VLC_VERSION}
8398 debug mode            : ${DEBUG}
8399 trace mode            : ${TRACE}
8400 cprof/gprof support   : ${CPROF}/${GPROF}
8401 need builtin getopt   : ${NEED_GETOPT}
8402 built-in modules      :${BUILTINS}
8403 plug-in modules       :${PLUGINS}
8404 vlc aliases           :${ALIASES}"
8405 fi
8406
8407 echo "
8408 libdvdcss configuration
8409 -----------------------
8410 can be built          : ${CAN_BUILD_LIBDVDCSS}
8411 will be built         : ${NEED_LIBDVDCSS}"
8412 if test x${NEED_LIBDVDCSS} = x1
8413 then
8414   echo "need BSDI libdvd      : ${NEED_BSDI_LIBDVD}"
8415   echo "link statically       : ${STATIC_LIBDVDCSS}"
8416 else
8417   echo "use dummy replacement : ${DUMMY_LIBDVDCSS}"
8418 fi
8419
8420 echo "
8421 You may now tune Makefile.opts at your convenience, for instance to choose
8422 which modules get compiled as plugins.
8423 "
8424 if test x${HAVE_VLC} = x1
8425 then
8426   echo "To build vlc and its plugins, type \`make vlc plugins'."
8427 fi
8428 if test x${HAVE_LIBDVDCSS} = x1
8429 then
8430   echo "To build libdvdcss only, type \`make libdvdcss'."
8431 fi
8432 echo ""
8433