]> git.sesse.net Git - vlc/blob - configure
694ab9307a0ee2095615b27d18d948bab54210b0
[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   --enable-pth            Enable GNU Pth support (default disabled)"
16 ac_help="$ac_help
17   --disable-ppro          Disable PentiumPro optimizations (default enabled for x86)"
18 ac_help="$ac_help
19   --disable-mmx           Disable MMX optimizations (default enabled for x86)"
20 ac_help="$ac_help
21   --enable-altivec        Enable altivec optimizations (default disabled since it is broken)"
22 ac_help="$ac_help
23   --disable-css           Disable DVD CSS decryption (default enabled)"
24 ac_help="$ac_help
25   --enable-debug          Enable debug mode (default disabled)"
26 ac_help="$ac_help
27   --enable-stats          Enable printing of statistics (default disabled)"
28 ac_help="$ac_help
29   --enable-trace          Enable trace mode (default disabled)"
30 ac_help="$ac_help
31   --disable-optimizations Disable compiler optimizations (default enabled)"
32 ac_help="$ac_help
33   --disable-dummy         dummy module (default enabled)"
34 ac_help="$ac_help
35   --disable-null          Null module (default enabled)"
36 ac_help="$ac_help
37   --disable-rc            rc module (default enabled)"
38 ac_help="$ac_help
39   --disable-dsp           Linux /dev/dsp support (default enabled)"
40 ac_help="$ac_help
41   --enable-esd            Esound library support (default disabled)"
42 ac_help="$ac_help
43   --enable-darwin         Darwin sound support (default disabled)"
44 ac_help="$ac_help
45   --enable-macosx         Mac OS X interface support (default enabled in Mac OS X)"
46 ac_help="$ac_help
47   --enable-fb             Linux framebuffer support (default disabled)"
48 ac_help="$ac_help
49   --with-ggi[=name]       GGI support (default disabled)"
50 ac_help="$ac_help
51   --with-sdl[=name]       SDL support (default enabled)"
52 ac_help="$ac_help
53   --with-directx[=name]   Windows DirectX support (default enabled)"
54 ac_help="$ac_help
55   --with-glide[=name]     Glide (3dfx) support (default disabled)"
56 ac_help="$ac_help
57   --enable-ncurses        ncurses interface support (default disabled)"
58 ac_help="$ac_help
59   --enable-qt             Qt interface support (default disabled)"
60 ac_help="$ac_help
61   --enable-kde            KDE interface support (default disabled)"
62 ac_help="$ac_help
63   --enable-gnome          Gnome interface support (default disabled)"
64 ac_help="$ac_help
65   --disable-gtk           Gtk+ support (default enabled)"
66 ac_help="$ac_help
67   --disable-x11           X11 support (default enabled)"
68 ac_help="$ac_help
69   --disable-xvideo        XVideo support (default enabled)"
70 ac_help="$ac_help
71   --enable-alsa           Alsa sound drivers support (Only for linux) (default disabled)"
72
73 # Initialize some variables set by options.
74 # The variables have the same names as the options, with
75 # dashes changed to underlines.
76 build=NONE
77 cache_file=./config.cache
78 exec_prefix=NONE
79 host=NONE
80 no_create=
81 nonopt=NONE
82 no_recursion=
83 prefix=NONE
84 program_prefix=NONE
85 program_suffix=NONE
86 program_transform_name=s,x,x,
87 silent=
88 site=
89 srcdir=
90 target=NONE
91 verbose=
92 x_includes=NONE
93 x_libraries=NONE
94 bindir='${exec_prefix}/bin'
95 sbindir='${exec_prefix}/sbin'
96 libexecdir='${exec_prefix}/libexec'
97 datadir='${prefix}/share'
98 sysconfdir='${prefix}/etc'
99 sharedstatedir='${prefix}/com'
100 localstatedir='${prefix}/var'
101 libdir='${exec_prefix}/lib'
102 includedir='${prefix}/include'
103 oldincludedir='/usr/include'
104 infodir='${prefix}/info'
105 mandir='${prefix}/man'
106
107 # Initialize some other variables.
108 subdirs=
109 MFLAGS= MAKEFLAGS=
110 SHELL=${CONFIG_SHELL-/bin/sh}
111 # Maximum number of lines to put in a shell here document.
112 ac_max_here_lines=12
113
114 ac_prev=
115 for ac_option
116 do
117
118   # If the previous option needs an argument, assign it.
119   if test -n "$ac_prev"; then
120     eval "$ac_prev=\$ac_option"
121     ac_prev=
122     continue
123   fi
124
125   case "$ac_option" in
126   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
127   *) ac_optarg= ;;
128   esac
129
130   # Accept the important Cygnus configure options, so we can diagnose typos.
131
132   case "$ac_option" in
133
134   -bindir | --bindir | --bindi | --bind | --bin | --bi)
135     ac_prev=bindir ;;
136   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
137     bindir="$ac_optarg" ;;
138
139   -build | --build | --buil | --bui | --bu)
140     ac_prev=build ;;
141   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
142     build="$ac_optarg" ;;
143
144   -cache-file | --cache-file | --cache-fil | --cache-fi \
145   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
146     ac_prev=cache_file ;;
147   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
148   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
149     cache_file="$ac_optarg" ;;
150
151   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
152     ac_prev=datadir ;;
153   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
154   | --da=*)
155     datadir="$ac_optarg" ;;
156
157   -disable-* | --disable-*)
158     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
159     # Reject names that are not valid shell variable names.
160     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
161       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
162     fi
163     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
164     eval "enable_${ac_feature}=no" ;;
165
166   -enable-* | --enable-*)
167     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
168     # Reject names that are not valid shell variable names.
169     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
170       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
171     fi
172     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
173     case "$ac_option" in
174       *=*) ;;
175       *) ac_optarg=yes ;;
176     esac
177     eval "enable_${ac_feature}='$ac_optarg'" ;;
178
179   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
180   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
181   | --exec | --exe | --ex)
182     ac_prev=exec_prefix ;;
183   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
184   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
185   | --exec=* | --exe=* | --ex=*)
186     exec_prefix="$ac_optarg" ;;
187
188   -gas | --gas | --ga | --g)
189     # Obsolete; use --with-gas.
190     with_gas=yes ;;
191
192   -help | --help | --hel | --he)
193     # Omit some internal or obsolete options to make the list less imposing.
194     # This message is too long to be a string in the A/UX 3.1 sh.
195     cat << EOF
196 Usage: configure [options] [host]
197 Options: [defaults in brackets after descriptions]
198 Configuration:
199   --cache-file=FILE       cache test results in FILE
200   --help                  print this message
201   --no-create             do not create output files
202   --quiet, --silent       do not print \`checking...' messages
203   --version               print the version of autoconf that created configure
204 Directory and file names:
205   --prefix=PREFIX         install architecture-independent files in PREFIX
206                           [$ac_default_prefix]
207   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
208                           [same as prefix]
209   --bindir=DIR            user executables in DIR [EPREFIX/bin]
210   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
211   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
212   --datadir=DIR           read-only architecture-independent data in DIR
213                           [PREFIX/share]
214   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
215   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
216                           [PREFIX/com]
217   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
218   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
219   --includedir=DIR        C header files in DIR [PREFIX/include]
220   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
221   --infodir=DIR           info documentation in DIR [PREFIX/info]
222   --mandir=DIR            man documentation in DIR [PREFIX/man]
223   --srcdir=DIR            find the sources in DIR [configure dir or ..]
224   --program-prefix=PREFIX prepend PREFIX to installed program names
225   --program-suffix=SUFFIX append SUFFIX to installed program names
226   --program-transform-name=PROGRAM
227                           run sed PROGRAM on installed program names
228 EOF
229     cat << EOF
230 Host type:
231   --build=BUILD           configure for building on BUILD [BUILD=HOST]
232   --host=HOST             configure for HOST [guessed]
233   --target=TARGET         configure for TARGET [TARGET=HOST]
234 Features and packages:
235   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
236   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
237   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
238   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
239   --x-includes=DIR        X include files are in DIR
240   --x-libraries=DIR       X library files are in DIR
241 EOF
242     if test -n "$ac_help"; then
243       echo "--enable and --with options recognized:$ac_help"
244     fi
245     exit 0 ;;
246
247   -host | --host | --hos | --ho)
248     ac_prev=host ;;
249   -host=* | --host=* | --hos=* | --ho=*)
250     host="$ac_optarg" ;;
251
252   -includedir | --includedir | --includedi | --included | --include \
253   | --includ | --inclu | --incl | --inc)
254     ac_prev=includedir ;;
255   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
256   | --includ=* | --inclu=* | --incl=* | --inc=*)
257     includedir="$ac_optarg" ;;
258
259   -infodir | --infodir | --infodi | --infod | --info | --inf)
260     ac_prev=infodir ;;
261   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
262     infodir="$ac_optarg" ;;
263
264   -libdir | --libdir | --libdi | --libd)
265     ac_prev=libdir ;;
266   -libdir=* | --libdir=* | --libdi=* | --libd=*)
267     libdir="$ac_optarg" ;;
268
269   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
270   | --libexe | --libex | --libe)
271     ac_prev=libexecdir ;;
272   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
273   | --libexe=* | --libex=* | --libe=*)
274     libexecdir="$ac_optarg" ;;
275
276   -localstatedir | --localstatedir | --localstatedi | --localstated \
277   | --localstate | --localstat | --localsta | --localst \
278   | --locals | --local | --loca | --loc | --lo)
279     ac_prev=localstatedir ;;
280   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
281   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
282   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
283     localstatedir="$ac_optarg" ;;
284
285   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
286     ac_prev=mandir ;;
287   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
288     mandir="$ac_optarg" ;;
289
290   -nfp | --nfp | --nf)
291     # Obsolete; use --without-fp.
292     with_fp=no ;;
293
294   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
295   | --no-cr | --no-c)
296     no_create=yes ;;
297
298   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
299   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
300     no_recursion=yes ;;
301
302   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
303   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
304   | --oldin | --oldi | --old | --ol | --o)
305     ac_prev=oldincludedir ;;
306   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
307   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
308   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
309     oldincludedir="$ac_optarg" ;;
310
311   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
312     ac_prev=prefix ;;
313   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
314     prefix="$ac_optarg" ;;
315
316   -program-prefix | --program-prefix | --program-prefi | --program-pref \
317   | --program-pre | --program-pr | --program-p)
318     ac_prev=program_prefix ;;
319   -program-prefix=* | --program-prefix=* | --program-prefi=* \
320   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
321     program_prefix="$ac_optarg" ;;
322
323   -program-suffix | --program-suffix | --program-suffi | --program-suff \
324   | --program-suf | --program-su | --program-s)
325     ac_prev=program_suffix ;;
326   -program-suffix=* | --program-suffix=* | --program-suffi=* \
327   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
328     program_suffix="$ac_optarg" ;;
329
330   -program-transform-name | --program-transform-name \
331   | --program-transform-nam | --program-transform-na \
332   | --program-transform-n | --program-transform- \
333   | --program-transform | --program-transfor \
334   | --program-transfo | --program-transf \
335   | --program-trans | --program-tran \
336   | --progr-tra | --program-tr | --program-t)
337     ac_prev=program_transform_name ;;
338   -program-transform-name=* | --program-transform-name=* \
339   | --program-transform-nam=* | --program-transform-na=* \
340   | --program-transform-n=* | --program-transform-=* \
341   | --program-transform=* | --program-transfor=* \
342   | --program-transfo=* | --program-transf=* \
343   | --program-trans=* | --program-tran=* \
344   | --progr-tra=* | --program-tr=* | --program-t=*)
345     program_transform_name="$ac_optarg" ;;
346
347   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
348   | -silent | --silent | --silen | --sile | --sil)
349     silent=yes ;;
350
351   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
352     ac_prev=sbindir ;;
353   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
354   | --sbi=* | --sb=*)
355     sbindir="$ac_optarg" ;;
356
357   -sharedstatedir | --sharedstatedir | --sharedstatedi \
358   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
359   | --sharedst | --shareds | --shared | --share | --shar \
360   | --sha | --sh)
361     ac_prev=sharedstatedir ;;
362   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
363   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
364   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
365   | --sha=* | --sh=*)
366     sharedstatedir="$ac_optarg" ;;
367
368   -site | --site | --sit)
369     ac_prev=site ;;
370   -site=* | --site=* | --sit=*)
371     site="$ac_optarg" ;;
372
373   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
374     ac_prev=srcdir ;;
375   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
376     srcdir="$ac_optarg" ;;
377
378   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
379   | --syscon | --sysco | --sysc | --sys | --sy)
380     ac_prev=sysconfdir ;;
381   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
382   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
383     sysconfdir="$ac_optarg" ;;
384
385   -target | --target | --targe | --targ | --tar | --ta | --t)
386     ac_prev=target ;;
387   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
388     target="$ac_optarg" ;;
389
390   -v | -verbose | --verbose | --verbos | --verbo | --verb)
391     verbose=yes ;;
392
393   -version | --version | --versio | --versi | --vers)
394     echo "configure generated by autoconf version 2.13"
395     exit 0 ;;
396
397   -with-* | --with-*)
398     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
399     # Reject names that are not valid shell variable names.
400     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
401       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
402     fi
403     ac_package=`echo $ac_package| sed 's/-/_/g'`
404     case "$ac_option" in
405       *=*) ;;
406       *) ac_optarg=yes ;;
407     esac
408     eval "with_${ac_package}='$ac_optarg'" ;;
409
410   -without-* | --without-*)
411     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
412     # Reject names that are not valid shell variable names.
413     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
414       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
415     fi
416     ac_package=`echo $ac_package| sed 's/-/_/g'`
417     eval "with_${ac_package}=no" ;;
418
419   --x)
420     # Obsolete; use --with-x.
421     with_x=yes ;;
422
423   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
424   | --x-incl | --x-inc | --x-in | --x-i)
425     ac_prev=x_includes ;;
426   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
427   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
428     x_includes="$ac_optarg" ;;
429
430   -x-libraries | --x-libraries | --x-librarie | --x-librari \
431   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
432     ac_prev=x_libraries ;;
433   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
434   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
435     x_libraries="$ac_optarg" ;;
436
437   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
438     ;;
439
440   *)
441     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
442       echo "configure: warning: $ac_option: invalid host type" 1>&2
443     fi
444     if test "x$nonopt" != xNONE; then
445       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
446     fi
447     nonopt="$ac_option"
448     ;;
449
450   esac
451 done
452
453 if test -n "$ac_prev"; then
454   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
455 fi
456
457 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
458
459 # File descriptor usage:
460 # 0 standard input
461 # 1 file creation
462 # 2 errors and warnings
463 # 3 some systems may open it to /dev/tty
464 # 4 used on the Kubota Titan
465 # 6 checking for... messages and results
466 # 5 compiler messages saved in config.log
467 if test "$silent" = yes; then
468   exec 6>/dev/null
469 else
470   exec 6>&1
471 fi
472 exec 5>./config.log
473
474 echo "\
475 This file contains any messages produced by compilers while
476 running configure, to aid debugging if configure makes a mistake.
477 " 1>&5
478
479 # Strip out --no-create and --no-recursion so they do not pile up.
480 # Also quote any args containing shell metacharacters.
481 ac_configure_args=
482 for ac_arg
483 do
484   case "$ac_arg" in
485   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
486   | --no-cr | --no-c) ;;
487   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
488   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
489   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
490   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
491   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
492   esac
493 done
494
495 # NLS nuisances.
496 # Only set these to C if already set.  These must not be set unconditionally
497 # because not all systems understand e.g. LANG=C (notably SCO).
498 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
499 # Non-C LC_CTYPE values break the ctype check.
500 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
501 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
502 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
503 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
504
505 # confdefs.h avoids OS command line length limits that DEFS can exceed.
506 rm -rf conftest* confdefs.h
507 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
508 echo > confdefs.h
509
510 # A filename unique to this package, relative to the directory that
511 # configure is in, which we can look for to find out if srcdir is correct.
512 ac_unique_file=src/interface/main.c
513
514 # Find the source files, if location was not specified.
515 if test -z "$srcdir"; then
516   ac_srcdir_defaulted=yes
517   # Try the directory containing this script, then its parent.
518   ac_prog=$0
519   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
520   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
521   srcdir=$ac_confdir
522   if test ! -r $srcdir/$ac_unique_file; then
523     srcdir=..
524   fi
525 else
526   ac_srcdir_defaulted=no
527 fi
528 if test ! -r $srcdir/$ac_unique_file; then
529   if test "$ac_srcdir_defaulted" = yes; then
530     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
531   else
532     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
533   fi
534 fi
535 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
536
537 # Prefer explicitly selected file to automatically selected ones.
538 if test -z "$CONFIG_SITE"; then
539   if test "x$prefix" != xNONE; then
540     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
541   else
542     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
543   fi
544 fi
545 for ac_site_file in $CONFIG_SITE; do
546   if test -r "$ac_site_file"; then
547     echo "loading site script $ac_site_file"
548     . "$ac_site_file"
549   fi
550 done
551
552 if test -r "$cache_file"; then
553   echo "loading cache $cache_file"
554   . $cache_file
555 else
556   echo "creating cache $cache_file"
557   > $cache_file
558 fi
559
560 ac_ext=c
561 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
562 ac_cpp='$CPP $CPPFLAGS'
563 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
564 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
565 cross_compiling=$ac_cv_prog_cc_cross
566
567 ac_exeext=
568 ac_objext=o
569 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
570   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
571   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
572     ac_n= ac_c='
573 ' ac_t='        '
574   else
575     ac_n=-n ac_c= ac_t=
576   fi
577 else
578   ac_n= ac_c='\c' ac_t=
579 fi
580
581
582
583
584 ac_aux_dir=
585 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
586   if test -f $ac_dir/install-sh; then
587     ac_aux_dir=$ac_dir
588     ac_install_sh="$ac_aux_dir/install-sh -c"
589     break
590   elif test -f $ac_dir/install.sh; then
591     ac_aux_dir=$ac_dir
592     ac_install_sh="$ac_aux_dir/install.sh -c"
593     break
594   fi
595 done
596 if test -z "$ac_aux_dir"; then
597   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
598 fi
599 ac_config_guess=$ac_aux_dir/config.guess
600 ac_config_sub=$ac_aux_dir/config.sub
601 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
602
603
604 # Make sure we can run config.sub.
605 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
606 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
607 fi
608
609 echo $ac_n "checking host system type""... $ac_c" 1>&6
610 echo "configure:611: checking host system type" >&5
611
612 host_alias=$host
613 case "$host_alias" in
614 NONE)
615   case $nonopt in
616   NONE)
617     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
618     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
619     fi ;;
620   *) host_alias=$nonopt ;;
621   esac ;;
622 esac
623
624 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
625 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
626 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
627 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
628 echo "$ac_t""$host" 1>&6
629
630
631 VLC_VERSION=0.2.80
632
633 VLC_CODENAME=Ourumov
634
635
636 save_CFLAGS="${CFLAGS}"
637
638 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
639 echo "configure:640: checking whether ${MAKE-make} sets \${MAKE}" >&5
640 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
641 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
642   echo $ac_n "(cached) $ac_c" 1>&6
643 else
644   cat > conftestmake <<\EOF
645 all:
646         @echo 'ac_maketemp="${MAKE}"'
647 EOF
648 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
649 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
650 if test -n "$ac_maketemp"; then
651   eval ac_cv_prog_make_${ac_make}_set=yes
652 else
653   eval ac_cv_prog_make_${ac_make}_set=no
654 fi
655 rm -f conftestmake
656 fi
657 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
658   echo "$ac_t""yes" 1>&6
659   SET_MAKE=
660 else
661   echo "$ac_t""no" 1>&6
662   SET_MAKE="MAKE=${MAKE-make}"
663 fi
664
665 # Extract the first word of "gcc", so it can be a program name with args.
666 set dummy gcc; ac_word=$2
667 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
668 echo "configure:669: checking for $ac_word" >&5
669 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
670   echo $ac_n "(cached) $ac_c" 1>&6
671 else
672   if test -n "$CC"; then
673   ac_cv_prog_CC="$CC" # Let the user override the test.
674 else
675   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
676   ac_dummy="$PATH"
677   for ac_dir in $ac_dummy; do
678     test -z "$ac_dir" && ac_dir=.
679     if test -f $ac_dir/$ac_word; then
680       ac_cv_prog_CC="gcc"
681       break
682     fi
683   done
684   IFS="$ac_save_ifs"
685 fi
686 fi
687 CC="$ac_cv_prog_CC"
688 if test -n "$CC"; then
689   echo "$ac_t""$CC" 1>&6
690 else
691   echo "$ac_t""no" 1>&6
692 fi
693
694 if test -z "$CC"; then
695   # Extract the first word of "cc", so it can be a program name with args.
696 set dummy cc; ac_word=$2
697 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
698 echo "configure:699: checking for $ac_word" >&5
699 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
700   echo $ac_n "(cached) $ac_c" 1>&6
701 else
702   if test -n "$CC"; then
703   ac_cv_prog_CC="$CC" # Let the user override the test.
704 else
705   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
706   ac_prog_rejected=no
707   ac_dummy="$PATH"
708   for ac_dir in $ac_dummy; do
709     test -z "$ac_dir" && ac_dir=.
710     if test -f $ac_dir/$ac_word; then
711       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
712         ac_prog_rejected=yes
713         continue
714       fi
715       ac_cv_prog_CC="cc"
716       break
717     fi
718   done
719   IFS="$ac_save_ifs"
720 if test $ac_prog_rejected = yes; then
721   # We found a bogon in the path, so make sure we never use it.
722   set dummy $ac_cv_prog_CC
723   shift
724   if test $# -gt 0; then
725     # We chose a different compiler from the bogus one.
726     # However, it has the same basename, so the bogon will be chosen
727     # first if we set CC to just the basename; use the full file name.
728     shift
729     set dummy "$ac_dir/$ac_word" "$@"
730     shift
731     ac_cv_prog_CC="$@"
732   fi
733 fi
734 fi
735 fi
736 CC="$ac_cv_prog_CC"
737 if test -n "$CC"; then
738   echo "$ac_t""$CC" 1>&6
739 else
740   echo "$ac_t""no" 1>&6
741 fi
742
743   if test -z "$CC"; then
744     case "`uname -s`" in
745     *win32* | *WIN32*)
746       # Extract the first word of "cl", so it can be a program name with args.
747 set dummy cl; ac_word=$2
748 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
749 echo "configure:750: checking for $ac_word" >&5
750 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
751   echo $ac_n "(cached) $ac_c" 1>&6
752 else
753   if test -n "$CC"; then
754   ac_cv_prog_CC="$CC" # Let the user override the test.
755 else
756   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
757   ac_dummy="$PATH"
758   for ac_dir in $ac_dummy; do
759     test -z "$ac_dir" && ac_dir=.
760     if test -f $ac_dir/$ac_word; then
761       ac_cv_prog_CC="cl"
762       break
763     fi
764   done
765   IFS="$ac_save_ifs"
766 fi
767 fi
768 CC="$ac_cv_prog_CC"
769 if test -n "$CC"; then
770   echo "$ac_t""$CC" 1>&6
771 else
772   echo "$ac_t""no" 1>&6
773 fi
774  ;;
775     esac
776   fi
777   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
778 fi
779
780 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
781 echo "configure:782: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
782
783 ac_ext=c
784 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
785 ac_cpp='$CPP $CPPFLAGS'
786 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
787 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
788 cross_compiling=$ac_cv_prog_cc_cross
789
790 cat > conftest.$ac_ext << EOF
791
792 #line 793 "configure"
793 #include "confdefs.h"
794
795 main(){return(0);}
796 EOF
797 if { (eval echo configure:798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
798   ac_cv_prog_cc_works=yes
799   # If we can't run a trivial program, we are probably using a cross compiler.
800   if (./conftest; exit) 2>/dev/null; then
801     ac_cv_prog_cc_cross=no
802   else
803     ac_cv_prog_cc_cross=yes
804   fi
805 else
806   echo "configure: failed program was:" >&5
807   cat conftest.$ac_ext >&5
808   ac_cv_prog_cc_works=no
809 fi
810 rm -fr conftest*
811 ac_ext=c
812 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
813 ac_cpp='$CPP $CPPFLAGS'
814 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
815 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
816 cross_compiling=$ac_cv_prog_cc_cross
817
818 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
819 if test $ac_cv_prog_cc_works = no; then
820   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
821 fi
822 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
823 echo "configure:824: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
824 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
825 cross_compiling=$ac_cv_prog_cc_cross
826
827 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
828 echo "configure:829: checking whether we are using GNU C" >&5
829 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
830   echo $ac_n "(cached) $ac_c" 1>&6
831 else
832   cat > conftest.c <<EOF
833 #ifdef __GNUC__
834   yes;
835 #endif
836 EOF
837 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:838: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
838   ac_cv_prog_gcc=yes
839 else
840   ac_cv_prog_gcc=no
841 fi
842 fi
843
844 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
845
846 if test $ac_cv_prog_gcc = yes; then
847   GCC=yes
848 else
849   GCC=
850 fi
851
852 ac_test_CFLAGS="${CFLAGS+set}"
853 ac_save_CFLAGS="$CFLAGS"
854 CFLAGS=
855 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
856 echo "configure:857: checking whether ${CC-cc} accepts -g" >&5
857 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
858   echo $ac_n "(cached) $ac_c" 1>&6
859 else
860   echo 'void f(){}' > conftest.c
861 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
862   ac_cv_prog_cc_g=yes
863 else
864   ac_cv_prog_cc_g=no
865 fi
866 rm -f conftest*
867
868 fi
869
870 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
871 if test "$ac_test_CFLAGS" = set; then
872   CFLAGS="$ac_save_CFLAGS"
873 elif test $ac_cv_prog_cc_g = yes; then
874   if test "$GCC" = yes; then
875     CFLAGS="-g -O2"
876   else
877     CFLAGS="-g"
878   fi
879 else
880   if test "$GCC" = yes; then
881     CFLAGS="-O2"
882   else
883     CFLAGS=
884   fi
885 fi
886
887 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
888 echo "configure:889: checking how to run the C preprocessor" >&5
889 # On Suns, sometimes $CPP names a directory.
890 if test -n "$CPP" && test -d "$CPP"; then
891   CPP=
892 fi
893 if test -z "$CPP"; then
894 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
895   echo $ac_n "(cached) $ac_c" 1>&6
896 else
897     # This must be in double quotes, not single quotes, because CPP may get
898   # substituted into the Makefile and "${CC-cc}" will confuse make.
899   CPP="${CC-cc} -E"
900   # On the NeXT, cc -E runs the code through the compiler's parser,
901   # not just through cpp.
902   cat > conftest.$ac_ext <<EOF
903 #line 904 "configure"
904 #include "confdefs.h"
905 #include <assert.h>
906 Syntax Error
907 EOF
908 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
909 { (eval echo configure:910: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
910 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
911 if test -z "$ac_err"; then
912   :
913 else
914   echo "$ac_err" >&5
915   echo "configure: failed program was:" >&5
916   cat conftest.$ac_ext >&5
917   rm -rf conftest*
918   CPP="${CC-cc} -E -traditional-cpp"
919   cat > conftest.$ac_ext <<EOF
920 #line 921 "configure"
921 #include "confdefs.h"
922 #include <assert.h>
923 Syntax Error
924 EOF
925 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
926 { (eval echo configure:927: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
927 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
928 if test -z "$ac_err"; then
929   :
930 else
931   echo "$ac_err" >&5
932   echo "configure: failed program was:" >&5
933   cat conftest.$ac_ext >&5
934   rm -rf conftest*
935   CPP="${CC-cc} -nologo -E"
936   cat > conftest.$ac_ext <<EOF
937 #line 938 "configure"
938 #include "confdefs.h"
939 #include <assert.h>
940 Syntax Error
941 EOF
942 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
943 { (eval echo configure:944: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
944 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
945 if test -z "$ac_err"; then
946   :
947 else
948   echo "$ac_err" >&5
949   echo "configure: failed program was:" >&5
950   cat conftest.$ac_ext >&5
951   rm -rf conftest*
952   CPP=/lib/cpp
953 fi
954 rm -f conftest*
955 fi
956 rm -f conftest*
957 fi
958 rm -f conftest*
959   ac_cv_prog_CPP="$CPP"
960 fi
961   CPP="$ac_cv_prog_CPP"
962 else
963   ac_cv_prog_CPP="$CPP"
964 fi
965 echo "$ac_t""$CPP" 1>&6
966
967 # Extract the first word of "ranlib", so it can be a program name with args.
968 set dummy ranlib; ac_word=$2
969 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
970 echo "configure:971: checking for $ac_word" >&5
971 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
972   echo $ac_n "(cached) $ac_c" 1>&6
973 else
974   if test -n "$RANLIB"; then
975   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
976 else
977   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
978   ac_dummy="$PATH"
979   for ac_dir in $ac_dummy; do
980     test -z "$ac_dir" && ac_dir=.
981     if test -f $ac_dir/$ac_word; then
982       ac_cv_prog_RANLIB="ranlib"
983       break
984     fi
985   done
986   IFS="$ac_save_ifs"
987   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
988 fi
989 fi
990 RANLIB="$ac_cv_prog_RANLIB"
991 if test -n "$RANLIB"; then
992   echo "$ac_t""$RANLIB" 1>&6
993 else
994   echo "$ac_t""no" 1>&6
995 fi
996
997
998 # Find a good install program.  We prefer a C program (faster),
999 # so one script is as good as another.  But avoid the broken or
1000 # incompatible versions:
1001 # SysV /etc/install, /usr/sbin/install
1002 # SunOS /usr/etc/install
1003 # IRIX /sbin/install
1004 # AIX /bin/install
1005 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1006 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1007 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1008 # ./install, which can be erroneously created by make from ./install.sh.
1009 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1010 echo "configure:1011: checking for a BSD compatible install" >&5
1011 if test -z "$INSTALL"; then
1012 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1013   echo $ac_n "(cached) $ac_c" 1>&6
1014 else
1015     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1016   for ac_dir in $PATH; do
1017     # Account for people who put trailing slashes in PATH elements.
1018     case "$ac_dir/" in
1019     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1020     *)
1021       # OSF1 and SCO ODT 3.0 have their own names for install.
1022       # Don't use installbsd from OSF since it installs stuff as root
1023       # by default.
1024       for ac_prog in ginstall scoinst install; do
1025         if test -f $ac_dir/$ac_prog; then
1026           if test $ac_prog = install &&
1027             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1028             # AIX install.  It has an incompatible calling convention.
1029             :
1030           else
1031             ac_cv_path_install="$ac_dir/$ac_prog -c"
1032             break 2
1033           fi
1034         fi
1035       done
1036       ;;
1037     esac
1038   done
1039   IFS="$ac_save_IFS"
1040
1041 fi
1042   if test "${ac_cv_path_install+set}" = set; then
1043     INSTALL="$ac_cv_path_install"
1044   else
1045     # As a last resort, use the slow shell script.  We don't cache a
1046     # path for INSTALL within a source directory, because that will
1047     # break other packages using the cache if that directory is
1048     # removed, or if the path is relative.
1049     INSTALL="$ac_install_sh"
1050   fi
1051 fi
1052 echo "$ac_t""$INSTALL" 1>&6
1053
1054 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1055 # It thinks the first close brace ends the variable substitution.
1056 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1057
1058 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1059
1060 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1061
1062
1063 echo $ac_n "checking for working const""... $ac_c" 1>&6
1064 echo "configure:1065: checking for working const" >&5
1065 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1066   echo $ac_n "(cached) $ac_c" 1>&6
1067 else
1068   cat > conftest.$ac_ext <<EOF
1069 #line 1070 "configure"
1070 #include "confdefs.h"
1071
1072 int main() {
1073
1074 /* Ultrix mips cc rejects this.  */
1075 typedef int charset[2]; const charset x;
1076 /* SunOS 4.1.1 cc rejects this.  */
1077 char const *const *ccp;
1078 char **p;
1079 /* NEC SVR4.0.2 mips cc rejects this.  */
1080 struct point {int x, y;};
1081 static struct point const zero = {0,0};
1082 /* AIX XL C 1.02.0.0 rejects this.
1083    It does not let you subtract one const X* pointer from another in an arm
1084    of an if-expression whose if-part is not a constant expression */
1085 const char *g = "string";
1086 ccp = &g + (g ? g-g : 0);
1087 /* HPUX 7.0 cc rejects these. */
1088 ++ccp;
1089 p = (char**) ccp;
1090 ccp = (char const *const *) p;
1091 { /* SCO 3.2v4 cc rejects this.  */
1092   char *t;
1093   char const *s = 0 ? (char *) 0 : (char const *) 0;
1094
1095   *t++ = 0;
1096 }
1097 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
1098   int x[] = {25, 17};
1099   const int *foo = &x[0];
1100   ++foo;
1101 }
1102 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1103   typedef const int *iptr;
1104   iptr p = 0;
1105   ++p;
1106 }
1107 { /* AIX XL C 1.02.0.0 rejects this saying
1108      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1109   struct s { int j; const int *ap[3]; };
1110   struct s *b; b->j = 5;
1111 }
1112 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1113   const int foo = 10;
1114 }
1115
1116 ; return 0; }
1117 EOF
1118 if { (eval echo configure:1119: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1119   rm -rf conftest*
1120   ac_cv_c_const=yes
1121 else
1122   echo "configure: failed program was:" >&5
1123   cat conftest.$ac_ext >&5
1124   rm -rf conftest*
1125   ac_cv_c_const=no
1126 fi
1127 rm -f conftest*
1128 fi
1129
1130 echo "$ac_t""$ac_cv_c_const" 1>&6
1131 if test $ac_cv_c_const = no; then
1132   cat >> confdefs.h <<\EOF
1133 #define const 
1134 EOF
1135
1136 fi
1137
1138
1139 if test x${cross_compiling} != xyes; then
1140   echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
1141 echo "configure:1142: checking whether byte ordering is bigendian" >&5
1142 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
1143   echo $ac_n "(cached) $ac_c" 1>&6
1144 else
1145   ac_cv_c_bigendian=unknown
1146 # See if sys/param.h defines the BYTE_ORDER macro.
1147 cat > conftest.$ac_ext <<EOF
1148 #line 1149 "configure"
1149 #include "confdefs.h"
1150 #include <sys/types.h>
1151 #include <sys/param.h>
1152 int main() {
1153
1154 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
1155  bogus endian macros
1156 #endif
1157 ; return 0; }
1158 EOF
1159 if { (eval echo configure:1160: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1160   rm -rf conftest*
1161   # It does; now see whether it defined to BIG_ENDIAN or not.
1162 cat > conftest.$ac_ext <<EOF
1163 #line 1164 "configure"
1164 #include "confdefs.h"
1165 #include <sys/types.h>
1166 #include <sys/param.h>
1167 int main() {
1168
1169 #if BYTE_ORDER != BIG_ENDIAN
1170  not big endian
1171 #endif
1172 ; return 0; }
1173 EOF
1174 if { (eval echo configure:1175: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1175   rm -rf conftest*
1176   ac_cv_c_bigendian=yes
1177 else
1178   echo "configure: failed program was:" >&5
1179   cat conftest.$ac_ext >&5
1180   rm -rf conftest*
1181   ac_cv_c_bigendian=no
1182 fi
1183 rm -f conftest*
1184 else
1185   echo "configure: failed program was:" >&5
1186   cat conftest.$ac_ext >&5
1187 fi
1188 rm -f conftest*
1189 if test $ac_cv_c_bigendian = unknown; then
1190 if test "$cross_compiling" = yes; then
1191     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1192 else
1193   cat > conftest.$ac_ext <<EOF
1194 #line 1195 "configure"
1195 #include "confdefs.h"
1196 main () {
1197   /* Are we little or big endian?  From Harbison&Steele.  */
1198   union
1199   {
1200     long l;
1201     char c[sizeof (long)];
1202   } u;
1203   u.l = 1;
1204   exit (u.c[sizeof (long) - 1] == 1);
1205 }
1206 EOF
1207 if { (eval echo configure:1208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1208 then
1209   ac_cv_c_bigendian=no
1210 else
1211   echo "configure: failed program was:" >&5
1212   cat conftest.$ac_ext >&5
1213   rm -fr conftest*
1214   ac_cv_c_bigendian=yes
1215 fi
1216 rm -fr conftest*
1217 fi
1218
1219 fi
1220 fi
1221
1222 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
1223 if test $ac_cv_c_bigendian = yes; then
1224   cat >> confdefs.h <<\EOF
1225 #define WORDS_BIGENDIAN 1
1226 EOF
1227
1228 fi
1229
1230 fi
1231
1232 for ac_func in gettimeofday select strerror strtod strtol
1233 do
1234 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1235 echo "configure:1236: checking for $ac_func" >&5
1236 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1237   echo $ac_n "(cached) $ac_c" 1>&6
1238 else
1239   cat > conftest.$ac_ext <<EOF
1240 #line 1241 "configure"
1241 #include "confdefs.h"
1242 /* System header to define __stub macros and hopefully few prototypes,
1243     which can conflict with char $ac_func(); below.  */
1244 #include <assert.h>
1245 /* Override any gcc2 internal prototype to avoid an error.  */
1246 /* We use char because int might match the return type of a gcc2
1247     builtin and then its argument prototype would still apply.  */
1248 char $ac_func();
1249
1250 int main() {
1251
1252 /* The GNU C library defines this for functions which it implements
1253     to always fail with ENOSYS.  Some functions are actually named
1254     something starting with __ and the normal name is an alias.  */
1255 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1256 choke me
1257 #else
1258 $ac_func();
1259 #endif
1260
1261 ; return 0; }
1262 EOF
1263 if { (eval echo configure:1264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1264   rm -rf conftest*
1265   eval "ac_cv_func_$ac_func=yes"
1266 else
1267   echo "configure: failed program was:" >&5
1268   cat conftest.$ac_ext >&5
1269   rm -rf conftest*
1270   eval "ac_cv_func_$ac_func=no"
1271 fi
1272 rm -f conftest*
1273 fi
1274
1275 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1276   echo "$ac_t""yes" 1>&6
1277     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1278   cat >> confdefs.h <<EOF
1279 #define $ac_tr_func 1
1280 EOF
1281  
1282 else
1283   echo "$ac_t""no" 1>&6
1284 fi
1285 done
1286
1287 for ac_func in setenv putenv
1288 do
1289 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1290 echo "configure:1291: checking for $ac_func" >&5
1291 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1292   echo $ac_n "(cached) $ac_c" 1>&6
1293 else
1294   cat > conftest.$ac_ext <<EOF
1295 #line 1296 "configure"
1296 #include "confdefs.h"
1297 /* System header to define __stub macros and hopefully few prototypes,
1298     which can conflict with char $ac_func(); below.  */
1299 #include <assert.h>
1300 /* Override any gcc2 internal prototype to avoid an error.  */
1301 /* We use char because int might match the return type of a gcc2
1302     builtin and then its argument prototype would still apply.  */
1303 char $ac_func();
1304
1305 int main() {
1306
1307 /* The GNU C library defines this for functions which it implements
1308     to always fail with ENOSYS.  Some functions are actually named
1309     something starting with __ and the normal name is an alias.  */
1310 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1311 choke me
1312 #else
1313 $ac_func();
1314 #endif
1315
1316 ; return 0; }
1317 EOF
1318 if { (eval echo configure:1319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1319   rm -rf conftest*
1320   eval "ac_cv_func_$ac_func=yes"
1321 else
1322   echo "configure: failed program was:" >&5
1323   cat conftest.$ac_ext >&5
1324   rm -rf conftest*
1325   eval "ac_cv_func_$ac_func=no"
1326 fi
1327 rm -f conftest*
1328 fi
1329
1330 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1331   echo "$ac_t""yes" 1>&6
1332     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1333   cat >> confdefs.h <<EOF
1334 #define $ac_tr_func 1
1335 EOF
1336  
1337 else
1338   echo "$ac_t""no" 1>&6
1339 fi
1340 done
1341
1342 echo $ac_n "checking for connect""... $ac_c" 1>&6
1343 echo "configure:1344: checking for connect" >&5
1344 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
1345   echo $ac_n "(cached) $ac_c" 1>&6
1346 else
1347   cat > conftest.$ac_ext <<EOF
1348 #line 1349 "configure"
1349 #include "confdefs.h"
1350 /* System header to define __stub macros and hopefully few prototypes,
1351     which can conflict with char connect(); below.  */
1352 #include <assert.h>
1353 /* Override any gcc2 internal prototype to avoid an error.  */
1354 /* We use char because int might match the return type of a gcc2
1355     builtin and then its argument prototype would still apply.  */
1356 char connect();
1357
1358 int main() {
1359
1360 /* The GNU C library defines this for functions which it implements
1361     to always fail with ENOSYS.  Some functions are actually named
1362     something starting with __ and the normal name is an alias.  */
1363 #if defined (__stub_connect) || defined (__stub___connect)
1364 choke me
1365 #else
1366 connect();
1367 #endif
1368
1369 ; return 0; }
1370 EOF
1371 if { (eval echo configure:1372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1372   rm -rf conftest*
1373   eval "ac_cv_func_connect=yes"
1374 else
1375   echo "configure: failed program was:" >&5
1376   cat conftest.$ac_ext >&5
1377   rm -rf conftest*
1378   eval "ac_cv_func_connect=no"
1379 fi
1380 rm -f conftest*
1381 fi
1382
1383 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
1384   echo "$ac_t""yes" 1>&6
1385   :
1386 else
1387   echo "$ac_t""no" 1>&6
1388
1389   echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
1390 echo "configure:1391: checking for connect in -lsocket" >&5
1391 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
1392 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1393   echo $ac_n "(cached) $ac_c" 1>&6
1394 else
1395   ac_save_LIBS="$LIBS"
1396 LIBS="-lsocket  $LIBS"
1397 cat > conftest.$ac_ext <<EOF
1398 #line 1399 "configure"
1399 #include "confdefs.h"
1400 /* Override any gcc2 internal prototype to avoid an error.  */
1401 /* We use char because int might match the return type of a gcc2
1402     builtin and then its argument prototype would still apply.  */
1403 char connect();
1404
1405 int main() {
1406 connect()
1407 ; return 0; }
1408 EOF
1409 if { (eval echo configure:1410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1410   rm -rf conftest*
1411   eval "ac_cv_lib_$ac_lib_var=yes"
1412 else
1413   echo "configure: failed program was:" >&5
1414   cat conftest.$ac_ext >&5
1415   rm -rf conftest*
1416   eval "ac_cv_lib_$ac_lib_var=no"
1417 fi
1418 rm -f conftest*
1419 LIBS="$ac_save_LIBS"
1420
1421 fi
1422 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1423   echo "$ac_t""yes" 1>&6
1424   LIB="${LIB} -lsocket"
1425 else
1426   echo "$ac_t""no" 1>&6
1427 fi
1428
1429
1430 fi
1431
1432 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
1433 echo "configure:1434: checking for gethostbyname" >&5
1434 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
1435   echo $ac_n "(cached) $ac_c" 1>&6
1436 else
1437   cat > conftest.$ac_ext <<EOF
1438 #line 1439 "configure"
1439 #include "confdefs.h"
1440 /* System header to define __stub macros and hopefully few prototypes,
1441     which can conflict with char gethostbyname(); below.  */
1442 #include <assert.h>
1443 /* Override any gcc2 internal prototype to avoid an error.  */
1444 /* We use char because int might match the return type of a gcc2
1445     builtin and then its argument prototype would still apply.  */
1446 char gethostbyname();
1447
1448 int main() {
1449
1450 /* The GNU C library defines this for functions which it implements
1451     to always fail with ENOSYS.  Some functions are actually named
1452     something starting with __ and the normal name is an alias.  */
1453 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
1454 choke me
1455 #else
1456 gethostbyname();
1457 #endif
1458
1459 ; return 0; }
1460 EOF
1461 if { (eval echo configure:1462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1462   rm -rf conftest*
1463   eval "ac_cv_func_gethostbyname=yes"
1464 else
1465   echo "configure: failed program was:" >&5
1466   cat conftest.$ac_ext >&5
1467   rm -rf conftest*
1468   eval "ac_cv_func_gethostbyname=no"
1469 fi
1470 rm -f conftest*
1471 fi
1472
1473 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
1474   echo "$ac_t""yes" 1>&6
1475   :
1476 else
1477   echo "$ac_t""no" 1>&6
1478
1479   echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
1480 echo "configure:1481: checking for gethostbyname in -lnsl" >&5
1481 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
1482 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1483   echo $ac_n "(cached) $ac_c" 1>&6
1484 else
1485   ac_save_LIBS="$LIBS"
1486 LIBS="-lnsl  $LIBS"
1487 cat > conftest.$ac_ext <<EOF
1488 #line 1489 "configure"
1489 #include "confdefs.h"
1490 /* Override any gcc2 internal prototype to avoid an error.  */
1491 /* We use char because int might match the return type of a gcc2
1492     builtin and then its argument prototype would still apply.  */
1493 char gethostbyname();
1494
1495 int main() {
1496 gethostbyname()
1497 ; return 0; }
1498 EOF
1499 if { (eval echo configure:1500: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1500   rm -rf conftest*
1501   eval "ac_cv_lib_$ac_lib_var=yes"
1502 else
1503   echo "configure: failed program was:" >&5
1504   cat conftest.$ac_ext >&5
1505   rm -rf conftest*
1506   eval "ac_cv_lib_$ac_lib_var=no"
1507 fi
1508 rm -f conftest*
1509 LIBS="$ac_save_LIBS"
1510
1511 fi
1512 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1513   echo "$ac_t""yes" 1>&6
1514   LIB="${LIB} -lnsl"
1515 else
1516   echo "$ac_t""no" 1>&6
1517 fi
1518
1519
1520 fi
1521
1522 echo $ac_n "checking for nanosleep""... $ac_c" 1>&6
1523 echo "configure:1524: checking for nanosleep" >&5
1524 if eval "test \"`echo '$''{'ac_cv_func_nanosleep'+set}'`\" = set"; then
1525   echo $ac_n "(cached) $ac_c" 1>&6
1526 else
1527   cat > conftest.$ac_ext <<EOF
1528 #line 1529 "configure"
1529 #include "confdefs.h"
1530 /* System header to define __stub macros and hopefully few prototypes,
1531     which can conflict with char nanosleep(); below.  */
1532 #include <assert.h>
1533 /* Override any gcc2 internal prototype to avoid an error.  */
1534 /* We use char because int might match the return type of a gcc2
1535     builtin and then its argument prototype would still apply.  */
1536 char nanosleep();
1537
1538 int main() {
1539
1540 /* The GNU C library defines this for functions which it implements
1541     to always fail with ENOSYS.  Some functions are actually named
1542     something starting with __ and the normal name is an alias.  */
1543 #if defined (__stub_nanosleep) || defined (__stub___nanosleep)
1544 choke me
1545 #else
1546 nanosleep();
1547 #endif
1548
1549 ; return 0; }
1550 EOF
1551 if { (eval echo configure:1552: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1552   rm -rf conftest*
1553   eval "ac_cv_func_nanosleep=yes"
1554 else
1555   echo "configure: failed program was:" >&5
1556   cat conftest.$ac_ext >&5
1557   rm -rf conftest*
1558   eval "ac_cv_func_nanosleep=no"
1559 fi
1560 rm -f conftest*
1561 fi
1562
1563 if eval "test \"`echo '$ac_cv_func_'nanosleep`\" = yes"; then
1564   echo "$ac_t""yes" 1>&6
1565   :
1566 else
1567   echo "$ac_t""no" 1>&6
1568
1569   echo $ac_n "checking for nanosleep in -lrt""... $ac_c" 1>&6
1570 echo "configure:1571: checking for nanosleep in -lrt" >&5
1571 ac_lib_var=`echo rt'_'nanosleep | sed 'y%./+-%__p_%'`
1572 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1573   echo $ac_n "(cached) $ac_c" 1>&6
1574 else
1575   ac_save_LIBS="$LIBS"
1576 LIBS="-lrt  $LIBS"
1577 cat > conftest.$ac_ext <<EOF
1578 #line 1579 "configure"
1579 #include "confdefs.h"
1580 /* Override any gcc2 internal prototype to avoid an error.  */
1581 /* We use char because int might match the return type of a gcc2
1582     builtin and then its argument prototype would still apply.  */
1583 char nanosleep();
1584
1585 int main() {
1586 nanosleep()
1587 ; return 0; }
1588 EOF
1589 if { (eval echo configure:1590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1590   rm -rf conftest*
1591   eval "ac_cv_lib_$ac_lib_var=yes"
1592 else
1593   echo "configure: failed program was:" >&5
1594   cat conftest.$ac_ext >&5
1595   rm -rf conftest*
1596   eval "ac_cv_lib_$ac_lib_var=no"
1597 fi
1598 rm -f conftest*
1599 LIBS="$ac_save_LIBS"
1600
1601 fi
1602 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1603   echo "$ac_t""yes" 1>&6
1604   LIB="${LIB} -lrt"
1605 else
1606   echo "$ac_t""no" 1>&6
1607
1608     echo $ac_n "checking for nanosleep in -lposix4""... $ac_c" 1>&6
1609 echo "configure:1610: checking for nanosleep in -lposix4" >&5
1610 ac_lib_var=`echo posix4'_'nanosleep | sed 'y%./+-%__p_%'`
1611 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1612   echo $ac_n "(cached) $ac_c" 1>&6
1613 else
1614   ac_save_LIBS="$LIBS"
1615 LIBS="-lposix4  $LIBS"
1616 cat > conftest.$ac_ext <<EOF
1617 #line 1618 "configure"
1618 #include "confdefs.h"
1619 /* Override any gcc2 internal prototype to avoid an error.  */
1620 /* We use char because int might match the return type of a gcc2
1621     builtin and then its argument prototype would still apply.  */
1622 char nanosleep();
1623
1624 int main() {
1625 nanosleep()
1626 ; return 0; }
1627 EOF
1628 if { (eval echo configure:1629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1629   rm -rf conftest*
1630   eval "ac_cv_lib_$ac_lib_var=yes"
1631 else
1632   echo "configure: failed program was:" >&5
1633   cat conftest.$ac_ext >&5
1634   rm -rf conftest*
1635   eval "ac_cv_lib_$ac_lib_var=no"
1636 fi
1637 rm -f conftest*
1638 LIBS="$ac_save_LIBS"
1639
1640 fi
1641 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1642   echo "$ac_t""yes" 1>&6
1643   LIB="${LIB} -lposix4"
1644 else
1645   echo "$ac_t""no" 1>&6
1646 fi
1647
1648   
1649 fi
1650
1651
1652 fi
1653
1654 for ac_func in usleep
1655 do
1656 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1657 echo "configure:1658: checking for $ac_func" >&5
1658 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1659   echo $ac_n "(cached) $ac_c" 1>&6
1660 else
1661   cat > conftest.$ac_ext <<EOF
1662 #line 1663 "configure"
1663 #include "confdefs.h"
1664 /* System header to define __stub macros and hopefully few prototypes,
1665     which can conflict with char $ac_func(); below.  */
1666 #include <assert.h>
1667 /* Override any gcc2 internal prototype to avoid an error.  */
1668 /* We use char because int might match the return type of a gcc2
1669     builtin and then its argument prototype would still apply.  */
1670 char $ac_func();
1671
1672 int main() {
1673
1674 /* The GNU C library defines this for functions which it implements
1675     to always fail with ENOSYS.  Some functions are actually named
1676     something starting with __ and the normal name is an alias.  */
1677 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1678 choke me
1679 #else
1680 $ac_func();
1681 #endif
1682
1683 ; return 0; }
1684 EOF
1685 if { (eval echo configure:1686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1686   rm -rf conftest*
1687   eval "ac_cv_func_$ac_func=yes"
1688 else
1689   echo "configure: failed program was:" >&5
1690   cat conftest.$ac_ext >&5
1691   rm -rf conftest*
1692   eval "ac_cv_func_$ac_func=no"
1693 fi
1694 rm -f conftest*
1695 fi
1696
1697 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1698   echo "$ac_t""yes" 1>&6
1699     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1700   cat >> confdefs.h <<EOF
1701 #define $ac_tr_func 1
1702 EOF
1703  
1704 else
1705   echo "$ac_t""no" 1>&6
1706 fi
1707 done
1708
1709 echo $ac_n "checking for inet_aton""... $ac_c" 1>&6
1710 echo "configure:1711: checking for inet_aton" >&5
1711 if eval "test \"`echo '$''{'ac_cv_func_inet_aton'+set}'`\" = set"; then
1712   echo $ac_n "(cached) $ac_c" 1>&6
1713 else
1714   cat > conftest.$ac_ext <<EOF
1715 #line 1716 "configure"
1716 #include "confdefs.h"
1717 /* System header to define __stub macros and hopefully few prototypes,
1718     which can conflict with char inet_aton(); below.  */
1719 #include <assert.h>
1720 /* Override any gcc2 internal prototype to avoid an error.  */
1721 /* We use char because int might match the return type of a gcc2
1722     builtin and then its argument prototype would still apply.  */
1723 char inet_aton();
1724
1725 int main() {
1726
1727 /* The GNU C library defines this for functions which it implements
1728     to always fail with ENOSYS.  Some functions are actually named
1729     something starting with __ and the normal name is an alias.  */
1730 #if defined (__stub_inet_aton) || defined (__stub___inet_aton)
1731 choke me
1732 #else
1733 inet_aton();
1734 #endif
1735
1736 ; return 0; }
1737 EOF
1738 if { (eval echo configure:1739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1739   rm -rf conftest*
1740   eval "ac_cv_func_inet_aton=yes"
1741 else
1742   echo "configure: failed program was:" >&5
1743   cat conftest.$ac_ext >&5
1744   rm -rf conftest*
1745   eval "ac_cv_func_inet_aton=no"
1746 fi
1747 rm -f conftest*
1748 fi
1749
1750 if eval "test \"`echo '$ac_cv_func_'inet_aton`\" = yes"; then
1751   echo "$ac_t""yes" 1>&6
1752   :
1753 else
1754   echo "$ac_t""no" 1>&6
1755
1756   echo $ac_n "checking for inet_aton in -lresolv""... $ac_c" 1>&6
1757 echo "configure:1758: checking for inet_aton in -lresolv" >&5
1758 ac_lib_var=`echo resolv'_'inet_aton | sed 'y%./+-%__p_%'`
1759 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1760   echo $ac_n "(cached) $ac_c" 1>&6
1761 else
1762   ac_save_LIBS="$LIBS"
1763 LIBS="-lresolv  $LIBS"
1764 cat > conftest.$ac_ext <<EOF
1765 #line 1766 "configure"
1766 #include "confdefs.h"
1767 /* Override any gcc2 internal prototype to avoid an error.  */
1768 /* We use char because int might match the return type of a gcc2
1769     builtin and then its argument prototype would still apply.  */
1770 char inet_aton();
1771
1772 int main() {
1773 inet_aton()
1774 ; return 0; }
1775 EOF
1776 if { (eval echo configure:1777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1777   rm -rf conftest*
1778   eval "ac_cv_lib_$ac_lib_var=yes"
1779 else
1780   echo "configure: failed program was:" >&5
1781   cat conftest.$ac_ext >&5
1782   rm -rf conftest*
1783   eval "ac_cv_lib_$ac_lib_var=no"
1784 fi
1785 rm -f conftest*
1786 LIBS="$ac_save_LIBS"
1787
1788 fi
1789 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1790   echo "$ac_t""yes" 1>&6
1791   LIB="${LIB} -lresolv"
1792 else
1793   echo "$ac_t""no" 1>&6
1794 fi
1795
1796
1797 fi
1798
1799 for ac_func in vasprintf
1800 do
1801 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1802 echo "configure:1803: checking for $ac_func" >&5
1803 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1804   echo $ac_n "(cached) $ac_c" 1>&6
1805 else
1806   cat > conftest.$ac_ext <<EOF
1807 #line 1808 "configure"
1808 #include "confdefs.h"
1809 /* System header to define __stub macros and hopefully few prototypes,
1810     which can conflict with char $ac_func(); below.  */
1811 #include <assert.h>
1812 /* Override any gcc2 internal prototype to avoid an error.  */
1813 /* We use char because int might match the return type of a gcc2
1814     builtin and then its argument prototype would still apply.  */
1815 char $ac_func();
1816
1817 int main() {
1818
1819 /* The GNU C library defines this for functions which it implements
1820     to always fail with ENOSYS.  Some functions are actually named
1821     something starting with __ and the normal name is an alias.  */
1822 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1823 choke me
1824 #else
1825 $ac_func();
1826 #endif
1827
1828 ; return 0; }
1829 EOF
1830 if { (eval echo configure:1831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1831   rm -rf conftest*
1832   eval "ac_cv_func_$ac_func=yes"
1833 else
1834   echo "configure: failed program was:" >&5
1835   cat conftest.$ac_ext >&5
1836   rm -rf conftest*
1837   eval "ac_cv_func_$ac_func=no"
1838 fi
1839 rm -f conftest*
1840 fi
1841
1842 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1843   echo "$ac_t""yes" 1>&6
1844     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1845   cat >> confdefs.h <<EOF
1846 #define $ac_tr_func 1
1847 EOF
1848  
1849 else
1850   echo "$ac_t""no" 1>&6
1851 fi
1852 done
1853
1854 for ac_func in swab
1855 do
1856 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1857 echo "configure:1858: checking for $ac_func" >&5
1858 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1859   echo $ac_n "(cached) $ac_c" 1>&6
1860 else
1861   cat > conftest.$ac_ext <<EOF
1862 #line 1863 "configure"
1863 #include "confdefs.h"
1864 /* System header to define __stub macros and hopefully few prototypes,
1865     which can conflict with char $ac_func(); below.  */
1866 #include <assert.h>
1867 /* Override any gcc2 internal prototype to avoid an error.  */
1868 /* We use char because int might match the return type of a gcc2
1869     builtin and then its argument prototype would still apply.  */
1870 char $ac_func();
1871
1872 int main() {
1873
1874 /* The GNU C library defines this for functions which it implements
1875     to always fail with ENOSYS.  Some functions are actually named
1876     something starting with __ and the normal name is an alias.  */
1877 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1878 choke me
1879 #else
1880 $ac_func();
1881 #endif
1882
1883 ; return 0; }
1884 EOF
1885 if { (eval echo configure:1886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1886   rm -rf conftest*
1887   eval "ac_cv_func_$ac_func=yes"
1888 else
1889   echo "configure: failed program was:" >&5
1890   cat conftest.$ac_ext >&5
1891   rm -rf conftest*
1892   eval "ac_cv_func_$ac_func=no"
1893 fi
1894 rm -f conftest*
1895 fi
1896
1897 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1898   echo "$ac_t""yes" 1>&6
1899     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1900   cat >> confdefs.h <<EOF
1901 #define $ac_tr_func 1
1902 EOF
1903  
1904 else
1905   echo "$ac_t""no" 1>&6
1906 fi
1907 done
1908
1909
1910 for ac_func in sigrelse
1911 do
1912 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1913 echo "configure:1914: checking for $ac_func" >&5
1914 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1915   echo $ac_n "(cached) $ac_c" 1>&6
1916 else
1917   cat > conftest.$ac_ext <<EOF
1918 #line 1919 "configure"
1919 #include "confdefs.h"
1920 /* System header to define __stub macros and hopefully few prototypes,
1921     which can conflict with char $ac_func(); below.  */
1922 #include <assert.h>
1923 /* Override any gcc2 internal prototype to avoid an error.  */
1924 /* We use char because int might match the return type of a gcc2
1925     builtin and then its argument prototype would still apply.  */
1926 char $ac_func();
1927
1928 int main() {
1929
1930 /* The GNU C library defines this for functions which it implements
1931     to always fail with ENOSYS.  Some functions are actually named
1932     something starting with __ and the normal name is an alias.  */
1933 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1934 choke me
1935 #else
1936 $ac_func();
1937 #endif
1938
1939 ; return 0; }
1940 EOF
1941 if { (eval echo configure:1942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1942   rm -rf conftest*
1943   eval "ac_cv_func_$ac_func=yes"
1944 else
1945   echo "configure: failed program was:" >&5
1946   cat conftest.$ac_ext >&5
1947   rm -rf conftest*
1948   eval "ac_cv_func_$ac_func=no"
1949 fi
1950 rm -f conftest*
1951 fi
1952
1953 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1954   echo "$ac_t""yes" 1>&6
1955     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1956   cat >> confdefs.h <<EOF
1957 #define $ac_tr_func 1
1958 EOF
1959  
1960 else
1961   echo "$ac_t""no" 1>&6
1962 fi
1963 done
1964
1965
1966 echo $ac_n "checking for getopt_long""... $ac_c" 1>&6
1967 echo "configure:1968: checking for getopt_long" >&5
1968 if eval "test \"`echo '$''{'ac_cv_func_getopt_long'+set}'`\" = set"; then
1969   echo $ac_n "(cached) $ac_c" 1>&6
1970 else
1971   cat > conftest.$ac_ext <<EOF
1972 #line 1973 "configure"
1973 #include "confdefs.h"
1974 /* System header to define __stub macros and hopefully few prototypes,
1975     which can conflict with char getopt_long(); below.  */
1976 #include <assert.h>
1977 /* Override any gcc2 internal prototype to avoid an error.  */
1978 /* We use char because int might match the return type of a gcc2
1979     builtin and then its argument prototype would still apply.  */
1980 char getopt_long();
1981
1982 int main() {
1983
1984 /* The GNU C library defines this for functions which it implements
1985     to always fail with ENOSYS.  Some functions are actually named
1986     something starting with __ and the normal name is an alias.  */
1987 #if defined (__stub_getopt_long) || defined (__stub___getopt_long)
1988 choke me
1989 #else
1990 getopt_long();
1991 #endif
1992
1993 ; return 0; }
1994 EOF
1995 if { (eval echo configure:1996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1996   rm -rf conftest*
1997   eval "ac_cv_func_getopt_long=yes"
1998 else
1999   echo "configure: failed program was:" >&5
2000   cat conftest.$ac_ext >&5
2001   rm -rf conftest*
2002   eval "ac_cv_func_getopt_long=no"
2003 fi
2004 rm -f conftest*
2005 fi
2006
2007 if eval "test \"`echo '$ac_cv_func_'getopt_long`\" = yes"; then
2008   echo "$ac_t""yes" 1>&6
2009   cat >> confdefs.h <<\EOF
2010 #define HAVE_GETOPT_LONG 1
2011 EOF
2012
2013 else
2014   echo "$ac_t""no" 1>&6
2015  # FreeBSD has a gnugetopt library for this:
2016   echo $ac_n "checking for getopt_long in -lgnugetopt""... $ac_c" 1>&6
2017 echo "configure:2018: checking for getopt_long in -lgnugetopt" >&5
2018 ac_lib_var=`echo gnugetopt'_'getopt_long | sed 'y%./+-%__p_%'`
2019 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2020   echo $ac_n "(cached) $ac_c" 1>&6
2021 else
2022   ac_save_LIBS="$LIBS"
2023 LIBS="-lgnugetopt  $LIBS"
2024 cat > conftest.$ac_ext <<EOF
2025 #line 2026 "configure"
2026 #include "confdefs.h"
2027 /* Override any gcc2 internal prototype to avoid an error.  */
2028 /* We use char because int might match the return type of a gcc2
2029     builtin and then its argument prototype would still apply.  */
2030 char getopt_long();
2031
2032 int main() {
2033 getopt_long()
2034 ; return 0; }
2035 EOF
2036 if { (eval echo configure:2037: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2037   rm -rf conftest*
2038   eval "ac_cv_lib_$ac_lib_var=yes"
2039 else
2040   echo "configure: failed program was:" >&5
2041   cat conftest.$ac_ext >&5
2042   rm -rf conftest*
2043   eval "ac_cv_lib_$ac_lib_var=no"
2044 fi
2045 rm -f conftest*
2046 LIBS="$ac_save_LIBS"
2047
2048 fi
2049 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2050   echo "$ac_t""yes" 1>&6
2051   cat >> confdefs.h <<\EOF
2052 #define HAVE_GETOPT_LONG 1
2053 EOF
2054  LIB="${LIB} -lgnugetopt"
2055 else
2056   echo "$ac_t""no" 1>&6
2057 GETOPT=1
2058 fi
2059
2060 fi
2061
2062
2063
2064 for ac_hdr in unistd.h
2065 do
2066 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2067 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2068 echo "configure:2069: checking for $ac_hdr" >&5
2069 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2070   echo $ac_n "(cached) $ac_c" 1>&6
2071 else
2072   cat > conftest.$ac_ext <<EOF
2073 #line 2074 "configure"
2074 #include "confdefs.h"
2075 #include <$ac_hdr>
2076 EOF
2077 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2078 { (eval echo configure:2079: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2079 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2080 if test -z "$ac_err"; then
2081   rm -rf conftest*
2082   eval "ac_cv_header_$ac_safe=yes"
2083 else
2084   echo "$ac_err" >&5
2085   echo "configure: failed program was:" >&5
2086   cat conftest.$ac_ext >&5
2087   rm -rf conftest*
2088   eval "ac_cv_header_$ac_safe=no"
2089 fi
2090 rm -f conftest*
2091 fi
2092 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2093   echo "$ac_t""yes" 1>&6
2094     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2095   cat >> confdefs.h <<EOF
2096 #define $ac_tr_hdr 1
2097 EOF
2098  
2099 else
2100   echo "$ac_t""no" 1>&6
2101 fi
2102 done
2103
2104 for ac_func in getpagesize
2105 do
2106 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2107 echo "configure:2108: checking for $ac_func" >&5
2108 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2109   echo $ac_n "(cached) $ac_c" 1>&6
2110 else
2111   cat > conftest.$ac_ext <<EOF
2112 #line 2113 "configure"
2113 #include "confdefs.h"
2114 /* System header to define __stub macros and hopefully few prototypes,
2115     which can conflict with char $ac_func(); below.  */
2116 #include <assert.h>
2117 /* Override any gcc2 internal prototype to avoid an error.  */
2118 /* We use char because int might match the return type of a gcc2
2119     builtin and then its argument prototype would still apply.  */
2120 char $ac_func();
2121
2122 int main() {
2123
2124 /* The GNU C library defines this for functions which it implements
2125     to always fail with ENOSYS.  Some functions are actually named
2126     something starting with __ and the normal name is an alias.  */
2127 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2128 choke me
2129 #else
2130 $ac_func();
2131 #endif
2132
2133 ; return 0; }
2134 EOF
2135 if { (eval echo configure:2136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2136   rm -rf conftest*
2137   eval "ac_cv_func_$ac_func=yes"
2138 else
2139   echo "configure: failed program was:" >&5
2140   cat conftest.$ac_ext >&5
2141   rm -rf conftest*
2142   eval "ac_cv_func_$ac_func=no"
2143 fi
2144 rm -f conftest*
2145 fi
2146
2147 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2148   echo "$ac_t""yes" 1>&6
2149     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2150   cat >> confdefs.h <<EOF
2151 #define $ac_tr_func 1
2152 EOF
2153  
2154 else
2155   echo "$ac_t""no" 1>&6
2156 fi
2157 done
2158
2159 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
2160 echo "configure:2161: checking for working mmap" >&5
2161 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
2162   echo $ac_n "(cached) $ac_c" 1>&6
2163 else
2164   if test "$cross_compiling" = yes; then
2165   ac_cv_func_mmap_fixed_mapped=no
2166 else
2167   cat > conftest.$ac_ext <<EOF
2168 #line 2169 "configure"
2169 #include "confdefs.h"
2170
2171 /* Thanks to Mike Haertel and Jim Avera for this test.
2172    Here is a matrix of mmap possibilities:
2173         mmap private not fixed
2174         mmap private fixed at somewhere currently unmapped
2175         mmap private fixed at somewhere already mapped
2176         mmap shared not fixed
2177         mmap shared fixed at somewhere currently unmapped
2178         mmap shared fixed at somewhere already mapped
2179    For private mappings, we should verify that changes cannot be read()
2180    back from the file, nor mmap's back from the file at a different
2181    address.  (There have been systems where private was not correctly
2182    implemented like the infamous i386 svr4.0, and systems where the
2183    VM page cache was not coherent with the filesystem buffer cache
2184    like early versions of FreeBSD and possibly contemporary NetBSD.)
2185    For shared mappings, we should conversely verify that changes get
2186    propogated back to all the places they're supposed to be.
2187
2188    Grep wants private fixed already mapped.
2189    The main things grep needs to know about mmap are:
2190    * does it exist and is it safe to write into the mmap'd area
2191    * how to use it (BSD variants)  */
2192 #include <sys/types.h>
2193 #include <fcntl.h>
2194 #include <sys/mman.h>
2195
2196 /* This mess was copied from the GNU getpagesize.h.  */
2197 #ifndef HAVE_GETPAGESIZE
2198 # ifdef HAVE_UNISTD_H
2199 #  include <unistd.h>
2200 # endif
2201
2202 /* Assume that all systems that can run configure have sys/param.h.  */
2203 # ifndef HAVE_SYS_PARAM_H
2204 #  define HAVE_SYS_PARAM_H 1
2205 # endif
2206
2207 # ifdef _SC_PAGESIZE
2208 #  define getpagesize() sysconf(_SC_PAGESIZE)
2209 # else /* no _SC_PAGESIZE */
2210 #  ifdef HAVE_SYS_PARAM_H
2211 #   include <sys/param.h>
2212 #   ifdef EXEC_PAGESIZE
2213 #    define getpagesize() EXEC_PAGESIZE
2214 #   else /* no EXEC_PAGESIZE */
2215 #    ifdef NBPG
2216 #     define getpagesize() NBPG * CLSIZE
2217 #     ifndef CLSIZE
2218 #      define CLSIZE 1
2219 #     endif /* no CLSIZE */
2220 #    else /* no NBPG */
2221 #     ifdef NBPC
2222 #      define getpagesize() NBPC
2223 #     else /* no NBPC */
2224 #      ifdef PAGESIZE
2225 #       define getpagesize() PAGESIZE
2226 #      endif /* PAGESIZE */
2227 #     endif /* no NBPC */
2228 #    endif /* no NBPG */
2229 #   endif /* no EXEC_PAGESIZE */
2230 #  else /* no HAVE_SYS_PARAM_H */
2231 #   define getpagesize() 8192   /* punt totally */
2232 #  endif /* no HAVE_SYS_PARAM_H */
2233 # endif /* no _SC_PAGESIZE */
2234
2235 #endif /* no HAVE_GETPAGESIZE */
2236
2237 #ifdef __cplusplus
2238 extern "C" { void *malloc(unsigned); }
2239 #else
2240 char *malloc();
2241 #endif
2242
2243 int
2244 main()
2245 {
2246         char *data, *data2, *data3;
2247         int i, pagesize;
2248         int fd;
2249
2250         pagesize = getpagesize();
2251
2252         /*
2253          * First, make a file with some known garbage in it.
2254          */
2255         data = malloc(pagesize);
2256         if (!data)
2257                 exit(1);
2258         for (i = 0; i < pagesize; ++i)
2259                 *(data + i) = rand();
2260         umask(0);
2261         fd = creat("conftestmmap", 0600);
2262         if (fd < 0)
2263                 exit(1);
2264         if (write(fd, data, pagesize) != pagesize)
2265                 exit(1);
2266         close(fd);
2267
2268         /*
2269          * Next, try to mmap the file at a fixed address which
2270          * already has something else allocated at it.  If we can,
2271          * also make sure that we see the same garbage.
2272          */
2273         fd = open("conftestmmap", O_RDWR);
2274         if (fd < 0)
2275                 exit(1);
2276         data2 = malloc(2 * pagesize);
2277         if (!data2)
2278                 exit(1);
2279         data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
2280         if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
2281             MAP_PRIVATE | MAP_FIXED, fd, 0L))
2282                 exit(1);
2283         for (i = 0; i < pagesize; ++i)
2284                 if (*(data + i) != *(data2 + i))
2285                         exit(1);
2286
2287         /*
2288          * Finally, make sure that changes to the mapped area
2289          * do not percolate back to the file as seen by read().
2290          * (This is a bug on some variants of i386 svr4.0.)
2291          */
2292         for (i = 0; i < pagesize; ++i)
2293                 *(data2 + i) = *(data2 + i) + 1;
2294         data3 = malloc(pagesize);
2295         if (!data3)
2296                 exit(1);
2297         if (read(fd, data3, pagesize) != pagesize)
2298                 exit(1);
2299         for (i = 0; i < pagesize; ++i)
2300                 if (*(data + i) != *(data3 + i))
2301                         exit(1);
2302         close(fd);
2303         unlink("conftestmmap");
2304         exit(0);
2305 }
2306
2307 EOF
2308 if { (eval echo configure:2309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2309 then
2310   ac_cv_func_mmap_fixed_mapped=yes
2311 else
2312   echo "configure: failed program was:" >&5
2313   cat conftest.$ac_ext >&5
2314   rm -fr conftest*
2315   ac_cv_func_mmap_fixed_mapped=no
2316 fi
2317 rm -fr conftest*
2318 fi
2319
2320 fi
2321
2322 echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
2323 if test $ac_cv_func_mmap_fixed_mapped = yes; then
2324   cat >> confdefs.h <<\EOF
2325 #define HAVE_MMAP 1
2326 EOF
2327
2328 fi
2329
2330 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
2331 echo "configure:2332: checking return type of signal handlers" >&5
2332 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
2333   echo $ac_n "(cached) $ac_c" 1>&6
2334 else
2335   cat > conftest.$ac_ext <<EOF
2336 #line 2337 "configure"
2337 #include "confdefs.h"
2338 #include <sys/types.h>
2339 #include <signal.h>
2340 #ifdef signal
2341 #undef signal
2342 #endif
2343 #ifdef __cplusplus
2344 extern "C" void (*signal (int, void (*)(int)))(int);
2345 #else
2346 void (*signal ()) ();
2347 #endif
2348
2349 int main() {
2350 int i;
2351 ; return 0; }
2352 EOF
2353 if { (eval echo configure:2354: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2354   rm -rf conftest*
2355   ac_cv_type_signal=void
2356 else
2357   echo "configure: failed program was:" >&5
2358   cat conftest.$ac_ext >&5
2359   rm -rf conftest*
2360   ac_cv_type_signal=int
2361 fi
2362 rm -f conftest*
2363 fi
2364
2365 echo "$ac_t""$ac_cv_type_signal" 1>&6
2366 cat >> confdefs.h <<EOF
2367 #define RETSIGTYPE $ac_cv_type_signal
2368 EOF
2369
2370
2371 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
2372 echo "configure:2373: checking for dlopen in -ldl" >&5
2373 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
2374 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2375   echo $ac_n "(cached) $ac_c" 1>&6
2376 else
2377   ac_save_LIBS="$LIBS"
2378 LIBS="-ldl  $LIBS"
2379 cat > conftest.$ac_ext <<EOF
2380 #line 2381 "configure"
2381 #include "confdefs.h"
2382 /* Override any gcc2 internal prototype to avoid an error.  */
2383 /* We use char because int might match the return type of a gcc2
2384     builtin and then its argument prototype would still apply.  */
2385 char dlopen();
2386
2387 int main() {
2388 dlopen()
2389 ; return 0; }
2390 EOF
2391 if { (eval echo configure:2392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2392   rm -rf conftest*
2393   eval "ac_cv_lib_$ac_lib_var=yes"
2394 else
2395   echo "configure: failed program was:" >&5
2396   cat conftest.$ac_ext >&5
2397   rm -rf conftest*
2398   eval "ac_cv_lib_$ac_lib_var=no"
2399 fi
2400 rm -f conftest*
2401 LIBS="$ac_save_LIBS"
2402
2403 fi
2404 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2405   echo "$ac_t""yes" 1>&6
2406   LIB="${LIB} -ldl"
2407 else
2408   echo "$ac_t""no" 1>&6
2409 fi
2410
2411 echo $ac_n "checking for pow in -lm""... $ac_c" 1>&6
2412 echo "configure:2413: checking for pow in -lm" >&5
2413 ac_lib_var=`echo m'_'pow | sed 'y%./+-%__p_%'`
2414 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2415   echo $ac_n "(cached) $ac_c" 1>&6
2416 else
2417   ac_save_LIBS="$LIBS"
2418 LIBS="-lm  $LIBS"
2419 cat > conftest.$ac_ext <<EOF
2420 #line 2421 "configure"
2421 #include "confdefs.h"
2422 /* Override any gcc2 internal prototype to avoid an error.  */
2423 /* We use char because int might match the return type of a gcc2
2424     builtin and then its argument prototype would still apply.  */
2425 char pow();
2426
2427 int main() {
2428 pow()
2429 ; return 0; }
2430 EOF
2431 if { (eval echo configure:2432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2432   rm -rf conftest*
2433   eval "ac_cv_lib_$ac_lib_var=yes"
2434 else
2435   echo "configure: failed program was:" >&5
2436   cat conftest.$ac_ext >&5
2437   rm -rf conftest*
2438   eval "ac_cv_lib_$ac_lib_var=no"
2439 fi
2440 rm -f conftest*
2441 LIBS="$ac_save_LIBS"
2442
2443 fi
2444 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2445   echo "$ac_t""yes" 1>&6
2446   LIB_YUV="${LIB_YUV} -lm"
2447 else
2448   echo "$ac_t""no" 1>&6
2449 fi
2450
2451
2452 CPPFLAGS="${CPPFLAGS} -I/usr/local/include"
2453 CFLAGS="${CFLAGS} -I/usr/local/include"
2454
2455 PTHREAD_LIBS=error
2456 echo $ac_n "checking for pthread_attr_init in -lpthread""... $ac_c" 1>&6
2457 echo "configure:2458: checking for pthread_attr_init in -lpthread" >&5
2458 ac_lib_var=`echo pthread'_'pthread_attr_init | sed 'y%./+-%__p_%'`
2459 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2460   echo $ac_n "(cached) $ac_c" 1>&6
2461 else
2462   ac_save_LIBS="$LIBS"
2463 LIBS="-lpthread  $LIBS"
2464 cat > conftest.$ac_ext <<EOF
2465 #line 2466 "configure"
2466 #include "confdefs.h"
2467 /* Override any gcc2 internal prototype to avoid an error.  */
2468 /* We use char because int might match the return type of a gcc2
2469     builtin and then its argument prototype would still apply.  */
2470 char pthread_attr_init();
2471
2472 int main() {
2473 pthread_attr_init()
2474 ; return 0; }
2475 EOF
2476 if { (eval echo configure:2477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2477   rm -rf conftest*
2478   eval "ac_cv_lib_$ac_lib_var=yes"
2479 else
2480   echo "configure: failed program was:" >&5
2481   cat conftest.$ac_ext >&5
2482   rm -rf conftest*
2483   eval "ac_cv_lib_$ac_lib_var=no"
2484 fi
2485 rm -f conftest*
2486 LIBS="$ac_save_LIBS"
2487
2488 fi
2489 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2490   echo "$ac_t""yes" 1>&6
2491   THREAD_LIB="-lpthread"
2492 else
2493   echo "$ac_t""no" 1>&6
2494 fi
2495
2496 if test "x${THREAD_LIB}" = xerror; then
2497   echo $ac_n "checking for pthread_attr_init in -lpthreads""... $ac_c" 1>&6
2498 echo "configure:2499: checking for pthread_attr_init in -lpthreads" >&5
2499 ac_lib_var=`echo pthreads'_'pthread_attr_init | sed 'y%./+-%__p_%'`
2500 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2501   echo $ac_n "(cached) $ac_c" 1>&6
2502 else
2503   ac_save_LIBS="$LIBS"
2504 LIBS="-lpthreads  $LIBS"
2505 cat > conftest.$ac_ext <<EOF
2506 #line 2507 "configure"
2507 #include "confdefs.h"
2508 /* Override any gcc2 internal prototype to avoid an error.  */
2509 /* We use char because int might match the return type of a gcc2
2510     builtin and then its argument prototype would still apply.  */
2511 char pthread_attr_init();
2512
2513 int main() {
2514 pthread_attr_init()
2515 ; return 0; }
2516 EOF
2517 if { (eval echo configure:2518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2518   rm -rf conftest*
2519   eval "ac_cv_lib_$ac_lib_var=yes"
2520 else
2521   echo "configure: failed program was:" >&5
2522   cat conftest.$ac_ext >&5
2523   rm -rf conftest*
2524   eval "ac_cv_lib_$ac_lib_var=no"
2525 fi
2526 rm -f conftest*
2527 LIBS="$ac_save_LIBS"
2528
2529 fi
2530 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2531   echo "$ac_t""yes" 1>&6
2532   THREAD_LIB="-lpthreads"
2533 else
2534   echo "$ac_t""no" 1>&6
2535 fi
2536
2537 fi
2538 if test "x${THREAD_LIB}" = xerror; then
2539   echo $ac_n "checking for pthread_attr_init in -lc_r""... $ac_c" 1>&6
2540 echo "configure:2541: checking for pthread_attr_init in -lc_r" >&5
2541 ac_lib_var=`echo c_r'_'pthread_attr_init | sed 'y%./+-%__p_%'`
2542 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2543   echo $ac_n "(cached) $ac_c" 1>&6
2544 else
2545   ac_save_LIBS="$LIBS"
2546 LIBS="-lc_r  $LIBS"
2547 cat > conftest.$ac_ext <<EOF
2548 #line 2549 "configure"
2549 #include "confdefs.h"
2550 /* Override any gcc2 internal prototype to avoid an error.  */
2551 /* We use char because int might match the return type of a gcc2
2552     builtin and then its argument prototype would still apply.  */
2553 char pthread_attr_init();
2554
2555 int main() {
2556 pthread_attr_init()
2557 ; return 0; }
2558 EOF
2559 if { (eval echo configure:2560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2560   rm -rf conftest*
2561   eval "ac_cv_lib_$ac_lib_var=yes"
2562 else
2563   echo "configure: failed program was:" >&5
2564   cat conftest.$ac_ext >&5
2565   rm -rf conftest*
2566   eval "ac_cv_lib_$ac_lib_var=no"
2567 fi
2568 rm -f conftest*
2569 LIBS="$ac_save_LIBS"
2570
2571 fi
2572 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2573   echo "$ac_t""yes" 1>&6
2574   THREAD_LIB="-lc_r"
2575 else
2576   echo "$ac_t""no" 1>&6
2577 fi
2578
2579 fi
2580 if test "x${THREAD_LIB}" = xerror; then
2581   THREAD_LIBS=""
2582   echo $ac_n "checking for pthread_attr_init""... $ac_c" 1>&6
2583 echo "configure:2584: checking for pthread_attr_init" >&5
2584 if eval "test \"`echo '$''{'ac_cv_func_pthread_attr_init'+set}'`\" = set"; then
2585   echo $ac_n "(cached) $ac_c" 1>&6
2586 else
2587   cat > conftest.$ac_ext <<EOF
2588 #line 2589 "configure"
2589 #include "confdefs.h"
2590 /* System header to define __stub macros and hopefully few prototypes,
2591     which can conflict with char pthread_attr_init(); below.  */
2592 #include <assert.h>
2593 /* Override any gcc2 internal prototype to avoid an error.  */
2594 /* We use char because int might match the return type of a gcc2
2595     builtin and then its argument prototype would still apply.  */
2596 char pthread_attr_init();
2597
2598 int main() {
2599
2600 /* The GNU C library defines this for functions which it implements
2601     to always fail with ENOSYS.  Some functions are actually named
2602     something starting with __ and the normal name is an alias.  */
2603 #if defined (__stub_pthread_attr_init) || defined (__stub___pthread_attr_init)
2604 choke me
2605 #else
2606 pthread_attr_init();
2607 #endif
2608
2609 ; return 0; }
2610 EOF
2611 if { (eval echo configure:2612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2612   rm -rf conftest*
2613   eval "ac_cv_func_pthread_attr_init=yes"
2614 else
2615   echo "configure: failed program was:" >&5
2616   cat conftest.$ac_ext >&5
2617   rm -rf conftest*
2618   eval "ac_cv_func_pthread_attr_init=no"
2619 fi
2620 rm -f conftest*
2621 fi
2622
2623 if eval "test \"`echo '$ac_cv_func_'pthread_attr_init`\" = yes"; then
2624   echo "$ac_t""yes" 1>&6
2625   :
2626 else
2627   echo "$ac_t""no" 1>&6
2628 fi
2629
2630 fi
2631
2632 cat > conftest.$ac_ext <<EOF
2633 #line 2634 "configure"
2634 #include "confdefs.h"
2635 #include <pthread.h>
2636 EOF
2637 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2638   egrep "pthread_cond_t" >/dev/null 2>&1; then
2639   rm -rf conftest*
2640   
2641   cat >> confdefs.h <<\EOF
2642 #define PTHREAD_COND_T_IN_PTHREAD_H 1
2643 EOF
2644
2645 fi
2646 rm -f conftest*
2647
2648 cat > conftest.$ac_ext <<EOF
2649 #line 2650 "configure"
2650 #include "confdefs.h"
2651 #include <strings.h>
2652 EOF
2653 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2654   egrep "strncasecmp" >/dev/null 2>&1; then
2655   rm -rf conftest*
2656   
2657   cat >> confdefs.h <<\EOF
2658 #define STRNCASECMP_IN_STRINGS_H 1
2659 EOF
2660
2661 fi
2662 rm -f conftest*
2663
2664
2665 for ac_hdr in stddef.h getopt.h strings.h
2666 do
2667 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2668 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2669 echo "configure:2670: checking for $ac_hdr" >&5
2670 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2671   echo $ac_n "(cached) $ac_c" 1>&6
2672 else
2673   cat > conftest.$ac_ext <<EOF
2674 #line 2675 "configure"
2675 #include "confdefs.h"
2676 #include <$ac_hdr>
2677 EOF
2678 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2679 { (eval echo configure:2680: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2680 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2681 if test -z "$ac_err"; then
2682   rm -rf conftest*
2683   eval "ac_cv_header_$ac_safe=yes"
2684 else
2685   echo "$ac_err" >&5
2686   echo "configure: failed program was:" >&5
2687   cat conftest.$ac_ext >&5
2688   rm -rf conftest*
2689   eval "ac_cv_header_$ac_safe=no"
2690 fi
2691 rm -f conftest*
2692 fi
2693 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2694   echo "$ac_t""yes" 1>&6
2695     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2696   cat >> confdefs.h <<EOF
2697 #define $ac_tr_hdr 1
2698 EOF
2699  
2700 else
2701   echo "$ac_t""no" 1>&6
2702 fi
2703 done
2704
2705 for ac_hdr in sys/sockio.h fcntl.h sys/time.h unistd.h
2706 do
2707 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2708 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2709 echo "configure:2710: checking for $ac_hdr" >&5
2710 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2711   echo $ac_n "(cached) $ac_c" 1>&6
2712 else
2713   cat > conftest.$ac_ext <<EOF
2714 #line 2715 "configure"
2715 #include "confdefs.h"
2716 #include <$ac_hdr>
2717 EOF
2718 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2719 { (eval echo configure:2720: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2720 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2721 if test -z "$ac_err"; then
2722   rm -rf conftest*
2723   eval "ac_cv_header_$ac_safe=yes"
2724 else
2725   echo "$ac_err" >&5
2726   echo "configure: failed program was:" >&5
2727   cat conftest.$ac_ext >&5
2728   rm -rf conftest*
2729   eval "ac_cv_header_$ac_safe=no"
2730 fi
2731 rm -f conftest*
2732 fi
2733 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2734   echo "$ac_t""yes" 1>&6
2735     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2736   cat >> confdefs.h <<EOF
2737 #define $ac_tr_hdr 1
2738 EOF
2739  
2740 else
2741   echo "$ac_t""no" 1>&6
2742 fi
2743 done
2744
2745 for ac_hdr in sys/soundcard.h machine/soundcard.h
2746 do
2747 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2748 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2749 echo "configure:2750: checking for $ac_hdr" >&5
2750 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2751   echo $ac_n "(cached) $ac_c" 1>&6
2752 else
2753   cat > conftest.$ac_ext <<EOF
2754 #line 2755 "configure"
2755 #include "confdefs.h"
2756 #include <$ac_hdr>
2757 EOF
2758 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2759 { (eval echo configure:2760: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2760 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2761 if test -z "$ac_err"; then
2762   rm -rf conftest*
2763   eval "ac_cv_header_$ac_safe=yes"
2764 else
2765   echo "$ac_err" >&5
2766   echo "configure: failed program was:" >&5
2767   cat conftest.$ac_ext >&5
2768   rm -rf conftest*
2769   eval "ac_cv_header_$ac_safe=no"
2770 fi
2771 rm -f conftest*
2772 fi
2773 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2774   echo "$ac_t""yes" 1>&6
2775     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2776   cat >> confdefs.h <<EOF
2777 #define $ac_tr_hdr 1
2778 EOF
2779  
2780 else
2781   echo "$ac_t""no" 1>&6
2782 fi
2783 done
2784
2785 for ac_hdr in dlfcn.h image.h
2786 do
2787 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2788 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2789 echo "configure:2790: checking for $ac_hdr" >&5
2790 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2791   echo $ac_n "(cached) $ac_c" 1>&6
2792 else
2793   cat > conftest.$ac_ext <<EOF
2794 #line 2795 "configure"
2795 #include "confdefs.h"
2796 #include <$ac_hdr>
2797 EOF
2798 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2799 { (eval echo configure:2800: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2800 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2801 if test -z "$ac_err"; then
2802   rm -rf conftest*
2803   eval "ac_cv_header_$ac_safe=yes"
2804 else
2805   echo "$ac_err" >&5
2806   echo "configure: failed program was:" >&5
2807   cat conftest.$ac_ext >&5
2808   rm -rf conftest*
2809   eval "ac_cv_header_$ac_safe=no"
2810 fi
2811 rm -f conftest*
2812 fi
2813 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2814   echo "$ac_t""yes" 1>&6
2815     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2816   cat >> confdefs.h <<EOF
2817 #define $ac_tr_hdr 1
2818 EOF
2819  
2820 else
2821   echo "$ac_t""no" 1>&6
2822 fi
2823 done
2824
2825 for ac_hdr in arpa/inet.h net/if.h netinet/in.h sys/socket.h
2826 do
2827 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2828 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2829 echo "configure:2830: checking for $ac_hdr" >&5
2830 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2831   echo $ac_n "(cached) $ac_c" 1>&6
2832 else
2833   cat > conftest.$ac_ext <<EOF
2834 #line 2835 "configure"
2835 #include "confdefs.h"
2836 #include <$ac_hdr>
2837 EOF
2838 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2839 { (eval echo configure:2840: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2840 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2841 if test -z "$ac_err"; then
2842   rm -rf conftest*
2843   eval "ac_cv_header_$ac_safe=yes"
2844 else
2845   echo "$ac_err" >&5
2846   echo "configure: failed program was:" >&5
2847   cat conftest.$ac_ext >&5
2848   rm -rf conftest*
2849   eval "ac_cv_header_$ac_safe=no"
2850 fi
2851 rm -f conftest*
2852 fi
2853 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2854   echo "$ac_t""yes" 1>&6
2855     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2856   cat >> confdefs.h <<EOF
2857 #define $ac_tr_hdr 1
2858 EOF
2859  
2860 else
2861   echo "$ac_t""no" 1>&6
2862 fi
2863 done
2864
2865 for ac_hdr in machine/param.h
2866 do
2867 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2868 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2869 echo "configure:2870: checking for $ac_hdr" >&5
2870 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2871   echo $ac_n "(cached) $ac_c" 1>&6
2872 else
2873   cat > conftest.$ac_ext <<EOF
2874 #line 2875 "configure"
2875 #include "confdefs.h"
2876 #include <$ac_hdr>
2877 EOF
2878 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2879 { (eval echo configure:2880: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2880 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2881 if test -z "$ac_err"; then
2882   rm -rf conftest*
2883   eval "ac_cv_header_$ac_safe=yes"
2884 else
2885   echo "$ac_err" >&5
2886   echo "configure: failed program was:" >&5
2887   cat conftest.$ac_ext >&5
2888   rm -rf conftest*
2889   eval "ac_cv_header_$ac_safe=no"
2890 fi
2891 rm -f conftest*
2892 fi
2893 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2894   echo "$ac_t""yes" 1>&6
2895     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2896   cat >> confdefs.h <<EOF
2897 #define $ac_tr_hdr 1
2898 EOF
2899  
2900 else
2901   echo "$ac_t""no" 1>&6
2902 fi
2903 done
2904
2905
2906 for ac_hdr in cthreads.h pthread.h kernel/scheduler.h kernel/OS.h
2907 do
2908 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2909 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2910 echo "configure:2911: checking for $ac_hdr" >&5
2911 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2912   echo $ac_n "(cached) $ac_c" 1>&6
2913 else
2914   cat > conftest.$ac_ext <<EOF
2915 #line 2916 "configure"
2916 #include "confdefs.h"
2917 #include <$ac_hdr>
2918 EOF
2919 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2920 { (eval echo configure:2921: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2921 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2922 if test -z "$ac_err"; then
2923   rm -rf conftest*
2924   eval "ac_cv_header_$ac_safe=yes"
2925 else
2926   echo "$ac_err" >&5
2927   echo "configure: failed program was:" >&5
2928   cat conftest.$ac_ext >&5
2929   rm -rf conftest*
2930   eval "ac_cv_header_$ac_safe=no"
2931 fi
2932 rm -f conftest*
2933 fi
2934 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2935   echo "$ac_t""yes" 1>&6
2936     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2937   cat >> confdefs.h <<EOF
2938 #define $ac_tr_hdr 1
2939 EOF
2940  
2941 else
2942   echo "$ac_t""no" 1>&6
2943 fi
2944 done
2945
2946
2947 CFLAGS="${save_CFLAGS} -Wall -Werror"
2948 echo $ac_n "checking for ntohl in sys/param.h""... $ac_c" 1>&6
2949 echo "configure:2950: checking for ntohl in sys/param.h" >&5
2950 cat > conftest.$ac_ext <<EOF
2951 #line 2952 "configure"
2952 #include "confdefs.h"
2953 #include <sys/param.h>
2954 void foo() { int meuh; ntohl(meuh); }
2955 int main() {
2956
2957 ; return 0; }
2958 EOF
2959 if { (eval echo configure:2960: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2960   rm -rf conftest*
2961   cat >> confdefs.h <<\EOF
2962 #define NTOHL_IN_SYS_PARAM_H 1
2963 EOF
2964
2965  echo "$ac_t""yes" 1>&6
2966 else
2967   echo "configure: failed program was:" >&5
2968   cat conftest.$ac_ext >&5
2969   rm -rf conftest*
2970   echo "$ac_t""no" 1>&6
2971 fi
2972 rm -f conftest*
2973
2974 CFLAGS="${save_CFLAGS} -bundle -undefined suppress"
2975 echo $ac_n "checking if \$CC compiles plugins with -bundle -undefined suppress""... $ac_c" 1>&6
2976 echo "configure:2977: checking if \$CC compiles plugins with -bundle -undefined suppress" >&5
2977 cat > conftest.$ac_ext <<EOF
2978 #line 2979 "configure"
2979 #include "confdefs.h"
2980
2981 int main() {
2982
2983 ; return 0; }
2984 EOF
2985 if { (eval echo configure:2986: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2986   rm -rf conftest*
2987   PLCFLAGS="${PLCFLAGS} -bundle -undefined suppress"; echo "$ac_t""yes" 1>&6
2988 else
2989   echo "configure: failed program was:" >&5
2990   cat conftest.$ac_ext >&5
2991   rm -rf conftest*
2992   echo "$ac_t""no" 1>&6
2993 fi
2994 rm -f conftest*
2995
2996 CFLAGS="${save_CFLAGS} -shared"
2997 echo $ac_n "checking if \$CC compiles plugins with -shared""... $ac_c" 1>&6
2998 echo "configure:2999: checking if \$CC compiles plugins with -shared" >&5
2999 cat > conftest.$ac_ext <<EOF
3000 #line 3001 "configure"
3001 #include "confdefs.h"
3002
3003 int main() {
3004
3005 ; return 0; }
3006 EOF
3007 if { (eval echo configure:3008: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3008   rm -rf conftest*
3009   PLCFLAGS="${PLCFLAGS} -shared"; echo "$ac_t""yes" 1>&6
3010 else
3011   echo "configure: failed program was:" >&5
3012   cat conftest.$ac_ext >&5
3013   rm -rf conftest*
3014   echo "$ac_t""no" 1>&6
3015 fi
3016 rm -f conftest*
3017
3018 CFLAGS="${save_CFLAGS}"
3019
3020 echo $ac_n "checking for boolean_t in sys/types.h""... $ac_c" 1>&6
3021 echo "configure:3022: checking for boolean_t in sys/types.h" >&5
3022 cat > conftest.$ac_ext <<EOF
3023 #line 3024 "configure"
3024 #include "confdefs.h"
3025 #include <sys/types.h>
3026 void quux() { boolean_t foo; }
3027 int main() {
3028
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   cat >> confdefs.h <<\EOF
3034 #define BOOLEAN_T_IN_SYS_TYPES_H 1
3035 EOF
3036
3037  echo "$ac_t""yes" 1>&6
3038 else
3039   echo "configure: failed program was:" >&5
3040   cat conftest.$ac_ext >&5
3041   rm -rf conftest*
3042   echo "$ac_t""no" 1>&6
3043 fi
3044 rm -f conftest*
3045 echo $ac_n "checking for boolean_t in pthread.h""... $ac_c" 1>&6
3046 echo "configure:3047: checking for boolean_t in pthread.h" >&5
3047 cat > conftest.$ac_ext <<EOF
3048 #line 3049 "configure"
3049 #include "confdefs.h"
3050 #include <pthread.h>
3051 void quux() { boolean_t foo; }
3052 int main() {
3053
3054 ; return 0; }
3055 EOF
3056 if { (eval echo configure:3057: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3057   rm -rf conftest*
3058   cat >> confdefs.h <<\EOF
3059 #define BOOLEAN_T_IN_PTHREAD_H 1
3060 EOF
3061
3062  echo "$ac_t""yes" 1>&6
3063 else
3064   echo "configure: failed program was:" >&5
3065   cat conftest.$ac_ext >&5
3066   rm -rf conftest*
3067   echo "$ac_t""no" 1>&6
3068 fi
3069 rm -f conftest*
3070
3071 echo $ac_n "checking for working const""... $ac_c" 1>&6
3072 echo "configure:3073: checking for working const" >&5
3073 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
3074   echo $ac_n "(cached) $ac_c" 1>&6
3075 else
3076   cat > conftest.$ac_ext <<EOF
3077 #line 3078 "configure"
3078 #include "confdefs.h"
3079
3080 int main() {
3081
3082 /* Ultrix mips cc rejects this.  */
3083 typedef int charset[2]; const charset x;
3084 /* SunOS 4.1.1 cc rejects this.  */
3085 char const *const *ccp;
3086 char **p;
3087 /* NEC SVR4.0.2 mips cc rejects this.  */
3088 struct point {int x, y;};
3089 static struct point const zero = {0,0};
3090 /* AIX XL C 1.02.0.0 rejects this.
3091    It does not let you subtract one const X* pointer from another in an arm
3092    of an if-expression whose if-part is not a constant expression */
3093 const char *g = "string";
3094 ccp = &g + (g ? g-g : 0);
3095 /* HPUX 7.0 cc rejects these. */
3096 ++ccp;
3097 p = (char**) ccp;
3098 ccp = (char const *const *) p;
3099 { /* SCO 3.2v4 cc rejects this.  */
3100   char *t;
3101   char const *s = 0 ? (char *) 0 : (char const *) 0;
3102
3103   *t++ = 0;
3104 }
3105 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
3106   int x[] = {25, 17};
3107   const int *foo = &x[0];
3108   ++foo;
3109 }
3110 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3111   typedef const int *iptr;
3112   iptr p = 0;
3113   ++p;
3114 }
3115 { /* AIX XL C 1.02.0.0 rejects this saying
3116      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3117   struct s { int j; const int *ap[3]; };
3118   struct s *b; b->j = 5;
3119 }
3120 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3121   const int foo = 10;
3122 }
3123
3124 ; return 0; }
3125 EOF
3126 if { (eval echo configure:3127: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3127   rm -rf conftest*
3128   ac_cv_c_const=yes
3129 else
3130   echo "configure: failed program was:" >&5
3131   cat conftest.$ac_ext >&5
3132   rm -rf conftest*
3133   ac_cv_c_const=no
3134 fi
3135 rm -f conftest*
3136 fi
3137
3138 echo "$ac_t""$ac_cv_c_const" 1>&6
3139 if test $ac_cv_c_const = no; then
3140   cat >> confdefs.h <<\EOF
3141 #define const 
3142 EOF
3143
3144 fi
3145
3146 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3147 echo "configure:3148: checking for ANSI C header files" >&5
3148 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
3149   echo $ac_n "(cached) $ac_c" 1>&6
3150 else
3151   cat > conftest.$ac_ext <<EOF
3152 #line 3153 "configure"
3153 #include "confdefs.h"
3154 #include <stdlib.h>
3155 #include <stdarg.h>
3156 #include <string.h>
3157 #include <float.h>
3158 EOF
3159 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3160 { (eval echo configure:3161: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3161 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3162 if test -z "$ac_err"; then
3163   rm -rf conftest*
3164   ac_cv_header_stdc=yes
3165 else
3166   echo "$ac_err" >&5
3167   echo "configure: failed program was:" >&5
3168   cat conftest.$ac_ext >&5
3169   rm -rf conftest*
3170   ac_cv_header_stdc=no
3171 fi
3172 rm -f conftest*
3173
3174 if test $ac_cv_header_stdc = yes; then
3175   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3176 cat > conftest.$ac_ext <<EOF
3177 #line 3178 "configure"
3178 #include "confdefs.h"
3179 #include <string.h>
3180 EOF
3181 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3182   egrep "memchr" >/dev/null 2>&1; then
3183   :
3184 else
3185   rm -rf conftest*
3186   ac_cv_header_stdc=no
3187 fi
3188 rm -f conftest*
3189
3190 fi
3191
3192 if test $ac_cv_header_stdc = yes; then
3193   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3194 cat > conftest.$ac_ext <<EOF
3195 #line 3196 "configure"
3196 #include "confdefs.h"
3197 #include <stdlib.h>
3198 EOF
3199 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3200   egrep "free" >/dev/null 2>&1; then
3201   :
3202 else
3203   rm -rf conftest*
3204   ac_cv_header_stdc=no
3205 fi
3206 rm -f conftest*
3207
3208 fi
3209
3210 if test $ac_cv_header_stdc = yes; then
3211   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3212 if test "$cross_compiling" = yes; then
3213   :
3214 else
3215   cat > conftest.$ac_ext <<EOF
3216 #line 3217 "configure"
3217 #include "confdefs.h"
3218 #include <ctype.h>
3219 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3220 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3221 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3222 int main () { int i; for (i = 0; i < 256; i++)
3223 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3224 exit (0); }
3225
3226 EOF
3227 if { (eval echo configure:3228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3228 then
3229   :
3230 else
3231   echo "configure: failed program was:" >&5
3232   cat conftest.$ac_ext >&5
3233   rm -fr conftest*
3234   ac_cv_header_stdc=no
3235 fi
3236 rm -fr conftest*
3237 fi
3238
3239 fi
3240 fi
3241
3242 echo "$ac_t""$ac_cv_header_stdc" 1>&6
3243 if test $ac_cv_header_stdc = yes; then
3244   cat >> confdefs.h <<\EOF
3245 #define STDC_HEADERS 1
3246 EOF
3247
3248 fi
3249
3250 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3251 echo "configure:3252: checking for size_t" >&5
3252 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
3253   echo $ac_n "(cached) $ac_c" 1>&6
3254 else
3255   cat > conftest.$ac_ext <<EOF
3256 #line 3257 "configure"
3257 #include "confdefs.h"
3258 #include <sys/types.h>
3259 #if STDC_HEADERS
3260 #include <stdlib.h>
3261 #include <stddef.h>
3262 #endif
3263 EOF
3264 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3265   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3266   rm -rf conftest*
3267   ac_cv_type_size_t=yes
3268 else
3269   rm -rf conftest*
3270   ac_cv_type_size_t=no
3271 fi
3272 rm -f conftest*
3273
3274 fi
3275 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3276 if test $ac_cv_type_size_t = no; then
3277   cat >> confdefs.h <<\EOF
3278 #define size_t unsigned
3279 EOF
3280
3281 fi
3282
3283 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
3284 echo "configure:3285: checking whether time.h and sys/time.h may both be included" >&5
3285 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
3286   echo $ac_n "(cached) $ac_c" 1>&6
3287 else
3288   cat > conftest.$ac_ext <<EOF
3289 #line 3290 "configure"
3290 #include "confdefs.h"
3291 #include <sys/types.h>
3292 #include <sys/time.h>
3293 #include <time.h>
3294 int main() {
3295 struct tm *tp;
3296 ; return 0; }
3297 EOF
3298 if { (eval echo configure:3299: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3299   rm -rf conftest*
3300   ac_cv_header_time=yes
3301 else
3302   echo "configure: failed program was:" >&5
3303   cat conftest.$ac_ext >&5
3304   rm -rf conftest*
3305   ac_cv_header_time=no
3306 fi
3307 rm -f conftest*
3308 fi
3309
3310 echo "$ac_t""$ac_cv_header_time" 1>&6
3311 if test $ac_cv_header_time = yes; then
3312   cat >> confdefs.h <<\EOF
3313 #define TIME_WITH_SYS_TIME 1
3314 EOF
3315
3316 fi
3317
3318
3319 ARCH=${host_cpu}
3320
3321 BUILTINS="${BUILTINS} es ps ts yuv idct idctclassic motion imdct downmix"
3322 PLUGINS="${PLUGINS}"
3323
3324 case x$host_os in
3325   xmingw32msvc)
3326     MMX_MODULES="idctmmx motionmmx"
3327     MMXEXT_MODULES="idctmmxext motionmmxext imdct3dn"
3328     ;;
3329   *)
3330     MMX_MODULES="yuvmmx idctmmx motionmmx"
3331     MMXEXT_MODULES="idctmmxext motionmmxext imdct3dn imdctsse downmix3dn downmixsse"
3332     ;;
3333 esac
3334
3335 echo $ac_n "checking if \$CC groks MMX inline assembly""... $ac_c" 1>&6
3336 echo "configure:3337: checking if \$CC groks MMX inline assembly" >&5
3337 cat > conftest.$ac_ext <<EOF
3338 #line 3339 "configure"
3339 #include "confdefs.h"
3340 void quux(){void *p;asm("packuswb %%mm1,%%mm2"::"r"(p));}
3341 int main() {
3342
3343 ; return 0; }
3344 EOF
3345 if { (eval echo configure:3346: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3346   rm -rf conftest*
3347   ACCEL_MODULES="${ACCEL_MODULES} ${MMX_MODULES}"
3348   echo "$ac_t""yes" 1>&6
3349 else
3350   echo "configure: failed program was:" >&5
3351   cat conftest.$ac_ext >&5
3352   rm -rf conftest*
3353   echo "$ac_t""no" 1>&6
3354 fi
3355 rm -f conftest*
3356
3357 echo $ac_n "checking if \$CC groks MMX EXT or SSE inline assembly""... $ac_c" 1>&6
3358 echo "configure:3359: checking if \$CC groks MMX EXT or SSE inline assembly" >&5
3359 cat > conftest.$ac_ext <<EOF
3360 #line 3361 "configure"
3361 #include "confdefs.h"
3362 void quux(){void *p;asm("maskmovq %%mm1,%%mm2"::"r"(p));}
3363 int main() {
3364
3365 ; return 0; }
3366 EOF
3367 if { (eval echo configure:3368: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3368   rm -rf conftest*
3369   ACCEL_MODULES="${ACCEL_MODULES} ${MMXEXT_MODULES}"
3370   echo "$ac_t""yes" 1>&6
3371 else
3372   echo "configure: failed program was:" >&5
3373   cat conftest.$ac_ext >&5
3374   rm -rf conftest*
3375   echo "$ac_t""no" 1>&6
3376 fi
3377 rm -f conftest*
3378
3379
3380 for ac_hdr in winioctl.h
3381 do
3382 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3383 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3384 echo "configure:3385: checking for $ac_hdr" >&5
3385 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3386   echo $ac_n "(cached) $ac_c" 1>&6
3387 else
3388   cat > conftest.$ac_ext <<EOF
3389 #line 3390 "configure"
3390 #include "confdefs.h"
3391 #include <$ac_hdr>
3392 EOF
3393 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3394 { (eval echo configure:3395: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3395 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3396 if test -z "$ac_err"; then
3397   rm -rf conftest*
3398   eval "ac_cv_header_$ac_safe=yes"
3399 else
3400   echo "$ac_err" >&5
3401   echo "configure: failed program was:" >&5
3402   cat conftest.$ac_ext >&5
3403   rm -rf conftest*
3404   eval "ac_cv_header_$ac_safe=no"
3405 fi
3406 rm -f conftest*
3407 fi
3408 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3409   echo "$ac_t""yes" 1>&6
3410     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3411   cat >> confdefs.h <<EOF
3412 #define $ac_tr_hdr 1
3413 EOF
3414  
3415   LIBDVDCSS=1
3416
3417 else
3418   echo "$ac_t""no" 1>&6
3419 fi
3420 done
3421
3422
3423 for ac_hdr in sys/ioctl.h
3424 do
3425 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3426 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3427 echo "configure:3428: checking for $ac_hdr" >&5
3428 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3429   echo $ac_n "(cached) $ac_c" 1>&6
3430 else
3431   cat > conftest.$ac_ext <<EOF
3432 #line 3433 "configure"
3433 #include "confdefs.h"
3434 #include <$ac_hdr>
3435 EOF
3436 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3437 { (eval echo configure:3438: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3438 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3439 if test -z "$ac_err"; then
3440   rm -rf conftest*
3441   eval "ac_cv_header_$ac_safe=yes"
3442 else
3443   echo "$ac_err" >&5
3444   echo "configure: failed program was:" >&5
3445   cat conftest.$ac_ext >&5
3446   rm -rf conftest*
3447   eval "ac_cv_header_$ac_safe=no"
3448 fi
3449 rm -f conftest*
3450 fi
3451 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3452   echo "$ac_t""yes" 1>&6
3453     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3454   cat >> confdefs.h <<EOF
3455 #define $ac_tr_hdr 1
3456 EOF
3457  
3458   LIBDVDCSS=1
3459   for ac_hdr in sys/cdio.h sys/dvdio.h linux/cdrom.h
3460 do
3461 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3462 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3463 echo "configure:3464: checking for $ac_hdr" >&5
3464 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3465   echo $ac_n "(cached) $ac_c" 1>&6
3466 else
3467   cat > conftest.$ac_ext <<EOF
3468 #line 3469 "configure"
3469 #include "confdefs.h"
3470 #include <$ac_hdr>
3471 EOF
3472 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3473 { (eval echo configure:3474: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3474 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3475 if test -z "$ac_err"; then
3476   rm -rf conftest*
3477   eval "ac_cv_header_$ac_safe=yes"
3478 else
3479   echo "$ac_err" >&5
3480   echo "configure: failed program was:" >&5
3481   cat conftest.$ac_ext >&5
3482   rm -rf conftest*
3483   eval "ac_cv_header_$ac_safe=no"
3484 fi
3485 rm -f conftest*
3486 fi
3487 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3488   echo "$ac_t""yes" 1>&6
3489     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3490   cat >> confdefs.h <<EOF
3491 #define $ac_tr_hdr 1
3492 EOF
3493  
3494 else
3495   echo "$ac_t""no" 1>&6
3496 fi
3497 done
3498
3499   BSD_DVD_STRUCT=0
3500         cat > conftest.$ac_ext <<EOF
3501 #line 3502 "configure"
3502 #include "confdefs.h"
3503 #include <sys/dvdio.h>
3504 EOF
3505 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3506   egrep "dvd_struct" >/dev/null 2>&1; then
3507   rm -rf conftest*
3508   
3509     cat >> confdefs.h <<\EOF
3510 #define DVD_STRUCT_IN_SYS_DVDIO_H 1
3511 EOF
3512
3513     BSD_DVD_STRUCT=1
3514   
3515 fi
3516 rm -f conftest*
3517
3518         cat > conftest.$ac_ext <<EOF
3519 #line 3520 "configure"
3520 #include "confdefs.h"
3521 #include <sys/cdio.h>
3522 EOF
3523 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3524   egrep "dvd_struct" >/dev/null 2>&1; then
3525   rm -rf conftest*
3526   
3527     cat >> confdefs.h <<\EOF
3528 #define DVD_STRUCT_IN_SYS_CDIO_H 1
3529 EOF
3530
3531     BSD_DVD_STRUCT=1
3532   
3533 fi
3534 rm -f conftest*
3535
3536   if test x$BSD_DVD_STRUCT = x1; then
3537     cat >> confdefs.h <<\EOF
3538 #define HAVE_BSD_DVD_STRUCT 1
3539 EOF
3540
3541   fi
3542         cat > conftest.$ac_ext <<EOF
3543 #line 3544 "configure"
3544 #include "confdefs.h"
3545 #include <linux/cdrom.h>
3546 EOF
3547 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3548   egrep "dvd_struct" >/dev/null 2>&1; then
3549   rm -rf conftest*
3550   
3551     cat >> confdefs.h <<\EOF
3552 #define DVD_STRUCT_IN_LINUX_CDROM_H 1
3553 EOF
3554
3555   
3556 fi
3557 rm -f conftest*
3558
3559
3560 else
3561   echo "$ac_t""no" 1>&6
3562 fi
3563 done
3564
3565
3566 # Check whether --enable-pth or --disable-pth was given.
3567 if test "${enable_pth+set}" = set; then
3568   enableval="$enable_pth"
3569    if test x$enableval = xyes; then
3570     echo $ac_n "checking for pth_init in -lpth""... $ac_c" 1>&6
3571 echo "configure:3572: checking for pth_init in -lpth" >&5
3572 ac_lib_var=`echo pth'_'pth_init | sed 'y%./+-%__p_%'`
3573 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3574   echo $ac_n "(cached) $ac_c" 1>&6
3575 else
3576   ac_save_LIBS="$LIBS"
3577 LIBS="-lpth  $LIBS"
3578 cat > conftest.$ac_ext <<EOF
3579 #line 3580 "configure"
3580 #include "confdefs.h"
3581 /* Override any gcc2 internal prototype to avoid an error.  */
3582 /* We use char because int might match the return type of a gcc2
3583     builtin and then its argument prototype would still apply.  */
3584 char pth_init();
3585
3586 int main() {
3587 pth_init()
3588 ; return 0; }
3589 EOF
3590 if { (eval echo configure:3591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3591   rm -rf conftest*
3592   eval "ac_cv_lib_$ac_lib_var=yes"
3593 else
3594   echo "configure: failed program was:" >&5
3595   cat conftest.$ac_ext >&5
3596   rm -rf conftest*
3597   eval "ac_cv_lib_$ac_lib_var=no"
3598 fi
3599 rm -f conftest*
3600 LIBS="$ac_save_LIBS"
3601
3602 fi
3603 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3604   echo "$ac_t""yes" 1>&6
3605     ac_tr_lib=HAVE_LIB`echo pth | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3606     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3607   cat >> confdefs.h <<EOF
3608 #define $ac_tr_lib 1
3609 EOF
3610
3611   LIBS="-lpth $LIBS"
3612
3613 else
3614   echo "$ac_t""no" 1>&6
3615 fi
3616
3617     cat > conftest.$ac_ext <<EOF
3618 #line 3619 "configure"
3619 #include "confdefs.h"
3620 #include <pth.h>
3621 EOF
3622 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3623   egrep "pth_init" >/dev/null 2>&1; then
3624   rm -rf conftest*
3625   
3626       cat >> confdefs.h <<\EOF
3627 #define PTH_INIT_IN_PTH_H 1
3628 EOF
3629
3630     THREAD_LIB="-lpth"
3631     fi
3632 fi
3633 rm -f conftest*
3634
3635
3636 fi
3637
3638
3639 LIB="${LIB} ${THREAD_LIB}"
3640
3641 # Check whether --enable-ppro or --disable-ppro was given.
3642 if test "${enable_ppro+set}" = set; then
3643   enableval="$enable_ppro"
3644    if test x$enableval = xyes; then ARCH="${ARCH} ppro"; fi 
3645 else
3646    if test x${host_cpu} = xi686; then ARCH="${ARCH} ppro"; fi 
3647 fi
3648
3649
3650 # Check whether --enable-mmx or --disable-mmx was given.
3651 if test "${enable_mmx+set}" = set; then
3652   enableval="$enable_mmx"
3653    if test x$enableval = xyes; then ARCH="${ARCH} mmx";
3654   BUILTINS="${BUILTINS} ${ACCEL_MODULES}"; fi 
3655 else
3656    if test x${host_cpu} = xi686 -o x${host_cpu} = xi586 -o x${host_cpu} = xx86 -o x${host_cpu} = xi386; then ARCH="${ARCH} mmx";
3657   BUILTINS="${BUILTINS} ${ACCEL_MODULES}"; fi 
3658 fi
3659
3660
3661 # Check whether --enable-altivec or --disable-altivec was given.
3662 if test "${enable_altivec+set}" = set; then
3663   enableval="$enable_altivec"
3664    if test x$enableval = xyes; then ARCH="${ARCH} altivec";
3665     BUILTINS="${BUILTINS} idctaltivec"
3666     LIB_IDCTALTIVEC="-framework vecLib"
3667   fi 
3668 fi
3669
3670 #[ if test -d /System/Library/Frameworks/vecLib.framework; then ARCH="${ARCH} altivec"; PLUGINS="${PLUGINS} idctaltivec"; fi ])
3671
3672 # Check whether --enable-css or --disable-css was given.
3673 if test "${enable_css+set}" = set; then
3674   enableval="$enable_css"
3675    if test x$enableval = xyes; then CSS=1; else CSS=0; fi 
3676 else
3677    CSS=1; 
3678 fi
3679
3680 if test x${CSS} = x1; then cat >> confdefs.h <<\EOF
3681 #define HAVE_CSS 1
3682 EOF
3683  fi
3684
3685 # Check whether --enable-debug or --disable-debug was given.
3686 if test "${enable_debug+set}" = set; then
3687   enableval="$enable_debug"
3688    if test x$enableval = xyes; then DEBUG=1; fi 
3689 fi
3690
3691
3692 # Check whether --enable-stats or --disable-stats was given.
3693 if test "${enable_stats+set}" = set; then
3694   enableval="$enable_stats"
3695    if test x$enableval = xyes; then STATS=1; fi 
3696 fi
3697
3698
3699 # Check whether --enable-trace or --disable-trace was given.
3700 if test "${enable_trace+set}" = set; then
3701   enableval="$enable_trace"
3702    if test x$enableval = xyes; then TRACE=1; fi 
3703 fi
3704
3705
3706 # Check whether --enable-optimizations or --disable-optimizations was given.
3707 if test "${enable_optimizations+set}" = set; then
3708   enableval="$enable_optimizations"
3709    if test x$enableval = xno; then OPTIMS=0; fi 
3710 else
3711    OPTIMS=1 
3712 fi
3713
3714
3715 for ac_hdr in videolan/dvdcss.h
3716 do
3717 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3718 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3719 echo "configure:3720: checking for $ac_hdr" >&5
3720 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3721   echo $ac_n "(cached) $ac_c" 1>&6
3722 else
3723   cat > conftest.$ac_ext <<EOF
3724 #line 3725 "configure"
3725 #include "confdefs.h"
3726 #include <$ac_hdr>
3727 EOF
3728 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3729 { (eval echo configure:3730: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3730 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3731 if test -z "$ac_err"; then
3732   rm -rf conftest*
3733   eval "ac_cv_header_$ac_safe=yes"
3734 else
3735   echo "$ac_err" >&5
3736   echo "configure: failed program was:" >&5
3737   cat conftest.$ac_ext >&5
3738   rm -rf conftest*
3739   eval "ac_cv_header_$ac_safe=no"
3740 fi
3741 rm -f conftest*
3742 fi
3743 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3744   echo "$ac_t""yes" 1>&6
3745     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3746   cat >> confdefs.h <<EOF
3747 #define $ac_tr_hdr 1
3748 EOF
3749  
3750   # installed libdvdcss
3751   BUILTINS="${BUILTINS} dvd"
3752   LIB_DVD="${LIB_DVD} -ldvdcss"
3753 else
3754   echo "$ac_t""no" 1>&6
3755 if test x${LIBDVDCSS} = x1; then
3756     # local libdvdcss
3757     LOCAL_LIBDVDCSS=1
3758     BUILTINS="${BUILTINS} dvd"
3759     CFLAGS_DVD="${CFLAGS_DVD} -I../../extras/libdvdcss"
3760   fi
3761 fi
3762 done
3763
3764
3765 # Check whether --enable-dummy or --disable-dummy was given.
3766 if test "${enable_dummy+set}" = set; then
3767   enableval="$enable_dummy"
3768   :
3769 fi
3770
3771 if test x$enable_dummy != xno; then
3772   BUILTINS="${BUILTINS} dummy"; fi
3773
3774 # Check whether --enable-null or --disable-null was given.
3775 if test "${enable_null+set}" = set; then
3776   enableval="$enable_null"
3777   :
3778 fi
3779
3780 if test x$enable_null != xno; then
3781   BUILTINS="${BUILTINS} null"; fi
3782
3783 # Check whether --enable-rc or --disable-rc was given.
3784 if test "${enable_rc+set}" = set; then
3785   enableval="$enable_rc"
3786   :
3787 fi
3788
3789 if test x$enable_rc != xno; then
3790   BUILTINS="${BUILTINS} rc"; fi
3791
3792 SYS=${host_os}
3793
3794 if test x$host_os = xbeos; then
3795     BUILTINS="${BUILTINS} beos"
3796     LIB_BEOS="-lbe -lgame -lroot -ltracker"
3797     PLCFLAGS="${PLCFLAGS} -nostart"
3798
3799 else
3800
3801 # Check whether --enable-dsp or --disable-dsp was given.
3802 if test "${enable_dsp+set}" = set; then
3803   enableval="$enable_dsp"
3804   :
3805 fi
3806
3807 if test x$enable_dsp != xno; then
3808   if test -c /dev/dsp; then
3809     PLUGINS="${PLUGINS} dsp"
3810   fi
3811 fi
3812
3813 # Check whether --enable-esd or --disable-esd was given.
3814 if test "${enable_esd+set}" = set; then
3815   enableval="$enable_esd"
3816   if test x$enable_esd = xyes; then
3817      # Extract the first word of "esd-config", so it can be a program name with args.
3818 set dummy esd-config; ac_word=$2
3819 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3820 echo "configure:3821: checking for $ac_word" >&5
3821 if eval "test \"`echo '$''{'ac_cv_path_ESD_CONFIG'+set}'`\" = set"; then
3822   echo $ac_n "(cached) $ac_c" 1>&6
3823 else
3824   case "$ESD_CONFIG" in
3825   /*)
3826   ac_cv_path_ESD_CONFIG="$ESD_CONFIG" # Let the user override the test with a path.
3827   ;;
3828   ?:/*)                  
3829   ac_cv_path_ESD_CONFIG="$ESD_CONFIG" # Let the user override the test with a dos path.
3830   ;;
3831   *)
3832   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3833   ac_dummy="$PATH"
3834   for ac_dir in $ac_dummy; do 
3835     test -z "$ac_dir" && ac_dir=.
3836     if test -f $ac_dir/$ac_word; then
3837       ac_cv_path_ESD_CONFIG="$ac_dir/$ac_word"
3838       break
3839     fi
3840   done
3841   IFS="$ac_save_ifs"
3842   test -z "$ac_cv_path_ESD_CONFIG" && ac_cv_path_ESD_CONFIG="no"
3843   ;;
3844 esac
3845 fi
3846 ESD_CONFIG="$ac_cv_path_ESD_CONFIG"
3847 if test -n "$ESD_CONFIG"; then
3848   echo "$ac_t""$ESD_CONFIG" 1>&6
3849 else
3850   echo "$ac_t""no" 1>&6
3851 fi
3852
3853      if test x${ESD_CONFIG} != xno; then
3854        PLUGINS="${PLUGINS} esd"
3855        LIB_ESD="`${ESD_CONFIG} --libs`"
3856      fi
3857    fi
3858 fi
3859
3860
3861 # Check whether --enable-darwin or --disable-darwin was given.
3862 if test "${enable_darwin+set}" = set; then
3863   enableval="$enable_darwin"
3864   if test x$enable_darwin = xyes; then
3865      PLUGINS="${PLUGINS} darwin"
3866      LIB_DARWIN="-framework CoreAudio"
3867    fi
3868 fi
3869
3870
3871 # Check whether --enable-macosx or --disable-macosx was given.
3872 if test "${enable_macosx+set}" = set; then
3873   enableval="$enable_macosx"
3874   if test x$enable_macosx = xyes; then
3875      BUILTINS="${BUILTINS} macosx"
3876      LIB_MACOSX="-framework CoreAudio -framework Carbon -framework AGL"
3877      LIB_TS="${LIB_TS} -framework AGL -framework Carbon"
3878      LIB_SDL="${LIB_SDL} -framework AGL -framework Carbon"
3879    fi
3880 else
3881   for ac_hdr in Carbon/Carbon.h
3882 do
3883 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3884 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3885 echo "configure:3886: checking for $ac_hdr" >&5
3886 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3887   echo $ac_n "(cached) $ac_c" 1>&6
3888 else
3889   cat > conftest.$ac_ext <<EOF
3890 #line 3891 "configure"
3891 #include "confdefs.h"
3892 #include <$ac_hdr>
3893 EOF
3894 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3895 { (eval echo configure:3896: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3896 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3897 if test -z "$ac_err"; then
3898   rm -rf conftest*
3899   eval "ac_cv_header_$ac_safe=yes"
3900 else
3901   echo "$ac_err" >&5
3902   echo "configure: failed program was:" >&5
3903   cat conftest.$ac_ext >&5
3904   rm -rf conftest*
3905   eval "ac_cv_header_$ac_safe=no"
3906 fi
3907 rm -f conftest*
3908 fi
3909 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3910   echo "$ac_t""yes" 1>&6
3911     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3912   cat >> confdefs.h <<EOF
3913 #define $ac_tr_hdr 1
3914 EOF
3915  BUILTINS="${BUILTINS} macosx"
3916      LIB_MACOSX="-framework CoreAudio -framework Carbon -framework AGL"
3917      LIB_TS="${LIB_TS} -framework AGL -framework Carbon"
3918      LIB_SDL="${LIB_SDL} -framework AGL -framework Carbon"
3919    
3920 else
3921   echo "$ac_t""no" 1>&6
3922 fi
3923 done
3924
3925 fi
3926
3927
3928 # Check whether --enable-fb or --disable-fb was given.
3929 if test "${enable_fb+set}" = set; then
3930   enableval="$enable_fb"
3931   if test x$enable_fb = xyes; then PLUGINS="${PLUGINS} fb"; fi
3932 fi
3933
3934
3935 # Check whether --with-ggi or --without-ggi was given.
3936 if test "${with_ggi+set}" = set; then
3937   withval="$with_ggi"
3938    if test "x$withval" != "xno";
3939     then
3940       PLUGINS="${PLUGINS} ggi";
3941       if test "x$withval" != "xyes";
3942       then
3943         LIB_GGI="-l"$withval
3944       else
3945         LIB_GGI="-lggi"
3946       fi
3947     fi 
3948 fi
3949
3950
3951 # Check whether --with-sdl or --without-sdl was given.
3952 if test "${with_sdl+set}" = set; then
3953   withval="$with_sdl"
3954    if test "x$withval" != "xno";
3955     then
3956       PLUGINS="${PLUGINS} sdl";
3957       if test "x$withval" != "xyes";
3958       then
3959         LIB_SDL="${LIB_SDL} -L/usr/X11R6/lib -L"$withval"/lib -lSDL"
3960         CFLAGS_SDL="-I"$withval"/include"
3961       else
3962         for ac_hdr in SDL/SDL.h
3963 do
3964 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3965 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3966 echo "configure:3967: checking for $ac_hdr" >&5
3967 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3968   echo $ac_n "(cached) $ac_c" 1>&6
3969 else
3970   cat > conftest.$ac_ext <<EOF
3971 #line 3972 "configure"
3972 #include "confdefs.h"
3973 #include <$ac_hdr>
3974 EOF
3975 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3976 { (eval echo configure:3977: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3977 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3978 if test -z "$ac_err"; then
3979   rm -rf conftest*
3980   eval "ac_cv_header_$ac_safe=yes"
3981 else
3982   echo "$ac_err" >&5
3983   echo "configure: failed program was:" >&5
3984   cat conftest.$ac_ext >&5
3985   rm -rf conftest*
3986   eval "ac_cv_header_$ac_safe=no"
3987 fi
3988 rm -f conftest*
3989 fi
3990 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3991   echo "$ac_t""yes" 1>&6
3992     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3993   cat >> confdefs.h <<EOF
3994 #define $ac_tr_hdr 1
3995 EOF
3996  
3997 else
3998   echo "$ac_t""no" 1>&6
3999 echo "Cannot find SDL headers !"; exit
4000 fi
4001 done
4002
4003         LIB_SDL="${LIB_SDL} -L/usr/X11R6/lib -lSDL"
4004       fi
4005     fi 
4006 fi
4007
4008     if test "x$withval" = "x";
4009     then
4010       for ac_hdr in SDL/SDL.h
4011 do
4012 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4013 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4014 echo "configure:4015: checking for $ac_hdr" >&5
4015 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4016   echo $ac_n "(cached) $ac_c" 1>&6
4017 else
4018   cat > conftest.$ac_ext <<EOF
4019 #line 4020 "configure"
4020 #include "confdefs.h"
4021 #include <$ac_hdr>
4022 EOF
4023 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4024 { (eval echo configure:4025: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4025 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4026 if test -z "$ac_err"; then
4027   rm -rf conftest*
4028   eval "ac_cv_header_$ac_safe=yes"
4029 else
4030   echo "$ac_err" >&5
4031   echo "configure: failed program was:" >&5
4032   cat conftest.$ac_ext >&5
4033   rm -rf conftest*
4034   eval "ac_cv_header_$ac_safe=no"
4035 fi
4036 rm -f conftest*
4037 fi
4038 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4039   echo "$ac_t""yes" 1>&6
4040     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4041   cat >> confdefs.h <<EOF
4042 #define $ac_tr_hdr 1
4043 EOF
4044  PLUGINS="${PLUGINS} sdl"
4045        LIB_SDL="${LIB_SDL} -L/usr/X11R6/lib -lSDL"
4046 else
4047   echo "$ac_t""no" 1>&6
4048 fi
4049 done
4050
4051     fi
4052
4053 # Check whether --with-directx or --without-directx was given.
4054 if test "${with_directx+set}" = set; then
4055   withval="$with_directx"
4056    if test "x$withval" != "xno";
4057     then
4058       PLUGINS="${PLUGINS} directx";
4059       if test "x$withval" != "xyes";
4060       then
4061         LIB_DIRECTX="${LIB_DIRECTX} -L"$withval"/lib -lgdi32 -ldxguid"
4062         INCLUDE="${INCLUDE} -I"$withval"/include"
4063       else
4064         for ac_hdr in directx.h
4065 do
4066 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4067 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4068 echo "configure:4069: checking for $ac_hdr" >&5
4069 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4070   echo $ac_n "(cached) $ac_c" 1>&6
4071 else
4072   cat > conftest.$ac_ext <<EOF
4073 #line 4074 "configure"
4074 #include "confdefs.h"
4075 #include <$ac_hdr>
4076 EOF
4077 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4078 { (eval echo configure:4079: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4079 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4080 if test -z "$ac_err"; then
4081   rm -rf conftest*
4082   eval "ac_cv_header_$ac_safe=yes"
4083 else
4084   echo "$ac_err" >&5
4085   echo "configure: failed program was:" >&5
4086   cat conftest.$ac_ext >&5
4087   rm -rf conftest*
4088   eval "ac_cv_header_$ac_safe=no"
4089 fi
4090 rm -f conftest*
4091 fi
4092 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4093   echo "$ac_t""yes" 1>&6
4094     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4095   cat >> confdefs.h <<EOF
4096 #define $ac_tr_hdr 1
4097 EOF
4098  
4099 else
4100   echo "$ac_t""no" 1>&6
4101 echo "Cannot find DirectX headers !"; exit
4102 fi
4103 done
4104
4105         LIB_DIRECTX="${LIB_DIRECTX} -L/usr/lib -lgdi32 -ldxguid"
4106       fi
4107     fi 
4108 fi
4109
4110     if test "x$withval" = "x";
4111     then
4112       for ac_hdr in directx.h
4113 do
4114 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4115 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4116 echo "configure:4117: checking for $ac_hdr" >&5
4117 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4118   echo $ac_n "(cached) $ac_c" 1>&6
4119 else
4120   cat > conftest.$ac_ext <<EOF
4121 #line 4122 "configure"
4122 #include "confdefs.h"
4123 #include <$ac_hdr>
4124 EOF
4125 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4126 { (eval echo configure:4127: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4127 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4128 if test -z "$ac_err"; then
4129   rm -rf conftest*
4130   eval "ac_cv_header_$ac_safe=yes"
4131 else
4132   echo "$ac_err" >&5
4133   echo "configure: failed program was:" >&5
4134   cat conftest.$ac_ext >&5
4135   rm -rf conftest*
4136   eval "ac_cv_header_$ac_safe=no"
4137 fi
4138 rm -f conftest*
4139 fi
4140 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4141   echo "$ac_t""yes" 1>&6
4142     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4143   cat >> confdefs.h <<EOF
4144 #define $ac_tr_hdr 1
4145 EOF
4146  PLUGINS="${PLUGINS} directx"
4147        LIB_DIRECTX="${LIB_DIRECTX} -L/usr/lib -lgdi32 -ldxguid"
4148 else
4149   echo "$ac_t""no" 1>&6
4150 fi
4151 done
4152
4153     fi
4154
4155 # Check whether --with-glide or --without-glide was given.
4156 if test "${with_glide+set}" = set; then
4157   withval="$with_glide"
4158    if test "x$withval" != "xno";
4159     then
4160       PLUGINS="${PLUGINS} glide";
4161       if test "x$withval" != "xyes";
4162       then
4163         LIB_GLIDE="-l"$withval" -lm"
4164       else
4165         LIB_GLIDE="-lglide2x -lm"
4166       fi
4167     fi 
4168 fi
4169
4170
4171 # Check whether --enable-ncurses or --disable-ncurses was given.
4172 if test "${enable_ncurses+set}" = set; then
4173   enableval="$enable_ncurses"
4174   if test x$enable_ncurses = xyes; then
4175      PLUGINS="${PLUGINS} ncurses"
4176      LIB_NCURSES="-lncurses"
4177    fi
4178 fi
4179
4180
4181 # Check whether --enable-qt or --disable-qt was given.
4182 if test "${enable_qt+set}" = set; then
4183   enableval="$enable_qt"
4184   if test x$enable_qt = xyes; then
4185      PLUGINS="${PLUGINS} qt"
4186      ALIASES="${ALIASES} qvlc"
4187      LIB_QT="-lqt -L${QTDIR}/lib"
4188      if test -x ${QTDIR}/bin/moc ;
4189      then
4190        MOC=${QTDIR}/bin/moc
4191      else
4192        MOC=moc
4193      fi
4194    fi
4195 fi
4196
4197
4198 # Check whether --enable-kde or --disable-kde was given.
4199 if test "${enable_kde+set}" = set; then
4200   enableval="$enable_kde"
4201   if test x$enable_kde = xyes; then PLUGINS="${PLUGINS} kde"; ALIASES="${ALIASES} kvlc"; fi
4202 fi
4203
4204
4205 # Check whether --enable-gnome or --disable-gnome was given.
4206 if test "${enable_gnome+set}" = set; then
4207   enableval="$enable_gnome"
4208   if test x$enable_gnome = xyes; then
4209      PLUGINS="${PLUGINS} gnome"
4210      ALIASES="${ALIASES} gnome-vlc"
4211      LIB_GNOME="`gnome-config --libs gnomeui | sed 's,-rdynamic,,'`"
4212    fi
4213 fi
4214
4215
4216 # Check whether --enable-gtk or --disable-gtk was given.
4217 if test "${enable_gtk+set}" = set; then
4218   enableval="$enable_gtk"
4219   :
4220 fi
4221
4222 if test x$enable_gtk != xno; then
4223   # Extract the first word of "gtk-config", so it can be a program name with args.
4224 set dummy gtk-config; ac_word=$2
4225 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4226 echo "configure:4227: checking for $ac_word" >&5
4227 if eval "test \"`echo '$''{'ac_cv_path_GTK_CONFIG'+set}'`\" = set"; then
4228   echo $ac_n "(cached) $ac_c" 1>&6
4229 else
4230   case "$GTK_CONFIG" in
4231   /*)
4232   ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a path.
4233   ;;
4234   ?:/*)                  
4235   ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a dos path.
4236   ;;
4237   *)
4238   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4239   ac_dummy="$PATH"
4240   for ac_dir in $ac_dummy; do 
4241     test -z "$ac_dir" && ac_dir=.
4242     if test -f $ac_dir/$ac_word; then
4243       ac_cv_path_GTK_CONFIG="$ac_dir/$ac_word"
4244       break
4245     fi
4246   done
4247   IFS="$ac_save_ifs"
4248   test -z "$ac_cv_path_GTK_CONFIG" && ac_cv_path_GTK_CONFIG="no"
4249   ;;
4250 esac
4251 fi
4252 GTK_CONFIG="$ac_cv_path_GTK_CONFIG"
4253 if test -n "$GTK_CONFIG"; then
4254   echo "$ac_t""$GTK_CONFIG" 1>&6
4255 else
4256   echo "$ac_t""no" 1>&6
4257 fi
4258
4259   if test x${GTK_CONFIG} != xno; then
4260     PLUGINS="${PLUGINS} gtk"
4261     ALIASES="${ALIASES} gvlc"
4262     CFLAGS_GTK="`${GTK_CONFIG} --cflags gtk`"
4263     LIB_GTK="`${GTK_CONFIG} --libs gtk | sed 's,-rdynamic,,'`"
4264   fi
4265 fi
4266
4267 # Check whether --enable-x11 or --disable-x11 was given.
4268 if test "${enable_x11+set}" = set; then
4269   enableval="$enable_x11"
4270   :
4271 fi
4272
4273 if test x$enable_x11 != xno; then
4274   if test x$x_includes = xNONE; then
4275     x_includes=/usr/X11R6/include
4276   fi
4277   if test x$x_libraries = xNONE; then
4278     x_libraries=/usr/X11R6/lib
4279   fi
4280   saved_CPPFLAGS=$CPPFLAGS
4281   CPPFLAGS="$CPPFLAGS -I$x_includes"
4282   for ac_hdr in X11/Xlib.h
4283 do
4284 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4285 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4286 echo "configure:4287: checking for $ac_hdr" >&5
4287 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4288   echo $ac_n "(cached) $ac_c" 1>&6
4289 else
4290   cat > conftest.$ac_ext <<EOF
4291 #line 4292 "configure"
4292 #include "confdefs.h"
4293 #include <$ac_hdr>
4294 EOF
4295 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4296 { (eval echo configure:4297: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4297 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4298 if test -z "$ac_err"; then
4299   rm -rf conftest*
4300   eval "ac_cv_header_$ac_safe=yes"
4301 else
4302   echo "$ac_err" >&5
4303   echo "configure: failed program was:" >&5
4304   cat conftest.$ac_ext >&5
4305   rm -rf conftest*
4306   eval "ac_cv_header_$ac_safe=no"
4307 fi
4308 rm -f conftest*
4309 fi
4310 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4311   echo "$ac_t""yes" 1>&6
4312     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4313   cat >> confdefs.h <<EOF
4314 #define $ac_tr_hdr 1
4315 EOF
4316  
4317     PLUGINS="${PLUGINS} x11"
4318     LIB_X11="-L$x_libraries -lX11 -lXext"
4319     CFLAGS_X11="-I$x_includes"
4320   
4321   CPPFLAGS=$saved_CPPFLAGS
4322 else
4323   echo "$ac_t""no" 1>&6
4324 fi
4325 done
4326
4327 fi
4328
4329 # Check whether --enable-xvideo or --disable-xvideo was given.
4330 if test "${enable_xvideo+set}" = set; then
4331   enableval="$enable_xvideo"
4332   :
4333 fi
4334
4335 if test x$enable_xvideo != xno; then
4336   if test x$x_includes = xNONE; then
4337     x_includes=/usr/X11R6/include
4338   fi
4339   if test x$x_libraries = xNONE; then
4340     x_libraries=/usr/X11R6/lib
4341   fi
4342   saved_CPPFLAGS=$CPPFLAGS
4343   CPPFLAGS="$CPPFLAGS -I$x_includes"
4344   for ac_hdr in X11/extensions/Xv.h
4345 do
4346 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4347 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4348 echo "configure:4349: checking for $ac_hdr" >&5
4349 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4350   echo $ac_n "(cached) $ac_c" 1>&6
4351 else
4352   cat > conftest.$ac_ext <<EOF
4353 #line 4354 "configure"
4354 #include "confdefs.h"
4355 #include <$ac_hdr>
4356 EOF
4357 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4358 { (eval echo configure:4359: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4359 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4360 if test -z "$ac_err"; then
4361   rm -rf conftest*
4362   eval "ac_cv_header_$ac_safe=yes"
4363 else
4364   echo "$ac_err" >&5
4365   echo "configure: failed program was:" >&5
4366   cat conftest.$ac_ext >&5
4367   rm -rf conftest*
4368   eval "ac_cv_header_$ac_safe=no"
4369 fi
4370 rm -f conftest*
4371 fi
4372 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4373   echo "$ac_t""yes" 1>&6
4374     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4375   cat >> confdefs.h <<EOF
4376 #define $ac_tr_hdr 1
4377 EOF
4378  
4379     PLUGINS="${PLUGINS} xvideo"
4380     LIB_XVIDEO="-L$x_libraries -lX11 -lXext -lXv"
4381     CFLAGS_X11="-I$x_includes"
4382   
4383   CPPFLAGS=$saved_CPPFLAGS
4384 else
4385   echo "$ac_t""no" 1>&6
4386 fi
4387 done
4388
4389 fi
4390
4391 # Check whether --enable-alsa or --disable-alsa was given.
4392 if test "${enable_alsa+set}" = set; then
4393   enableval="$enable_alsa"
4394   if test x$enable_alsa = xyes; then ac_safe=`echo "sys/asoundlib.h" | sed 'y%./+-%__p_%'`
4395 echo $ac_n "checking for sys/asoundlib.h""... $ac_c" 1>&6
4396 echo "configure:4397: checking for sys/asoundlib.h" >&5
4397 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4398   echo $ac_n "(cached) $ac_c" 1>&6
4399 else
4400   cat > conftest.$ac_ext <<EOF
4401 #line 4402 "configure"
4402 #include "confdefs.h"
4403 #include <sys/asoundlib.h>
4404 EOF
4405 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4406 { (eval echo configure:4407: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4407 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4408 if test -z "$ac_err"; then
4409   rm -rf conftest*
4410   eval "ac_cv_header_$ac_safe=yes"
4411 else
4412   echo "$ac_err" >&5
4413   echo "configure: failed program was:" >&5
4414   cat conftest.$ac_ext >&5
4415   rm -rf conftest*
4416   eval "ac_cv_header_$ac_safe=no"
4417 fi
4418 rm -f conftest*
4419 fi
4420 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4421   echo "$ac_t""yes" 1>&6
4422   echo $ac_n "checking for main in -lasound""... $ac_c" 1>&6
4423 echo "configure:4424: checking for main in -lasound" >&5
4424 ac_lib_var=`echo asound'_'main | sed 'y%./+-%__p_%'`
4425 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4426   echo $ac_n "(cached) $ac_c" 1>&6
4427 else
4428   ac_save_LIBS="$LIBS"
4429 LIBS="-lasound  $LIBS"
4430 cat > conftest.$ac_ext <<EOF
4431 #line 4432 "configure"
4432 #include "confdefs.h"
4433
4434 int main() {
4435 main()
4436 ; return 0; }
4437 EOF
4438 if { (eval echo configure:4439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4439   rm -rf conftest*
4440   eval "ac_cv_lib_$ac_lib_var=yes"
4441 else
4442   echo "configure: failed program was:" >&5
4443   cat conftest.$ac_ext >&5
4444   rm -rf conftest*
4445   eval "ac_cv_lib_$ac_lib_var=no"
4446 fi
4447 rm -f conftest*
4448 LIBS="$ac_save_LIBS"
4449
4450 fi
4451 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4452   echo "$ac_t""yes" 1>&6
4453   have_alsa="true"
4454 else
4455   echo "$ac_t""no" 1>&6
4456 have_alsa="false"
4457 fi
4458
4459 else
4460   echo "$ac_t""no" 1>&6
4461 have_alsa="false"
4462 fi
4463  if test x$have_alsa = xtrue; then
4464      PLUGINS="${PLUGINS} alsa"
4465      LIB_ALSA="-lasound"
4466    fi; fi
4467 fi
4468
4469
4470 fi
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519 trap '' 1 2 15
4520 cat > confcache <<\EOF
4521 # This file is a shell script that caches the results of configure
4522 # tests run on this system so they can be shared between configure
4523 # scripts and configure runs.  It is not useful on other systems.
4524 # If it contains results you don't want to keep, you may remove or edit it.
4525 #
4526 # By default, configure uses ./config.cache as the cache file,
4527 # creating it if it does not exist already.  You can give configure
4528 # the --cache-file=FILE option to use a different cache file; that is
4529 # what configure does when it calls configure scripts in
4530 # subdirectories, so they share the cache.
4531 # Giving --cache-file=/dev/null disables caching, for debugging configure.
4532 # config.status only pays attention to the cache file if you give it the
4533 # --recheck option to rerun configure.
4534 #
4535 EOF
4536 # The following way of writing the cache mishandles newlines in values,
4537 # but we know of no workaround that is simple, portable, and efficient.
4538 # So, don't put newlines in cache variables' values.
4539 # Ultrix sh set writes to stderr and can't be redirected directly,
4540 # and sets the high bit in the cache file unless we assign to the vars.
4541 (set) 2>&1 |
4542   case `(ac_space=' '; set | grep ac_space) 2>&1` in
4543   *ac_space=\ *)
4544     # `set' does not quote correctly, so add quotes (double-quote substitution
4545     # turns \\\\ into \\, and sed turns \\ into \).
4546     sed -n \
4547       -e "s/'/'\\\\''/g" \
4548       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
4549     ;;
4550   *)
4551     # `set' quotes correctly as required by POSIX, so do not add quotes.
4552     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
4553     ;;
4554   esac >> confcache
4555 if cmp -s $cache_file confcache; then
4556   :
4557 else
4558   if test -w $cache_file; then
4559     echo "updating cache $cache_file"
4560     cat confcache > $cache_file
4561   else
4562     echo "not updating unwritable cache $cache_file"
4563   fi
4564 fi
4565 rm -f confcache
4566
4567 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
4568
4569 test "x$prefix" = xNONE && prefix=$ac_default_prefix
4570 # Let make expand exec_prefix.
4571 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4572
4573 # Any assignment to VPATH causes Sun make to only execute
4574 # the first set of double-colon rules, so remove it if not needed.
4575 # If there is a colon in the path, we need to keep it.
4576 if test "x$srcdir" = x.; then
4577   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
4578 fi
4579
4580 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
4581
4582 DEFS=-DHAVE_CONFIG_H
4583
4584 # Without the "./", some shells look in PATH for config.status.
4585 : ${CONFIG_STATUS=./config.status}
4586
4587 echo creating $CONFIG_STATUS
4588 rm -f $CONFIG_STATUS
4589 cat > $CONFIG_STATUS <<EOF
4590 #! /bin/sh
4591 # Generated automatically by configure.
4592 # Run this file to recreate the current configuration.
4593 # This directory was configured as follows,
4594 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4595 #
4596 # $0 $ac_configure_args
4597 #
4598 # Compiler output produced by configure, useful for debugging
4599 # configure, is in ./config.log if it exists.
4600
4601 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
4602 for ac_option
4603 do
4604   case "\$ac_option" in
4605   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
4606     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
4607     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
4608   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
4609     echo "$CONFIG_STATUS generated by autoconf version 2.13"
4610     exit 0 ;;
4611   -help | --help | --hel | --he | --h)
4612     echo "\$ac_cs_usage"; exit 0 ;;
4613   *) echo "\$ac_cs_usage"; exit 1 ;;
4614   esac
4615 done
4616
4617 ac_given_srcdir=$srcdir
4618 ac_given_INSTALL="$INSTALL"
4619
4620 trap 'rm -fr `echo "Makefile.opts include/config.h include/defs.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
4621 EOF
4622 cat >> $CONFIG_STATUS <<EOF
4623
4624 # Protect against being on the right side of a sed subst in config.status.
4625 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
4626  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
4627 $ac_vpsub
4628 $extrasub
4629 s%@SHELL@%$SHELL%g
4630 s%@CFLAGS@%$CFLAGS%g
4631 s%@CPPFLAGS@%$CPPFLAGS%g
4632 s%@CXXFLAGS@%$CXXFLAGS%g
4633 s%@FFLAGS@%$FFLAGS%g
4634 s%@DEFS@%$DEFS%g
4635 s%@LDFLAGS@%$LDFLAGS%g
4636 s%@LIBS@%$LIBS%g
4637 s%@exec_prefix@%$exec_prefix%g
4638 s%@prefix@%$prefix%g
4639 s%@program_transform_name@%$program_transform_name%g
4640 s%@bindir@%$bindir%g
4641 s%@sbindir@%$sbindir%g
4642 s%@libexecdir@%$libexecdir%g
4643 s%@datadir@%$datadir%g
4644 s%@sysconfdir@%$sysconfdir%g
4645 s%@sharedstatedir@%$sharedstatedir%g
4646 s%@localstatedir@%$localstatedir%g
4647 s%@libdir@%$libdir%g
4648 s%@includedir@%$includedir%g
4649 s%@oldincludedir@%$oldincludedir%g
4650 s%@infodir@%$infodir%g
4651 s%@mandir@%$mandir%g
4652 s%@host@%$host%g
4653 s%@host_alias@%$host_alias%g
4654 s%@host_cpu@%$host_cpu%g
4655 s%@host_vendor@%$host_vendor%g
4656 s%@host_os@%$host_os%g
4657 s%@VLC_VERSION@%$VLC_VERSION%g
4658 s%@VLC_CODENAME@%$VLC_CODENAME%g
4659 s%@SET_MAKE@%$SET_MAKE%g
4660 s%@CC@%$CC%g
4661 s%@CPP@%$CPP%g
4662 s%@RANLIB@%$RANLIB%g
4663 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
4664 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
4665 s%@INSTALL_DATA@%$INSTALL_DATA%g
4666 s%@GETOPT@%$GETOPT%g
4667 s%@ESD_CONFIG@%$ESD_CONFIG%g
4668 s%@GTK_CONFIG@%$GTK_CONFIG%g
4669 s%@SYS@%$SYS%g
4670 s%@ARCH@%$ARCH%g
4671 s%@PLUGINS@%$PLUGINS%g
4672 s%@BUILTINS@%$BUILTINS%g
4673 s%@ALIASES@%$ALIASES%g
4674 s%@DEFINE@%$DEFINE%g
4675 s%@INCLUDE@%$INCLUDE%g
4676 s%@DEBUG@%$DEBUG%g
4677 s%@STATS@%$STATS%g
4678 s%@ASM@%$ASM%g
4679 s%@TRACE@%$TRACE%g
4680 s%@OPTIMS@%$OPTIMS%g
4681 s%@CSS@%$CSS%g
4682 s%@MOC@%$MOC%g
4683 s%@LCFLAGS@%$LCFLAGS%g
4684 s%@PLCFLAGS@%$PLCFLAGS%g
4685 s%@LIB@%$LIB%g
4686 s%@LIB_ALSA@%$LIB_ALSA%g
4687 s%@LIB_BEOS@%$LIB_BEOS%g
4688 s%@LIB_DARWIN@%$LIB_DARWIN%g
4689 s%@LIB_DVD@%$LIB_DVD%g
4690 s%@LIB_ESD@%$LIB_ESD%g
4691 s%@LIB_GGI@%$LIB_GGI%g
4692 s%@LIB_GLIDE@%$LIB_GLIDE%g
4693 s%@LIB_GNOME@%$LIB_GNOME%g
4694 s%@LIB_GTK@%$LIB_GTK%g
4695 s%@LIB_IDCTALTIVEC@%$LIB_IDCTALTIVEC%g
4696 s%@LIB_MACOSX@%$LIB_MACOSX%g
4697 s%@LIB_NCURSES@%$LIB_NCURSES%g
4698 s%@LIB_QT@%$LIB_QT%g
4699 s%@LIB_TS@%$LIB_TS%g
4700 s%@LIB_SDL@%$LIB_SDL%g
4701 s%@LIB_DIRECTX@%$LIB_DIRECTX%g
4702 s%@LIB_X11@%$LIB_X11%g
4703 s%@LIB_XVIDEO@%$LIB_XVIDEO%g
4704 s%@LIB_YUV@%$LIB_YUV%g
4705 s%@CFLAGS_VLC@%$CFLAGS_VLC%g
4706 s%@CFLAGS_DVD@%$CFLAGS_DVD%g
4707 s%@CFLAGS_GTK@%$CFLAGS_GTK%g
4708 s%@CFLAGS_SDL@%$CFLAGS_SDL%g
4709 s%@CFLAGS_X11@%$CFLAGS_X11%g
4710 s%@LOCAL_LIBDVDCSS@%$LOCAL_LIBDVDCSS%g
4711
4712 CEOF
4713 EOF
4714
4715 cat >> $CONFIG_STATUS <<\EOF
4716
4717 # Split the substitutions into bite-sized pieces for seds with
4718 # small command number limits, like on Digital OSF/1 and HP-UX.
4719 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
4720 ac_file=1 # Number of current file.
4721 ac_beg=1 # First line for current file.
4722 ac_end=$ac_max_sed_cmds # Line after last line for current file.
4723 ac_more_lines=:
4724 ac_sed_cmds=""
4725 while $ac_more_lines; do
4726   if test $ac_beg -gt 1; then
4727     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
4728   else
4729     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
4730   fi
4731   if test ! -s conftest.s$ac_file; then
4732     ac_more_lines=false
4733     rm -f conftest.s$ac_file
4734   else
4735     if test -z "$ac_sed_cmds"; then
4736       ac_sed_cmds="sed -f conftest.s$ac_file"
4737     else
4738       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
4739     fi
4740     ac_file=`expr $ac_file + 1`
4741     ac_beg=$ac_end
4742     ac_end=`expr $ac_end + $ac_max_sed_cmds`
4743   fi
4744 done
4745 if test -z "$ac_sed_cmds"; then
4746   ac_sed_cmds=cat
4747 fi
4748 EOF
4749
4750 cat >> $CONFIG_STATUS <<EOF
4751
4752 CONFIG_FILES=\${CONFIG_FILES-"Makefile.opts include/config.h"}
4753 EOF
4754 cat >> $CONFIG_STATUS <<\EOF
4755 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
4756   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
4757   case "$ac_file" in
4758   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
4759        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4760   *) ac_file_in="${ac_file}.in" ;;
4761   esac
4762
4763   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
4764
4765   # Remove last slash and all that follows it.  Not all systems have dirname.
4766   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4767   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4768     # The file is in a subdirectory.
4769     test ! -d "$ac_dir" && mkdir "$ac_dir"
4770     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
4771     # A "../" for each directory in $ac_dir_suffix.
4772     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
4773   else
4774     ac_dir_suffix= ac_dots=
4775   fi
4776
4777   case "$ac_given_srcdir" in
4778   .)  srcdir=.
4779       if test -z "$ac_dots"; then top_srcdir=.
4780       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
4781   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
4782   *) # Relative path.
4783     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
4784     top_srcdir="$ac_dots$ac_given_srcdir" ;;
4785   esac
4786
4787   case "$ac_given_INSTALL" in
4788   [/$]*) INSTALL="$ac_given_INSTALL" ;;
4789   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
4790   esac
4791
4792   echo creating "$ac_file"
4793   rm -f "$ac_file"
4794   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
4795   case "$ac_file" in
4796   *Makefile*) ac_comsub="1i\\
4797 # $configure_input" ;;
4798   *) ac_comsub= ;;
4799   esac
4800
4801   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
4802   sed -e "$ac_comsub
4803 s%@configure_input@%$configure_input%g
4804 s%@srcdir@%$srcdir%g
4805 s%@top_srcdir@%$top_srcdir%g
4806 s%@INSTALL@%$INSTALL%g
4807 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
4808 fi; done
4809 rm -f conftest.s*
4810
4811 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
4812 # NAME is the cpp macro being defined and VALUE is the value it is being given.
4813 #
4814 # ac_d sets the value in "#define NAME VALUE" lines.
4815 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
4816 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
4817 ac_dC='\3'
4818 ac_dD='%g'
4819 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
4820 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
4821 ac_uB='\([      ]\)%\1#\2define\3'
4822 ac_uC=' '
4823 ac_uD='\4%g'
4824 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
4825 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
4826 ac_eB='$%\1#\2define\3'
4827 ac_eC=' '
4828 ac_eD='%g'
4829
4830 if test "${CONFIG_HEADERS+set}" != set; then
4831 EOF
4832 cat >> $CONFIG_STATUS <<EOF
4833   CONFIG_HEADERS="include/defs.h"
4834 EOF
4835 cat >> $CONFIG_STATUS <<\EOF
4836 fi
4837 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
4838   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
4839   case "$ac_file" in
4840   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
4841        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4842   *) ac_file_in="${ac_file}.in" ;;
4843   esac
4844
4845   echo creating $ac_file
4846
4847   rm -f conftest.frag conftest.in conftest.out
4848   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
4849   cat $ac_file_inputs > conftest.in
4850
4851 EOF
4852
4853 # Transform confdefs.h into a sed script conftest.vals that substitutes
4854 # the proper values into config.h.in to produce config.h.  And first:
4855 # Protect against being on the right side of a sed subst in config.status.
4856 # Protect against being in an unquoted here document in config.status.
4857 rm -f conftest.vals
4858 cat > conftest.hdr <<\EOF
4859 s/[\\&%]/\\&/g
4860 s%[\\$`]%\\&%g
4861 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
4862 s%ac_d%ac_u%gp
4863 s%ac_u%ac_e%gp
4864 EOF
4865 sed -n -f conftest.hdr confdefs.h > conftest.vals
4866 rm -f conftest.hdr
4867
4868 # This sed command replaces #undef with comments.  This is necessary, for
4869 # example, in the case of _POSIX_SOURCE, which is predefined and required
4870 # on some systems where configure will not decide to define it.
4871 cat >> conftest.vals <<\EOF
4872 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
4873 EOF
4874
4875 # Break up conftest.vals because some shells have a limit on
4876 # the size of here documents, and old seds have small limits too.
4877
4878 rm -f conftest.tail
4879 while :
4880 do
4881   ac_lines=`grep -c . conftest.vals`
4882   # grep -c gives empty output for an empty file on some AIX systems.
4883   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
4884   # Write a limited-size here document to conftest.frag.
4885   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
4886   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
4887   echo 'CEOF
4888   sed -f conftest.frag conftest.in > conftest.out
4889   rm -f conftest.in
4890   mv conftest.out conftest.in
4891 ' >> $CONFIG_STATUS
4892   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
4893   rm -f conftest.vals
4894   mv conftest.tail conftest.vals
4895 done
4896 rm -f conftest.vals
4897
4898 cat >> $CONFIG_STATUS <<\EOF
4899   rm -f conftest.frag conftest.h
4900   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
4901   cat conftest.in >> conftest.h
4902   rm -f conftest.in
4903   if cmp -s $ac_file conftest.h 2>/dev/null; then
4904     echo "$ac_file is unchanged"
4905     rm -f conftest.h
4906   else
4907     # Remove last slash and all that follows it.  Not all systems have dirname.
4908       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4909       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4910       # The file is in a subdirectory.
4911       test ! -d "$ac_dir" && mkdir "$ac_dir"
4912     fi
4913     rm -f $ac_file
4914     mv conftest.h $ac_file
4915   fi
4916 fi; done
4917
4918 EOF
4919 cat >> $CONFIG_STATUS <<EOF
4920
4921 EOF
4922 cat >> $CONFIG_STATUS <<\EOF
4923
4924 exit 0
4925 EOF
4926 chmod +x $CONFIG_STATUS
4927 rm -fr confdefs* $ac_clean_files
4928 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
4929
4930
4931 echo "
4932 global configuration
4933 --------------------
4934 system                : ${SYS}
4935 architecture          : ${ARCH}
4936 optimizations         : ${OPTIMS}
4937 inline assembly       : ${ASM}
4938
4939 vlc configuration
4940 -----------------
4941 vlc version           : ${VLC_VERSION}
4942 debug mode            : ${DEBUG}
4943 statistics            : ${STATS}
4944 trace mode            : ${TRACE}
4945 need builtin getopt   : ${GETOPT}
4946 built-in modules      :${BUILTINS}
4947 plugin modules        :${PLUGINS}
4948 vlc aliases           :${ALIASES}
4949
4950 libdvdcss configuration
4951 -----------------------
4952 CSS decryption        : ${CSS}
4953
4954 You may now tune Makefile.opts at your convenience. To build vlc, type
4955 \`make vlc'. To build libdvdcss only, type \`make libdvdcss'."
4956