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