]> git.sesse.net Git - vlc/blob - configure
* DirectX enhancements by Gildas Bazin, such as software rendering.
[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 for ac_hdr in sys/ioctl.h
3380 do
3381 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3382 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3383 echo "configure:3384: checking for $ac_hdr" >&5
3384 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3385   echo $ac_n "(cached) $ac_c" 1>&6
3386 else
3387   cat > conftest.$ac_ext <<EOF
3388 #line 3389 "configure"
3389 #include "confdefs.h"
3390 #include <$ac_hdr>
3391 EOF
3392 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3393 { (eval echo configure:3394: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3394 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3395 if test -z "$ac_err"; then
3396   rm -rf conftest*
3397   eval "ac_cv_header_$ac_safe=yes"
3398 else
3399   echo "$ac_err" >&5
3400   echo "configure: failed program was:" >&5
3401   cat conftest.$ac_ext >&5
3402   rm -rf conftest*
3403   eval "ac_cv_header_$ac_safe=no"
3404 fi
3405 rm -f conftest*
3406 fi
3407 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3408   echo "$ac_t""yes" 1>&6
3409     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3410   cat >> confdefs.h <<EOF
3411 #define $ac_tr_hdr 1
3412 EOF
3413  
3414   LIBDVDCSS=1
3415   for ac_hdr in sys/cdio.h sys/dvdio.h linux/cdrom.h
3416 do
3417 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3418 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3419 echo "configure:3420: checking for $ac_hdr" >&5
3420 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3421   echo $ac_n "(cached) $ac_c" 1>&6
3422 else
3423   cat > conftest.$ac_ext <<EOF
3424 #line 3425 "configure"
3425 #include "confdefs.h"
3426 #include <$ac_hdr>
3427 EOF
3428 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3429 { (eval echo configure:3430: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3430 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3431 if test -z "$ac_err"; then
3432   rm -rf conftest*
3433   eval "ac_cv_header_$ac_safe=yes"
3434 else
3435   echo "$ac_err" >&5
3436   echo "configure: failed program was:" >&5
3437   cat conftest.$ac_ext >&5
3438   rm -rf conftest*
3439   eval "ac_cv_header_$ac_safe=no"
3440 fi
3441 rm -f conftest*
3442 fi
3443 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3444   echo "$ac_t""yes" 1>&6
3445     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3446   cat >> confdefs.h <<EOF
3447 #define $ac_tr_hdr 1
3448 EOF
3449  
3450 else
3451   echo "$ac_t""no" 1>&6
3452 fi
3453 done
3454
3455   BSD_DVD_STRUCT=0
3456         cat > conftest.$ac_ext <<EOF
3457 #line 3458 "configure"
3458 #include "confdefs.h"
3459 #include <sys/dvdio.h>
3460 EOF
3461 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3462   egrep "dvd_struct" >/dev/null 2>&1; then
3463   rm -rf conftest*
3464   
3465     cat >> confdefs.h <<\EOF
3466 #define DVD_STRUCT_IN_SYS_DVDIO_H 1
3467 EOF
3468
3469     BSD_DVD_STRUCT=1
3470   
3471 fi
3472 rm -f conftest*
3473
3474         cat > conftest.$ac_ext <<EOF
3475 #line 3476 "configure"
3476 #include "confdefs.h"
3477 #include <sys/cdio.h>
3478 EOF
3479 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3480   egrep "dvd_struct" >/dev/null 2>&1; then
3481   rm -rf conftest*
3482   
3483     cat >> confdefs.h <<\EOF
3484 #define DVD_STRUCT_IN_SYS_CDIO_H 1
3485 EOF
3486
3487     BSD_DVD_STRUCT=1
3488   
3489 fi
3490 rm -f conftest*
3491
3492   if test x$BSD_DVD_STRUCT = x1; then
3493     cat >> confdefs.h <<\EOF
3494 #define HAVE_BSD_DVD_STRUCT 1
3495 EOF
3496
3497   fi
3498         cat > conftest.$ac_ext <<EOF
3499 #line 3500 "configure"
3500 #include "confdefs.h"
3501 #include <linux/cdrom.h>
3502 EOF
3503 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3504   egrep "dvd_struct" >/dev/null 2>&1; then
3505   rm -rf conftest*
3506   
3507     cat >> confdefs.h <<\EOF
3508 #define DVD_STRUCT_IN_LINUX_CDROM_H 1
3509 EOF
3510
3511   
3512 fi
3513 rm -f conftest*
3514
3515
3516 else
3517   echo "$ac_t""no" 1>&6
3518 fi
3519 done
3520
3521
3522 # Check whether --enable-pth or --disable-pth was given.
3523 if test "${enable_pth+set}" = set; then
3524   enableval="$enable_pth"
3525    if test x$enableval = xyes; then
3526     echo $ac_n "checking for pth_init in -lpth""... $ac_c" 1>&6
3527 echo "configure:3528: checking for pth_init in -lpth" >&5
3528 ac_lib_var=`echo pth'_'pth_init | sed 'y%./+-%__p_%'`
3529 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3530   echo $ac_n "(cached) $ac_c" 1>&6
3531 else
3532   ac_save_LIBS="$LIBS"
3533 LIBS="-lpth  $LIBS"
3534 cat > conftest.$ac_ext <<EOF
3535 #line 3536 "configure"
3536 #include "confdefs.h"
3537 /* Override any gcc2 internal prototype to avoid an error.  */
3538 /* We use char because int might match the return type of a gcc2
3539     builtin and then its argument prototype would still apply.  */
3540 char pth_init();
3541
3542 int main() {
3543 pth_init()
3544 ; return 0; }
3545 EOF
3546 if { (eval echo configure:3547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3547   rm -rf conftest*
3548   eval "ac_cv_lib_$ac_lib_var=yes"
3549 else
3550   echo "configure: failed program was:" >&5
3551   cat conftest.$ac_ext >&5
3552   rm -rf conftest*
3553   eval "ac_cv_lib_$ac_lib_var=no"
3554 fi
3555 rm -f conftest*
3556 LIBS="$ac_save_LIBS"
3557
3558 fi
3559 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3560   echo "$ac_t""yes" 1>&6
3561     ac_tr_lib=HAVE_LIB`echo pth | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3562     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3563   cat >> confdefs.h <<EOF
3564 #define $ac_tr_lib 1
3565 EOF
3566
3567   LIBS="-lpth $LIBS"
3568
3569 else
3570   echo "$ac_t""no" 1>&6
3571 fi
3572
3573     cat > conftest.$ac_ext <<EOF
3574 #line 3575 "configure"
3575 #include "confdefs.h"
3576 #include <pth.h>
3577 EOF
3578 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3579   egrep "pth_init" >/dev/null 2>&1; then
3580   rm -rf conftest*
3581   
3582       cat >> confdefs.h <<\EOF
3583 #define PTH_INIT_IN_PTH_H 1
3584 EOF
3585
3586     THREAD_LIB="-lpth"
3587     fi
3588 fi
3589 rm -f conftest*
3590
3591
3592 fi
3593
3594
3595 LIB="${LIB} ${THREAD_LIB}"
3596
3597 # Check whether --enable-ppro or --disable-ppro was given.
3598 if test "${enable_ppro+set}" = set; then
3599   enableval="$enable_ppro"
3600    if test x$enableval = xyes; then ARCH="${ARCH} ppro"; fi 
3601 else
3602    if test x${host_cpu} = xi686; then ARCH="${ARCH} ppro"; fi 
3603 fi
3604
3605
3606 # Check whether --enable-mmx or --disable-mmx was given.
3607 if test "${enable_mmx+set}" = set; then
3608   enableval="$enable_mmx"
3609    if test x$enableval = xyes; then ARCH="${ARCH} mmx";
3610   BUILTINS="${BUILTINS} ${ACCEL_MODULES}"; fi 
3611 else
3612    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";
3613   BUILTINS="${BUILTINS} ${ACCEL_MODULES}"; fi 
3614 fi
3615
3616
3617 # Check whether --enable-altivec or --disable-altivec was given.
3618 if test "${enable_altivec+set}" = set; then
3619   enableval="$enable_altivec"
3620    if test x$enableval = xyes; then ARCH="${ARCH} altivec";
3621     BUILTINS="${BUILTINS} idctaltivec"
3622     LIB_IDCTALTIVEC="-framework vecLib"
3623   fi 
3624 fi
3625
3626 #[ if test -d /System/Library/Frameworks/vecLib.framework; then ARCH="${ARCH} altivec"; PLUGINS="${PLUGINS} idctaltivec"; fi ])
3627
3628 # Check whether --enable-css or --disable-css was given.
3629 if test "${enable_css+set}" = set; then
3630   enableval="$enable_css"
3631    if test x$enableval = xyes; then CSS=1; else CSS=0; fi 
3632 else
3633    CSS=1; 
3634 fi
3635
3636 if test x${CSS} = x1; then cat >> confdefs.h <<\EOF
3637 #define HAVE_CSS 1
3638 EOF
3639  fi
3640
3641 # Check whether --enable-debug or --disable-debug was given.
3642 if test "${enable_debug+set}" = set; then
3643   enableval="$enable_debug"
3644    if test x$enableval = xyes; then DEBUG=1; fi 
3645 fi
3646
3647
3648 # Check whether --enable-stats or --disable-stats was given.
3649 if test "${enable_stats+set}" = set; then
3650   enableval="$enable_stats"
3651    if test x$enableval = xyes; then STATS=1; fi 
3652 fi
3653
3654
3655 # Check whether --enable-trace or --disable-trace was given.
3656 if test "${enable_trace+set}" = set; then
3657   enableval="$enable_trace"
3658    if test x$enableval = xyes; then TRACE=1; fi 
3659 fi
3660
3661
3662 # Check whether --enable-optimizations or --disable-optimizations was given.
3663 if test "${enable_optimizations+set}" = set; then
3664   enableval="$enable_optimizations"
3665    if test x$enableval = xno; then OPTIMS=0; fi 
3666 else
3667    OPTIMS=1 
3668 fi
3669
3670
3671 for ac_hdr in videolan/dvdcss.h
3672 do
3673 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3674 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3675 echo "configure:3676: checking for $ac_hdr" >&5
3676 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3677   echo $ac_n "(cached) $ac_c" 1>&6
3678 else
3679   cat > conftest.$ac_ext <<EOF
3680 #line 3681 "configure"
3681 #include "confdefs.h"
3682 #include <$ac_hdr>
3683 EOF
3684 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3685 { (eval echo configure:3686: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3686 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3687 if test -z "$ac_err"; then
3688   rm -rf conftest*
3689   eval "ac_cv_header_$ac_safe=yes"
3690 else
3691   echo "$ac_err" >&5
3692   echo "configure: failed program was:" >&5
3693   cat conftest.$ac_ext >&5
3694   rm -rf conftest*
3695   eval "ac_cv_header_$ac_safe=no"
3696 fi
3697 rm -f conftest*
3698 fi
3699 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3700   echo "$ac_t""yes" 1>&6
3701     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3702   cat >> confdefs.h <<EOF
3703 #define $ac_tr_hdr 1
3704 EOF
3705  
3706   # installed libdvdcss
3707   BUILTINS="${BUILTINS} dvd"
3708   LIB_DVD="${LIB_DVD} -ldvdcss"
3709 else
3710   echo "$ac_t""no" 1>&6
3711 if test x${LIBDVDCSS} = x1; then
3712     # local libdvdcss
3713     LOCAL_LIBDVDCSS=1
3714     BUILTINS="${BUILTINS} dvd"
3715     CFLAGS_DVD="${CFLAGS_DVD} -I../../extras/libdvdcss"
3716   fi
3717 fi
3718 done
3719
3720
3721 # Check whether --enable-dummy or --disable-dummy was given.
3722 if test "${enable_dummy+set}" = set; then
3723   enableval="$enable_dummy"
3724   :
3725 fi
3726
3727 if test x$enable_dummy != xno; then
3728   BUILTINS="${BUILTINS} dummy"; fi
3729
3730 # Check whether --enable-null or --disable-null was given.
3731 if test "${enable_null+set}" = set; then
3732   enableval="$enable_null"
3733   :
3734 fi
3735
3736 if test x$enable_null != xno; then
3737   BUILTINS="${BUILTINS} null"; fi
3738
3739 # Check whether --enable-rc or --disable-rc was given.
3740 if test "${enable_rc+set}" = set; then
3741   enableval="$enable_rc"
3742   :
3743 fi
3744
3745 if test x$enable_rc != xno; then
3746   BUILTINS="${BUILTINS} rc"; fi
3747
3748 SYS=${host_os}
3749
3750 if test x$host_os = xbeos; then
3751     BUILTINS="${BUILTINS} beos"
3752     LIB_BEOS="-lbe -lgame -lroot -ltracker"
3753     PLCFLAGS="${PLCFLAGS} -nostart"
3754
3755 else
3756
3757 # Check whether --enable-dsp or --disable-dsp was given.
3758 if test "${enable_dsp+set}" = set; then
3759   enableval="$enable_dsp"
3760   :
3761 fi
3762
3763 if test x$enable_dsp != xno; then
3764   if test -c /dev/dsp; then
3765     PLUGINS="${PLUGINS} dsp"
3766   fi
3767 fi
3768
3769 # Check whether --enable-esd or --disable-esd was given.
3770 if test "${enable_esd+set}" = set; then
3771   enableval="$enable_esd"
3772   if test x$enable_esd = xyes; then
3773      # Extract the first word of "esd-config", so it can be a program name with args.
3774 set dummy esd-config; ac_word=$2
3775 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3776 echo "configure:3777: checking for $ac_word" >&5
3777 if eval "test \"`echo '$''{'ac_cv_path_ESD_CONFIG'+set}'`\" = set"; then
3778   echo $ac_n "(cached) $ac_c" 1>&6
3779 else
3780   case "$ESD_CONFIG" in
3781   /*)
3782   ac_cv_path_ESD_CONFIG="$ESD_CONFIG" # Let the user override the test with a path.
3783   ;;
3784   ?:/*)                  
3785   ac_cv_path_ESD_CONFIG="$ESD_CONFIG" # Let the user override the test with a dos path.
3786   ;;
3787   *)
3788   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3789   ac_dummy="$PATH"
3790   for ac_dir in $ac_dummy; do 
3791     test -z "$ac_dir" && ac_dir=.
3792     if test -f $ac_dir/$ac_word; then
3793       ac_cv_path_ESD_CONFIG="$ac_dir/$ac_word"
3794       break
3795     fi
3796   done
3797   IFS="$ac_save_ifs"
3798   test -z "$ac_cv_path_ESD_CONFIG" && ac_cv_path_ESD_CONFIG="no"
3799   ;;
3800 esac
3801 fi
3802 ESD_CONFIG="$ac_cv_path_ESD_CONFIG"
3803 if test -n "$ESD_CONFIG"; then
3804   echo "$ac_t""$ESD_CONFIG" 1>&6
3805 else
3806   echo "$ac_t""no" 1>&6
3807 fi
3808
3809      if test x${ESD_CONFIG} != xno; then
3810        PLUGINS="${PLUGINS} esd"
3811        LIB_ESD="`${ESD_CONFIG} --libs`"
3812      fi
3813    fi
3814 fi
3815
3816
3817 # Check whether --enable-darwin or --disable-darwin was given.
3818 if test "${enable_darwin+set}" = set; then
3819   enableval="$enable_darwin"
3820   if test x$enable_darwin = xyes; then
3821      PLUGINS="${PLUGINS} darwin"
3822      LIB_DARWIN="-framework CoreAudio"
3823    fi
3824 fi
3825
3826
3827 # Check whether --enable-macosx or --disable-macosx was given.
3828 if test "${enable_macosx+set}" = set; then
3829   enableval="$enable_macosx"
3830   if test x$enable_macosx = xyes; then
3831      BUILTINS="${BUILTINS} macosx"
3832      LIB_MACOSX="-framework CoreAudio -framework Carbon -framework AGL"
3833      LIB_TS="${LIB_TS} -framework AGL -framework Carbon"
3834      LIB_SDL="${LIB_SDL} -framework AGL -framework Carbon"
3835    fi
3836 else
3837   for ac_hdr in Carbon/Carbon.h
3838 do
3839 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3840 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3841 echo "configure:3842: checking for $ac_hdr" >&5
3842 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3843   echo $ac_n "(cached) $ac_c" 1>&6
3844 else
3845   cat > conftest.$ac_ext <<EOF
3846 #line 3847 "configure"
3847 #include "confdefs.h"
3848 #include <$ac_hdr>
3849 EOF
3850 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3851 { (eval echo configure:3852: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3852 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3853 if test -z "$ac_err"; then
3854   rm -rf conftest*
3855   eval "ac_cv_header_$ac_safe=yes"
3856 else
3857   echo "$ac_err" >&5
3858   echo "configure: failed program was:" >&5
3859   cat conftest.$ac_ext >&5
3860   rm -rf conftest*
3861   eval "ac_cv_header_$ac_safe=no"
3862 fi
3863 rm -f conftest*
3864 fi
3865 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3866   echo "$ac_t""yes" 1>&6
3867     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3868   cat >> confdefs.h <<EOF
3869 #define $ac_tr_hdr 1
3870 EOF
3871  BUILTINS="${BUILTINS} macosx"
3872      LIB_MACOSX="-framework CoreAudio -framework Carbon -framework AGL"
3873      LIB_TS="${LIB_TS} -framework AGL -framework Carbon"
3874      LIB_SDL="${LIB_SDL} -framework AGL -framework Carbon"
3875    
3876 else
3877   echo "$ac_t""no" 1>&6
3878 fi
3879 done
3880
3881 fi
3882
3883
3884 # Check whether --enable-fb or --disable-fb was given.
3885 if test "${enable_fb+set}" = set; then
3886   enableval="$enable_fb"
3887   if test x$enable_fb = xyes; then PLUGINS="${PLUGINS} fb"; fi
3888 fi
3889
3890
3891 # Check whether --with-ggi or --without-ggi was given.
3892 if test "${with_ggi+set}" = set; then
3893   withval="$with_ggi"
3894    if test "x$withval" != "xno";
3895     then
3896       PLUGINS="${PLUGINS} ggi";
3897       if test "x$withval" != "xyes";
3898       then
3899         LIB_GGI="-l"$withval
3900       else
3901         LIB_GGI="-lggi"
3902       fi
3903     fi 
3904 fi
3905
3906
3907 # Check whether --with-sdl or --without-sdl was given.
3908 if test "${with_sdl+set}" = set; then
3909   withval="$with_sdl"
3910    if test "x$withval" != "xno";
3911     then
3912       PLUGINS="${PLUGINS} sdl";
3913       if test "x$withval" != "xyes";
3914       then
3915         LIB_SDL="${LIB_SDL} -L/usr/X11R6/lib -L"$withval"/lib -lSDL"
3916         CFLAGS_SDL="-I"$withval"/include"
3917       else
3918         for ac_hdr in SDL/SDL.h
3919 do
3920 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3921 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3922 echo "configure:3923: checking for $ac_hdr" >&5
3923 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3924   echo $ac_n "(cached) $ac_c" 1>&6
3925 else
3926   cat > conftest.$ac_ext <<EOF
3927 #line 3928 "configure"
3928 #include "confdefs.h"
3929 #include <$ac_hdr>
3930 EOF
3931 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3932 { (eval echo configure:3933: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3933 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3934 if test -z "$ac_err"; then
3935   rm -rf conftest*
3936   eval "ac_cv_header_$ac_safe=yes"
3937 else
3938   echo "$ac_err" >&5
3939   echo "configure: failed program was:" >&5
3940   cat conftest.$ac_ext >&5
3941   rm -rf conftest*
3942   eval "ac_cv_header_$ac_safe=no"
3943 fi
3944 rm -f conftest*
3945 fi
3946 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3947   echo "$ac_t""yes" 1>&6
3948     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3949   cat >> confdefs.h <<EOF
3950 #define $ac_tr_hdr 1
3951 EOF
3952  
3953 else
3954   echo "$ac_t""no" 1>&6
3955 echo "Cannot find SDL headers !"; exit
3956 fi
3957 done
3958
3959         LIB_SDL="${LIB_SDL} -L/usr/X11R6/lib -lSDL"
3960       fi
3961     fi 
3962 fi
3963
3964     if test "x$withval" = "x";
3965     then
3966       for ac_hdr in SDL/SDL.h
3967 do
3968 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3969 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3970 echo "configure:3971: checking for $ac_hdr" >&5
3971 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3972   echo $ac_n "(cached) $ac_c" 1>&6
3973 else
3974   cat > conftest.$ac_ext <<EOF
3975 #line 3976 "configure"
3976 #include "confdefs.h"
3977 #include <$ac_hdr>
3978 EOF
3979 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3980 { (eval echo configure:3981: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3981 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3982 if test -z "$ac_err"; then
3983   rm -rf conftest*
3984   eval "ac_cv_header_$ac_safe=yes"
3985 else
3986   echo "$ac_err" >&5
3987   echo "configure: failed program was:" >&5
3988   cat conftest.$ac_ext >&5
3989   rm -rf conftest*
3990   eval "ac_cv_header_$ac_safe=no"
3991 fi
3992 rm -f conftest*
3993 fi
3994 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3995   echo "$ac_t""yes" 1>&6
3996     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3997   cat >> confdefs.h <<EOF
3998 #define $ac_tr_hdr 1
3999 EOF
4000  PLUGINS="${PLUGINS} sdl"
4001        LIB_SDL="${LIB_SDL} -L/usr/X11R6/lib -lSDL"
4002 else
4003   echo "$ac_t""no" 1>&6
4004 fi
4005 done
4006
4007     fi
4008
4009 # Check whether --with-directx or --without-directx was given.
4010 if test "${with_directx+set}" = set; then
4011   withval="$with_directx"
4012    if test "x$withval" != "xno";
4013     then
4014       PLUGINS="${PLUGINS} directx";
4015       if test "x$withval" != "xyes";
4016       then
4017         LIB_DIRECTX="${LIB_DIRECTX} -L"$withval"/lib -lgdi32 -ldxguid"
4018         INCLUDE="${INCLUDE} -I"$withval"/include"
4019       else
4020         for ac_hdr in directx.h
4021 do
4022 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4023 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4024 echo "configure:4025: checking for $ac_hdr" >&5
4025 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4026   echo $ac_n "(cached) $ac_c" 1>&6
4027 else
4028   cat > conftest.$ac_ext <<EOF
4029 #line 4030 "configure"
4030 #include "confdefs.h"
4031 #include <$ac_hdr>
4032 EOF
4033 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4034 { (eval echo configure:4035: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4035 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4036 if test -z "$ac_err"; then
4037   rm -rf conftest*
4038   eval "ac_cv_header_$ac_safe=yes"
4039 else
4040   echo "$ac_err" >&5
4041   echo "configure: failed program was:" >&5
4042   cat conftest.$ac_ext >&5
4043   rm -rf conftest*
4044   eval "ac_cv_header_$ac_safe=no"
4045 fi
4046 rm -f conftest*
4047 fi
4048 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4049   echo "$ac_t""yes" 1>&6
4050     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4051   cat >> confdefs.h <<EOF
4052 #define $ac_tr_hdr 1
4053 EOF
4054  
4055 else
4056   echo "$ac_t""no" 1>&6
4057 echo "Cannot find DirectX headers !"; exit
4058 fi
4059 done
4060
4061         LIB_DIRECTX="${LIB_DIRECTX} -L/usr/lib -lgdi32 -ldxguid"
4062       fi
4063     fi 
4064 fi
4065
4066     if test "x$withval" = "x";
4067     then
4068       for ac_hdr in directx.h
4069 do
4070 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4071 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4072 echo "configure:4073: checking for $ac_hdr" >&5
4073 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4074   echo $ac_n "(cached) $ac_c" 1>&6
4075 else
4076   cat > conftest.$ac_ext <<EOF
4077 #line 4078 "configure"
4078 #include "confdefs.h"
4079 #include <$ac_hdr>
4080 EOF
4081 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4082 { (eval echo configure:4083: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4083 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4084 if test -z "$ac_err"; then
4085   rm -rf conftest*
4086   eval "ac_cv_header_$ac_safe=yes"
4087 else
4088   echo "$ac_err" >&5
4089   echo "configure: failed program was:" >&5
4090   cat conftest.$ac_ext >&5
4091   rm -rf conftest*
4092   eval "ac_cv_header_$ac_safe=no"
4093 fi
4094 rm -f conftest*
4095 fi
4096 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4097   echo "$ac_t""yes" 1>&6
4098     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4099   cat >> confdefs.h <<EOF
4100 #define $ac_tr_hdr 1
4101 EOF
4102  PLUGINS="${PLUGINS} directx"
4103        LIB_DIRECTX="${LIB_DIRECTX} -L/usr/lib -lgdi32 -ldxguid"
4104 else
4105   echo "$ac_t""no" 1>&6
4106 fi
4107 done
4108
4109     fi
4110
4111 # Check whether --with-glide or --without-glide was given.
4112 if test "${with_glide+set}" = set; then
4113   withval="$with_glide"
4114    if test "x$withval" != "xno";
4115     then
4116       PLUGINS="${PLUGINS} glide";
4117       if test "x$withval" != "xyes";
4118       then
4119         LIB_GLIDE="-l"$withval" -lm"
4120       else
4121         LIB_GLIDE="-lglide2x -lm"
4122       fi
4123     fi 
4124 fi
4125
4126
4127 # Check whether --enable-ncurses or --disable-ncurses was given.
4128 if test "${enable_ncurses+set}" = set; then
4129   enableval="$enable_ncurses"
4130   if test x$enable_ncurses = xyes; then
4131      PLUGINS="${PLUGINS} ncurses"
4132      LIB_NCURSES="-lncurses"
4133    fi
4134 fi
4135
4136
4137 # Check whether --enable-qt or --disable-qt was given.
4138 if test "${enable_qt+set}" = set; then
4139   enableval="$enable_qt"
4140   if test x$enable_qt = xyes; then
4141      PLUGINS="${PLUGINS} qt"
4142      ALIASES="${ALIASES} qvlc"
4143      LIB_QT="-lqt -L${QTDIR}/lib"
4144      if test -x ${QTDIR}/bin/moc ;
4145      then
4146        MOC=${QTDIR}/bin/moc
4147      else
4148        MOC=moc
4149      fi
4150    fi
4151 fi
4152
4153
4154 # Check whether --enable-kde or --disable-kde was given.
4155 if test "${enable_kde+set}" = set; then
4156   enableval="$enable_kde"
4157   if test x$enable_kde = xyes; then PLUGINS="${PLUGINS} kde"; ALIASES="${ALIASES} kvlc"; fi
4158 fi
4159
4160
4161 # Check whether --enable-gnome or --disable-gnome was given.
4162 if test "${enable_gnome+set}" = set; then
4163   enableval="$enable_gnome"
4164   if test x$enable_gnome = xyes; then
4165      PLUGINS="${PLUGINS} gnome"
4166      ALIASES="${ALIASES} gnome-vlc"
4167      LIB_GNOME="`gnome-config --libs gnomeui | sed 's,-rdynamic,,'`"
4168    fi
4169 fi
4170
4171
4172 # Check whether --enable-gtk or --disable-gtk was given.
4173 if test "${enable_gtk+set}" = set; then
4174   enableval="$enable_gtk"
4175   :
4176 fi
4177
4178 if test x$enable_gtk != xno; then
4179   # Extract the first word of "gtk-config", so it can be a program name with args.
4180 set dummy gtk-config; ac_word=$2
4181 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4182 echo "configure:4183: checking for $ac_word" >&5
4183 if eval "test \"`echo '$''{'ac_cv_path_GTK_CONFIG'+set}'`\" = set"; then
4184   echo $ac_n "(cached) $ac_c" 1>&6
4185 else
4186   case "$GTK_CONFIG" in
4187   /*)
4188   ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a path.
4189   ;;
4190   ?:/*)                  
4191   ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a dos path.
4192   ;;
4193   *)
4194   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4195   ac_dummy="$PATH"
4196   for ac_dir in $ac_dummy; do 
4197     test -z "$ac_dir" && ac_dir=.
4198     if test -f $ac_dir/$ac_word; then
4199       ac_cv_path_GTK_CONFIG="$ac_dir/$ac_word"
4200       break
4201     fi
4202   done
4203   IFS="$ac_save_ifs"
4204   test -z "$ac_cv_path_GTK_CONFIG" && ac_cv_path_GTK_CONFIG="no"
4205   ;;
4206 esac
4207 fi
4208 GTK_CONFIG="$ac_cv_path_GTK_CONFIG"
4209 if test -n "$GTK_CONFIG"; then
4210   echo "$ac_t""$GTK_CONFIG" 1>&6
4211 else
4212   echo "$ac_t""no" 1>&6
4213 fi
4214
4215   if test x${GTK_CONFIG} != xno; then
4216     PLUGINS="${PLUGINS} gtk"
4217     ALIASES="${ALIASES} gvlc"
4218     CFLAGS_GTK="`${GTK_CONFIG} --cflags gtk`"
4219     LIB_GTK="`${GTK_CONFIG} --libs gtk | sed 's,-rdynamic,,'`"
4220   fi
4221 fi
4222
4223 # Check whether --enable-x11 or --disable-x11 was given.
4224 if test "${enable_x11+set}" = set; then
4225   enableval="$enable_x11"
4226   :
4227 fi
4228
4229 if test x$enable_x11 != xno; then
4230   if test x$x_includes = xNONE; then
4231     x_includes=/usr/X11R6/include
4232   fi
4233   if test x$x_libraries = xNONE; then
4234     x_libraries=/usr/X11R6/lib
4235   fi
4236   saved_CPPFLAGS=$CPPFLAGS
4237   CPPFLAGS="$CPPFLAGS -I$x_includes"
4238   for ac_hdr in X11/Xlib.h
4239 do
4240 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4241 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4242 echo "configure:4243: checking for $ac_hdr" >&5
4243 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4244   echo $ac_n "(cached) $ac_c" 1>&6
4245 else
4246   cat > conftest.$ac_ext <<EOF
4247 #line 4248 "configure"
4248 #include "confdefs.h"
4249 #include <$ac_hdr>
4250 EOF
4251 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4252 { (eval echo configure:4253: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4253 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4254 if test -z "$ac_err"; then
4255   rm -rf conftest*
4256   eval "ac_cv_header_$ac_safe=yes"
4257 else
4258   echo "$ac_err" >&5
4259   echo "configure: failed program was:" >&5
4260   cat conftest.$ac_ext >&5
4261   rm -rf conftest*
4262   eval "ac_cv_header_$ac_safe=no"
4263 fi
4264 rm -f conftest*
4265 fi
4266 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4267   echo "$ac_t""yes" 1>&6
4268     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4269   cat >> confdefs.h <<EOF
4270 #define $ac_tr_hdr 1
4271 EOF
4272  
4273     PLUGINS="${PLUGINS} x11"
4274     LIB_X11="-L$x_libraries -lX11 -lXext"
4275     CFLAGS_X11="-I$x_includes"
4276   
4277   CPPFLAGS=$saved_CPPFLAGS
4278 else
4279   echo "$ac_t""no" 1>&6
4280 fi
4281 done
4282
4283 fi
4284
4285 # Check whether --enable-xvideo or --disable-xvideo was given.
4286 if test "${enable_xvideo+set}" = set; then
4287   enableval="$enable_xvideo"
4288   :
4289 fi
4290
4291 if test x$enable_xvideo != xno; then
4292   if test x$x_includes = xNONE; then
4293     x_includes=/usr/X11R6/include
4294   fi
4295   if test x$x_libraries = xNONE; then
4296     x_libraries=/usr/X11R6/lib
4297   fi
4298   saved_CPPFLAGS=$CPPFLAGS
4299   CPPFLAGS="$CPPFLAGS -I$x_includes"
4300   for ac_hdr in X11/extensions/Xv.h
4301 do
4302 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4303 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4304 echo "configure:4305: checking for $ac_hdr" >&5
4305 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4306   echo $ac_n "(cached) $ac_c" 1>&6
4307 else
4308   cat > conftest.$ac_ext <<EOF
4309 #line 4310 "configure"
4310 #include "confdefs.h"
4311 #include <$ac_hdr>
4312 EOF
4313 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4314 { (eval echo configure:4315: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4315 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4316 if test -z "$ac_err"; then
4317   rm -rf conftest*
4318   eval "ac_cv_header_$ac_safe=yes"
4319 else
4320   echo "$ac_err" >&5
4321   echo "configure: failed program was:" >&5
4322   cat conftest.$ac_ext >&5
4323   rm -rf conftest*
4324   eval "ac_cv_header_$ac_safe=no"
4325 fi
4326 rm -f conftest*
4327 fi
4328 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4329   echo "$ac_t""yes" 1>&6
4330     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4331   cat >> confdefs.h <<EOF
4332 #define $ac_tr_hdr 1
4333 EOF
4334  
4335     PLUGINS="${PLUGINS} xvideo"
4336     LIB_XVIDEO="-L$x_libraries -lX11 -lXext -lXv"
4337     CFLAGS_X11="-I$x_includes"
4338   
4339   CPPFLAGS=$saved_CPPFLAGS
4340 else
4341   echo "$ac_t""no" 1>&6
4342 fi
4343 done
4344
4345 fi
4346
4347 # Check whether --enable-alsa or --disable-alsa was given.
4348 if test "${enable_alsa+set}" = set; then
4349   enableval="$enable_alsa"
4350   if test x$enable_alsa = xyes; then ac_safe=`echo "sys/asoundlib.h" | sed 'y%./+-%__p_%'`
4351 echo $ac_n "checking for sys/asoundlib.h""... $ac_c" 1>&6
4352 echo "configure:4353: checking for sys/asoundlib.h" >&5
4353 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4354   echo $ac_n "(cached) $ac_c" 1>&6
4355 else
4356   cat > conftest.$ac_ext <<EOF
4357 #line 4358 "configure"
4358 #include "confdefs.h"
4359 #include <sys/asoundlib.h>
4360 EOF
4361 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4362 { (eval echo configure:4363: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4363 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4364 if test -z "$ac_err"; then
4365   rm -rf conftest*
4366   eval "ac_cv_header_$ac_safe=yes"
4367 else
4368   echo "$ac_err" >&5
4369   echo "configure: failed program was:" >&5
4370   cat conftest.$ac_ext >&5
4371   rm -rf conftest*
4372   eval "ac_cv_header_$ac_safe=no"
4373 fi
4374 rm -f conftest*
4375 fi
4376 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4377   echo "$ac_t""yes" 1>&6
4378   echo $ac_n "checking for main in -lasound""... $ac_c" 1>&6
4379 echo "configure:4380: checking for main in -lasound" >&5
4380 ac_lib_var=`echo asound'_'main | sed 'y%./+-%__p_%'`
4381 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4382   echo $ac_n "(cached) $ac_c" 1>&6
4383 else
4384   ac_save_LIBS="$LIBS"
4385 LIBS="-lasound  $LIBS"
4386 cat > conftest.$ac_ext <<EOF
4387 #line 4388 "configure"
4388 #include "confdefs.h"
4389
4390 int main() {
4391 main()
4392 ; return 0; }
4393 EOF
4394 if { (eval echo configure:4395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4395   rm -rf conftest*
4396   eval "ac_cv_lib_$ac_lib_var=yes"
4397 else
4398   echo "configure: failed program was:" >&5
4399   cat conftest.$ac_ext >&5
4400   rm -rf conftest*
4401   eval "ac_cv_lib_$ac_lib_var=no"
4402 fi
4403 rm -f conftest*
4404 LIBS="$ac_save_LIBS"
4405
4406 fi
4407 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4408   echo "$ac_t""yes" 1>&6
4409   have_alsa="true"
4410 else
4411   echo "$ac_t""no" 1>&6
4412 have_alsa="false"
4413 fi
4414
4415 else
4416   echo "$ac_t""no" 1>&6
4417 have_alsa="false"
4418 fi
4419  if test x$have_alsa = xtrue; then
4420      PLUGINS="${PLUGINS} alsa"
4421      LIB_ALSA="-lasound"
4422    fi; fi
4423 fi
4424
4425
4426 fi
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475 trap '' 1 2 15
4476 cat > confcache <<\EOF
4477 # This file is a shell script that caches the results of configure
4478 # tests run on this system so they can be shared between configure
4479 # scripts and configure runs.  It is not useful on other systems.
4480 # If it contains results you don't want to keep, you may remove or edit it.
4481 #
4482 # By default, configure uses ./config.cache as the cache file,
4483 # creating it if it does not exist already.  You can give configure
4484 # the --cache-file=FILE option to use a different cache file; that is
4485 # what configure does when it calls configure scripts in
4486 # subdirectories, so they share the cache.
4487 # Giving --cache-file=/dev/null disables caching, for debugging configure.
4488 # config.status only pays attention to the cache file if you give it the
4489 # --recheck option to rerun configure.
4490 #
4491 EOF
4492 # The following way of writing the cache mishandles newlines in values,
4493 # but we know of no workaround that is simple, portable, and efficient.
4494 # So, don't put newlines in cache variables' values.
4495 # Ultrix sh set writes to stderr and can't be redirected directly,
4496 # and sets the high bit in the cache file unless we assign to the vars.
4497 (set) 2>&1 |
4498   case `(ac_space=' '; set | grep ac_space) 2>&1` in
4499   *ac_space=\ *)
4500     # `set' does not quote correctly, so add quotes (double-quote substitution
4501     # turns \\\\ into \\, and sed turns \\ into \).
4502     sed -n \
4503       -e "s/'/'\\\\''/g" \
4504       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
4505     ;;
4506   *)
4507     # `set' quotes correctly as required by POSIX, so do not add quotes.
4508     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
4509     ;;
4510   esac >> confcache
4511 if cmp -s $cache_file confcache; then
4512   :
4513 else
4514   if test -w $cache_file; then
4515     echo "updating cache $cache_file"
4516     cat confcache > $cache_file
4517   else
4518     echo "not updating unwritable cache $cache_file"
4519   fi
4520 fi
4521 rm -f confcache
4522
4523 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
4524
4525 test "x$prefix" = xNONE && prefix=$ac_default_prefix
4526 # Let make expand exec_prefix.
4527 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4528
4529 # Any assignment to VPATH causes Sun make to only execute
4530 # the first set of double-colon rules, so remove it if not needed.
4531 # If there is a colon in the path, we need to keep it.
4532 if test "x$srcdir" = x.; then
4533   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
4534 fi
4535
4536 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
4537
4538 DEFS=-DHAVE_CONFIG_H
4539
4540 # Without the "./", some shells look in PATH for config.status.
4541 : ${CONFIG_STATUS=./config.status}
4542
4543 echo creating $CONFIG_STATUS
4544 rm -f $CONFIG_STATUS
4545 cat > $CONFIG_STATUS <<EOF
4546 #! /bin/sh
4547 # Generated automatically by configure.
4548 # Run this file to recreate the current configuration.
4549 # This directory was configured as follows,
4550 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4551 #
4552 # $0 $ac_configure_args
4553 #
4554 # Compiler output produced by configure, useful for debugging
4555 # configure, is in ./config.log if it exists.
4556
4557 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
4558 for ac_option
4559 do
4560   case "\$ac_option" in
4561   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
4562     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
4563     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
4564   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
4565     echo "$CONFIG_STATUS generated by autoconf version 2.13"
4566     exit 0 ;;
4567   -help | --help | --hel | --he | --h)
4568     echo "\$ac_cs_usage"; exit 0 ;;
4569   *) echo "\$ac_cs_usage"; exit 1 ;;
4570   esac
4571 done
4572
4573 ac_given_srcdir=$srcdir
4574 ac_given_INSTALL="$INSTALL"
4575
4576 trap 'rm -fr `echo "Makefile.opts include/config.h include/defs.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
4577 EOF
4578 cat >> $CONFIG_STATUS <<EOF
4579
4580 # Protect against being on the right side of a sed subst in config.status.
4581 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
4582  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
4583 $ac_vpsub
4584 $extrasub
4585 s%@SHELL@%$SHELL%g
4586 s%@CFLAGS@%$CFLAGS%g
4587 s%@CPPFLAGS@%$CPPFLAGS%g
4588 s%@CXXFLAGS@%$CXXFLAGS%g
4589 s%@FFLAGS@%$FFLAGS%g
4590 s%@DEFS@%$DEFS%g
4591 s%@LDFLAGS@%$LDFLAGS%g
4592 s%@LIBS@%$LIBS%g
4593 s%@exec_prefix@%$exec_prefix%g
4594 s%@prefix@%$prefix%g
4595 s%@program_transform_name@%$program_transform_name%g
4596 s%@bindir@%$bindir%g
4597 s%@sbindir@%$sbindir%g
4598 s%@libexecdir@%$libexecdir%g
4599 s%@datadir@%$datadir%g
4600 s%@sysconfdir@%$sysconfdir%g
4601 s%@sharedstatedir@%$sharedstatedir%g
4602 s%@localstatedir@%$localstatedir%g
4603 s%@libdir@%$libdir%g
4604 s%@includedir@%$includedir%g
4605 s%@oldincludedir@%$oldincludedir%g
4606 s%@infodir@%$infodir%g
4607 s%@mandir@%$mandir%g
4608 s%@host@%$host%g
4609 s%@host_alias@%$host_alias%g
4610 s%@host_cpu@%$host_cpu%g
4611 s%@host_vendor@%$host_vendor%g
4612 s%@host_os@%$host_os%g
4613 s%@VLC_VERSION@%$VLC_VERSION%g
4614 s%@VLC_CODENAME@%$VLC_CODENAME%g
4615 s%@SET_MAKE@%$SET_MAKE%g
4616 s%@CC@%$CC%g
4617 s%@CPP@%$CPP%g
4618 s%@RANLIB@%$RANLIB%g
4619 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
4620 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
4621 s%@INSTALL_DATA@%$INSTALL_DATA%g
4622 s%@GETOPT@%$GETOPT%g
4623 s%@ESD_CONFIG@%$ESD_CONFIG%g
4624 s%@GTK_CONFIG@%$GTK_CONFIG%g
4625 s%@SYS@%$SYS%g
4626 s%@ARCH@%$ARCH%g
4627 s%@PLUGINS@%$PLUGINS%g
4628 s%@BUILTINS@%$BUILTINS%g
4629 s%@ALIASES@%$ALIASES%g
4630 s%@DEFINE@%$DEFINE%g
4631 s%@INCLUDE@%$INCLUDE%g
4632 s%@DEBUG@%$DEBUG%g
4633 s%@STATS@%$STATS%g
4634 s%@ASM@%$ASM%g
4635 s%@TRACE@%$TRACE%g
4636 s%@OPTIMS@%$OPTIMS%g
4637 s%@CSS@%$CSS%g
4638 s%@MOC@%$MOC%g
4639 s%@LCFLAGS@%$LCFLAGS%g
4640 s%@PLCFLAGS@%$PLCFLAGS%g
4641 s%@LIB@%$LIB%g
4642 s%@LIB_ALSA@%$LIB_ALSA%g
4643 s%@LIB_BEOS@%$LIB_BEOS%g
4644 s%@LIB_DARWIN@%$LIB_DARWIN%g
4645 s%@LIB_DVD@%$LIB_DVD%g
4646 s%@LIB_ESD@%$LIB_ESD%g
4647 s%@LIB_GGI@%$LIB_GGI%g
4648 s%@LIB_GLIDE@%$LIB_GLIDE%g
4649 s%@LIB_GNOME@%$LIB_GNOME%g
4650 s%@LIB_GTK@%$LIB_GTK%g
4651 s%@LIB_IDCTALTIVEC@%$LIB_IDCTALTIVEC%g
4652 s%@LIB_MACOSX@%$LIB_MACOSX%g
4653 s%@LIB_NCURSES@%$LIB_NCURSES%g
4654 s%@LIB_QT@%$LIB_QT%g
4655 s%@LIB_TS@%$LIB_TS%g
4656 s%@LIB_SDL@%$LIB_SDL%g
4657 s%@LIB_DIRECTX@%$LIB_DIRECTX%g
4658 s%@LIB_X11@%$LIB_X11%g
4659 s%@LIB_XVIDEO@%$LIB_XVIDEO%g
4660 s%@LIB_YUV@%$LIB_YUV%g
4661 s%@CFLAGS_VLC@%$CFLAGS_VLC%g
4662 s%@CFLAGS_DVD@%$CFLAGS_DVD%g
4663 s%@CFLAGS_GTK@%$CFLAGS_GTK%g
4664 s%@CFLAGS_SDL@%$CFLAGS_SDL%g
4665 s%@CFLAGS_X11@%$CFLAGS_X11%g
4666 s%@LOCAL_LIBDVDCSS@%$LOCAL_LIBDVDCSS%g
4667
4668 CEOF
4669 EOF
4670
4671 cat >> $CONFIG_STATUS <<\EOF
4672
4673 # Split the substitutions into bite-sized pieces for seds with
4674 # small command number limits, like on Digital OSF/1 and HP-UX.
4675 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
4676 ac_file=1 # Number of current file.
4677 ac_beg=1 # First line for current file.
4678 ac_end=$ac_max_sed_cmds # Line after last line for current file.
4679 ac_more_lines=:
4680 ac_sed_cmds=""
4681 while $ac_more_lines; do
4682   if test $ac_beg -gt 1; then
4683     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
4684   else
4685     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
4686   fi
4687   if test ! -s conftest.s$ac_file; then
4688     ac_more_lines=false
4689     rm -f conftest.s$ac_file
4690   else
4691     if test -z "$ac_sed_cmds"; then
4692       ac_sed_cmds="sed -f conftest.s$ac_file"
4693     else
4694       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
4695     fi
4696     ac_file=`expr $ac_file + 1`
4697     ac_beg=$ac_end
4698     ac_end=`expr $ac_end + $ac_max_sed_cmds`
4699   fi
4700 done
4701 if test -z "$ac_sed_cmds"; then
4702   ac_sed_cmds=cat
4703 fi
4704 EOF
4705
4706 cat >> $CONFIG_STATUS <<EOF
4707
4708 CONFIG_FILES=\${CONFIG_FILES-"Makefile.opts include/config.h"}
4709 EOF
4710 cat >> $CONFIG_STATUS <<\EOF
4711 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
4712   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
4713   case "$ac_file" in
4714   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
4715        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4716   *) ac_file_in="${ac_file}.in" ;;
4717   esac
4718
4719   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
4720
4721   # Remove last slash and all that follows it.  Not all systems have dirname.
4722   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4723   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4724     # The file is in a subdirectory.
4725     test ! -d "$ac_dir" && mkdir "$ac_dir"
4726     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
4727     # A "../" for each directory in $ac_dir_suffix.
4728     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
4729   else
4730     ac_dir_suffix= ac_dots=
4731   fi
4732
4733   case "$ac_given_srcdir" in
4734   .)  srcdir=.
4735       if test -z "$ac_dots"; then top_srcdir=.
4736       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
4737   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
4738   *) # Relative path.
4739     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
4740     top_srcdir="$ac_dots$ac_given_srcdir" ;;
4741   esac
4742
4743   case "$ac_given_INSTALL" in
4744   [/$]*) INSTALL="$ac_given_INSTALL" ;;
4745   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
4746   esac
4747
4748   echo creating "$ac_file"
4749   rm -f "$ac_file"
4750   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
4751   case "$ac_file" in
4752   *Makefile*) ac_comsub="1i\\
4753 # $configure_input" ;;
4754   *) ac_comsub= ;;
4755   esac
4756
4757   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
4758   sed -e "$ac_comsub
4759 s%@configure_input@%$configure_input%g
4760 s%@srcdir@%$srcdir%g
4761 s%@top_srcdir@%$top_srcdir%g
4762 s%@INSTALL@%$INSTALL%g
4763 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
4764 fi; done
4765 rm -f conftest.s*
4766
4767 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
4768 # NAME is the cpp macro being defined and VALUE is the value it is being given.
4769 #
4770 # ac_d sets the value in "#define NAME VALUE" lines.
4771 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
4772 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
4773 ac_dC='\3'
4774 ac_dD='%g'
4775 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
4776 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
4777 ac_uB='\([      ]\)%\1#\2define\3'
4778 ac_uC=' '
4779 ac_uD='\4%g'
4780 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
4781 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
4782 ac_eB='$%\1#\2define\3'
4783 ac_eC=' '
4784 ac_eD='%g'
4785
4786 if test "${CONFIG_HEADERS+set}" != set; then
4787 EOF
4788 cat >> $CONFIG_STATUS <<EOF
4789   CONFIG_HEADERS="include/defs.h"
4790 EOF
4791 cat >> $CONFIG_STATUS <<\EOF
4792 fi
4793 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
4794   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
4795   case "$ac_file" in
4796   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
4797        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4798   *) ac_file_in="${ac_file}.in" ;;
4799   esac
4800
4801   echo creating $ac_file
4802
4803   rm -f conftest.frag conftest.in conftest.out
4804   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
4805   cat $ac_file_inputs > conftest.in
4806
4807 EOF
4808
4809 # Transform confdefs.h into a sed script conftest.vals that substitutes
4810 # the proper values into config.h.in to produce config.h.  And first:
4811 # Protect against being on the right side of a sed subst in config.status.
4812 # Protect against being in an unquoted here document in config.status.
4813 rm -f conftest.vals
4814 cat > conftest.hdr <<\EOF
4815 s/[\\&%]/\\&/g
4816 s%[\\$`]%\\&%g
4817 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
4818 s%ac_d%ac_u%gp
4819 s%ac_u%ac_e%gp
4820 EOF
4821 sed -n -f conftest.hdr confdefs.h > conftest.vals
4822 rm -f conftest.hdr
4823
4824 # This sed command replaces #undef with comments.  This is necessary, for
4825 # example, in the case of _POSIX_SOURCE, which is predefined and required
4826 # on some systems where configure will not decide to define it.
4827 cat >> conftest.vals <<\EOF
4828 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
4829 EOF
4830
4831 # Break up conftest.vals because some shells have a limit on
4832 # the size of here documents, and old seds have small limits too.
4833
4834 rm -f conftest.tail
4835 while :
4836 do
4837   ac_lines=`grep -c . conftest.vals`
4838   # grep -c gives empty output for an empty file on some AIX systems.
4839   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
4840   # Write a limited-size here document to conftest.frag.
4841   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
4842   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
4843   echo 'CEOF
4844   sed -f conftest.frag conftest.in > conftest.out
4845   rm -f conftest.in
4846   mv conftest.out conftest.in
4847 ' >> $CONFIG_STATUS
4848   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
4849   rm -f conftest.vals
4850   mv conftest.tail conftest.vals
4851 done
4852 rm -f conftest.vals
4853
4854 cat >> $CONFIG_STATUS <<\EOF
4855   rm -f conftest.frag conftest.h
4856   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
4857   cat conftest.in >> conftest.h
4858   rm -f conftest.in
4859   if cmp -s $ac_file conftest.h 2>/dev/null; then
4860     echo "$ac_file is unchanged"
4861     rm -f conftest.h
4862   else
4863     # Remove last slash and all that follows it.  Not all systems have dirname.
4864       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4865       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4866       # The file is in a subdirectory.
4867       test ! -d "$ac_dir" && mkdir "$ac_dir"
4868     fi
4869     rm -f $ac_file
4870     mv conftest.h $ac_file
4871   fi
4872 fi; done
4873
4874 EOF
4875 cat >> $CONFIG_STATUS <<EOF
4876
4877 EOF
4878 cat >> $CONFIG_STATUS <<\EOF
4879
4880 exit 0
4881 EOF
4882 chmod +x $CONFIG_STATUS
4883 rm -fr confdefs* $ac_clean_files
4884 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
4885
4886
4887 echo "
4888 global configuration
4889 --------------------
4890 system                : ${SYS}
4891 architecture          : ${ARCH}
4892 optimizations         : ${OPTIMS}
4893 inline assembly       : ${ASM}
4894
4895 vlc configuration
4896 -----------------
4897 vlc version           : ${VLC_VERSION}
4898 debug mode            : ${DEBUG}
4899 statistics            : ${STATS}
4900 trace mode            : ${TRACE}
4901 need builtin getopt   : ${GETOPT}
4902 built-in modules      :${BUILTINS}
4903 plugin modules        :${PLUGINS}
4904 vlc aliases           :${ALIASES}
4905
4906 libdvdcss configuration
4907 -----------------------
4908 CSS decryption        : ${CSS}
4909
4910 You may now tune Makefile.opts at your convenience. To build vlc, type
4911 \`make vlc'. To build libdvdcss only, type \`make libdvdcss'."
4912