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