configure 152 KB
Newer Older
1
#! /bin/sh
Sam Hocevar's avatar
 
Sam Hocevar committed
2

3
# Guess values for system-dependent variables and create Makefiles.
Sam Hocevar's avatar
 
Sam Hocevar committed
4 5
# Generated automatically using autoconf version 2.13 
# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 7 8 9
#
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.

Sam Hocevar's avatar
 
Sam Hocevar committed
10 11
# Defaults:
ac_help=
12
ac_default_prefix=/usr/local
Sam Hocevar's avatar
 
Sam Hocevar committed
13 14 15 16 17 18 19 20 21 22 23 24 25
# Any additions from configure.in:
ac_help="$ac_help
  --disable-ppro          Disable PentiumPro optimizations (default enabled for x86)"
ac_help="$ac_help
  --disable-mmx           Disable MMX optimizations (default enabled for x86)"
ac_help="$ac_help
  --enable-altivec        Enable altivec optimizations (default disabled since it is broken)"
ac_help="$ac_help
  --enable-debug          Enable debug mode (default disabled)"
ac_help="$ac_help
  --enable-stats          Enable printing of statistics (default disabled)"
ac_help="$ac_help
  --enable-trace          Enable trace mode (default disabled)"
Sam Hocevar's avatar
 
Sam Hocevar committed
26 27
ac_help="$ac_help
  --enable-profiling      Enable gprof profiling (default disabled)"
Sam Hocevar's avatar
 
Sam Hocevar committed
28 29
ac_help="$ac_help
  --disable-optimizations Disable compiler optimizations (default enabled)"
Sam Hocevar's avatar
 
Sam Hocevar committed
30 31
ac_help="$ac_help
  --enable-pth            Enable GNU Pth support (default disabled)"
Sam Hocevar's avatar
 
Sam Hocevar committed
32
ac_help="$ac_help
Sam Hocevar's avatar
 
Sam Hocevar committed
33
  --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')"
Sam Hocevar's avatar
 
Sam Hocevar committed
34 35 36 37 38 39
ac_help="$ac_help
  --disable-dummy         dummy module (default enabled)"
ac_help="$ac_help
  --disable-null          Null module (default enabled)"
ac_help="$ac_help
  --disable-rc            rc module (default enabled)"
Sam Hocevar's avatar
 
Sam Hocevar committed
40 41 42 43 44 45 46 47
ac_help="$ac_help
  --disable-dsp           Linux /dev/dsp support (default enabled)"
ac_help="$ac_help
  --enable-esd            Esound library support (default disabled)"
ac_help="$ac_help
  --enable-darwin         Darwin sound support (default disabled)"
ac_help="$ac_help
  --enable-macosx         Mac OS X interface support (default enabled in Mac OS X)"
48
ac_help="$ac_help
Sam Hocevar's avatar
 
Sam Hocevar committed
49
  --disable-qnx           QNX RTOS support (default enabled in QNX RTOS)"
Sam Hocevar's avatar
 
Sam Hocevar committed
50 51 52 53 54
ac_help="$ac_help
  --enable-fb             Linux framebuffer support (default disabled)"
ac_help="$ac_help
  --with-ggi[=name]       GGI support (default disabled)"
ac_help="$ac_help
55
  --disable-sdl           SDL support (default enabled)"
56 57
ac_help="$ac_help
  --with-sdl-config-path=path sdl-config path (default search in \$PATH)"
Sam Hocevar's avatar
 
Sam Hocevar committed
58 59
ac_help="$ac_help
  --with-directx[=name]   Windows DirectX support (default enabled)"
Sam Hocevar's avatar
 
Sam Hocevar committed
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77
ac_help="$ac_help
  --with-glide[=name]     Glide (3dfx) support (default disabled)"
ac_help="$ac_help
  --enable-ncurses        ncurses interface support (default disabled)"
ac_help="$ac_help
  --enable-qt             Qt interface support (default disabled)"
ac_help="$ac_help
  --enable-kde            KDE interface support (default disabled)"
ac_help="$ac_help
  --enable-gnome          Gnome interface support (default disabled)"
ac_help="$ac_help
  --disable-gtk           Gtk+ support (default enabled)"
ac_help="$ac_help
  --disable-x11           X11 support (default enabled)"
ac_help="$ac_help
  --disable-xvideo        XVideo support (default enabled)"
ac_help="$ac_help
  --enable-alsa           Alsa sound drivers support (Only for linux) (default disabled)"
78 79 80 81

# Initialize some variables set by options.
# The variables have the same names as the options, with
# dashes changed to underlines.
Sam Hocevar's avatar
 
Sam Hocevar committed
82 83
build=NONE
cache_file=./config.cache
84
exec_prefix=NONE
Sam Hocevar's avatar
 
Sam Hocevar committed
85
host=NONE
86
no_create=
Sam Hocevar's avatar
 
Sam Hocevar committed
87
nonopt=NONE
88 89 90 91 92 93 94 95
no_recursion=
prefix=NONE
program_prefix=NONE
program_suffix=NONE
program_transform_name=s,x,x,
silent=
site=
srcdir=
Sam Hocevar's avatar
 
Sam Hocevar committed
96
target=NONE
97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112
verbose=
x_includes=NONE
x_libraries=NONE
bindir='${exec_prefix}/bin'
sbindir='${exec_prefix}/sbin'
libexecdir='${exec_prefix}/libexec'
datadir='${prefix}/share'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
libdir='${exec_prefix}/lib'
includedir='${prefix}/include'
oldincludedir='/usr/include'
infodir='${prefix}/info'
mandir='${prefix}/man'

Sam Hocevar's avatar
 
Sam Hocevar committed
113 114 115 116 117 118
# Initialize some other variables.
subdirs=
MFLAGS= MAKEFLAGS=
SHELL=${CONFIG_SHELL-/bin/sh}
# Maximum number of lines to put in a shell here document.
ac_max_here_lines=12
119 120 121 122

ac_prev=
for ac_option
do
Sam Hocevar's avatar
 
Sam Hocevar committed
123

124 125 126 127 128 129 130
  # If the previous option needs an argument, assign it.
  if test -n "$ac_prev"; then
    eval "$ac_prev=\$ac_option"
    ac_prev=
    continue
  fi

Sam Hocevar's avatar
 
Sam Hocevar committed
131 132 133 134
  case "$ac_option" in
  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  *) ac_optarg= ;;
  esac
135 136 137

  # Accept the important Cygnus configure options, so we can diagnose typos.

Sam Hocevar's avatar
 
Sam Hocevar committed
138
  case "$ac_option" in
139 140 141 142

  -bindir | --bindir | --bindi | --bind | --bin | --bi)
    ac_prev=bindir ;;
  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Sam Hocevar's avatar
 
Sam Hocevar committed
143
    bindir="$ac_optarg" ;;
144 145

  -build | --build | --buil | --bui | --bu)
Sam Hocevar's avatar
 
Sam Hocevar committed
146
    ac_prev=build ;;
147
  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Sam Hocevar's avatar
 
Sam Hocevar committed
148
    build="$ac_optarg" ;;
149 150 151 152 153 154

  -cache-file | --cache-file | --cache-fil | --cache-fi \
  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
    ac_prev=cache_file ;;
  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Sam Hocevar's avatar
 
Sam Hocevar committed
155
    cache_file="$ac_optarg" ;;
156 157 158 159 160

  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
    ac_prev=datadir ;;
  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
  | --da=*)
Sam Hocevar's avatar
 
Sam Hocevar committed
161
    datadir="$ac_optarg" ;;
162 163

  -disable-* | --disable-*)
Sam Hocevar's avatar
 
Sam Hocevar committed
164
    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
165
    # Reject names that are not valid shell variable names.
Sam Hocevar's avatar
 
Sam Hocevar committed
166 167 168 169 170
    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
    fi
    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
    eval "enable_${ac_feature}=no" ;;
171 172

  -enable-* | --enable-*)
Sam Hocevar's avatar
 
Sam Hocevar committed
173
    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
174
    # Reject names that are not valid shell variable names.
Sam Hocevar's avatar
 
Sam Hocevar committed
175 176 177 178 179 180
    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
    fi
    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
    case "$ac_option" in
      *=*) ;;
181 182
      *) ac_optarg=yes ;;
    esac
Sam Hocevar's avatar
 
Sam Hocevar committed
183
    eval "enable_${ac_feature}='$ac_optarg'" ;;
184 185 186 187 188 189 190 191

  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  | --exec | --exe | --ex)
    ac_prev=exec_prefix ;;
  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  | --exec=* | --exe=* | --ex=*)
Sam Hocevar's avatar
 
Sam Hocevar committed
192
    exec_prefix="$ac_optarg" ;;
193 194 195 196 197

  -gas | --gas | --ga | --g)
    # Obsolete; use --with-gas.
    with_gas=yes ;;

Sam Hocevar's avatar
 
Sam Hocevar committed
198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251
  -help | --help | --hel | --he)
    # Omit some internal or obsolete options to make the list less imposing.
    # This message is too long to be a string in the A/UX 3.1 sh.
    cat << EOF
Usage: configure [options] [host]
Options: [defaults in brackets after descriptions]
Configuration:
  --cache-file=FILE       cache test results in FILE
  --help                  print this message
  --no-create             do not create output files
  --quiet, --silent       do not print \`checking...' messages
  --version               print the version of autoconf that created configure
Directory and file names:
  --prefix=PREFIX         install architecture-independent files in PREFIX
                          [$ac_default_prefix]
  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
                          [same as prefix]
  --bindir=DIR            user executables in DIR [EPREFIX/bin]
  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
  --datadir=DIR           read-only architecture-independent data in DIR
                          [PREFIX/share]
  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
                          [PREFIX/com]
  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
  --includedir=DIR        C header files in DIR [PREFIX/include]
  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
  --infodir=DIR           info documentation in DIR [PREFIX/info]
  --mandir=DIR            man documentation in DIR [PREFIX/man]
  --srcdir=DIR            find the sources in DIR [configure dir or ..]
  --program-prefix=PREFIX prepend PREFIX to installed program names
  --program-suffix=SUFFIX append SUFFIX to installed program names
  --program-transform-name=PROGRAM
                          run sed PROGRAM on installed program names
EOF
    cat << EOF
Host type:
  --build=BUILD           configure for building on BUILD [BUILD=HOST]
  --host=HOST             configure for HOST [guessed]
  --target=TARGET         configure for TARGET [TARGET=HOST]
Features and packages:
  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  --x-includes=DIR        X include files are in DIR
  --x-libraries=DIR       X library files are in DIR
EOF
    if test -n "$ac_help"; then
      echo "--enable and --with options recognized:$ac_help"
    fi
    exit 0 ;;
252 253

  -host | --host | --hos | --ho)
Sam Hocevar's avatar
 
Sam Hocevar committed
254
    ac_prev=host ;;
255
  -host=* | --host=* | --hos=* | --ho=*)
Sam Hocevar's avatar
 
Sam Hocevar committed
256
    host="$ac_optarg" ;;
257 258 259 260 261 262

  -includedir | --includedir | --includedi | --included | --include \
  | --includ | --inclu | --incl | --inc)
    ac_prev=includedir ;;
  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
  | --includ=* | --inclu=* | --incl=* | --inc=*)
Sam Hocevar's avatar
 
Sam Hocevar committed
263
    includedir="$ac_optarg" ;;
264 265 266 267

  -infodir | --infodir | --infodi | --infod | --info | --inf)
    ac_prev=infodir ;;
  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Sam Hocevar's avatar
 
Sam Hocevar committed
268
    infodir="$ac_optarg" ;;
269 270 271 272

  -libdir | --libdir | --libdi | --libd)
    ac_prev=libdir ;;
  -libdir=* | --libdir=* | --libdi=* | --libd=*)
Sam Hocevar's avatar
 
Sam Hocevar committed
273
    libdir="$ac_optarg" ;;
274 275 276 277 278 279

  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
  | --libexe | --libex | --libe)
    ac_prev=libexecdir ;;
  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
  | --libexe=* | --libex=* | --libe=*)
Sam Hocevar's avatar
 
Sam Hocevar committed
280
    libexecdir="$ac_optarg" ;;
281 282 283 284 285 286 287 288

  -localstatedir | --localstatedir | --localstatedi | --localstated \
  | --localstate | --localstat | --localsta | --localst \
  | --locals | --local | --loca | --loc | --lo)
    ac_prev=localstatedir ;;
  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
Sam Hocevar's avatar
 
Sam Hocevar committed
289
    localstatedir="$ac_optarg" ;;
290 291 292 293

  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
    ac_prev=mandir ;;
  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Sam Hocevar's avatar
 
Sam Hocevar committed
294
    mandir="$ac_optarg" ;;
295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314

  -nfp | --nfp | --nf)
    # Obsolete; use --without-fp.
    with_fp=no ;;

  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  | --no-cr | --no-c)
    no_create=yes ;;

  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
    no_recursion=yes ;;

  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
  | --oldin | --oldi | --old | --ol | --o)
    ac_prev=oldincludedir ;;
  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Sam Hocevar's avatar
 
Sam Hocevar committed
315
    oldincludedir="$ac_optarg" ;;
316 317 318 319

  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
    ac_prev=prefix ;;
  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Sam Hocevar's avatar
 
Sam Hocevar committed
320
    prefix="$ac_optarg" ;;
321 322 323 324 325 326

  -program-prefix | --program-prefix | --program-prefi | --program-pref \
  | --program-pre | --program-pr | --program-p)
    ac_prev=program_prefix ;;
  -program-prefix=* | --program-prefix=* | --program-prefi=* \
  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Sam Hocevar's avatar
 
Sam Hocevar committed
327
    program_prefix="$ac_optarg" ;;
328 329 330 331 332 333

  -program-suffix | --program-suffix | --program-suffi | --program-suff \
  | --program-suf | --program-su | --program-s)
    ac_prev=program_suffix ;;
  -program-suffix=* | --program-suffix=* | --program-suffi=* \
  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Sam Hocevar's avatar
 
Sam Hocevar committed
334
    program_suffix="$ac_optarg" ;;
335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350

  -program-transform-name | --program-transform-name \
  | --program-transform-nam | --program-transform-na \
  | --program-transform-n | --program-transform- \
  | --program-transform | --program-transfor \
  | --program-transfo | --program-transf \
  | --program-trans | --program-tran \
  | --progr-tra | --program-tr | --program-t)
    ac_prev=program_transform_name ;;
  -program-transform-name=* | --program-transform-name=* \
  | --program-transform-nam=* | --program-transform-na=* \
  | --program-transform-n=* | --program-transform-=* \
  | --program-transform=* | --program-transfor=* \
  | --program-transfo=* | --program-transf=* \
  | --program-trans=* | --program-tran=* \
  | --progr-tra=* | --program-tr=* | --program-t=*)
Sam Hocevar's avatar
 
Sam Hocevar committed
351
    program_transform_name="$ac_optarg" ;;
352 353 354 355 356 357 358 359 360

  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  | -silent | --silent | --silen | --sile | --sil)
    silent=yes ;;

  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
    ac_prev=sbindir ;;
  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
  | --sbi=* | --sb=*)
Sam Hocevar's avatar
 
Sam Hocevar committed
361
    sbindir="$ac_optarg" ;;
362 363 364 365 366 367 368 369 370 371

  -sharedstatedir | --sharedstatedir | --sharedstatedi \
  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
  | --sharedst | --shareds | --shared | --share | --shar \
  | --sha | --sh)
    ac_prev=sharedstatedir ;;
  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
  | --sha=* | --sh=*)
Sam Hocevar's avatar
 
Sam Hocevar committed
372
    sharedstatedir="$ac_optarg" ;;
373 374 375 376

  -site | --site | --sit)
    ac_prev=site ;;
  -site=* | --site=* | --sit=*)
Sam Hocevar's avatar
 
Sam Hocevar committed
377
    site="$ac_optarg" ;;
378 379 380 381

  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
    ac_prev=srcdir ;;
  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Sam Hocevar's avatar
 
Sam Hocevar committed
382
    srcdir="$ac_optarg" ;;
383 384 385 386 387 388

  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
  | --syscon | --sysco | --sysc | --sys | --sy)
    ac_prev=sysconfdir ;;
  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Sam Hocevar's avatar
 
Sam Hocevar committed
389
    sysconfdir="$ac_optarg" ;;
390 391

  -target | --target | --targe | --targ | --tar | --ta | --t)
Sam Hocevar's avatar
 
Sam Hocevar committed
392
    ac_prev=target ;;
393
  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Sam Hocevar's avatar
 
Sam Hocevar committed
394
    target="$ac_optarg" ;;
395 396 397 398

  -v | -verbose | --verbose | --verbos | --verbo | --verb)
    verbose=yes ;;

Sam Hocevar's avatar
 
Sam Hocevar committed
399 400 401
  -version | --version | --versio | --versi | --vers)
    echo "configure generated by autoconf version 2.13"
    exit 0 ;;
402 403

  -with-* | --with-*)
Sam Hocevar's avatar
 
Sam Hocevar committed
404
    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
405
    # Reject names that are not valid shell variable names.
Sam Hocevar's avatar
 
Sam Hocevar committed
406 407 408
    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
    fi
409
    ac_package=`echo $ac_package| sed 's/-/_/g'`
Sam Hocevar's avatar
 
Sam Hocevar committed
410 411
    case "$ac_option" in
      *=*) ;;
412 413
      *) ac_optarg=yes ;;
    esac
Sam Hocevar's avatar
 
Sam Hocevar committed
414
    eval "with_${ac_package}='$ac_optarg'" ;;
415 416

  -without-* | --without-*)
Sam Hocevar's avatar
 
Sam Hocevar committed
417
    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
418
    # Reject names that are not valid shell variable names.
Sam Hocevar's avatar
 
Sam Hocevar committed
419 420 421 422 423
    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
    fi
    ac_package=`echo $ac_package| sed 's/-/_/g'`
    eval "with_${ac_package}=no" ;;
424 425 426 427 428 429 430 431 432 433

  --x)
    # Obsolete; use --with-x.
    with_x=yes ;;

  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  | --x-incl | --x-inc | --x-in | --x-i)
    ac_prev=x_includes ;;
  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Sam Hocevar's avatar
 
Sam Hocevar committed
434
    x_includes="$ac_optarg" ;;
435 436 437 438 439 440

  -x-libraries | --x-libraries | --x-librarie | --x-librari \
  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
    ac_prev=x_libraries ;;
  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Sam Hocevar's avatar
 
Sam Hocevar committed
441
    x_libraries="$ac_optarg" ;;
442

Sam Hocevar's avatar
 
Sam Hocevar committed
443
  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
444 445 446
    ;;

  *)
Sam Hocevar's avatar
 
Sam Hocevar committed
447 448 449 450 451 452 453
    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
      echo "configure: warning: $ac_option: invalid host type" 1>&2
    fi
    if test "x$nonopt" != xNONE; then
      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
    fi
    nonopt="$ac_option"
454 455 456 457 458 459
    ;;

  esac
done

if test -n "$ac_prev"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476
  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
fi

trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15

# File descriptor usage:
# 0 standard input
# 1 file creation
# 2 errors and warnings
# 3 some systems may open it to /dev/tty
# 4 used on the Kubota Titan
# 6 checking for... messages and results
# 5 compiler messages saved in config.log
if test "$silent" = yes; then
  exec 6>/dev/null
else
  exec 6>&1
477
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
478 479 480 481 482 483
exec 5>./config.log

echo "\
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
" 1>&5
484

Sam Hocevar's avatar
 
Sam Hocevar committed
485 486 487 488
# Strip out --no-create and --no-recursion so they do not pile up.
# Also quote any args containing shell metacharacters.
ac_configure_args=
for ac_arg
489
do
Sam Hocevar's avatar
 
Sam Hocevar committed
490 491 492 493 494 495 496 497
  case "$ac_arg" in
  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  | --no-cr | --no-c) ;;
  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
498 499 500
  esac
done

Sam Hocevar's avatar
 
Sam Hocevar committed
501 502 503 504 505 506 507 508 509
# NLS nuisances.
# Only set these to C if already set.  These must not be set unconditionally
# because not all systems understand e.g. LANG=C (notably SCO).
# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
# Non-C LC_CTYPE values break the ctype check.
if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
510

Sam Hocevar's avatar
 
Sam Hocevar committed
511 512 513 514
# confdefs.h avoids OS command line length limits that DEFS can exceed.
rm -rf conftest* confdefs.h
# AIX cpp loses on an empty file, so make sure it contains at least a newline.
echo > confdefs.h
515

Sam Hocevar's avatar
 
Sam Hocevar committed
516 517
# A filename unique to this package, relative to the directory that
# configure is in, which we can look for to find out if srcdir is correct.
Sam Hocevar's avatar
 
Sam Hocevar committed
518
ac_unique_file=include/common.h
519 520 521 522 523 524

# Find the source files, if location was not specified.
if test -z "$srcdir"; then
  ac_srcdir_defaulted=yes
  # Try the directory containing this script, then its parent.
  ac_prog=$0
Sam Hocevar's avatar
 
Sam Hocevar committed
525
  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
526 527 528 529 530 531 532 533 534 535
  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  srcdir=$ac_confdir
  if test ! -r $srcdir/$ac_unique_file; then
    srcdir=..
  fi
else
  ac_srcdir_defaulted=no
fi
if test ! -r $srcdir/$ac_unique_file; then
  if test "$ac_srcdir_defaulted" = yes; then
Sam Hocevar's avatar
 
Sam Hocevar committed
536
    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
537
  else
Sam Hocevar's avatar
 
Sam Hocevar committed
538
    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
539 540
  fi
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
541
srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
542 543 544 545 546 547 548 549 550 551 552

# Prefer explicitly selected file to automatically selected ones.
if test -z "$CONFIG_SITE"; then
  if test "x$prefix" != xNONE; then
    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
  else
    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
  fi
fi
for ac_site_file in $CONFIG_SITE; do
  if test -r "$ac_site_file"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
553
    echo "loading site script $ac_site_file"
554 555 556 557 558
    . "$ac_site_file"
  fi
done

if test -r "$cache_file"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
559 560
  echo "loading cache $cache_file"
  . $cache_file
561
else
Sam Hocevar's avatar
 
Sam Hocevar committed
562 563
  echo "creating cache $cache_file"
  > $cache_file
564 565 566
fi

ac_ext=c
Sam Hocevar's avatar
 
Sam Hocevar committed
567
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
568
ac_cpp='$CPP $CPPFLAGS'
Sam Hocevar's avatar
 
Sam Hocevar committed
569 570 571 572 573 574 575 576 577 578 579 580 581 582
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

ac_exeext=
ac_objext=o
if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
    ac_n= ac_c='
' ac_t='	'
  else
    ac_n=-n ac_c= ac_t=
  fi
583
else
Sam Hocevar's avatar
 
Sam Hocevar committed
584
  ac_n= ac_c='\c' ac_t=
585 586
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
587 588


589

590 591 592 593 594 595 596 597 598 599 600 601 602
ac_aux_dir=
for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
  if test -f $ac_dir/install-sh; then
    ac_aux_dir=$ac_dir
    ac_install_sh="$ac_aux_dir/install-sh -c"
    break
  elif test -f $ac_dir/install.sh; then
    ac_aux_dir=$ac_dir
    ac_install_sh="$ac_aux_dir/install.sh -c"
    break
  fi
done
if test -z "$ac_aux_dir"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
603
  { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
604
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
605 606 607 608
ac_config_guess=$ac_aux_dir/config.guess
ac_config_sub=$ac_aux_dir/config.sub
ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.

609 610

# Make sure we can run config.sub.
Sam Hocevar's avatar
 
Sam Hocevar committed
611 612 613 614 615
if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
fi

echo $ac_n "checking host system type""... $ac_c" 1>&6
616
echo "configure:617: checking host system type" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635

host_alias=$host
case "$host_alias" in
NONE)
  case $nonopt in
  NONE)
    if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
    else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
    fi ;;
  *) host_alias=$nonopt ;;
  esac ;;
esac

host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$host" 1>&6

636

Sam Hocevar's avatar
 
Sam Hocevar committed
637 638 639
HAVE_VLC=0
if test -r src/interface/main.c; then
  HAVE_VLC=1
Sam Hocevar's avatar
 
Sam Hocevar committed
640
  VLC_VERSION=0.2.82
Sam Hocevar's avatar
 
Sam Hocevar committed
641 642 643 644
  
  VLC_CODENAME=Ourumov
  
fi
645

Sam Hocevar's avatar
 
Sam Hocevar committed
646 647 648
HAVE_LIBDVDCSS=0
if test -r extras/libdvdcss/libdvdcss.c; then
  HAVE_LIBDVDCSS=1
Sam Hocevar's avatar
 
Sam Hocevar committed
649
  LIBDVDCSS_VERSION=0.0.3
Sam Hocevar's avatar
 
Sam Hocevar committed
650 651
  
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
652

Sam Hocevar's avatar
 
Sam Hocevar committed
653
save_CFLAGS="${CFLAGS}"
Sam Hocevar's avatar
 
Sam Hocevar committed
654
save_LDFLAGS="${LDFLAGS}"
Sam Hocevar's avatar
 
Sam Hocevar committed
655

Sam Hocevar's avatar
 
Sam Hocevar committed
656
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
657
echo "configure:658: checking whether ${MAKE-make} sets \${MAKE}" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
658 659 660
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
661
else
Sam Hocevar's avatar
 
Sam Hocevar committed
662
  cat > conftestmake <<\EOF
663 664 665 666
all:
	@echo 'ac_maketemp="${MAKE}"'
EOF
# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
Sam Hocevar's avatar
 
Sam Hocevar committed
667
eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
668 669 670 671 672
if test -n "$ac_maketemp"; then
  eval ac_cv_prog_make_${ac_make}_set=yes
else
  eval ac_cv_prog_make_${ac_make}_set=no
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
673
rm -f conftestmake
674 675
fi
if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
676
  echo "$ac_t""yes" 1>&6
677 678
  SET_MAKE=
else
Sam Hocevar's avatar
 
Sam Hocevar committed
679
  echo "$ac_t""no" 1>&6
680 681 682
  SET_MAKE="MAKE=${MAKE-make}"
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
683
# Extract the first word of "gcc", so it can be a program name with args.
684
set dummy gcc; ac_word=$2
Sam Hocevar's avatar
 
Sam Hocevar committed
685
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
686
echo "configure:687: checking for $ac_word" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
687 688
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
689 690 691 692
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
Sam Hocevar's avatar
 
Sam Hocevar committed
693 694 695 696 697 698 699 700 701 702
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_CC="gcc"
      break
    fi
  done
  IFS="$ac_save_ifs"
703 704
fi
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
705
CC="$ac_cv_prog_CC"
706
if test -n "$CC"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
707
  echo "$ac_t""$CC" 1>&6
708
else
Sam Hocevar's avatar
 
Sam Hocevar committed
709
  echo "$ac_t""no" 1>&6
710 711 712 713 714
fi

if test -z "$CC"; then
  # Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
Sam Hocevar's avatar
 
Sam Hocevar committed
715
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
716
echo "configure:717: checking for $ac_word" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
717 718
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
719 720 721 722
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
Sam Hocevar's avatar
 
Sam Hocevar committed
723
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
724
  ac_prog_rejected=no
Sam Hocevar's avatar
 
Sam Hocevar committed
725 726 727 728 729 730 731 732 733 734 735 736 737
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
        ac_prog_rejected=yes
	continue
      fi
      ac_cv_prog_CC="cc"
      break
    fi
  done
  IFS="$ac_save_ifs"
738 739 740 741
if test $ac_prog_rejected = yes; then
  # We found a bogon in the path, so make sure we never use it.
  set dummy $ac_cv_prog_CC
  shift
Sam Hocevar's avatar
 
Sam Hocevar committed
742
  if test $# -gt 0; then
743 744 745 746
    # We chose a different compiler from the bogus one.
    # However, it has the same basename, so the bogon will be chosen
    # first if we set CC to just the basename; use the full file name.
    shift
Sam Hocevar's avatar
 
Sam Hocevar committed
747
    set dummy "$ac_dir/$ac_word" "$@"
748 749 750 751 752 753
    shift
    ac_cv_prog_CC="$@"
  fi
fi
fi
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
754
CC="$ac_cv_prog_CC"
755
if test -n "$CC"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
756
  echo "$ac_t""$CC" 1>&6
757
else
Sam Hocevar's avatar
 
Sam Hocevar committed
758
  echo "$ac_t""no" 1>&6
759 760
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
761 762 763 764 765 766
  if test -z "$CC"; then
    case "`uname -s`" in
    *win32* | *WIN32*)
      # Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
767
echo "configure:768: checking for $ac_word" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
768 769
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
770 771 772 773
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
Sam Hocevar's avatar
 
Sam Hocevar committed
774 775 776 777 778 779 780 781 782 783
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_CC="cl"
      break
    fi
  done
  IFS="$ac_save_ifs"
784 785
fi
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
786
CC="$ac_cv_prog_CC"
787
if test -n "$CC"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
788
  echo "$ac_t""$CC" 1>&6
789
else
Sam Hocevar's avatar
 
Sam Hocevar committed
790
  echo "$ac_t""no" 1>&6
791
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
792 793 794 795
 ;;
    esac
  fi
  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
796 797
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
798
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
799
echo "configure:800: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
800

Sam Hocevar's avatar
 
Sam Hocevar committed
801 802 803 804 805 806
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
807

Sam Hocevar's avatar
 
Sam Hocevar committed
808
cat > conftest.$ac_ext << EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
809

810
#line 811 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
811 812
#include "confdefs.h"

Sam Hocevar's avatar
 
Sam Hocevar committed
813 814
main(){return(0);}
EOF
815
if { (eval echo configure:816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
816 817 818 819
  ac_cv_prog_cc_works=yes
  # If we can't run a trivial program, we are probably using a cross compiler.
  if (./conftest; exit) 2>/dev/null; then
    ac_cv_prog_cc_cross=no
Sam Hocevar's avatar
 
Sam Hocevar committed
820
  else
Sam Hocevar's avatar
 
Sam Hocevar committed
821
    ac_cv_prog_cc_cross=yes
Sam Hocevar's avatar
 
Sam Hocevar committed
822
  fi
Sam Hocevar's avatar
 
Sam Hocevar committed
823 824 825 826
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_prog_cc_works=no
827
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
828 829 830 831 832 833 834 835 836 837 838 839 840
rm -fr conftest*
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
if test $ac_cv_prog_cc_works = no; then
  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
841
echo "configure:842: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
842 843 844 845
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross

echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
846
echo "configure:847: checking whether we are using GNU C" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
847 848 849 850 851 852 853 854
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.c <<EOF
#ifdef __GNUC__
  yes;
#endif
EOF
855
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:856: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
Sam Hocevar's avatar
 
Sam Hocevar committed
856
  ac_cv_prog_gcc=yes
Sam Hocevar's avatar
 
Sam Hocevar committed
857
else
Sam Hocevar's avatar
 
Sam Hocevar committed
858 859
  ac_cv_prog_gcc=no
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
860 861
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
862
echo "$ac_t""$ac_cv_prog_gcc" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
863

Sam Hocevar's avatar
 
Sam Hocevar committed
864 865
if test $ac_cv_prog_gcc = yes; then
  GCC=yes
Sam Hocevar's avatar
 
Sam Hocevar committed
866
else
Sam Hocevar's avatar
 
Sam Hocevar committed
867
  GCC=
Sam Hocevar's avatar
 
Sam Hocevar committed
868 869
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
870 871 872 873
ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
874
echo "configure:875: checking whether ${CC-cc} accepts -g" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
875 876
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
877
else
Sam Hocevar's avatar
 
Sam Hocevar committed
878 879
  echo 'void f(){}' > conftest.c
if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
880 881
  ac_cv_prog_cc_g=yes
else
Sam Hocevar's avatar
 
Sam Hocevar committed
882
  ac_cv_prog_cc_g=no
Sam Hocevar's avatar
 
Sam Hocevar committed
883
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
884 885
rm -f conftest*

Sam Hocevar's avatar
 
Sam Hocevar committed
886
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
887 888

echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
889
if test "$ac_test_CFLAGS" = set; then
Sam Hocevar's avatar
 
Sam Hocevar committed
890
  CFLAGS="$ac_save_CFLAGS"
891 892 893 894 895 896 897 898 899 900 901 902 903
elif test $ac_cv_prog_cc_g = yes; then
  if test "$GCC" = yes; then
    CFLAGS="-g -O2"
  else
    CFLAGS="-g"
  fi
else
  if test "$GCC" = yes; then
    CFLAGS="-O2"
  else
    CFLAGS=
  fi
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
904

Sam Hocevar's avatar
 
Sam Hocevar committed
905
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
906
echo "configure:907: checking how to run the C preprocessor" >&5
907 908 909 910 911
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
  CPP=
fi
if test -z "$CPP"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
912 913 914 915 916 917
if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
    # This must be in double quotes, not single quotes, because CPP may get
  # substituted into the Makefile and "${CC-cc}" will confuse make.
  CPP="${CC-cc} -E"
918
  # On the NeXT, cc -E runs the code through the compiler's parser,
Sam Hocevar's avatar
 
Sam Hocevar committed
919 920
  # not just through cpp.
  cat > conftest.$ac_ext <<EOF
921
#line 922 "configure"
922 923
#include "confdefs.h"
#include <assert.h>
Sam Hocevar's avatar
 
Sam Hocevar committed
924 925 926
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
927
{ (eval echo configure:928: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Sam Hocevar's avatar
 
Sam Hocevar committed
928 929
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
930 931
  :
else
Sam Hocevar's avatar
 
Sam Hocevar committed
932 933
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
934
  cat conftest.$ac_ext >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
935 936 937
  rm -rf conftest*
  CPP="${CC-cc} -E -traditional-cpp"
  cat > conftest.$ac_ext <<EOF
938
#line 939 "configure"
939
#include "confdefs.h"
Sam Hocevar's avatar
 
Sam Hocevar committed
940 941 942 943
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
944
{ (eval echo configure:945: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Sam Hocevar's avatar
 
Sam Hocevar committed
945 946 947
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  :
948
else
Sam Hocevar's avatar
 
Sam Hocevar committed
949 950
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
951
  cat conftest.$ac_ext >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
952 953 954
  rm -rf conftest*
  CPP="${CC-cc} -nologo -E"
  cat > conftest.$ac_ext <<EOF
955
#line 956 "configure"
956 957
#include "confdefs.h"
#include <assert.h>
Sam Hocevar's avatar
 
Sam Hocevar committed
958 959 960
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
961
{ (eval echo configure:962: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Sam Hocevar's avatar
 
Sam Hocevar committed
962 963
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
964 965
  :
else
Sam Hocevar's avatar
 
Sam Hocevar committed
966 967
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
968
  cat conftest.$ac_ext >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
969 970
  rm -rf conftest*
  CPP=/lib/cpp
971
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
972
rm -f conftest*
973
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
974
rm -f conftest*
975
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
976 977 978 979
rm -f conftest*
  ac_cv_prog_CPP="$CPP"
fi
  CPP="$ac_cv_prog_CPP"
980
else
Sam Hocevar's avatar
 
Sam Hocevar committed
981
  ac_cv_prog_CPP="$CPP"
982
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
983
echo "$ac_t""$CPP" 1>&6
984

Sam Hocevar's avatar
 
Sam Hocevar committed
985 986 987
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
988
echo "configure:989: checking for $ac_word" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
989 990
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
991 992 993 994
else
  if test -n "$RANLIB"; then
  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
else
Sam Hocevar's avatar
 
Sam Hocevar committed
995 996 997 998 999 1000 1001 1002 1003 1004 1005
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_RANLIB="ranlib"
      break
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
Sam Hocevar's avatar
 
Sam Hocevar committed
1006 1007
fi
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
1008
RANLIB="$ac_cv_prog_RANLIB"
Sam Hocevar's avatar
 
Sam Hocevar committed
1009
if test -n "$RANLIB"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
1010
  echo "$ac_t""$RANLIB" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1011
else
Sam Hocevar's avatar
 
Sam Hocevar committed
1012
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1013 1014
fi

1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026

# Find a good install program.  We prefer a C program (faster),
# so one script is as good as another.  But avoid the broken or
# incompatible versions:
# SysV /etc/install, /usr/sbin/install
# SunOS /usr/etc/install
# IRIX /sbin/install
# AIX /bin/install
# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
# AFS /usr/afsws/bin/install, which mishandles nonexistent args
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
Sam Hocevar's avatar
 
Sam Hocevar committed
1027
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1028
echo "configure:1029: checking for a BSD compatible install" >&5
1029
if test -z "$INSTALL"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
1030 1031
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
1032
else
Sam Hocevar's avatar
 
Sam Hocevar committed
1033
    IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS=":"
1034 1035
  for ac_dir in $PATH; do
    # Account for people who put trailing slashes in PATH elements.
Sam Hocevar's avatar
 
Sam Hocevar committed
1036 1037
    case "$ac_dir/" in
    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1038 1039 1040 1041 1042
    *)
      # OSF1 and SCO ODT 3.0 have their own names for install.
      # Don't use installbsd from OSF since it installs stuff as root
      # by default.
      for ac_prog in ginstall scoinst install; do
Sam Hocevar's avatar
 
Sam Hocevar committed
1043
        if test -f $ac_dir/$ac_prog; then
1044
	  if test $ac_prog = install &&
Sam Hocevar's avatar
 
Sam Hocevar committed
1045
            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056
	    # AIX install.  It has an incompatible calling convention.
	    :
	  else
	    ac_cv_path_install="$ac_dir/$ac_prog -c"
	    break 2
	  fi
	fi
      done
      ;;
    esac
  done
Sam Hocevar's avatar
 
Sam Hocevar committed
1057
  IFS="$ac_save_IFS"
1058 1059 1060

fi
  if test "${ac_cv_path_install+set}" = set; then
Sam Hocevar's avatar
 
Sam Hocevar committed
1061
    INSTALL="$ac_cv_path_install"
1062 1063 1064 1065 1066
  else
    # As a last resort, use the slow shell script.  We don't cache a
    # path for INSTALL within a source directory, because that will
    # break other packages using the cache if that directory is
    # removed, or if the path is relative.
Sam Hocevar's avatar
 
Sam Hocevar committed
1067
    INSTALL="$ac_install_sh"
1068 1069
  fi
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
1070
echo "$ac_t""$INSTALL" 1>&6
1071 1072 1073 1074 1075

# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
# It thinks the first close brace ends the variable substitution.
test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'

Sam Hocevar's avatar
 
Sam Hocevar committed
1076
test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1077 1078 1079

test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'

Sam Hocevar's avatar
 
Sam Hocevar committed
1080

Sam Hocevar's avatar
 
Sam Hocevar committed
1081
if test x${cross_compiling} != xyes; then
Sam Hocevar's avatar
 
Sam Hocevar committed
1082
  echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
1083
echo "configure:1084: checking whether byte ordering is bigendian" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
1084 1085
if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
1086 1087 1088
else
  ac_cv_c_bigendian=unknown
# See if sys/param.h defines the BYTE_ORDER macro.
Sam Hocevar's avatar
 
Sam Hocevar committed
1089
cat > conftest.$ac_ext <<EOF
1090
#line 1091 "configure"
1091 1092 1093
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
Sam Hocevar's avatar
 
Sam Hocevar committed
1094
int main() {
1095 1096 1097 1098

#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
 bogus endian macros
#endif
Sam Hocevar's avatar
 
Sam Hocevar committed
1099 1100
; return 0; }
EOF
1101
if { (eval echo configure:1102: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Sam Hocevar's avatar
 
Sam Hocevar committed
1102
  rm -rf conftest*
1103
  # It does; now see whether it defined to BIG_ENDIAN or not.
Sam Hocevar's avatar
 
Sam Hocevar committed
1104
cat > conftest.$ac_ext <<EOF
1105
#line 1106 "configure"
1106 1107 1108
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
Sam Hocevar's avatar
 
Sam Hocevar committed
1109
int main() {
1110 1111 1112 1113

#if BYTE_ORDER != BIG_ENDIAN
 not big endian
#endif
Sam Hocevar's avatar
 
Sam Hocevar committed
1114 1115
; return 0; }
EOF
1116
if { (eval echo configure:1117: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Sam Hocevar's avatar
 
Sam Hocevar committed
1117
  rm -rf conftest*
1118 1119
  ac_cv_c_bigendian=yes
else
Sam Hocevar's avatar
 
Sam Hocevar committed
1120 1121 1122 1123
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_c_bigendian=no
1124
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
1125
rm -f conftest*
1126
else
Sam Hocevar's avatar
 
Sam Hocevar committed
1127 1128
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
1129
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
1130
rm -f conftest*
1131 1132
if test $ac_cv_c_bigendian = unknown; then
if test "$cross_compiling" = yes; then
Sam Hocevar's avatar
 
Sam Hocevar committed
1133
    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1134
else
Sam Hocevar's avatar
 
Sam Hocevar committed
1135
  cat > conftest.$ac_ext <<EOF
1136
#line 1137 "configure"
1137
#include "confdefs.h"
Sam Hocevar's avatar
 
Sam Hocevar committed
1138
main () {
1139 1140 1141 1142 1143 1144 1145 1146 1147
  /* Are we little or big endian?  From Harbison&Steele.  */
  union
  {
    long l;
    char c[sizeof (long)];
  } u;
  u.l = 1;
  exit (u.c[sizeof (long) - 1] == 1);
}
Sam Hocevar's avatar
 
Sam Hocevar committed
1148
EOF
1149
if { (eval echo configure:1150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Sam Hocevar's avatar
 
Sam Hocevar committed
1150
then
1151 1152
  ac_cv_c_bigendian=no
else
Sam Hocevar's avatar
 
Sam Hocevar committed
1153 1154 1155 1156
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_c_bigendian=yes
1157
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
1158
rm -fr conftest*
1159
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
1160

1161 1162
fi
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
1163

Sam Hocevar's avatar
 
Sam Hocevar committed
1164 1165 1166
echo "$ac_t""$ac_cv_c_bigendian" 1>&6
if test $ac_cv_c_bigendian = yes; then
  cat >> confdefs.h <<\EOF
1167 1168 1169 1170 1171
#define WORDS_BIGENDIAN 1
EOF

fi

Sam Hocevar's avatar
 
Sam Hocevar committed
1172
fi
1173 1174 1175

for ac_func in gettimeofday select strerror strtod strtol
do
Sam Hocevar's avatar
 
Sam Hocevar committed
1176
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1177
echo "configure:1178: checking for $ac_func" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
1178 1179 1180 1181
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
1182
#line 1183 "configure"
1183 1184
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
Sam Hocevar's avatar
 
Sam Hocevar committed
1185
    which can conflict with char $ac_func(); below.  */
1186 1187 1188
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
Sam Hocevar's avatar
 
Sam Hocevar committed
1189 1190 1191 1192
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {
1193 1194 1195 1196 1197 1198 1199

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
Sam Hocevar's avatar
 
Sam Hocevar committed
1200
$ac_func();
1201 1202
#endif

Sam Hocevar's avatar
 
Sam Hocevar committed
1203
; return 0; }
1204
EOF
1205
if { (eval echo configure:1206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
1206 1207 1208 1209 1210 1211 1212 1213 1214 1215
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi
1216

Sam Hocevar's avatar
 
Sam Hocevar committed
1217 1218 1219 1220 1221 1222 1223 1224 1225
if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 
else
  echo "$ac_t""no" 1>&6
1226 1227 1228 1229 1230
fi
done

for ac_func in setenv putenv
do
Sam Hocevar's avatar
 
Sam Hocevar committed
1231
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1232
echo "configure:1233: checking for $ac_func" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
1233 1234
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
1235
else
Sam Hocevar's avatar
 
Sam Hocevar committed
1236
  cat > conftest.$ac_ext <<EOF
1237
#line 1238 "configure"
1238 1239
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
Sam Hocevar's avatar
 
Sam Hocevar committed
1240
    which can conflict with char $ac_func(); below.  */
1241 1242 1243
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
Sam Hocevar's avatar
 
Sam Hocevar committed
1244 1245 1246 1247
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {
1248 1249 1250 1251 1252 1253 1254

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
Sam Hocevar's avatar
 
Sam Hocevar committed
1255
$ac_func();
1256 1257
#endif

Sam Hocevar's avatar
 
Sam Hocevar committed
1258
; return 0; }
1259
EOF
1260
if { (eval echo configure:1261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
1261 1262 1263 1264 1265 1266 1267 1268 1269 1270
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi
1271

Sam Hocevar's avatar
 
Sam Hocevar committed
1272 1273 1274 1275 1276 1277 1278 1279 1280
if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 
else
  echo "$ac_t""no" 1>&6
1281 1282 1283
fi
done

Sam Hocevar's avatar
 
Sam Hocevar committed
1284
echo $ac_n "checking for connect""... $ac_c" 1>&6
1285
echo "configure:1286: checking for connect" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
1286 1287
if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
1288
else
Sam Hocevar's avatar
 
Sam Hocevar committed
1289
  cat > conftest.$ac_ext <<EOF
1290
#line 1291 "configure"
1291 1292
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
Sam Hocevar's avatar
 
Sam Hocevar committed
1293
    which can conflict with char connect(); below.  */
1294 1295 1296
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
Sam Hocevar's avatar
 
Sam Hocevar committed
1297 1298 1299 1300
    builtin and then its argument prototype would still apply.  */
char connect();

int main() {
1301 1302 1303 1304 1305 1306 1307

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_connect) || defined (__stub___connect)
choke me
#else
Sam Hocevar's avatar
 
Sam Hocevar committed
1308
connect();
1309 1310
#endif

Sam Hocevar's avatar
 
Sam Hocevar committed
1311 1312
; return 0; }
EOF
1313
if { (eval echo configure:1314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326
  rm -rf conftest*
  eval "ac_cv_func_connect=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_connect=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
  echo "$ac_t""yes" 1>&6
1327 1328
  :
else
Sam Hocevar's avatar
 
Sam Hocevar committed
1329
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1330

Sam Hocevar's avatar
 
Sam Hocevar committed
1331
  echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
1332
echo "configure:1333: checking for connect in -lsocket" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
1333 1334 1335
ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
1336
else
Sam Hocevar's avatar
 
Sam Hocevar committed
1337
  ac_save_LIBS="$LIBS"
1338
LIBS="-lsocket  $LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
1339
cat > conftest.$ac_ext <<EOF
1340
#line 1341 "configure"
1341 1342 1343
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
Sam Hocevar's avatar
 
Sam Hocevar committed
1344 1345 1346 1347 1348 1349 1350
    builtin and then its argument prototype would still apply.  */
char connect();

int main() {
connect()
; return 0; }
EOF
1351
if { (eval echo configure:1352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1366
  LIB="${LIB} -lsocket"
Sam Hocevar's avatar
 
Sam Hocevar committed
1367 1368
else
  echo "$ac_t""no" 1>&6
1369 1370
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
1371

1372 1373
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
1374
echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
1375
echo "configure:1376: checking for gethostbyname" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
1376 1377
if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
1378
else
Sam Hocevar's avatar
 
Sam Hocevar committed
1379
  cat > conftest.$ac_ext <<EOF
1380
#line 1381 "configure"
1381 1382
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
Sam Hocevar's avatar
 
Sam Hocevar committed
1383
    which can conflict with char gethostbyname(); below.  */
1384 1385 1386
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
Sam Hocevar's avatar
 
Sam Hocevar committed
1387 1388 1389 1390
    builtin and then its argument prototype would still apply.  */
char gethostbyname();

int main() {
1391 1392 1393 1394 1395 1396 1397

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
choke me
#else
Sam Hocevar's avatar
 
Sam Hocevar committed
1398
gethostbyname();
1399 1400
#endif

Sam Hocevar's avatar
 
Sam Hocevar committed
1401 1402
; return 0; }
EOF
1403
if { (eval echo configure:1404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416
  rm -rf conftest*
  eval "ac_cv_func_gethostbyname=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_gethostbyname=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
  echo "$ac_t""yes" 1>&6
1417 1418
  :
else
Sam Hocevar's avatar
 
Sam Hocevar committed
1419
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1420

Sam Hocevar's avatar
 
Sam Hocevar committed
1421
  echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
1422
echo "configure:1423: checking for gethostbyname in -lnsl" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
1423 1424 1425
ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
1426
else
Sam Hocevar's avatar
 
Sam Hocevar committed
1427
  ac_save_LIBS="$LIBS"
1428
LIBS="-lnsl  $LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
1429
cat > conftest.$ac_ext <<EOF
1430
#line 1431 "configure"
1431 1432 1433
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
Sam Hocevar's avatar
 
Sam Hocevar committed
1434 1435 1436 1437 1438 1439 1440
    builtin and then its argument prototype would still apply.  */
char gethostbyname();

int main() {
gethostbyname()
; return 0; }
EOF
1441
if { (eval echo configure:1442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1456
  LIB="${LIB} -lnsl"
Sam Hocevar's avatar
 
Sam Hocevar committed
1457 1458
else
  echo "$ac_t""no" 1>&6
1459 1460
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
1461

1462 1463
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
1464
echo $ac_n "checking for nanosleep""... $ac_c" 1>&6
1465
echo "configure:1466: checking for nanosleep" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
1466 1467
if eval "test \"`echo '$''{'ac_cv_func_nanosleep'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
1468
else
Sam Hocevar's avatar
 
Sam Hocevar committed
1469
  cat > conftest.$ac_ext <<EOF
1470
#line 1471 "configure"
1471 1472
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
Sam Hocevar's avatar
 
Sam Hocevar committed
1473
    which can conflict with char nanosleep(); below.  */
1474 1475 1476
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
Sam Hocevar's avatar
 
Sam Hocevar committed
1477 1478 1479 1480
    builtin and then its argument prototype would still apply.  */
char nanosleep();

int main() {
1481 1482 1483 1484 1485 1486 1487

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_nanosleep) || defined (__stub___nanosleep)
choke me
#else
Sam Hocevar's avatar
 
Sam Hocevar committed
1488
nanosleep();
1489 1490
#endif

Sam Hocevar's avatar
 
Sam Hocevar committed
1491 1492
; return 0; }
EOF
1493
if { (eval echo configure:1494: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506
  rm -rf conftest*
  eval "ac_cv_func_nanosleep=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_nanosleep=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'nanosleep`\" = yes"; then
  echo "$ac_t""yes" 1>&6
1507 1508
  :
else
Sam Hocevar's avatar
 
Sam Hocevar committed
1509
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1510

Sam Hocevar's avatar
 
Sam Hocevar committed
1511
  echo $ac_n "checking for nanosleep in -lrt""... $ac_c" 1>&6
1512
echo "configure:1513: checking for nanosleep in -lrt" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
1513 1514 1515
ac_lib_var=`echo rt'_'nanosleep | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
1516
else
Sam Hocevar's avatar
 
Sam Hocevar committed
1517
  ac_save_LIBS="$LIBS"
1518
LIBS="-lrt  $LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
1519
cat > conftest.$ac_ext <<EOF
1520
#line 1521 "configure"
1521 1522 1523
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
Sam Hocevar's avatar
 
Sam Hocevar committed
1524 1525 1526 1527 1528 1529 1530
    builtin and then its argument prototype would still apply.  */
char nanosleep();

int main() {
nanosleep()
; return 0; }
EOF
1531
if { (eval echo configure:1532: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1546
  LIB="${LIB} -lrt"
1547
else
Sam Hocevar's avatar
 
Sam Hocevar committed
1548
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1549

Sam Hocevar's avatar
 
Sam Hocevar committed
1550
    echo $ac_n "checking for nanosleep in -lposix4""... $ac_c" 1>&6
1551
echo "configure:1552: checking for nanosleep in -lposix4" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
1552 1553 1554
ac_lib_var=`echo posix4'_'nanosleep | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
1555
else
Sam Hocevar's avatar
 
Sam Hocevar committed
1556
  ac_save_LIBS="$LIBS"
1557
LIBS="-lposix4  $LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
1558
cat > conftest.$ac_ext <<EOF
1559
#line 1560 "configure"
1560 1561 1562
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
Sam Hocevar's avatar
 
Sam Hocevar committed
1563 1564 1565 1566 1567 1568 1569
    builtin and then its argument prototype would still apply.  */
char nanosleep();

int main() {
nanosleep()
; return 0; }
EOF
1570
if { (eval echo configure:1571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1585
  LIB="${LIB} -lposix4"
Sam Hocevar's avatar
 
Sam Hocevar committed
1586 1587
else
  echo "$ac_t""no" 1>&6
1588 1589
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
1590
  
1591 1592
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
1593

1594 1595 1596 1597
fi

for ac_func in usleep
do
Sam Hocevar's avatar
 
Sam Hocevar committed
1598
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1599
echo "configure:1600: checking for $ac_func" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
1600 1601 1602 1603
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
1604
#line 1605 "configure"
1605 1606
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
Sam Hocevar's avatar
 
Sam Hocevar committed
1607
    which can conflict with char $ac_func(); below.  */
1608 1609 1610
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
Sam Hocevar's avatar
 
Sam Hocevar committed
1611 1612 1613 1614
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {
1615 1616 1617 1618 1619

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Sam Hocevar's avatar
 
Sam Hocevar committed
1620 1621
choke me
#else
Sam Hocevar's avatar
 
Sam Hocevar committed
1622
$ac_func();
Sam Hocevar's avatar
 
Sam Hocevar committed
1623
#endif
1624

Sam Hocevar's avatar
 
Sam Hocevar committed
1625
; return 0; }
1626
EOF
1627
if { (eval echo configure:1628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
1628 1629 1630 1631 1632 1633 1634 1635 1636 1637
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
1638

Sam Hocevar's avatar
 
Sam Hocevar committed
1639 1640 1641 1642 1643 1644 1645 1646 1647
if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 
else
  echo "$ac_t""no" 1>&6
1648 1649 1650
fi
done

Sam Hocevar's avatar
 
Sam Hocevar committed
1651
echo $ac_n "checking for inet_aton""... $ac_c" 1>&6
1652
echo "configure:1653: checking for inet_aton" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
1653 1654
if eval "test \"`echo '$''{'ac_cv_func_inet_aton'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
1655
else
Sam Hocevar's avatar
 
Sam Hocevar committed
1656
  cat > conftest.$ac_ext <<EOF
1657
#line 1658 "configure"
1658 1659
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
Sam Hocevar's avatar
 
Sam Hocevar committed
1660
    which can conflict with char inet_aton(); below.  */
1661 1662 1663
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
Sam Hocevar's avatar
 
Sam Hocevar committed
1664 1665 1666 1667
    builtin and then its argument prototype would still apply.  */
char inet_aton();

int main() {
1668 1669 1670 1671 1672 1673 1674

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_inet_aton) || defined (__stub___inet_aton)
choke me
#else
Sam Hocevar's avatar
 
Sam Hocevar committed
1675
inet_aton();
1676 1677
#endif

Sam Hocevar's avatar
 
Sam Hocevar committed
1678 1679
; return 0; }
EOF
1680
if { (eval echo configure:1681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693
  rm -rf conftest*
  eval "ac_cv_func_inet_aton=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_inet_aton=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'inet_aton`\" = yes"; then
  echo "$ac_t""yes" 1>&6
1694 1695
  :
else
Sam Hocevar's avatar
 
Sam Hocevar committed
1696
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1697

Sam Hocevar's avatar
 
Sam Hocevar committed
1698
  echo $ac_n "checking for inet_aton in -lresolv""... $ac_c" 1>&6
1699
echo "configure:1700: checking for inet_aton in -lresolv" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
1700 1701 1702
ac_lib_var=`echo resolv'_'inet_aton | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
1703
else
Sam Hocevar's avatar
 
Sam Hocevar committed
1704
  ac_save_LIBS="$LIBS"
1705
LIBS="-lresolv  $LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
1706
cat > conftest.$ac_ext <<EOF
1707
#line 1708 "configure"
1708 1709 1710
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
Sam Hocevar's avatar
 
Sam Hocevar committed
1711 1712 1713 1714 1715 1716 1717
    builtin and then its argument prototype would still apply.  */
char inet_aton();

int main() {
inet_aton()
; return 0; }
EOF
1718
if { (eval echo configure:1719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1733
  LIB="${LIB} -lresolv"
Sam Hocevar's avatar
 
Sam Hocevar committed
1734 1735
else
  echo "$ac_t""no" 1>&6
1736 1737
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
1738

1739 1740
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
1741 1742
for ac_func in vasprintf
do
Sam Hocevar's avatar
 
Sam Hocevar committed
1743
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1744
echo "configure:1745: checking for $ac_func" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
1745 1746 1747 1748
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
1749
#line 1750 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
1750 1751
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
Sam Hocevar's avatar
 
Sam Hocevar committed
1752
    which can conflict with char $ac_func(); below.  */
Sam Hocevar's avatar
 
Sam Hocevar committed
1753 1754 1755
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
Sam Hocevar's avatar
 
Sam Hocevar committed
1756 1757 1758 1759
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
1760 1761 1762 1763 1764 1765 1766

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
Sam Hocevar's avatar
 
Sam Hocevar committed
1767
$ac_func();
Sam Hocevar's avatar
 
Sam Hocevar committed
1768 1769
#endif

Sam Hocevar's avatar
 
Sam Hocevar committed
1770
; return 0; }
Sam Hocevar's avatar
 
Sam Hocevar committed
1771
EOF
1772
if { (eval echo configure:1773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
1773 1774 1775 1776 1777 1778 1779 1780 1781 1782
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
1783

Sam Hocevar's avatar
 
Sam Hocevar committed
1784 1785 1786 1787 1788 1789 1790 1791 1792
if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1793 1794 1795
fi
done

Sam Hocevar's avatar
 
Sam Hocevar committed
1796 1797
for ac_func in swab
do
Sam Hocevar's avatar
 
Sam Hocevar committed
1798
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1799
echo "configure:1800: checking for $ac_func" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
1800 1801 1802 1803
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
1804
#line 1805 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
$ac_func();
#endif

; return 0; }
EOF
1827
if { (eval echo configure:1828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 
else
  echo "$ac_t""no" 1>&6
fi
done


for ac_func in sigrelse
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1855
echo "configure:1856: checking for $ac_func" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
1856 1857 1858 1859
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
1860
#line 1861 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
1861 1862
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
Sam Hocevar's avatar
 
Sam Hocevar committed
1863
    which can conflict with char $ac_func(); below.  */
Sam Hocevar's avatar
 
Sam Hocevar committed
1864 1865 1866
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
Sam Hocevar's avatar
 
Sam Hocevar committed
1867 1868 1869 1870
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
1871 1872 1873 1874 1875 1876 1877

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
Sam Hocevar's avatar
 
Sam Hocevar committed
1878
$ac_func();
Sam Hocevar's avatar
 
Sam Hocevar committed
1879 1880
#endif

Sam Hocevar's avatar
 
Sam Hocevar committed
1881
; return 0; }
Sam Hocevar's avatar
 
Sam Hocevar committed
1882
EOF
1883
if { (eval echo configure:1884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
1884 1885 1886 1887 1888 1889 1890 1891 1892 1893
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
1894

Sam Hocevar's avatar
 
Sam Hocevar committed
1895 1896 1897 1898 1899 1900 1901 1902 1903
if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1904 1905 1906
fi
done

Sam Hocevar's avatar
 
Sam Hocevar committed
1907

Sam Hocevar's avatar
 
Sam Hocevar committed
1908
NEED_GETOPT=0
Sam Hocevar's avatar
 
Sam Hocevar committed
1909
echo $ac_n "checking for getopt_long""... $ac_c" 1>&6
1910
echo "configure:1911: checking for getopt_long" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
1911 1912
if eval "test \"`echo '$''{'ac_cv_func_getopt_long'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1913
else
Sam Hocevar's avatar
 
Sam Hocevar committed
1914
  cat > conftest.$ac_ext <<EOF
1915
#line 1916 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
1916 1917
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
Sam Hocevar's avatar
 
Sam Hocevar committed
1918
    which can conflict with char getopt_long(); below.  */
Sam Hocevar's avatar
 
Sam Hocevar committed
1919 1920 1921
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
Sam Hocevar's avatar
 
Sam Hocevar committed
1922 1923 1924 1925
    builtin and then its argument prototype would still apply.  */
char getopt_long();

int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
1926 1927 1928 1929 1930 1931 1932

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_getopt_long) || defined (__stub___getopt_long)
choke me
#else
Sam Hocevar's avatar
 
Sam Hocevar committed
1933
getopt_long();
Sam Hocevar's avatar
 
Sam Hocevar committed
1934 1935
#endif

Sam Hocevar's avatar
 
Sam Hocevar committed
1936 1937
; return 0; }
EOF
1938
if { (eval echo configure:1939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952
  rm -rf conftest*
  eval "ac_cv_func_getopt_long=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_getopt_long=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'getopt_long`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  cat >> confdefs.h <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1953 1954 1955 1956
#define HAVE_GETOPT_LONG 1
EOF

else
Sam Hocevar's avatar
 
Sam Hocevar committed
1957 1958 1959
  echo "$ac_t""no" 1>&6
 # FreeBSD has a gnugetopt library for this:
  echo $ac_n "checking for getopt_long in -lgnugetopt""... $ac_c" 1>&6
1960
echo "configure:1961: checking for getopt_long in -lgnugetopt" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
1961 1962 1963
ac_lib_var=`echo gnugetopt'_'getopt_long | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1964
else
Sam Hocevar's avatar
 
Sam Hocevar committed
1965
  ac_save_LIBS="$LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
1966
LIBS="-lgnugetopt  $LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
1967
cat > conftest.$ac_ext <<EOF
1968
#line 1969 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
1969 1970 1971
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
Sam Hocevar's avatar
 
Sam Hocevar committed
1972 1973 1974 1975 1976 1977 1978
    builtin and then its argument prototype would still apply.  */
char getopt_long();

int main() {
getopt_long()
; return 0; }
EOF
1979
if { (eval echo configure:1980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  cat >> confdefs.h <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1995 1996
#define HAVE_GETOPT_LONG 1
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1997
 LIB="${LIB} -lgnugetopt"
Sam Hocevar's avatar
 
Sam Hocevar committed
1998
else
Sam Hocevar's avatar
 
Sam Hocevar committed
1999
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2000
NEED_GETOPT=1
Sam Hocevar's avatar
 
Sam Hocevar committed
2001 2002 2003 2004
fi

fi

Sam Hocevar's avatar
 
Sam Hocevar committed
2005 2006

for ac_hdr in unistd.h
2007
do
Sam Hocevar's avatar
 
Sam Hocevar committed
2008 2009
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2010
echo "configure:2011: checking for $ac_hdr" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
2011 2012 2013 2014
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
2015
#line 2016 "configure"
2016
#include "confdefs.h"
Sam Hocevar's avatar
 
Sam Hocevar committed
2017 2018 2019
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2020
{ (eval echo configure:2021: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Sam Hocevar's avatar
 
Sam Hocevar committed
2021 2022 2023 2024 2025 2026 2027
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
2028
  cat conftest.$ac_ext >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
2029 2030
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
2031
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
2032
rm -f conftest*
2033
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
2034 2035 2036 2037 2038
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
2039
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2040 2041 2042
 
else
  echo "$ac_t""no" 1>&6
2043 2044 2045 2046 2047
fi
done

for ac_func in getpagesize
do
Sam Hocevar's avatar
 
Sam Hocevar committed
2048
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2049
echo "configure:2050: checking for $ac_func" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
2050 2051 2052 2053
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
2054
#line 2055 "configure"
2055 2056
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
Sam Hocevar's avatar
 
Sam Hocevar committed
2057
    which can conflict with char $ac_func(); below.  */
2058 2059 2060
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
Sam Hocevar's avatar
 
Sam Hocevar committed
2061 2062 2063 2064
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {
2065 2066 2067 2068 2069 2070 2071

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
Sam Hocevar's avatar
 
Sam Hocevar committed
2072
$ac_func();
2073 2074
#endif

Sam Hocevar's avatar
 
Sam Hocevar committed
2075
; return 0; }
2076
EOF
2077
if { (eval echo configure:2078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
2078 2079 2080 2081 2082 2083 2084 2085 2086 2087
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi
2088

Sam Hocevar's avatar
 
Sam Hocevar committed
2089 2090 2091 2092 2093 2094 2095 2096 2097
if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 
else
  echo "$ac_t""no" 1>&6
2098 2099 2100
fi
done

Sam Hocevar's avatar
 
Sam Hocevar committed
2101
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
2102
echo "configure:2103: checking for working mmap" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
2103 2104
if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
2105 2106 2107 2108
else
  if test "$cross_compiling" = yes; then
  ac_cv_func_mmap_fixed_mapped=no
else
Sam Hocevar's avatar
 
Sam Hocevar committed
2109
  cat > conftest.$ac_ext <<EOF
2110
#line 2111 "configure"
2111
#include "confdefs.h"
Sam Hocevar's avatar
 
Sam Hocevar committed
2112

2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124
/* Thanks to Mike Haertel and Jim Avera for this test.
   Here is a matrix of mmap possibilities:
	mmap private not fixed
	mmap private fixed at somewhere currently unmapped
	mmap private fixed at somewhere already mapped
	mmap shared not fixed
	mmap shared fixed at somewhere currently unmapped
	mmap shared fixed at somewhere already mapped
   For private mappings, we should verify that changes cannot be read()
   back from the file, nor mmap's back from the file at a different
   address.  (There have been systems where private was not correctly
   implemented like the infamous i386 svr4.0, and systems where the
Sam Hocevar's avatar
 
Sam Hocevar committed
2125
   VM page cache was not coherent with the filesystem buffer cache
2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137
   like early versions of FreeBSD and possibly contemporary NetBSD.)
   For shared mappings, we should conversely verify that changes get
   propogated back to all the places they're supposed to be.

   Grep wants private fixed already mapped.
   The main things grep needs to know about mmap are:
   * does it exist and is it safe to write into the mmap'd area
   * how to use it (BSD variants)  */
#include <sys/types.h>
#include <fcntl.h>
#include <sys/mman.h>

Sam Hocevar's avatar
 
Sam Hocevar committed
2138
/* This mess was copied from the GNU getpagesize.h.  */
Sam Hocevar's avatar
 
Sam Hocevar committed
2139
#ifndef HAVE_GETPAGESIZE
Sam Hocevar's avatar
 
Sam Hocevar committed
2140 2141 2142
# ifdef HAVE_UNISTD_H
#  include <unistd.h>
# endif
Sam Hocevar's avatar
 
Sam Hocevar committed
2143

2144
/* Assume that all systems that can run configure have sys/param.h.  */
Sam Hocevar's avatar
 
Sam Hocevar committed
2145
# ifndef HAVE_SYS_PARAM_H
2146 2147 2148 2149 2150 2151
#  define HAVE_SYS_PARAM_H 1
# endif

# ifdef _SC_PAGESIZE
#  define getpagesize() sysconf(_SC_PAGESIZE)
# else /* no _SC_PAGESIZE */
Sam Hocevar's avatar
 
Sam Hocevar committed
2152
#  ifdef HAVE_SYS_PARAM_H
2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178
#   include <sys/param.h>
#   ifdef EXEC_PAGESIZE
#    define getpagesize() EXEC_PAGESIZE
#   else /* no EXEC_PAGESIZE */
#    ifdef NBPG
#     define getpagesize() NBPG * CLSIZE
#     ifndef CLSIZE
#      define CLSIZE 1
#     endif /* no CLSIZE */
#    else /* no NBPG */
#     ifdef NBPC
#      define getpagesize() NBPC
#     else /* no NBPC */
#      ifdef PAGESIZE
#       define getpagesize() PAGESIZE
#      endif /* PAGESIZE */
#     endif /* no NBPC */
#    endif /* no NBPG */
#   endif /* no EXEC_PAGESIZE */
#  else /* no HAVE_SYS_PARAM_H */
#   define getpagesize() 8192	/* punt totally */
#  endif /* no HAVE_SYS_PARAM_H */
# endif /* no _SC_PAGESIZE */

#endif /* no HAVE_GETPAGESIZE */

Sam Hocevar's avatar
 
Sam Hocevar committed
2179 2180 2181 2182 2183 2184
#ifdef __cplusplus
extern "C" { void *malloc(unsigned); }
#else
char *malloc();
#endif

2185
int
Sam Hocevar's avatar
 
Sam Hocevar committed
2186
main()
2187
{
Sam Hocevar's avatar
 
Sam Hocevar committed
2188 2189 2190 2191 2192 2193 2194 2195 2196
	char *data, *data2, *data3;
	int i, pagesize;
	int fd;

	pagesize = getpagesize();

	/*
	 * First, make a file with some known garbage in it.
	 */
Sam Hocevar's avatar
 
Sam Hocevar committed
2197
	data = malloc(pagesize);
Sam Hocevar's avatar
 
Sam Hocevar committed
2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217
	if (!data)
		exit(1);
	for (i = 0; i < pagesize; ++i)
		*(data + i) = rand();
	umask(0);
	fd = creat("conftestmmap", 0600);
	if (fd < 0)
		exit(1);
	if (write(fd, data, pagesize) != pagesize)
		exit(1);
	close(fd);

	/*
	 * Next, try to mmap the file at a fixed address which
	 * already has something else allocated at it.  If we can,
	 * also make sure that we see the same garbage.
	 */
	fd = open("conftestmmap", O_RDWR);
	if (fd < 0)
		exit(1);
Sam Hocevar's avatar
 
Sam Hocevar committed
2218
	data2 = malloc(2 * pagesize);
Sam Hocevar's avatar
 
Sam Hocevar committed
2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235
	if (!data2)
		exit(1);
	data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
	if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
	    MAP_PRIVATE | MAP_FIXED, fd, 0L))
		exit(1);
	for (i = 0; i < pagesize; ++i)
		if (*(data + i) != *(data2 + i))
			exit(1);

	/*
	 * Finally, make sure that changes to the mapped area
	 * do not percolate back to the file as seen by read().
	 * (This is a bug on some variants of i386 svr4.0.)
	 */
	for (i = 0; i < pagesize; ++i)
		*(data2 + i) = *(data2 + i) + 1;
Sam Hocevar's avatar
 
Sam Hocevar committed
2236
	data3 = malloc(pagesize);
Sam Hocevar's avatar
 
Sam Hocevar committed
2237 2238 2239 2240 2241 2242 2243 2244 2245 2246
	if (!data3)
		exit(1);
	if (read(fd, data3, pagesize) != pagesize)
		exit(1);
	for (i = 0; i < pagesize; ++i)
		if (*(data + i) != *(data3 + i))
			exit(1);
	close(fd);
	unlink("conftestmmap");
	exit(0);
2247
}
Sam Hocevar's avatar
 
Sam Hocevar committed
2248 2249

EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2250
if { (eval echo configure:2251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Sam Hocevar's avatar
 
Sam Hocevar committed
2251
then
2252 2253
  ac_cv_func_mmap_fixed_mapped=yes
else
Sam Hocevar's avatar
 
Sam Hocevar committed
2254 2255 2256 2257
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_func_mmap_fixed_mapped=no
2258
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
2259
rm -fr conftest*
2260
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
2261

2262
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
2263

Sam Hocevar's avatar
 
Sam Hocevar committed
2264 2265 2266
echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
if test $ac_cv_func_mmap_fixed_mapped = yes; then
  cat >> confdefs.h <<\EOF
2267 2268 2269 2270 2271
#define HAVE_MMAP 1
EOF

fi

Sam Hocevar's avatar
 
Sam Hocevar committed
2272
echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2273
echo "configure:2274: checking return type of signal handlers" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
2274 2275
if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
2276
else
Sam Hocevar's avatar
 
Sam Hocevar committed
2277
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2278
#line 2279 "configure"
2279 2280 2281 2282
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
#ifdef signal
Sam Hocevar's avatar
 
Sam Hocevar committed
2283
#undef signal
2284 2285 2286 2287 2288 2289 2290
#endif
#ifdef __cplusplus
extern "C" void (*signal (int, void (*)(int)))(int);
#else
void (*signal ()) ();
#endif

Sam Hocevar's avatar
 
Sam Hocevar committed
2291
int main() {
2292
int i;
Sam Hocevar's avatar
 
Sam Hocevar committed
2293 2294
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2295
if { (eval echo configure:2296: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Sam Hocevar's avatar
 
Sam Hocevar committed
2296
  rm -rf conftest*
2297 2298
  ac_cv_type_signal=void
else
Sam Hocevar's avatar
 
Sam Hocevar committed
2299 2300 2301 2302
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_type_signal=int
2303
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
2304
rm -f conftest*
2305 2306
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
2307 2308
echo "$ac_t""$ac_cv_type_signal" 1>&6
cat >> confdefs.h <<EOF
2309 2310 2311
#define RETSIGTYPE $ac_cv_type_signal
EOF

Sam Hocevar's avatar
 
Sam Hocevar committed
2312 2313

echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2314
echo "configure:2315: checking for dlopen in -ldl" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
2315 2316 2317
ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
2318
else
Sam Hocevar's avatar
 
Sam Hocevar committed
2319
  ac_save_LIBS="$LIBS"
2320
LIBS="-ldl  $LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
2321
cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2322
#line 2323 "configure"
2323 2324 2325
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
Sam Hocevar's avatar
 
Sam Hocevar committed
2326 2327 2328 2329 2330 2331 2332
    builtin and then its argument prototype would still apply.  */
char dlopen();

int main() {
dlopen()
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2333
if { (eval echo configure:2334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2348
  LIB="${LIB} -ldl"
Sam Hocevar's avatar
 
Sam Hocevar committed
2349 2350
else
  echo "$ac_t""no" 1>&6
2351 2352
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
2353
echo $ac_n "checking for pow in -lm""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2354
echo "configure:2355: checking for pow in -lm" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
2355 2356 2357
ac_lib_var=`echo m'_'pow | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
2358
else
Sam Hocevar's avatar
 
Sam Hocevar committed
2359
  ac_save_LIBS="$LIBS"
2360
LIBS="-lm  $LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
2361
cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2362
#line 2363 "configure"
2363 2364 2365
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
Sam Hocevar's avatar
 
Sam Hocevar committed
2366 2367 2368 2369 2370 2371 2372
    builtin and then its argument prototype would still apply.  */
char pow();

int main() {
pow()
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2373
if { (eval echo configure:2374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2388
  LIB_YUV="${LIB_YUV} -lm"
Sam Hocevar's avatar
 
Sam Hocevar committed
2389 2390
else
  echo "$ac_t""no" 1>&6
2391 2392
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
2393

Sam Hocevar's avatar
 
Sam Hocevar committed
2394 2395 2396
CPPFLAGS="${CPPFLAGS} -I/usr/local/include"
CFLAGS="${CFLAGS} -I/usr/local/include"

Sam Hocevar's avatar
 
Sam Hocevar committed
2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447
echo $ac_n "checking for pthread_attr_init""... $ac_c" 1>&6
echo "configure:2399: checking for pthread_attr_init" >&5
if eval "test \"`echo '$''{'ac_cv_func_pthread_attr_init'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 2404 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char pthread_attr_init(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char pthread_attr_init();

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_pthread_attr_init) || defined (__stub___pthread_attr_init)
choke me
#else
pthread_attr_init();
#endif

; return 0; }
EOF
if { (eval echo configure:2427: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_pthread_attr_init=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_pthread_attr_init=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'pthread_attr_init`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  :
else
  echo "$ac_t""no" 1>&6

  THREAD_LIB=error
  if test "x${THREAD_LIB}" = xerror; then
    echo $ac_n "checking for pthread_attr_init in -lpthread""... $ac_c" 1>&6
echo "configure:2448: checking for pthread_attr_init in -lpthread" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
2448 2449 2450
ac_lib_var=`echo pthread'_'pthread_attr_init | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
2451
else
Sam Hocevar's avatar
 
Sam Hocevar committed
2452
  ac_save_LIBS="$LIBS"
2453
LIBS="-lpthread  $LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
2454
cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2455
#line 2456 "configure"
2456 2457 2458
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
Sam Hocevar's avatar
 
Sam Hocevar committed
2459 2460 2461 2462 2463 2464 2465
    builtin and then its argument prototype would still apply.  */
char pthread_attr_init();

int main() {
pthread_attr_init()
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2466
if { (eval echo configure:2467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2481
  THREAD_LIB="-lpthread"
Sam Hocevar's avatar
 
Sam Hocevar committed
2482 2483
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2484 2485
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
2486 2487 2488 2489
  fi
  if test "x${THREAD_LIB}" = xerror; then
    echo $ac_n "checking for pthread_attr_init in -lpthreads""... $ac_c" 1>&6
echo "configure:2490: checking for pthread_attr_init in -lpthreads" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
2490 2491 2492
ac_lib_var=`echo pthreads'_'pthread_attr_init | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2493
else
Sam Hocevar's avatar
 
Sam Hocevar committed
2494
  ac_save_LIBS="$LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
2495
LIBS="-lpthreads  $LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
2496
cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2497
#line 2498 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
2498
#include "confdefs.h"
Sam Hocevar's avatar
 
Sam Hocevar committed
2499 2500
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
Sam Hocevar's avatar
 
Sam Hocevar committed
2501 2502 2503 2504 2505 2506 2507
    builtin and then its argument prototype would still apply.  */
char pthread_attr_init();

int main() {
pthread_attr_init()
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2508
if { (eval echo configure:2509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2523
  THREAD_LIB="-lpthreads"
Sam Hocevar's avatar
 
Sam Hocevar committed
2524 2525
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2526
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
2527

Sam Hocevar's avatar
 
Sam Hocevar committed
2528 2529 2530 2531
  fi
  if test "x${THREAD_LIB}" = xerror; then
    echo $ac_n "checking for pthread_attr_init in -lc_r""... $ac_c" 1>&6
echo "configure:2532: checking for pthread_attr_init in -lc_r" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
2532 2533 2534
ac_lib_var=`echo c_r'_'pthread_attr_init | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
2535
else
Sam Hocevar's avatar
 
Sam Hocevar committed
2536
  ac_save_LIBS="$LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
2537
LIBS="-lc_r  $LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
2538
cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2539
#line 2540 "configure"
2540 2541 2542
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
Sam Hocevar's avatar
 
Sam Hocevar committed
2543 2544 2545 2546 2547 2548 2549
    builtin and then its argument prototype would still apply.  */
char pthread_attr_init();

int main() {
pthread_attr_init()
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2550
if { (eval echo configure:2551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2565
  THREAD_LIB="-lc_r"
Sam Hocevar's avatar
 
Sam Hocevar committed
2566 2567
else
  echo "$ac_t""no" 1>&6
2568 2569
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
2570 2571 2572 2573 2574
  fi
  if test "x${THREAD_LIB}" = xerror; then
    THREAD_LIB=""
  fi

Sam Hocevar's avatar
 
Sam Hocevar committed
2575
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
2576 2577 2578 2579 2580 2581


echo $ac_n "checking for cthread_fork in -lthreads""... $ac_c" 1>&6
echo "configure:2580: checking for cthread_fork in -lthreads" >&5
ac_lib_var=`echo threads'_'cthread_fork | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
2582
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2583
else
Sam Hocevar's avatar
 
Sam Hocevar committed
2584 2585 2586 2587
  ac_save_LIBS="$LIBS"
LIBS="-lthreads  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 2588 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
2588 2589 2590
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
Sam Hocevar's avatar
 
Sam Hocevar committed
2591
    builtin and then its argument prototype would still apply.  */
Sam Hocevar's avatar
 
Sam Hocevar committed
2592
char cthread_fork();
Sam Hocevar's avatar
 
Sam Hocevar committed
2593 2594

int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
2595
cthread_fork()
Sam Hocevar's avatar
 
Sam Hocevar committed
2596 2597
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2598
if { (eval echo configure:2599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
2599
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
2600
  eval "ac_cv_lib_$ac_lib_var=yes"
Sam Hocevar's avatar
 
Sam Hocevar committed
2601 2602 2603 2604
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
2605
  eval "ac_cv_lib_$ac_lib_var=no"
Sam Hocevar's avatar
 
Sam Hocevar committed
2606 2607
fi
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
2608
LIBS="$ac_save_LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
2609

Sam Hocevar's avatar
 
Sam Hocevar committed
2610 2611
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
2612
  echo "$ac_t""yes" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2613
  THREAD_LIB="-lthreads"
Sam Hocevar's avatar
 
Sam Hocevar committed
2614 2615 2616
else
  echo "$ac_t""no" 1>&6
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
2617 2618


Sam Hocevar's avatar
 
Sam Hocevar committed
2619
cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2620
#line 2621 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
2621 2622
#include "confdefs.h"
#include <pthread.h>
Sam Hocevar's avatar
 
Sam Hocevar committed
2623
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2624 2625
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "pthread_cond_t" >/dev/null 2>&1; then
Sam Hocevar's avatar
 
Sam Hocevar committed
2626 2627 2628
  rm -rf conftest*
  
  cat >> confdefs.h <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2629 2630 2631 2632 2633 2634
#define PTHREAD_COND_T_IN_PTHREAD_H 1
EOF

fi
rm -f conftest*

Sam Hocevar's avatar
 
Sam Hocevar committed
2635
cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2636
#line 2637 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
2637 2638
#include "confdefs.h"
#include <strings.h>
Sam Hocevar's avatar
 
Sam Hocevar committed
2639
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2640 2641
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "strncasecmp" >/dev/null 2>&1; then
Sam Hocevar's avatar
 
Sam Hocevar committed
2642 2643 2644
  rm -rf conftest*
  
  cat >> confdefs.h <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2645 2646 2647 2648 2649
#define STRNCASECMP_IN_STRINGS_H 1
EOF

fi
rm -f conftest*
2650

Sam Hocevar's avatar
 
Sam Hocevar committed
2651 2652

for ac_hdr in stddef.h getopt.h strings.h
Christophe Massiot's avatar
Christophe Massiot committed
2653
do
Sam Hocevar's avatar
 
Sam Hocevar committed
2654 2655
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2656
echo "configure:2657: checking for $ac_hdr" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
2657 2658 2659 2660
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2661
#line 2662 "configure"
Christophe Massiot's avatar
Christophe Massiot committed
2662
#include "confdefs.h"
Sam Hocevar's avatar
 
Sam Hocevar committed
2663 2664 2665
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Sam Hocevar's avatar
 
Sam Hocevar committed
2666
{ (eval echo configure:2667: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Sam Hocevar's avatar
 
Sam Hocevar committed
2667 2668 2669 2670 2671 2672 2673
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
Christophe Massiot's avatar
Christophe Massiot committed
2674
  cat conftest.$ac_ext >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
2675 2676
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
Christophe Massiot's avatar
Christophe Massiot committed
2677
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
2678
rm -f conftest*
Christophe Massiot's avatar
Christophe Massiot committed
2679
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
2680 2681 2682 2683 2684
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
Christophe Massiot's avatar
Christophe Massiot committed
2685
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2686 2687 2688
 
else
  echo "$ac_t""no" 1>&6
Christophe Massiot's avatar
Christophe Massiot committed
2689 2690 2691
fi
done

Sam Hocevar's avatar
 
Sam Hocevar committed
2692
for ac_hdr in sys/sockio.h fcntl.h sys/time.h
2693
do
Sam Hocevar's avatar
 
Sam Hocevar committed
2694 2695
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2696
echo "configure:2697: checking for $ac_hdr" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
2697 2698 2699 2700
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2701
#line 2702 "configure"
2702
#include "confdefs.h"
Sam Hocevar's avatar
 
Sam Hocevar committed
2703 2704 2705
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Sam Hocevar's avatar
 
Sam Hocevar committed
2706
{ (eval echo configure:2707: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Sam Hocevar's avatar
 
Sam Hocevar committed
2707 2708 2709 2710 2711 2712 2713
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
2714
  cat conftest.$ac_ext >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
2715 2716
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
2717
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
2718
rm -f conftest*
2719
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
2720 2721 2722 2723 2724
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
2725
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2726 2727 2728
 
else
  echo "$ac_t""no" 1>&6
2729 2730 2731
fi
done

Sam Hocevar's avatar
 
Sam Hocevar committed
2732
for ac_hdr in sys/soundcard.h machine/soundcard.h
2733
do
Sam Hocevar's avatar
 
Sam Hocevar committed
2734 2735
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2736
echo "configure:2737: checking for $ac_hdr" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
2737 2738 2739 2740
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2741
#line 2742 "configure"
2742
#include "confdefs.h"
Sam Hocevar's avatar
 
Sam Hocevar committed
2743 2744 2745
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Sam Hocevar's avatar
 
Sam Hocevar committed
2746
{ (eval echo configure:2747: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Sam Hocevar's avatar
 
Sam Hocevar committed
2747 2748 2749 2750 2751 2752 2753
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
2754
  cat conftest.$ac_ext >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
2755 2756
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
2757
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
2758
rm -f conftest*
2759
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
2760 2761 2762 2763 2764
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
2765
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2766 2767 2768
 
else
  echo "$ac_t""no" 1>&6
2769 2770 2771
fi
done

Sam Hocevar's avatar
 
Sam Hocevar committed
2772
for ac_hdr in dlfcn.h image.h
2773
do
Sam Hocevar's avatar
 
Sam Hocevar committed
2774 2775
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2776
echo "configure:2777: checking for $ac_hdr" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
2777 2778 2779 2780
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2781
#line 2782 "configure"
2782
#include "confdefs.h"
Sam Hocevar's avatar
 
Sam Hocevar committed
2783 2784 2785
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Sam Hocevar's avatar
 
Sam Hocevar committed
2786
{ (eval echo configure:2787: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Sam Hocevar's avatar
 
Sam Hocevar committed
2787 2788 2789 2790 2791 2792 2793
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
2794
  cat conftest.$ac_ext >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
2795 2796
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
2797
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
2798
rm -f conftest*
2799
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
2800 2801 2802 2803 2804
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
2805
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2806 2807 2808
 
else
  echo "$ac_t""no" 1>&6
2809 2810 2811
fi
done

Sam Hocevar's avatar
 
Sam Hocevar committed
2812
for ac_hdr in arpa/inet.h net/if.h netinet/in.h sys/socket.h
2813
do
Sam Hocevar's avatar
 
Sam Hocevar committed
2814 2815
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2816
echo "configure:2817: checking for $ac_hdr" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
2817 2818 2819 2820
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2821
#line 2822 "configure"
2822
#include "confdefs.h"
Sam Hocevar's avatar
 
Sam Hocevar committed
2823 2824 2825
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Sam Hocevar's avatar
 
Sam Hocevar committed
2826
{ (eval echo configure:2827: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Sam Hocevar's avatar
 
Sam Hocevar committed
2827 2828 2829 2830 2831 2832 2833
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
2834
  cat conftest.$ac_ext >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
2835 2836
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
2837
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
2838
rm -f conftest*
2839
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
2840 2841 2842 2843 2844
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
2845
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2846 2847 2848
 
else
  echo "$ac_t""no" 1>&6
2849 2850 2851
fi
done

Sam Hocevar's avatar
 
Sam Hocevar committed
2852
for ac_hdr in machine/param.h
Benoit Steiner's avatar
 
Benoit Steiner committed
2853
do
Sam Hocevar's avatar
 
Sam Hocevar committed
2854 2855
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2856
echo "configure:2857: checking for $ac_hdr" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
2857 2858 2859 2860
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2861
#line 2862 "configure"
Benoit Steiner's avatar
 
Benoit Steiner committed
2862
#include "confdefs.h"
Sam Hocevar's avatar
 
Sam Hocevar committed
2863 2864 2865
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Sam Hocevar's avatar
 
Sam Hocevar committed
2866
{ (eval echo configure:2867: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Sam Hocevar's avatar
 
Sam Hocevar committed
2867 2868 2869 2870 2871 2872 2873
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
Benoit Steiner's avatar
 
Benoit Steiner committed
2874
  cat conftest.$ac_ext >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
2875 2876
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
Benoit Steiner's avatar
 
Benoit Steiner committed
2877
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
2878
rm -f conftest*
Benoit Steiner's avatar
 
Benoit Steiner committed
2879
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
2880 2881 2882 2883 2884
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
Benoit Steiner's avatar
 
Benoit Steiner committed
2885
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2886 2887 2888
 
else
  echo "$ac_t""no" 1>&6
Benoit Steiner's avatar
 
Benoit Steiner committed
2889 2890 2891
fi
done

Sam Hocevar's avatar
 
Sam Hocevar committed
2892 2893

for ac_hdr in cthreads.h pthread.h kernel/scheduler.h kernel/OS.h
Benoit Steiner's avatar
 
Benoit Steiner committed
2894
do
Sam Hocevar's avatar
 
Sam Hocevar committed
2895 2896
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2897
echo "configure:2898: checking for $ac_hdr" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
2898 2899 2900 2901
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2902
#line 2903 "configure"
Christophe Massiot's avatar
Christophe Massiot committed
2903
#include "confdefs.h"
Sam Hocevar's avatar
 
Sam Hocevar committed
2904 2905 2906
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Sam Hocevar's avatar
 
Sam Hocevar committed
2907
{ (eval echo configure:2908: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Sam Hocevar's avatar
 
Sam Hocevar committed
2908 2909 2910 2911 2912 2913 2914
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
Christophe Massiot's avatar
Christophe Massiot committed
2915
  cat conftest.$ac_ext >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
2916 2917
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
Christophe Massiot's avatar
Christophe Massiot committed
2918
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
2919
rm -f conftest*
Christophe Massiot's avatar
Christophe Massiot committed
2920
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
2921 2922 2923 2924 2925
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
Christophe Massiot's avatar
Christophe Massiot committed
2926
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2927 2928 2929
 
else
  echo "$ac_t""no" 1>&6
Christophe Massiot's avatar
Christophe Massiot committed
2930 2931 2932
fi
done

Sam Hocevar's avatar
 
Sam Hocevar committed
2933

Sam Hocevar's avatar
 
Sam Hocevar committed
2934
CFLAGS="${save_CFLAGS} -Wall -Werror"
Sam Hocevar's avatar
 
Sam Hocevar committed
2935
echo $ac_n "checking for ntohl in sys/param.h""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2936
echo "configure:2937: checking for ntohl in sys/param.h" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
2937
cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2938
#line 2939 "configure"
Christophe Massiot's avatar
Christophe Massiot committed
2939 2940 2941
#include "confdefs.h"
#include <sys/param.h>
void foo() { int meuh; ntohl(meuh); }
Sam Hocevar's avatar
 
Sam Hocevar committed
2942
int main() {
Christophe Massiot's avatar
Christophe Massiot committed
2943

Sam Hocevar's avatar
 
Sam Hocevar committed
2944 2945
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2946
if { (eval echo configure:2947: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Sam Hocevar's avatar
 
Sam Hocevar committed
2947 2948
  rm -rf conftest*
  cat >> confdefs.h <<\EOF
Christophe Massiot's avatar
Christophe Massiot committed
2949 2950 2951
#define NTOHL_IN_SYS_PARAM_H 1
EOF

Sam Hocevar's avatar
 
Sam Hocevar committed
2952
 echo "$ac_t""yes" 1>&6
Christophe Massiot's avatar
Christophe Massiot committed
2953
else
Sam Hocevar's avatar
 
Sam Hocevar committed
2954 2955 2956 2957
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  echo "$ac_t""no" 1>&6
Christophe Massiot's avatar
Christophe Massiot committed
2958
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
2959
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
2960

Sam Hocevar's avatar
 
Sam Hocevar committed
2961
CFLAGS="${save_CFLAGS} -finline-limit=31337"
Sam Hocevar's avatar
 
Sam Hocevar committed
2962
echo $ac_n "checking if \$CC accepts -finline-limit""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2963
echo "configure:2964: checking if \$CC accepts -finline-limit" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
2964
cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2965
#line 2966 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
2966 2967 2968 2969 2970 2971
#include "confdefs.h"

int main() {

; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2972
if { (eval echo configure:2973: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Sam Hocevar's avatar
 
Sam Hocevar committed
2973 2974 2975 2976 2977 2978 2979 2980 2981 2982
  rm -rf conftest*
  save_CFLAGS="${save_CFLAGS} -finline-limit=31337"; echo "$ac_t""yes" 1>&6
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  echo "$ac_t""no" 1>&6
fi
rm -f conftest*

Sam Hocevar's avatar
 
Sam Hocevar committed
2983
CFLAGS="${save_CFLAGS} -bundle -undefined suppress"
Sam Hocevar's avatar
 
Sam Hocevar committed
2984
echo $ac_n "checking if \$CC accepts -bundle -undefined suppress""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2985
echo "configure:2986: checking if \$CC accepts -bundle -undefined suppress" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
2986
cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2987
#line 2988 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
2988 2989 2990 2991 2992 2993
#include "confdefs.h"

int main() {

; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2994
if { (eval echo configure:2995: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Sam Hocevar's avatar
 
Sam Hocevar committed
2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005
  rm -rf conftest*
  PLCFLAGS="${PLCFLAGS} -bundle -undefined suppress"; echo "$ac_t""yes" 1>&6
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  echo "$ac_t""no" 1>&6
fi
rm -f conftest*

CFLAGS="${save_CFLAGS} -shared"
Sam Hocevar's avatar
 
Sam Hocevar committed
3006
echo $ac_n "checking if \$CC accepts -shared""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3007
echo "configure:3008: checking if \$CC accepts -shared" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
3008
cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3009
#line 3010 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
3010 3011 3012 3013 3014 3015
#include "confdefs.h"

int main() {

; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3016
if { (eval echo configure:3017: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Sam Hocevar's avatar
 
Sam Hocevar committed
3017 3018 3019 3020 3021 3022 3023 3024 3025 3026
  rm -rf conftest*
  PLCFLAGS="${PLCFLAGS} -shared"; echo "$ac_t""yes" 1>&6
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  echo "$ac_t""no" 1>&6
fi
rm -f conftest*

Sam Hocevar's avatar
 
Sam Hocevar committed
3027 3028 3029 3030
if test x"${SOFLAGS}" = x; then
  try_SOFLAGS="-Wl,-soname -Wl,"
  LDFLAGS="${save_LDFLAGS} ${try_SOFLAGS}foo.so.0"
  echo $ac_n "checking if linker accepts ${try_SOFLAGS}foo.so.0""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3031
echo "configure:3032: checking if linker accepts ${try_SOFLAGS}foo.so.0" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
3032
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3033
#line 3034 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
3034 3035 3036 3037 3038 3039
#include "confdefs.h"

int main() {

; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3040
if { (eval echo configure:3041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055
  rm -rf conftest*
  SOFLAGS="${try_SOFLAGS}"; echo "$ac_t""yes" 1>&6
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  echo "$ac_t""no" 1>&6
fi
rm -f conftest*
fi

if test x"${SOFLAGS}" = x; then
  try_SOFLAGS="-Wl,-h -Wl,"
  LDFLAGS="${save_LDFLAGS} ${try_SOFLAGS}foo.so.0"
  echo $ac_n "checking if linker accepts ${try_SOFLAGS}foo.so.0""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3056
echo "configure:3057: checking if linker accepts ${try_SOFLAGS}foo.so.0" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
3057
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3058
#line 3059 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
3059 3060 3061 3062 3063 3064
#include "confdefs.h"

int main() {

; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3065
if { (eval echo configure:3066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076
  rm -rf conftest*
  SOFLAGS="${try_SOFLAGS}"; echo "$ac_t""yes" 1>&6
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  echo "$ac_t""no" 1>&6
fi
rm -f conftest*
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
3077
CFLAGS="${save_CFLAGS}"
Sam Hocevar's avatar
 
Sam Hocevar committed
3078
LDFLAGS="${save_LDFLAGS}"
Christophe Massiot's avatar
Christophe Massiot committed
3079

Sam Hocevar's avatar
 
Sam Hocevar committed
3080
echo $ac_n "checking for boolean_t in sys/types.h""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3081
echo "configure:3082: checking for boolean_t in sys/types.h" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
3082
cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3083
#line 3084 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
3084 3085 3086
#include "confdefs.h"
#include <sys/types.h>
void quux() { boolean_t foo; }
Sam Hocevar's avatar
 
Sam Hocevar committed
3087
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
3088

Sam Hocevar's avatar
 
Sam Hocevar committed
3089 3090
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3091
if { (eval echo configure:3092: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Sam Hocevar's avatar
 
Sam Hocevar committed
3092 3093
  rm -rf conftest*
  cat >> confdefs.h <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3094 3095 3096
#define BOOLEAN_T_IN_SYS_TYPES_H 1
EOF

Sam Hocevar's avatar
 
Sam Hocevar committed
3097
 echo "$ac_t""yes" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3098
else
Sam Hocevar's avatar
 
Sam Hocevar committed
3099 3100 3101 3102
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3103
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
3104 3105
rm -f conftest*
echo $ac_n "checking for boolean_t in pthread.h""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3106
echo "configure:3107: checking for boolean_t in pthread.h" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
3107
cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3108
#line 3109 "configure"
3109 3110 3111
#include "confdefs.h"
#include <pthread.h>
void quux() { boolean_t foo; }
Sam Hocevar's avatar
 
Sam Hocevar committed
3112
int main() {
3113

Sam Hocevar's avatar
 
Sam Hocevar committed
3114 3115
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3116
if { (eval echo configure:3117: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Sam Hocevar's avatar
 
Sam Hocevar committed
3117 3118
  rm -rf conftest*
  cat >> confdefs.h <<\EOF
3119 3120 3121
#define BOOLEAN_T_IN_PTHREAD_H 1
EOF

Sam Hocevar's avatar
 
Sam Hocevar committed
3122
 echo "$ac_t""yes" 1>&6
3123
else
Sam Hocevar's avatar
 
Sam Hocevar committed
3124 3125 3126 3127
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  echo "$ac_t""no" 1>&6
3128
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
3129
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154
echo $ac_n "checking for boolean_t in cthreads.h""... $ac_c" 1>&6
echo "configure:3132: checking for boolean_t in cthreads.h" >&5
cat > conftest.$ac_ext <<EOF
#line 3134 "configure"
#include "confdefs.h"
#include <cthreads.h>
void quux() { boolean_t foo; }
int main() {

; return 0; }
EOF
if { (eval echo configure:3142: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  cat >> confdefs.h <<\EOF
#define BOOLEAN_T_IN_CTHREADS_H 1
EOF

 echo "$ac_t""yes" 1>&6
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  echo "$ac_t""no" 1>&6
fi
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
3155

Sam Hocevar's avatar
 
Sam Hocevar committed
3156
echo $ac_n "checking for working const""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3157
echo "configure:3158: checking for working const" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
3158 3159
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
3160
else
Sam Hocevar's avatar
 
Sam Hocevar committed
3161
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3162
#line 3163 "configure"
3163 3164
#include "confdefs.h"

Sam Hocevar's avatar
 
Sam Hocevar committed
3165 3166 3167
int main() {

/* Ultrix mips cc rejects this.  */
Sam Hocevar's avatar
 
Sam Hocevar committed
3168
typedef int charset[2]; const charset x;
Sam Hocevar's avatar
 
Sam Hocevar committed
3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203
/* SunOS 4.1.1 cc rejects this.  */
char const *const *ccp;
char **p;
/* NEC SVR4.0.2 mips cc rejects this.  */
struct point {int x, y;};
static struct point const zero = {0,0};
/* AIX XL C 1.02.0.0 rejects this.
   It does not let you subtract one const X* pointer from another in an arm
   of an if-expression whose if-part is not a constant expression */
const char *g = "string";
ccp = &g + (g ? g-g : 0);
/* HPUX 7.0 cc rejects these. */
++ccp;
p = (char**) ccp;
ccp = (char const *const *) p;
{ /* SCO 3.2v4 cc rejects this.  */
  char *t;
  char const *s = 0 ? (char *) 0 : (char const *) 0;

  *t++ = 0;
}
{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
  int x[] = {25, 17};
  const int *foo = &x[0];
  ++foo;
}
{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
  typedef const int *iptr;
  iptr p = 0;
  ++p;
}
{ /* AIX XL C 1.02.0.0 rejects this saying
     "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
  struct s { int j; const int *ap[3]; };
  struct s *b; b->j = 5;
Sam Hocevar's avatar
 
Sam Hocevar committed
3204
}
Sam Hocevar's avatar
 
Sam Hocevar committed
3205 3206 3207 3208 3209 3210
{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
  const int foo = 10;
}

; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3211
if { (eval echo configure:3212: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Sam Hocevar's avatar
 
Sam Hocevar committed
3212
  rm -rf conftest*
3213 3214
  ac_cv_c_const=yes
else
Sam Hocevar's avatar
 
Sam Hocevar committed
3215 3216 3217 3218
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_c_const=no
3219
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
3220
rm -f conftest*
3221
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
3222

Sam Hocevar's avatar
 
Sam Hocevar committed
3223 3224 3225 3226
echo "$ac_t""$ac_cv_c_const" 1>&6
if test $ac_cv_c_const = no; then
  cat >> confdefs.h <<\EOF
#define const 
3227 3228 3229 3230
EOF

fi

Sam Hocevar's avatar
 
Sam Hocevar committed
3231
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3232
echo "configure:3233: checking for ANSI C header files" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
3233 3234
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
3235
else
Sam Hocevar's avatar
 
Sam Hocevar committed
3236
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3237
#line 3238 "configure"
3238 3239 3240 3241 3242
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <float.h>
Sam Hocevar's avatar
 
Sam Hocevar committed
3243 3244
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Sam Hocevar's avatar
 
Sam Hocevar committed
3245
{ (eval echo configure:3246: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Sam Hocevar's avatar
 
Sam Hocevar committed
3246 3247 3248
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
3249 3250
  ac_cv_header_stdc=yes
else
Sam Hocevar's avatar
 
Sam Hocevar committed
3251 3252
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
3253
  cat conftest.$ac_ext >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
3254
  rm -rf conftest*
3255 3256
  ac_cv_header_stdc=no
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
3257
rm -f conftest*
3258 3259 3260

if test $ac_cv_header_stdc = yes; then
  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Sam Hocevar's avatar
 
Sam Hocevar committed
3261
cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3262
#line 3263 "configure"
3263 3264
#include "confdefs.h"
#include <string.h>
Sam Hocevar's avatar
 
Sam Hocevar committed
3265
EOF
3266 3267 3268 3269
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "memchr" >/dev/null 2>&1; then
  :
else
Sam Hocevar's avatar
 
Sam Hocevar committed
3270
  rm -rf conftest*
3271 3272 3273 3274 3275 3276 3277 3278
  ac_cv_header_stdc=no
fi
rm -f conftest*

fi

if test $ac_cv_header_stdc = yes; then
  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Sam Hocevar's avatar
 
Sam Hocevar committed
3279
cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3280
#line 3281 "configure"
3281 3282
#include "confdefs.h"
#include <stdlib.h>
Sam Hocevar's avatar
 
Sam Hocevar committed
3283
EOF
3284 3285 3286 3287
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "free" >/dev/null 2>&1; then
  :
else
Sam Hocevar's avatar
 
Sam Hocevar committed
3288
  rm -rf conftest*
3289 3290 3291 3292 3293 3294 3295 3296
  ac_cv_header_stdc=no
fi
rm -f conftest*

fi

if test $ac_cv_header_stdc = yes; then
  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Sam Hocevar's avatar
 
Sam Hocevar committed
3297
if test "$cross_compiling" = yes; then
3298 3299
  :
else
Sam Hocevar's avatar
 
Sam Hocevar committed
3300
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3301
#line 3302 "configure"
3302 3303
#include "confdefs.h"
#include <ctype.h>
Sam Hocevar's avatar
 
Sam Hocevar committed
3304 3305
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
Sam Hocevar's avatar
 
Sam Hocevar committed
3306
#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
Sam Hocevar's avatar
 
Sam Hocevar committed
3307 3308 3309 3310 3311
int main () { int i; for (i = 0; i < 256; i++)
if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }

EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3312
if { (eval echo configure:3313: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Sam Hocevar's avatar
 
Sam Hocevar committed
3313
then
3314 3315
  :
else
Sam Hocevar's avatar
 
Sam Hocevar committed
3316 3317 3318 3319
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_header_stdc=no
3320
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
3321
rm -fr conftest*
3322
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
3323

3324 3325
fi
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
3326

Sam Hocevar's avatar
 
Sam Hocevar committed
3327 3328 3329
echo "$ac_t""$ac_cv_header_stdc" 1>&6
if test $ac_cv_header_stdc = yes; then
  cat >> confdefs.h <<\EOF
3330 3331 3332 3333 3334
#define STDC_HEADERS 1
EOF

fi

Sam Hocevar's avatar
 
Sam Hocevar committed
3335
echo $ac_n "checking for size_t""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3336
echo "configure:3337: checking for size_t" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
3337 3338
if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3339
else
Sam Hocevar's avatar
 
Sam Hocevar committed
3340
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3341
#line 3342 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
3342
#include "confdefs.h"
Sam Hocevar's avatar
 
Sam Hocevar committed
3343 3344 3345 3346 3347 3348 3349 3350 3351
#include <sys/types.h>
#if STDC_HEADERS
#include <stdlib.h>
#include <stddef.h>
#endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  rm -rf conftest*
3352 3353
  ac_cv_type_size_t=yes
else
Sam Hocevar's avatar
 
Sam Hocevar committed
3354 3355
  rm -rf conftest*
  ac_cv_type_size_t=no
3356
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
3357
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
3358

Sam Hocevar's avatar
 
Sam Hocevar committed
3359 3360 3361 3362
fi
echo "$ac_t""$ac_cv_type_size_t" 1>&6
if test $ac_cv_type_size_t = no; then
  cat >> confdefs.h <<\EOF
3363 3364 3365 3366 3367
#define size_t unsigned
EOF

fi

Sam Hocevar's avatar
 
Sam Hocevar committed
3368
echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3369
echo "configure:3370: checking whether time.h and sys/time.h may both be included" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
3370 3371
if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
3372
else
Sam Hocevar's avatar
 
Sam Hocevar committed
3373
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3374
#line 3375 "configure"
3375 3376 3377 3378
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
#include <time.h>
Sam Hocevar's avatar
 
Sam Hocevar committed
3379
int main() {
3380
struct tm *tp;
Sam Hocevar's avatar
 
Sam Hocevar committed
3381 3382
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3383
if { (eval echo configure:3384: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Sam Hocevar's avatar
 
Sam Hocevar committed
3384
  rm -rf conftest*
3385 3386
  ac_cv_header_time=yes
else
Sam Hocevar's avatar
 
Sam Hocevar committed
3387 3388 3389 3390
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_header_time=no
3391
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
3392
rm -f conftest*
3393
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
3394

Sam Hocevar's avatar
 
Sam Hocevar committed
3395 3396 3397
echo "$ac_t""$ac_cv_header_time" 1>&6
if test $ac_cv_header_time = yes; then
  cat >> confdefs.h <<\EOF
3398 3399 3400 3401 3402
#define TIME_WITH_SYS_TIME 1
EOF

fi

Sam Hocevar's avatar
 
Sam Hocevar committed
3403

Sam Hocevar's avatar
 
Sam Hocevar committed
3404 3405
ARCH=${host_cpu}

Sam Hocevar's avatar
 
Sam Hocevar committed
3406 3407
BUILTINS="${BUILTINS} es ps ts yuv idct idctclassic motion imdct downmix"
PLUGINS="${PLUGINS}"
Sam Hocevar's avatar
 
Sam Hocevar committed
3408

Gildas Bazin's avatar
 
Gildas Bazin committed
3409 3410
MMX_MODULES="yuvmmx idctmmx motionmmx"
MMXEXT_MODULES="idctmmxext motionmmxext imdct3dn imdctsse downmix3dn downmixsse"
Sam Hocevar's avatar
 
Sam Hocevar committed
3411

Sam Hocevar's avatar
 
Sam Hocevar committed
3412
echo $ac_n "checking if \$CC groks MMX inline assembly""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3413
echo "configure:3414: checking if \$CC groks MMX inline assembly" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
3414
cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3415
#line 3416 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
3416 3417
#include "confdefs.h"
void quux(){void *p;asm("packuswb %%mm1,%%mm2"::"r"(p));}
Sam Hocevar's avatar
 
Sam Hocevar committed
3418
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
3419

Sam Hocevar's avatar
 
Sam Hocevar committed
3420 3421
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3422
if { (eval echo configure:3423: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Sam Hocevar's avatar
 
Sam Hocevar committed
3423
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
3424
  ACCEL_MODULES="${ACCEL_MODULES} ${MMX_MODULES}"
Sam Hocevar's avatar
 
Sam Hocevar committed
3425
  echo "$ac_t""yes" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3426
else
Sam Hocevar's avatar
 
Sam Hocevar committed
3427 3428 3429 3430
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3431
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
3432
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
3433

Sam Hocevar's avatar
 
Sam Hocevar committed
3434
echo $ac_n "checking if \$CC groks MMX EXT or SSE inline assembly""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3435
echo "configure:3436: checking if \$CC groks MMX EXT or SSE inline assembly" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
3436
cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3437
#line 3438 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
3438 3439
#include "confdefs.h"
void quux(){void *p;asm("maskmovq %%mm1,%%mm2"::"r"(p));}
Sam Hocevar's avatar
 
Sam Hocevar committed
3440
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
3441

Sam Hocevar's avatar
 
Sam Hocevar committed
3442 3443
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3444
if { (eval echo configure:3445: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Sam Hocevar's avatar
 
Sam Hocevar committed
3445
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
3446
  ACCEL_MODULES="${ACCEL_MODULES} ${MMXEXT_MODULES}"
Sam Hocevar's avatar
 
Sam Hocevar committed
3447
  echo "$ac_t""yes" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3448
else
Sam Hocevar's avatar
 
Sam Hocevar committed
3449 3450 3451 3452
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3453
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
3454
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
3455

Sam Hocevar's avatar
 
Sam Hocevar committed
3456

Sam Hocevar's avatar
 
Sam Hocevar committed
3457 3458
CAN_BUILD_LIBDVDCSS=0

Sam Hocevar's avatar
 
Sam Hocevar committed
3459 3460 3461 3462
for ac_hdr in winioctl.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3463
echo "configure:3464: checking for $ac_hdr" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
3464 3465 3466 3467
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3468
#line 3469 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
3469 3470 3471 3472
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Sam Hocevar's avatar
 
Sam Hocevar committed
3473
{ (eval echo configure:3474: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Sam Hocevar's avatar
 
Sam Hocevar committed
3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
 
Sam Hocevar's avatar
 
Sam Hocevar committed
3494
  CAN_BUILD_LIBDVDCSS="${HAVE_LIBDVDCSS}"
Sam Hocevar's avatar
 
Sam Hocevar committed
3495 3496 3497 3498 3499 3500 3501

else
  echo "$ac_t""no" 1>&6
fi
done


Sam Hocevar's avatar
 
Sam Hocevar committed
3502
for ac_hdr in sys/ioctl.h
3503
do
Sam Hocevar's avatar
 
Sam Hocevar committed
3504 3505
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3506
echo "configure:3507: checking for $ac_hdr" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
3507 3508 3509 3510
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3511
#line 3512 "configure"
3512
#include "confdefs.h"
Sam Hocevar's avatar
 
Sam Hocevar committed
3513 3514 3515
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Sam Hocevar's avatar
 
Sam Hocevar committed
3516
{ (eval echo configure:3517: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Sam Hocevar's avatar
 
Sam Hocevar committed
3517 3518 3519 3520 3521 3522 3523
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
3524
  cat conftest.$ac_ext >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
3525 3526
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
3527
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
3528
rm -f conftest*
3529
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
3530 3531 3532 3533 3534
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
3535
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3536
 
Sam Hocevar's avatar
 
Sam Hocevar committed
3537
  CAN_BUILD_LIBDVDCSS="${HAVE_LIBDVDCSS}"
Sam Hocevar's avatar
 
Sam Hocevar committed
3538
  for ac_hdr in sys/cdio.h sys/dvdio.h linux/cdrom.h dvd.h
3539
do
Sam Hocevar's avatar
 
Sam Hocevar committed
3540 3541
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3542
echo "configure:3543: checking for $ac_hdr" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
3543 3544 3545 3546
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3547
#line 3548 "configure"
3548
#include "confdefs.h"
Sam Hocevar's avatar
 
Sam Hocevar committed
3549 3550 3551
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Sam Hocevar's avatar
 
Sam Hocevar committed
3552
{ (eval echo configure:3553: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Sam Hocevar's avatar
 
Sam Hocevar committed
3553 3554 3555 3556 3557 3558 3559
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
3560
  cat conftest.$ac_ext >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
3561 3562
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
3563
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
3564
rm -f conftest*
3565
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
3566 3567 3568 3569 3570
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
3571
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3572 3573 3574
 
else
  echo "$ac_t""no" 1>&6
3575 3576 3577
fi
done

Sam Hocevar's avatar
 
Sam Hocevar committed
3578
  BSD_DVD_STRUCT=0
Sam Hocevar's avatar
 
Sam Hocevar committed
3579
  LINUX_DVD_STRUCT=0
Sam Hocevar's avatar
 
Sam Hocevar committed
3580
        cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3581
#line 3582 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
3582 3583
#include "confdefs.h"
#include <sys/dvdio.h>
Sam Hocevar's avatar
 
Sam Hocevar committed
3584
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3585 3586
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "dvd_struct" >/dev/null 2>&1; then
Sam Hocevar's avatar
 
Sam Hocevar committed
3587 3588 3589
  rm -rf conftest*
  
    cat >> confdefs.h <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3590 3591 3592 3593
#define DVD_STRUCT_IN_SYS_DVDIO_H 1
EOF

    BSD_DVD_STRUCT=1
Sam Hocevar's avatar
 
Sam Hocevar committed
3594
  
Sam Hocevar's avatar
 
Sam Hocevar committed
3595 3596 3597
fi
rm -f conftest*

Sam Hocevar's avatar
 
Sam Hocevar committed
3598
        cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3599
#line 3600 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
3600 3601
#include "confdefs.h"
#include <sys/cdio.h>
Sam Hocevar's avatar
 
Sam Hocevar committed
3602
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3603 3604
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "dvd_struct" >/dev/null 2>&1; then
Sam Hocevar's avatar
 
Sam Hocevar committed
3605 3606 3607
  rm -rf conftest*
  
    cat >> confdefs.h <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3608 3609 3610 3611
#define DVD_STRUCT_IN_SYS_CDIO_H 1
EOF

    BSD_DVD_STRUCT=1
Sam Hocevar's avatar
 
Sam Hocevar committed
3612
  
Sam Hocevar's avatar
 
Sam Hocevar committed
3613 3614 3615
fi
rm -f conftest*

Sam Hocevar's avatar
 
Sam Hocevar committed
3616
        cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3617
#line 3618 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
3618 3619 3620 3621 3622 3623 3624
#include "confdefs.h"
#include <linux/cdrom.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "dvd_struct" >/dev/null 2>&1; then
  rm -rf conftest*
  
Sam Hocevar's avatar
 
Sam Hocevar committed
3625
    cat >> confdefs.h <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3626
#define DVD_STRUCT_IN_LINUX_CDROM_H 1
Sam Hocevar's avatar
 
Sam Hocevar committed
3627 3628
EOF

Sam Hocevar's avatar
 
Sam Hocevar committed
3629 3630 3631 3632 3633
    LINUX_DVD_STRUCT=1
  
fi
rm -f conftest*

Sam Hocevar's avatar
 
Sam Hocevar committed
3634 3635
        NEED_BSDI_LIBDVD=0
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3636
#line 3637 "configure"
3637
#include "confdefs.h"
Sam Hocevar's avatar
 
Sam Hocevar committed
3638
#include <dvd.h>
Sam Hocevar's avatar
 
Sam Hocevar committed
3639
EOF
3640
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Sam Hocevar's avatar
 
Sam Hocevar committed
3641
  egrep "dvd_struct" >/dev/null 2>&1; then
Sam Hocevar's avatar
 
Sam Hocevar committed
3642 3643 3644
  rm -rf conftest*
  
    cat >> confdefs.h <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3645
#define DVD_STRUCT_IN_DVD_H 1
3646 3647
EOF

Sam Hocevar's avatar
 
Sam Hocevar committed
3648
    LIB_LIBDVDCSS="${LIB_LIBDVDCSS} -ldvd"
Sam Hocevar's avatar
 
Sam Hocevar committed
3649
    LINUX_DVD_STRUCT=1
Sam Hocevar's avatar
 
Sam Hocevar committed
3650 3651 3652
  
else
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
3653
  
Sam Hocevar's avatar
 
Sam Hocevar committed
3654 3655 3656 3657
                for ac_hdr in /sys/dev/scsi/scsi_ioctl.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3658
echo "configure:3659: checking for $ac_hdr" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
3659 3660 3661 3662
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3663
#line 3664 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
3664 3665 3666 3667
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Sam Hocevar's avatar
 
Sam Hocevar committed
3668
{ (eval echo configure:3669: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Sam Hocevar's avatar
 
Sam Hocevar committed
3669 3670 3671 3672 3673 3674 3675 3676 3677 3678
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
3679 3680
fi
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
3681 3682 3683 3684 3685 3686 3687 3688 3689
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
 
      NEED_BSDI_LIBDVD=1
Sam Hocevar's avatar
 
Sam Hocevar committed
3690 3691 3692 3693
      cat >> confdefs.h <<\EOF
#define DVD_STRUCT_IN_BSDI_DVDIOCTL_DVD_H 1
EOF

Sam Hocevar's avatar
 
Sam Hocevar committed
3694
      OBJ_LIBDVDCSS="${OBJ_LIBDVDCSS} bsdi_dvdioctl.o"
Sam Hocevar's avatar
 
Sam Hocevar committed
3695 3696 3697 3698 3699 3700
      LINUX_DVD_STRUCT=1
    
else
  echo "$ac_t""no" 1>&6
fi
done
3701

Sam Hocevar's avatar
 
Sam Hocevar committed
3702 3703 3704 3705 3706 3707
  
fi
rm -f conftest*

        ac_safe=`echo "sys/scsi/scsi_types.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for sys/scsi/scsi_types.h""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3708
echo "configure:3709: checking for sys/scsi/scsi_types.h" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
3709 3710 3711 3712
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3713
#line 3714 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
3714
#include "confdefs.h"
Sam Hocevar's avatar
 
Sam Hocevar committed
3715
#include <sys/scsi/scsi_types.h>
Sam Hocevar's avatar
 
Sam Hocevar committed
3716 3717
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Sam Hocevar's avatar
 
Sam Hocevar committed
3718
{ (eval echo configure:3719: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Sam Hocevar's avatar
 
Sam Hocevar committed
3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  
    ac_safe=`echo "sys/scsi/impl/uscsi.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for sys/scsi/impl/uscsi.h""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3737
echo "configure:3738: checking for sys/scsi/impl/uscsi.h" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
3738 3739 3740 3741
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3742
#line 3743 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
3743 3744 3745 3746
#include "confdefs.h"
#include <sys/scsi/impl/uscsi.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Sam Hocevar's avatar
 
Sam Hocevar committed
3747
{ (eval echo configure:3748: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Sam Hocevar's avatar
 
Sam Hocevar committed
3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  
      cat >> confdefs.h <<\EOF
#define SOLARIS_USCSI 1
EOF

    
else
  echo "$ac_t""no" 1>&6
fi

  
else
  echo "$ac_t""no" 1>&6
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790
        if test x$LINUX_DVD_STRUCT = x1; then
    cat >> confdefs.h <<\EOF
#define HAVE_LINUX_DVD_STRUCT 1
EOF

  else
    if test x$BSD_DVD_STRUCT = x1; then
      cat >> confdefs.h <<\EOF
#define HAVE_BSD_DVD_STRUCT 1
EOF

    fi
  fi
Sam Hocevar's avatar
 
Sam Hocevar committed
3791 3792 3793

else
  echo "$ac_t""no" 1>&6
3794 3795 3796
fi
done

Sam Hocevar's avatar
 
Sam Hocevar committed
3797

Sam Hocevar's avatar
 
Sam Hocevar committed
3798

Sam Hocevar's avatar
 
Sam Hocevar committed
3799
case ${host_os} in
Sam Hocevar's avatar
 
Sam Hocevar committed
3800 3801 3802
  bsdi*)
    SYS=bsdi
    ;;
Sam Hocevar's avatar
 
Sam Hocevar committed
3803 3804 3805 3806 3807 3808 3809 3810
  darwin*)
    SYS=darwin
    ;;
  *)
    SYS=${host_os}
    ;;
esac

Sam Hocevar's avatar
 
Sam Hocevar committed
3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833
# Check whether --enable-ppro or --disable-ppro was given.
if test "${enable_ppro+set}" = set; then
  enableval="$enable_ppro"
   if test x$enableval = xyes; then ARCH="${ARCH} ppro"; fi 
else
   if test x${host_cpu} = xi686; then ARCH="${ARCH} ppro"; fi 
fi


# Check whether --enable-mmx or --disable-mmx was given.
if test "${enable_mmx+set}" = set; then
  enableval="$enable_mmx"
   if test x$enableval = xyes; then ARCH="${ARCH} mmx";
  BUILTINS="${BUILTINS} ${ACCEL_MODULES}"; fi 
else
   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";
  BUILTINS="${BUILTINS} ${ACCEL_MODULES}"; fi 
fi


# Check whether --enable-altivec or --disable-altivec was given.
if test "${enable_altivec+set}" = set; then
  enableval="$enable_altivec"
Sam Hocevar's avatar
 
Sam Hocevar committed
3834
   if test x$enableval = xyes; then ARCH="${ARCH} altivec"
Sam Hocevar's avatar
 
Sam Hocevar committed
3835 3836 3837 3838 3839 3840 3841
    BUILTINS="${BUILTINS} idctaltivec"
    LIB_IDCTALTIVEC="-framework vecLib"
  fi 
fi

#[ if test -d /System/Library/Frameworks/vecLib.framework; then ARCH="${ARCH} altivec"; PLUGINS="${PLUGINS} idctaltivec"; fi ])

Sam Hocevar's avatar
 
Sam Hocevar committed
3842
DEBUG=0
Sam Hocevar's avatar
 
Sam Hocevar committed
3843 3844 3845 3846 3847 3848 3849
# Check whether --enable-debug or --disable-debug was given.
if test "${enable_debug+set}" = set; then
  enableval="$enable_debug"
   if test x$enableval = xyes; then DEBUG=1; fi 
fi


Sam Hocevar's avatar
 
Sam Hocevar committed
3850
STATS=0
Sam Hocevar's avatar
 
Sam Hocevar committed
3851 3852 3853 3854 3855 3856 3857
# Check whether --enable-stats or --disable-stats was given.
if test "${enable_stats+set}" = set; then
  enableval="$enable_stats"
   if test x$enableval = xyes; then STATS=1; fi 
fi


Sam Hocevar's avatar
 
Sam Hocevar committed
3858
TRACE=0
Sam Hocevar's avatar
 
Sam Hocevar committed
3859 3860 3861 3862 3863 3864 3865
# Check whether --enable-trace or --disable-trace was given.
if test "${enable_trace+set}" = set; then
  enableval="$enable_trace"
   if test x$enableval = xyes; then TRACE=1; fi 
fi


Sam Hocevar's avatar
 
Sam Hocevar committed
3866
PROFILING=0
Sam Hocevar's avatar
 
Sam Hocevar committed
3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882
# Check whether --enable-profiling or --disable-profiling was given.
if test "${enable_profiling+set}" = set; then
  enableval="$enable_profiling"
   if test x$enableval = xyes; then PROFILING=1; fi 
fi


# Check whether --enable-optimizations or --disable-optimizations was given.
if test "${enable_optimizations+set}" = set; then
  enableval="$enable_optimizations"
   if test x$enableval = xno; then OPTIMS=0; fi 
else
   OPTIMS=1 
fi


Sam Hocevar's avatar
 
Sam Hocevar committed
3883 3884 3885 3886 3887
# Check whether --enable-pth or --disable-pth was given.
if test "${enable_pth+set}" = set; then
  enableval="$enable_pth"
   if test x$enableval = xyes; then
    echo $ac_n "checking for pth_init in -lpth""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3888
echo "configure:3889: checking for pth_init in -lpth" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
3889 3890 3891 3892 3893 3894 3895
ac_lib_var=`echo pth'_'pth_init | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lpth  $LIBS"
cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3896
#line 3897 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
3897 3898 3899 3900 3901 3902 3903 3904 3905 3906
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char pth_init();

int main() {
pth_init()
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3907
if { (eval echo configure:3908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
3908 3909 3910 3911 3912 3913 3914
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
Sam Hocevar's avatar
 
Sam Hocevar committed
3915
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
3916 3917
rm -f conftest*
LIBS="$ac_save_LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
3918

Sam Hocevar's avatar
 
Sam Hocevar committed
3919 3920 3921 3922 3923 3924 3925 3926
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_lib=HAVE_LIB`echo pth | sed -e 's/[^a-zA-Z0-9_]/_/g' \
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3927

Sam Hocevar's avatar
 
Sam Hocevar committed
3928 3929 3930 3931
  LIBS="-lpth $LIBS"

else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3932
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
3933

Sam Hocevar's avatar
 
Sam Hocevar committed
3934
    cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3935
#line 3936 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
3936 3937 3938 3939 3940 3941 3942 3943 3944 3945
#include "confdefs.h"
#include <pth.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "pth_init" >/dev/null 2>&1; then
  rm -rf conftest*
  
      cat >> confdefs.h <<\EOF
#define PTH_INIT_IN_PTH_H 1
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3946

Sam Hocevar's avatar
 
Sam Hocevar committed
3947 3948
    THREAD_LIB="-lpth"
    fi
Sam Hocevar's avatar
 
Sam Hocevar committed
3949
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
3950
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
3951

Sam Hocevar's avatar
 
Sam Hocevar committed
3952 3953 3954 3955 3956

fi


LIB="${LIB} ${THREAD_LIB}"
Sam Hocevar's avatar
 
Sam Hocevar committed
3957

Sam Hocevar's avatar
 
Sam Hocevar committed
3958
NEED_LIBDVDCSS=0
Sam Hocevar's avatar
 
Sam Hocevar committed
3959
STATIC_LIBDVDCSS=0
Sam Hocevar's avatar
 
Sam Hocevar committed
3960
DUMMY_LIBDVDCSS=0
Sam Hocevar's avatar
 
Sam Hocevar committed
3961 3962 3963
# Check whether --with-dvdcss or --without-dvdcss was given.
if test "${with_dvdcss+set}" = set; then
  withval="$with_dvdcss"
Sam Hocevar's avatar
 
Sam Hocevar committed
3964 3965 3966 3967 3968
   case "x${withval}" in
    xlocal-static|xyes)
      # local libdvdcss, statically linked
      if test x${CAN_BUILD_LIBDVDCSS} = x1
      then
Sam Hocevar's avatar
 
Sam Hocevar committed
3969
        NEED_LIBDVDCSS=1
Sam Hocevar's avatar
 
Sam Hocevar committed
3970 3971 3972
        STATIC_LIBDVDCSS=1
        BUILTINS="${BUILTINS} dvd"
        CFLAGS_DVD="${CFLAGS_DVD} -I../../extras/libdvdcss"
Sam Hocevar's avatar
 
Sam Hocevar committed
3973 3974
        LIB_DVD="${LIB_DVD} lib/libdvdcss.a ${LIB_LIBDVDCSS}"
        LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} ../../lib/libdvdcss.a ${LIB_LIBDVDCSS}"
Sam Hocevar's avatar
 
Sam Hocevar committed
3975 3976 3977 3978
      fi
    ;;
    xlocal-shared)
      # local libdvdcss, dynamically linked
Sam Hocevar's avatar
 
Sam Hocevar committed
3979 3980
      if test x${CAN_BUILD_LIBDVDCSS} = x1
      then
Sam Hocevar's avatar
 
Sam Hocevar committed
3981
        NEED_LIBDVDCSS=1
Sam Hocevar's avatar
 
Sam Hocevar committed
3982 3983 3984 3985 3986
        BUILTINS="${BUILTINS} dvd"
        CFLAGS_DVD="${CFLAGS_DVD} -I../../extras/libdvdcss"
        LIB_DVD="${LIB_DVD} -Llib -ldvdcss"
        LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} -L../../lib -ldvdcss"
      fi
Sam Hocevar's avatar
 
Sam Hocevar committed
3987
    ;;
Sam Hocevar's avatar
 
Sam Hocevar committed
3988 3989 3990 3991 3992 3993
    xno)
      # don't use libdvdcss at all, build a DVD module that can dlopen() it
      DUMMY_LIBDVDCSS=1
      BUILTINS="${BUILTINS} dvd"
      OBJ_DVD="${OBJ_DVD} dummy_dvdcss.o"
      CFLAGS_DVD="${CFLAGS_DVD} -DGOD_DAMN_DMCA"
Sam Hocevar's avatar
 
Sam Hocevar committed
3994
      CFLAGS_DVD="${CFLAGS_DVD} -DLIBDVDCSS_VERSION=\"${LIBDVDCSS_VERSION}\""
Sam Hocevar's avatar
 
Sam Hocevar committed
3995 3996 3997
      LIB_DVD="${LIB_DVD} -ldl"
      LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} -ldl"
    ;;
Sam Hocevar's avatar
 
Sam Hocevar committed
3998
    *)
Sam Hocevar's avatar
 
Sam Hocevar committed
3999 4000 4001 4002 4003 4004 4005 4006 4007
      # existing libdvdcss
      BUILTINS="${BUILTINS} dvd"
      if test "x$withval" != "xyes"
      then
        LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} -L"$withval"/lib"
        CFLAGS_DVD="${CFLAGS_DVD} -I"$withval"/include"
      fi
      LIB_DVD="${LIB_DVD} -ldvdcss"
      LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} -ldvdcss"
Sam Hocevar's avatar
 
Sam Hocevar committed
4008
    esac 
Sam Hocevar's avatar
 
Sam Hocevar committed
4009 4010
else
  # user didn't decide, we choose to use local libdvdcss and link statically
Sam Hocevar's avatar
 
Sam Hocevar committed
4011
  # if libdvdcss is in the archive, or to use the dummy replacement otherwise.
Sam Hocevar's avatar
 
Sam Hocevar committed
4012 4013
   if test x${CAN_BUILD_LIBDVDCSS} = x1
    then
Sam Hocevar's avatar
 
Sam Hocevar committed
4014
      NEED_LIBDVDCSS=1
Sam Hocevar's avatar
 
Sam Hocevar committed
4015 4016 4017
      STATIC_LIBDVDCSS=1
      BUILTINS="${BUILTINS} dvd"
      CFLAGS_DVD="${CFLAGS_DVD} -I../../extras/libdvdcss"
Sam Hocevar's avatar
 
Sam Hocevar committed
4018 4019
      LIB_DVD="${LIB_DVD} lib/libdvdcss.a ${LIB_LIBDVDCSS}"
      LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} ../../lib/libdvdcss.a ${LIB_LIBDVDCSS}"
Sam Hocevar's avatar
 
Sam Hocevar committed
4020 4021 4022 4023 4024 4025 4026 4027
    else
      # XXX: no check for libdl is done, don't try this at home !
      DUMMY_LIBDVDCSS=1
      BUILTINS="${BUILTINS} dvd"
      OBJ_DVD="${OBJ_DVD} dummy_dvdcss.o"
      CFLAGS_DVD="${CFLAGS_DVD} -DGOD_DAMN_DMCA"
      LIB_DVD="${LIB_DVD} -ldl"
      LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} -ldl"
Sam Hocevar's avatar
 
Sam Hocevar committed
4028 4029 4030 4031
    fi 
fi


Sam Hocevar's avatar
 
Sam Hocevar committed
4032 4033 4034 4035 4036 4037
# Check whether --enable-dummy or --disable-dummy was given.
if test "${enable_dummy+set}" = set; then
  enableval="$enable_dummy"
  :
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
4038 4039 4040 4041 4042

if test x$enable_dummy != xno
then
  BUILTINS="${BUILTINS} dummy"
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4043 4044 4045 4046 4047 4048 4049

# Check whether --enable-null or --disable-null was given.
if test "${enable_null+set}" = set; then
  enableval="$enable_null"
  :
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
4050 4051 4052 4053 4054

if test x$enable_null != xno
then
  BUILTINS="${BUILTINS} null"
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4055 4056 4057 4058 4059 4060 4061 4062

# Check whether --enable-rc or --disable-rc was given.
if test "${enable_rc+set}" = set; then
  enableval="$enable_rc"
  :
fi


Sam Hocevar's avatar
 
Sam Hocevar committed
4063 4064 4065 4066 4067 4068 4069
if test x$enable_rc != xno
then
  BUILTINS="${BUILTINS} rc"
fi

if test x$SYS = xbeos
then
Sam Hocevar's avatar
 
Sam Hocevar committed
4070
    BUILTINS="${BUILTINS} beos"
Sam Hocevar's avatar
 
Sam Hocevar committed
4071
    LIB_BEOS="-lbe -lgame -lroot -ltracker"
Sam Hocevar's avatar
 
Sam Hocevar committed
4072
    PLCFLAGS="${PLCFLAGS} -nostart"
4073 4074 4075 4076 4077 4078

else

# Check whether --enable-dsp or --disable-dsp was given.
if test "${enable_dsp+set}" = set; then
  enableval="$enable_dsp"
Sam Hocevar's avatar
 
Sam Hocevar committed
4079 4080
  :
fi
4081

Sam Hocevar's avatar
 
Sam Hocevar committed
4082 4083 4084 4085 4086

if test x$enable_dsp != xno
then
  if test -c /dev/dsp
  then
Sam Hocevar's avatar
 
Sam Hocevar committed
4087
    PLUGINS="${PLUGINS} dsp"
4088 4089
  fi
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4090

4091 4092 4093
# Check whether --enable-esd or --disable-esd was given.
if test "${enable_esd+set}" = set; then
  enableval="$enable_esd"
Sam Hocevar's avatar
 
Sam Hocevar committed
4094 4095
  if test x$enable_esd = xyes
   then
Sam Hocevar's avatar
 
Sam Hocevar committed
4096 4097
     # Extract the first word of "esd-config", so it can be a program name with args.
set dummy esd-config; ac_word=$2
Sam Hocevar's avatar
 
Sam Hocevar committed
4098
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4099
echo "configure:4100: checking for $ac_word" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
4100 4101
if eval "test \"`echo '$''{'ac_cv_path_ESD_CONFIG'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4102
else
Sam Hocevar's avatar
 
Sam Hocevar committed
4103 4104
  case "$ESD_CONFIG" in
  /*)
Sam Hocevar's avatar
 
Sam Hocevar committed
4105 4106
  ac_cv_path_ESD_CONFIG="$ESD_CONFIG" # Let the user override the test with a path.
  ;;
Sam Hocevar's avatar
 
Sam Hocevar committed
4107 4108 4109
  ?:/*)			 
  ac_cv_path_ESD_CONFIG="$ESD_CONFIG" # Let the user override the test with a dos path.
  ;;
Sam Hocevar's avatar
 
Sam Hocevar committed
4110
  *)
Sam Hocevar's avatar
 
Sam Hocevar committed
4111 4112 4113 4114 4115 4116 4117 4118 4119 4120
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do 
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_ESD_CONFIG="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
Sam Hocevar's avatar
 
Sam Hocevar committed
4121 4122 4123 4124
  test -z "$ac_cv_path_ESD_CONFIG" && ac_cv_path_ESD_CONFIG="no"
  ;;
esac
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4125
ESD_CONFIG="$ac_cv_path_ESD_CONFIG"
Sam Hocevar's avatar
 
Sam Hocevar committed
4126
if test -n "$ESD_CONFIG"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
4127
  echo "$ac_t""$ESD_CONFIG" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4128
else
Sam Hocevar's avatar
 
Sam Hocevar committed
4129
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4130 4131
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
4132 4133
     if test x${ESD_CONFIG} != xno
     then
Sam Hocevar's avatar
 
Sam Hocevar committed
4134
       PLUGINS="${PLUGINS} esd"
Sam Hocevar's avatar
 
Sam Hocevar committed
4135 4136
       LIB_ESD="`${ESD_CONFIG} --libs`"
     fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4137
   fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4138 4139
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
4140

Sam Hocevar's avatar
 
Sam Hocevar committed
4141 4142 4143
# Check whether --enable-darwin or --disable-darwin was given.
if test "${enable_darwin+set}" = set; then
  enableval="$enable_darwin"
Sam Hocevar's avatar
 
Sam Hocevar committed
4144
  if test x$enable_darwin = xyes; then
Sam Hocevar's avatar
 
Sam Hocevar committed
4145
     PLUGINS="${PLUGINS} darwin"
Sam Hocevar's avatar
 
Sam Hocevar committed
4146 4147
     LIB_DARWIN="-framework CoreAudio"
   fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4148 4149
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
4150

4151 4152 4153
# Check whether --enable-macosx or --disable-macosx was given.
if test "${enable_macosx+set}" = set; then
  enableval="$enable_macosx"
Sam Hocevar's avatar
 
Sam Hocevar committed
4154 4155
  if test x$enable_macosx = xyes
   then
Sam Hocevar's avatar
 
Sam Hocevar committed
4156
     BUILTINS="${BUILTINS} macosx"
Sam Hocevar's avatar
 
Sam Hocevar committed
4157
     LIB_MACOSX="-framework CoreAudio -framework Carbon -framework AGL"
Sam Hocevar's avatar
 
Sam Hocevar committed
4158 4159
     LIB_TS="${LIB_TS} -framework AGL -framework Carbon"
     LIB_SDL="${LIB_SDL} -framework AGL -framework Carbon"
Sam Hocevar's avatar
 
Sam Hocevar committed
4160
   fi
4161
else
Sam Hocevar's avatar
 
Sam Hocevar committed
4162
  for ac_hdr in Carbon/Carbon.h
4163
do
Sam Hocevar's avatar
 
Sam Hocevar committed
4164 4165
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4166
echo "configure:4167: checking for $ac_hdr" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
4167 4168 4169 4170
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4171
#line 4172 "configure"
4172
#include "confdefs.h"
Sam Hocevar's avatar
 
Sam Hocevar committed
4173 4174 4175
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Sam Hocevar's avatar
 
Sam Hocevar committed
4176
{ (eval echo configure:4177: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Sam Hocevar's avatar
 
Sam Hocevar committed
4177 4178 4179 4180 4181 4182 4183
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
4184
  cat conftest.$ac_ext >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
4185 4186
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
4187
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4188
rm -f conftest*
4189
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4190 4191 4192 4193 4194
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
4195
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4196
 BUILTINS="${BUILTINS} macosx"
Sam Hocevar's avatar
 
Sam Hocevar committed
4197
     LIB_MACOSX="-framework CoreAudio -framework Carbon -framework AGL"
Sam Hocevar's avatar
 
Sam Hocevar committed
4198 4199
     LIB_TS="${LIB_TS} -framework AGL -framework Carbon"
     LIB_SDL="${LIB_SDL} -framework AGL -framework Carbon"
Sam Hocevar's avatar
 
Sam Hocevar committed
4200 4201 4202
   
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4203
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4204
done
Sam Hocevar's avatar
 
Sam Hocevar committed
4205

Sam Hocevar's avatar
 
Sam Hocevar committed
4206 4207
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
4208

4209 4210 4211 4212 4213 4214
# Check whether --enable-qnx or --disable-qnx was given.
if test "${enable_qnx+set}" = set; then
  enableval="$enable_qnx"
  :
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
4215 4216
    if test x$enable_qnx != xno
    then
4217 4218 4219 4220
      for ac_hdr in Ph.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4221
echo "configure:4222: checking for $ac_hdr" >&5
4222 4223 4224 4225
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4226
#line 4227 "configure"
4227 4228 4229 4230
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Sam Hocevar's avatar
 
Sam Hocevar committed
4231
{ (eval echo configure:4232: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
 
        PLUGINS="${PLUGINS} qnx"
        LIB_QNX="-lasound -lph"
      
else
  echo "$ac_t""no" 1>&6
fi
done

    fi

4262 4263 4264
# Check whether --enable-fb or --disable-fb was given.
if test "${enable_fb+set}" = set; then
  enableval="$enable_fb"
Sam Hocevar's avatar
 
Sam Hocevar committed
4265 4266 4267 4268
   if test x$enable_fb = xyes
    then
      PLUGINS="${PLUGINS} fb"
    fi 
Sam Hocevar's avatar
 
Sam Hocevar committed
4269 4270
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
4271

Christophe Massiot's avatar
Christophe Massiot committed
4272 4273 4274
# Check whether --with-ggi or --without-ggi was given.
if test "${with_ggi+set}" = set; then
  withval="$with_ggi"
Sam Hocevar's avatar
 
Sam Hocevar committed
4275
   if test "x$withval" != "xno"
Christophe Massiot's avatar
Christophe Massiot committed
4276
    then
Sam Hocevar's avatar
 
Sam Hocevar committed
4277 4278
      PLUGINS="${PLUGINS} ggi"
      if test "x$withval" != "xyes"
Sam Hocevar's avatar
 
Sam Hocevar committed
4279 4280 4281 4282
      then
        LIB_GGI="-l"$withval
      else
        LIB_GGI="-lggi"
Sam Hocevar's avatar
 
Sam Hocevar committed
4283
      fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4284 4285 4286
    fi 
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
4287

4288 4289 4290 4291 4292 4293
# Check whether --enable-sdl or --disable-sdl was given.
if test "${enable_sdl+set}" = set; then
  enableval="$enable_sdl"
  :
fi

4294
if test "x$enable_sdl" != "xno"
4295
then
4296 4297 4298 4299 4300 4301 4302 4303 4304 4305
  SDL_PATH=$PATH
  # Check whether --with-sdl-config-path or --without-sdl-config-path was given.
if test "${with_sdl_config_path+set}" = set; then
  withval="$with_sdl_config_path"
   if test "x$withval" != "xno"
      then
        SDL_PATH=$withval:$PATH
      fi 
fi

4306 4307
  # Extract the first word of "sdl12-config", so it can be a program name with args.
set dummy sdl12-config; ac_word=$2
4308
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4309
echo "configure:4310: checking for $ac_word" >&5
4310
if eval "test \"`echo '$''{'ac_cv_path_SDL12_CONFIG'+set}'`\" = set"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
4311 4312
  echo $ac_n "(cached) $ac_c" 1>&6
else
4313
  case "$SDL12_CONFIG" in
4314
  /*)
4315
  ac_cv_path_SDL12_CONFIG="$SDL12_CONFIG" # Let the user override the test with a path.
4316 4317
  ;;
  ?:/*)			 
4318
  ac_cv_path_SDL12_CONFIG="$SDL12_CONFIG" # Let the user override the test with a dos path.
4319 4320 4321
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
4322
  ac_dummy="$SDL_PATH"
4323 4324 4325
  for ac_dir in $ac_dummy; do 
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
4326
      ac_cv_path_SDL12_CONFIG="$ac_dir/$ac_word"
4327 4328 4329 4330
      break
    fi
  done
  IFS="$ac_save_ifs"
4331
  test -z "$ac_cv_path_SDL12_CONFIG" && ac_cv_path_SDL12_CONFIG="no"
4332 4333 4334
  ;;
esac
fi
4335 4336 4337
SDL12_CONFIG="$ac_cv_path_SDL12_CONFIG"
if test -n "$SDL12_CONFIG"; then
  echo "$ac_t""$SDL12_CONFIG" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4338
else
4339
  echo "$ac_t""no" 1>&6
4340
fi
4341

4342 4343
  SDL_CONFIG=${SDL12_CONFIG}
  SDL_HEADER="SDL12/SDL.h"
Sam Hocevar's avatar
 
Sam Hocevar committed
4344 4345
  if test x${SDL_CONFIG} = xno
  then
4346 4347 4348
    # Extract the first word of "sdl11-config", so it can be a program name with args.
set dummy sdl11-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4349
echo "configure:4350: checking for $ac_word" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
4350
if eval "test \"`echo '$''{'ac_cv_path_SDL11_CONFIG'+set}'`\" = set"; then
4351 4352
  echo $ac_n "(cached) $ac_c" 1>&6
else
Sam Hocevar's avatar
 
Sam Hocevar committed
4353
  case "$SDL11_CONFIG" in
4354
  /*)
Sam Hocevar's avatar
 
Sam Hocevar committed
4355
  ac_cv_path_SDL11_CONFIG="$SDL11_CONFIG" # Let the user override the test with a path.
4356 4357
  ;;
  ?:/*)			 
Sam Hocevar's avatar
 
Sam Hocevar committed
4358
  ac_cv_path_SDL11_CONFIG="$SDL11_CONFIG" # Let the user override the test with a dos path.
4359 4360 4361
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
4362
  ac_dummy="$SDL_PATH"
4363 4364 4365
  for ac_dir in $ac_dummy; do 
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
Sam Hocevar's avatar
 
Sam Hocevar committed
4366
      ac_cv_path_SDL11_CONFIG="$ac_dir/$ac_word"
4367 4368 4369 4370
      break
    fi
  done
  IFS="$ac_save_ifs"
Sam Hocevar's avatar
 
Sam Hocevar committed
4371
  test -z "$ac_cv_path_SDL11_CONFIG" && ac_cv_path_SDL11_CONFIG="no"
4372 4373
  ;;
esac
4374
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4375 4376 4377
SDL11_CONFIG="$ac_cv_path_SDL11_CONFIG"
if test -n "$SDL11_CONFIG"; then
  echo "$ac_t""$SDL11_CONFIG" 1>&6
4378
else
Sam Hocevar's avatar
 
Sam Hocevar committed
4379
  echo "$ac_t""no" 1>&6
4380 4381
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
4382
    SDL_CONFIG=${SDL11_CONFIG}
4383 4384
    SDL_HEADER="SDL11/SDL.h"
  fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4385 4386
  if test x${SDL_CONFIG} = xno
  then
4387 4388
    # Extract the first word of "sdl-config", so it can be a program name with args.
set dummy sdl-config; ac_word=$2
4389
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4390
echo "configure:4391: checking for $ac_word" >&5
4391
if eval "test \"`echo '$''{'ac_cv_path_SDL_CONFIG'+set}'`\" = set"; then
4392 4393
  echo $ac_n "(cached) $ac_c" 1>&6
else
4394
  case "$SDL_CONFIG" in
4395
  /*)
4396
  ac_cv_path_SDL_CONFIG="$SDL_CONFIG" # Let the user override the test with a path.
4397 4398
  ;;
  ?:/*)			 
4399
  ac_cv_path_SDL_CONFIG="$SDL_CONFIG" # Let the user override the test with a dos path.
4400 4401 4402
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
4403
  ac_dummy="$SDL_PATH"
4404 4405 4406
  for ac_dir in $ac_dummy; do 
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
4407
      ac_cv_path_SDL_CONFIG="$ac_dir/$ac_word"
4408 4409 4410 4411
      break
    fi
  done
  IFS="$ac_save_ifs"
4412
  test -z "$ac_cv_path_SDL_CONFIG" && ac_cv_path_SDL_CONFIG="no"
4413 4414 4415
  ;;
esac
fi
4416 4417 4418
SDL_CONFIG="$ac_cv_path_SDL_CONFIG"
if test -n "$SDL_CONFIG"; then
  echo "$ac_t""$SDL_CONFIG" 1>&6
4419 4420
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4421 4422
fi

4423
    SDL_HEADER="SDL/SDL.h"
4424
  fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4425 4426
  if test x${SDL_CONFIG} != xno
  then
4427 4428 4429 4430 4431
    PLUGINS="${PLUGINS} sdl"
    CFLAGS_SDL="`${SDL_CONFIG} --cflags`"
    LIB_SDL="`${SDL_CONFIG} --libs | sed 's,-rdynamic,,'`"
    save_CFLAGS=$CFLAGS
    CFLAGS="$CFLAGS $CFLAGS_SDL"
4432
    for ac_hdr in ${SDL_HEADER}
4433
do
Sam Hocevar's avatar
 
Sam Hocevar committed
4434 4435
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4436
echo "configure:4437: checking for $ac_hdr" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
4437 4438 4439 4440
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4441
#line 4442 "configure"
4442
#include "confdefs.h"
Sam Hocevar's avatar
 
Sam Hocevar committed
4443 4444 4445
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Sam Hocevar's avatar
 
Sam Hocevar committed
4446
{ (eval echo configure:4447: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Sam Hocevar's avatar
 
Sam Hocevar committed
4447 4448 4449 4450 4451 4452 4453
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
4454
  cat conftest.$ac_ext >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
4455 4456
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
4457
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4458
rm -f conftest*
4459
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4460 4461 4462 4463 4464
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
4465
EOF
4466 4467 4468 4469
 cat >> confdefs.h <<EOF
#define SDL_INCLUDE_FILE <${SDL_HEADER}>
EOF

Sam Hocevar's avatar
 
Sam Hocevar committed
4470 4471
else
  echo "$ac_t""no" 1>&6
4472
echo "The development package for SDL is not installed. Please install it"
4473 4474
        echo "and try again. Alternatively you can also configure with --disable-sdl."
        exit 1 
4475 4476 4477
fi
done

4478
    CFLAGS=$save_CFLAGS
Sam Hocevar's avatar
 
Sam Hocevar committed
4479
    if expr 1.1.5 \> `$SDL_CONFIG --version` >/dev/null
Sam Hocevar's avatar
 
Sam Hocevar committed
4480
    then
4481 4482 4483
      echo "You need SDL version 1.1.5 or later. Install it and try again."
      echo "Alternatively, you can also configure with --disable-sdl."
      exit 1
Sam Hocevar's avatar
 
Sam Hocevar committed
4484
    fi
4485
  elif test "x$enable_sdl" =  "xyes"
Sam Hocevar's avatar
 
Sam Hocevar committed
4486
  then
4487
    echo "I couldn't find the SDL package. You can download libSDL from"
4488 4489 4490
    echo "http://www.libsdl.org/, or configure with --disable-sdl. Have a"
    echo "nice day."
    exit 1
4491 4492
  fi
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4493

Sam Hocevar's avatar
 
Sam Hocevar committed
4494 4495 4496
# Check whether --with-directx or --without-directx was given.
if test "${with_directx+set}" = set; then
  withval="$with_directx"
Sam Hocevar's avatar
 
Sam Hocevar committed
4497
   if test "x$withval" != "xno"
Sam Hocevar's avatar
 
Sam Hocevar committed
4498
    then
Sam Hocevar's avatar
 
Sam Hocevar committed
4499 4500
      PLUGINS="${PLUGINS} directx"
      if test "x$withval" != "xyes"
Sam Hocevar's avatar
 
Sam Hocevar committed
4501
      then
Sam Hocevar's avatar
 
Sam Hocevar committed
4502
        LIB_DIRECTX="${LIB_DIRECTX} -L"$withval"/lib -lgdi32 -ldxguid"
Sam Hocevar's avatar
 
Sam Hocevar committed
4503 4504 4505 4506 4507 4508
        INCLUDE="${INCLUDE} -I"$withval"/include"
      else
        for ac_hdr in directx.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4509
echo "configure:4510: checking for $ac_hdr" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
4510 4511 4512 4513
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4514
#line 4515 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
4515 4516 4517 4518
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Sam Hocevar's avatar
 
Sam Hocevar committed
4519
{ (eval echo configure:4520: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Sam Hocevar's avatar
 
Sam Hocevar committed
4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
 
else
  echo "$ac_t""no" 1>&6
echo "Cannot find DirectX headers !"; exit
fi
done

Sam Hocevar's avatar
 
Sam Hocevar committed
4546
        LIB_DIRECTX="${LIB_DIRECTX} -L/usr/lib -lgdi32 -ldxguid"
Sam Hocevar's avatar
 
Sam Hocevar committed
4547 4548 4549 4550
      fi
    fi 
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
4551
    if test "x$withval" = "x"
Sam Hocevar's avatar
 
Sam Hocevar committed
4552 4553 4554 4555 4556
    then
      for ac_hdr in directx.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4557
echo "configure:4558: checking for $ac_hdr" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
4558 4559 4560 4561
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4562
#line 4563 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
4563 4564 4565 4566
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Sam Hocevar's avatar
 
Sam Hocevar committed
4567
{ (eval echo configure:4568: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Sam Hocevar's avatar
 
Sam Hocevar committed
4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
 PLUGINS="${PLUGINS} directx"
Sam Hocevar's avatar
 
Sam Hocevar committed
4588
       LIB_DIRECTX="${LIB_DIRECTX} -L/usr/lib -lgdi32 -ldxguid"
Sam Hocevar's avatar
 
Sam Hocevar committed
4589 4590 4591 4592 4593 4594 4595
else
  echo "$ac_t""no" 1>&6
fi
done

    fi

Christophe Massiot's avatar
Christophe Massiot committed
4596 4597 4598
# Check whether --with-glide or --without-glide was given.
if test "${with_glide+set}" = set; then
  withval="$with_glide"
Sam Hocevar's avatar
 
Sam Hocevar committed
4599
   if test "x$withval" != "xno"
Christophe Massiot's avatar
Christophe Massiot committed
4600
    then
Sam Hocevar's avatar
 
Sam Hocevar committed
4601 4602
      PLUGINS="${PLUGINS} glide"
      if test "x$withval" != "xyes"
Sam Hocevar's avatar
 
Sam Hocevar committed
4603
      then
Sam Hocevar's avatar
 
Sam Hocevar committed
4604
        LIB_GLIDE="-l"$withval" -lm"
Sam Hocevar's avatar
 
Sam Hocevar committed
4605
      else
Sam Hocevar's avatar
 
Sam Hocevar committed
4606
        LIB_GLIDE="-lglide2x -lm"
Sam Hocevar's avatar
 
Sam Hocevar committed
4607
      fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4608 4609 4610
    fi 
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
4611

Sam Hocevar's avatar
 
Sam Hocevar committed
4612 4613 4614
# Check whether --enable-ncurses or --disable-ncurses was given.
if test "${enable_ncurses+set}" = set; then
  enableval="$enable_ncurses"
Sam Hocevar's avatar
 
Sam Hocevar committed
4615
  if test x$enable_ncurses = xyes; then
Sam Hocevar's avatar
 
Sam Hocevar committed
4616
     PLUGINS="${PLUGINS} ncurses"
Sam Hocevar's avatar
 
Sam Hocevar committed
4617 4618
     LIB_NCURSES="-lncurses"
   fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4619 4620
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
4621

Sam Hocevar's avatar
 
Sam Hocevar committed
4622 4623 4624
# Check whether --enable-qt or --disable-qt was given.
if test "${enable_qt+set}" = set; then
  enableval="$enable_qt"
Sam Hocevar's avatar
 
Sam Hocevar committed
4625
  if test x$enable_qt = xyes; then
Sam Hocevar's avatar
 
Sam Hocevar committed
4626 4627
     PLUGINS="${PLUGINS} qt"
     ALIASES="${ALIASES} qvlc"
Sam Hocevar's avatar
 
Sam Hocevar committed
4628
     LIB_QT="-lqt -L${QTDIR}/lib"
Sam Hocevar's avatar
 
Sam Hocevar committed
4629
     if test -x ${QTDIR}/bin/moc
Sam Hocevar's avatar
 
Sam Hocevar committed
4630 4631 4632 4633 4634
     then
       MOC=${QTDIR}/bin/moc
     else
       MOC=moc
     fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4635
   fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4636 4637
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
4638

4639 4640 4641
# Check whether --enable-kde or --disable-kde was given.
if test "${enable_kde+set}" = set; then
  enableval="$enable_kde"
Sam Hocevar's avatar
 
Sam Hocevar committed
4642
  if test x$enable_kde = xyes; then
Sam Hocevar's avatar
 
Sam Hocevar committed
4643 4644
     PLUGINS="${PLUGINS} kde"
     ALIASES="${ALIASES} kvlc"
4645 4646 4647 4648 4649 4650 4651
     LIB_KDE="-L${KDEDIR}/lib -lkfile"
     if test -x ${QTDIR}/bin/moc
     then
       MOC=${QTDIR}/bin/moc
     else
       MOC=moc
     fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4652
   fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4653 4654
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
4655

4656 4657 4658
# Check whether --enable-gnome or --disable-gnome was given.
if test "${enable_gnome+set}" = set; then
  enableval="$enable_gnome"
Sam Hocevar's avatar
 
Sam Hocevar committed
4659
  if test x$enable_gnome = xyes; then
Sam Hocevar's avatar
 
Sam Hocevar committed
4660 4661
     PLUGINS="${PLUGINS} gnome"
     ALIASES="${ALIASES} gnome-vlc"
Sam Hocevar's avatar
 
Sam Hocevar committed
4662 4663
     LIB_GNOME="`gnome-config --libs gnomeui | sed 's,-rdynamic,,'`"
   fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4664 4665
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
4666

Sam Hocevar's avatar
 
Sam Hocevar committed
4667 4668 4669
# Check whether --enable-gtk or --disable-gtk was given.
if test "${enable_gtk+set}" = set; then
  enableval="$enable_gtk"
Sam Hocevar's avatar
 
Sam Hocevar committed
4670 4671
  :
fi
4672

Sam Hocevar's avatar
 
Sam Hocevar committed
4673 4674 4675
if test x$enable_gtk != xno
then
  # look for gtk-config
Sam Hocevar's avatar
 
Sam Hocevar committed
4676 4677
  # Extract the first word of "gtk-config", so it can be a program name with args.
set dummy gtk-config; ac_word=$2
Sam Hocevar's avatar
 
Sam Hocevar committed
4678
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4679
echo "configure:4680: checking for $ac_word" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
4680 4681
if eval "test \"`echo '$''{'ac_cv_path_GTK_CONFIG'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4682
else
Sam Hocevar's avatar
 
Sam Hocevar committed
4683 4684
  case "$GTK_CONFIG" in
  /*)
Sam Hocevar's avatar
 
Sam Hocevar committed
4685 4686
  ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a path.
  ;;
Sam Hocevar's avatar
 
Sam Hocevar committed
4687 4688 4689
  ?:/*)			 
  ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a dos path.
  ;;
Sam Hocevar's avatar
 
Sam Hocevar committed
4690
  *)
Sam Hocevar's avatar
 
Sam Hocevar committed
4691 4692 4693 4694 4695 4696 4697 4698 4699 4700
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do 
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_GTK_CONFIG="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
Sam Hocevar's avatar
 
Sam Hocevar committed
4701 4702 4703 4704
  test -z "$ac_cv_path_GTK_CONFIG" && ac_cv_path_GTK_CONFIG="no"
  ;;
esac
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4705
GTK_CONFIG="$ac_cv_path_GTK_CONFIG"
Sam Hocevar's avatar
 
Sam Hocevar committed
4706
if test -n "$GTK_CONFIG"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
4707
  echo "$ac_t""$GTK_CONFIG" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4708
else
Sam Hocevar's avatar
 
Sam Hocevar committed
4709
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4710 4711
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
4712 4713
  if test -x ${GTK_CONFIG}
  then
Sam Hocevar's avatar
 
Sam Hocevar committed
4714 4715
    CFLAGS_GTK="`${GTK_CONFIG} --cflags gtk`"
    LIB_GTK="`${GTK_CONFIG} --libs gtk | sed 's,-rdynamic,,'`"
4716
  fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4717 4718 4719 4720 4721 4722 4723
  # now look for the gtk.h header
  saved_CPPFLAGS=$CPPFLAGS
  CPPFLAGS="$CPPFLAGS $CFLAGS_GTK"
  for ac_hdr in gtk/gtk.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4724
echo "configure:4725: checking for $ac_hdr" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
4725 4726 4727 4728
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4729
#line 4730 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
4730 4731 4732 4733
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Sam Hocevar's avatar
 
Sam Hocevar committed
4734
{ (eval echo configure:4735: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Sam Hocevar's avatar
 
Sam Hocevar committed
4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
 
    PLUGINS="${PLUGINS} gtk"
    ALIASES="${ALIASES} gvlc"
  
else
  echo "$ac_t""no" 1>&6
fi
done

  CPPFLAGS=$saved_CPPFLAGS
4764
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4765

4766 4767 4768
# Check whether --enable-x11 or --disable-x11 was given.
if test "${enable_x11+set}" = set; then
  enableval="$enable_x11"
Sam Hocevar's avatar
 
Sam Hocevar committed
4769 4770
  :
fi
Henri Fallon's avatar
 
Henri Fallon committed
4771

4772
if test x$enable_x11 != xno; then
Sam Hocevar's avatar
 
Sam Hocevar committed
4773 4774 4775 4776 4777 4778 4779 4780
  if test x$x_includes = xNONE; then
    x_includes=/usr/X11R6/include
  fi
  if test x$x_libraries = xNONE; then
    x_libraries=/usr/X11R6/lib
  fi
  saved_CPPFLAGS=$CPPFLAGS
  CPPFLAGS="$CPPFLAGS -I$x_includes"
Sam Hocevar's avatar
 
Sam Hocevar committed
4781
  for ac_hdr in X11/Xlib.h
4782
do
Sam Hocevar's avatar
 
Sam Hocevar committed
4783 4784
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4785
echo "configure:4786: checking for $ac_hdr" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
4786 4787 4788 4789
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4790
#line 4791 "configure"
4791
#include "confdefs.h"
Sam Hocevar's avatar
 
Sam Hocevar committed
4792 4793 4794
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Sam Hocevar's avatar
 
Sam Hocevar committed
4795
{ (eval echo configure:4796: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Sam Hocevar's avatar
 
Sam Hocevar committed
4796 4797 4798 4799 4800 4801 4802
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
4803
  cat conftest.$ac_ext >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
4804 4805
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
4806
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4807
rm -f conftest*
4808
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4809 4810 4811 4812 4813
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
4814
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4815
 
Sam Hocevar's avatar
 
Sam Hocevar committed
4816
    PLUGINS="${PLUGINS} x11"
Sam Hocevar's avatar
 
Sam Hocevar committed
4817 4818
    LIB_X11="-L$x_libraries -lX11 -lXext"
    CFLAGS_X11="-I$x_includes"
Sam Hocevar's avatar
 
Sam Hocevar committed
4819
  
Sam Hocevar's avatar
 
Sam Hocevar committed
4820
  CPPFLAGS=$saved_CPPFLAGS
Sam Hocevar's avatar
 
Sam Hocevar committed
4821 4822
else
  echo "$ac_t""no" 1>&6
4823 4824 4825 4826
fi
done

fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4827

Sam Hocevar's avatar
 
Sam Hocevar committed
4828 4829 4830
# Check whether --enable-xvideo or --disable-xvideo was given.
if test "${enable_xvideo+set}" = set; then
  enableval="$enable_xvideo"
Sam Hocevar's avatar
 
Sam Hocevar committed
4831 4832
  :
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4833 4834 4835 4836 4837 4838 4839 4840 4841 4842

if test x$enable_xvideo != xno; then
  if test x$x_includes = xNONE; then
    x_includes=/usr/X11R6/include
  fi
  if test x$x_libraries = xNONE; then
    x_libraries=/usr/X11R6/lib
  fi
  saved_CPPFLAGS=$CPPFLAGS
  CPPFLAGS="$CPPFLAGS -I$x_includes"
Sam Hocevar's avatar
 
Sam Hocevar committed
4843
  for ac_hdr in X11/extensions/Xv.h
Sam Hocevar's avatar
 
Sam Hocevar committed
4844
do
Sam Hocevar's avatar
 
Sam Hocevar committed
4845 4846
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4847
echo "configure:4848: checking for $ac_hdr" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
4848 4849 4850 4851
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4852
#line 4853 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
4853
#include "confdefs.h"
Sam Hocevar's avatar
 
Sam Hocevar committed
4854 4855 4856
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Sam Hocevar's avatar
 
Sam Hocevar committed
4857
{ (eval echo configure:4858: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Sam Hocevar's avatar
 
Sam Hocevar committed
4858 4859 4860 4861 4862 4863 4864
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
4865
  cat conftest.$ac_ext >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
4866 4867
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
Sam Hocevar's avatar
 
Sam Hocevar committed
4868
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4869
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
4870
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4871 4872 4873 4874 4875
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
Sam Hocevar's avatar
 
Sam Hocevar committed
4876
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4877
 
Sam Hocevar's avatar
 
Sam Hocevar committed
4878 4879 4880
    PLUGINS="${PLUGINS} xvideo"
    LIB_XVIDEO="-L$x_libraries -lX11 -lXext -lXv"
    CFLAGS_X11="-I$x_includes"
Sam Hocevar's avatar
 
Sam Hocevar committed
4881
  
Sam Hocevar's avatar
 
Sam Hocevar committed
4882
  CPPFLAGS=$saved_CPPFLAGS
Sam Hocevar's avatar
 
Sam Hocevar committed
4883 4884
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4885 4886
fi
done
Sam Hocevar's avatar
 
Sam Hocevar committed
4887

Sam Hocevar's avatar
 
Sam Hocevar committed
4888
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4889

Henri Fallon's avatar
 
Henri Fallon committed
4890 4891 4892
# Check whether --enable-alsa or --disable-alsa was given.
if test "${enable_alsa+set}" = set; then
  enableval="$enable_alsa"
Sam Hocevar's avatar
 
Sam Hocevar committed
4893 4894 4895
  if test x$enable_alsa = xyes
   then
     ac_safe=`echo "sys/asoundlib.h" | sed 'y%./+-%__p_%'`
Sam Hocevar's avatar
 
Sam Hocevar committed
4896
echo $ac_n "checking for sys/asoundlib.h""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4897
echo "configure:4898: checking for sys/asoundlib.h" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
4898 4899 4900 4901
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4902
#line 4903 "configure"
Henri Fallon's avatar
 
Henri Fallon committed
4903 4904
#include "confdefs.h"
#include <sys/asoundlib.h>
Sam Hocevar's avatar
 
Sam Hocevar committed
4905 4906
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Sam Hocevar's avatar
 
Sam Hocevar committed
4907
{ (eval echo configure:4908: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Sam Hocevar's avatar
 
Sam Hocevar committed
4908 4909 4910 4911 4912 4913 4914
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
Henri Fallon's avatar
 
Henri Fallon committed
4915
  cat conftest.$ac_ext >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
4916 4917
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
Henri Fallon's avatar
 
Henri Fallon committed
4918
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4919
rm -f conftest*
Henri Fallon's avatar
 
Henri Fallon committed
4920
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4921 4922 4923
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  echo $ac_n "checking for main in -lasound""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4924
echo "configure:4925: checking for main in -lasound" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
4925 4926 4927
ac_lib_var=`echo asound'_'main | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Henri Fallon's avatar
 
Henri Fallon committed
4928
else
Sam Hocevar's avatar
 
Sam Hocevar committed
4929
  ac_save_LIBS="$LIBS"
Henri Fallon's avatar
 
Henri Fallon committed
4930
LIBS="-lasound  $LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
4931
cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4932
#line 4933 "configure"
Henri Fallon's avatar
 
Henri Fallon committed
4933 4934
#include "confdefs.h"

Sam Hocevar's avatar
 
Sam Hocevar committed
4935 4936 4937 4938
int main() {
main()
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4939
if { (eval echo configure:4940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
Henri Fallon's avatar
 
Henri Fallon committed
4954 4955
  have_alsa="true"
else
Sam Hocevar's avatar
 
Sam Hocevar committed
4956 4957
  echo "$ac_t""no" 1>&6
have_alsa="false"
Henri Fallon's avatar
 
Henri Fallon committed
4958 4959 4960
fi

else
Sam Hocevar's avatar
 
Sam Hocevar committed
4961 4962
  echo "$ac_t""no" 1>&6
have_alsa="false"
Henri Fallon's avatar
 
Henri Fallon committed
4963
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4964 4965 4966 4967 4968 4969 4970

     if test x$have_alsa = xtrue
     then
       PLUGINS="${PLUGINS} alsa"
       LIB_ALSA="-lasound"
     fi
   fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4971 4972
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
4973

4974 4975 4976 4977 4978 4979 4980
fi






Henri Fallon's avatar
 
Henri Fallon committed
4981 4982 4983



Christophe Massiot's avatar
Christophe Massiot committed
4984 4985 4986



Sam Hocevar's avatar
 
Sam Hocevar committed
4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000














Sam Hocevar's avatar
 
Sam Hocevar committed
5001

Sam Hocevar's avatar
 
Sam Hocevar committed
5002

Sam Hocevar's avatar
 
Sam Hocevar committed
5003 5004 5005 5006




Sam Hocevar's avatar
 
Sam Hocevar committed
5007

Sam Hocevar's avatar
 
Sam Hocevar committed
5008 5009


5010

Sam Hocevar's avatar
 
Sam Hocevar committed
5011

Sam Hocevar's avatar
 
Sam Hocevar committed
5012

Sam Hocevar's avatar
 
Sam Hocevar committed
5013

Sam Hocevar's avatar
 
Sam Hocevar committed
5014

Sam Hocevar's avatar
 
Sam Hocevar committed
5015

Sam Hocevar's avatar
 
Sam Hocevar committed
5016 5017 5018



Sam Hocevar's avatar
 
Sam Hocevar committed
5019

Sam Hocevar's avatar
 
Sam Hocevar committed
5020

Sam Hocevar's avatar
 
Sam Hocevar committed
5021

Sam Hocevar's avatar
 
Sam Hocevar committed
5022

Sam Hocevar's avatar
 
Sam Hocevar committed
5023

Sam Hocevar's avatar
 
Sam Hocevar committed
5024 5025


5026

Sam Hocevar's avatar
 
Sam Hocevar committed
5027

Sam Hocevar's avatar
 
Sam Hocevar committed
5028 5029 5030



Sam Hocevar's avatar
 
Sam Hocevar committed
5031

5032

Sam Hocevar's avatar
 
Sam Hocevar committed
5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074 5075 5076 5077 5078

trap '' 1 2 15
cat > confcache <<\EOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
# scripts and configure runs.  It is not useful on other systems.
# If it contains results you don't want to keep, you may remove or edit it.
#
# By default, configure uses ./config.cache as the cache file,
# creating it if it does not exist already.  You can give configure
# the --cache-file=FILE option to use a different cache file; that is
# what configure does when it calls configure scripts in
# subdirectories, so they share the cache.
# Giving --cache-file=/dev/null disables caching, for debugging configure.
# config.status only pays attention to the cache file if you give it the
# --recheck option to rerun configure.
#
EOF
# The following way of writing the cache mishandles newlines in values,
# but we know of no workaround that is simple, portable, and efficient.
# So, don't put newlines in cache variables' values.
# Ultrix sh set writes to stderr and can't be redirected directly,
# and sets the high bit in the cache file unless we assign to the vars.
(set) 2>&1 |
  case `(ac_space=' '; set | grep ac_space) 2>&1` in
  *ac_space=\ *)
    # `set' does not quote correctly, so add quotes (double-quote substitution
    # turns \\\\ into \\, and sed turns \\ into \).
    sed -n \
      -e "s/'/'\\\\''/g" \
      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
    ;;
  *)
    # `set' quotes correctly as required by POSIX, so do not add quotes.
    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
    ;;
  esac >> confcache
if cmp -s $cache_file confcache; then
  :
else
  if test -w $cache_file; then
    echo "updating cache $cache_file"
    cat confcache > $cache_file
  else
    echo "not updating unwritable cache $cache_file"
  fi
5079
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
5080
rm -f confcache
5081

Sam Hocevar's avatar
 
Sam Hocevar committed
5082
trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
Sam Hocevar's avatar
 
Sam Hocevar committed
5083

Sam Hocevar's avatar
 
Sam Hocevar committed
5084 5085 5086
test "x$prefix" = xNONE && prefix=$ac_default_prefix
# Let make expand exec_prefix.
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5087

Sam Hocevar's avatar
 
Sam Hocevar committed
5088 5089 5090 5091 5092 5093 5094 5095 5096 5097
# Any assignment to VPATH causes Sun make to only execute
# the first set of double-colon rules, so remove it if not needed.
# If there is a colon in the path, we need to keep it.
if test "x$srcdir" = x.; then
  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
fi

trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15

DEFS=-DHAVE_CONFIG_H
5098

Sam Hocevar's avatar
 
Sam Hocevar committed
5099 5100
# Without the "./", some shells look in PATH for config.status.
: ${CONFIG_STATUS=./config.status}
5101

Sam Hocevar's avatar
 
Sam Hocevar committed
5102 5103 5104 5105 5106 5107 5108 5109
echo creating $CONFIG_STATUS
rm -f $CONFIG_STATUS
cat > $CONFIG_STATUS <<EOF
#! /bin/sh
# Generated automatically by configure.
# Run this file to recreate the current configuration.
# This directory was configured as follows,
# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
5110
#
Sam Hocevar's avatar
 
Sam Hocevar committed
5111
# $0 $ac_configure_args
5112
#
Sam Hocevar's avatar
 
Sam Hocevar committed
5113 5114
# Compiler output produced by configure, useful for debugging
# configure, is in ./config.log if it exists.
5115

Sam Hocevar's avatar
 
Sam Hocevar committed
5116 5117 5118 5119 5120 5121 5122 5123 5124 5125 5126 5127 5128 5129 5130 5131 5132 5133
ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
for ac_option
do
  case "\$ac_option" in
  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
    echo "$CONFIG_STATUS generated by autoconf version 2.13"
    exit 0 ;;
  -help | --help | --hel | --he | --h)
    echo "\$ac_cs_usage"; exit 0 ;;
  *) echo "\$ac_cs_usage"; exit 1 ;;
  esac
done

ac_given_srcdir=$srcdir
ac_given_INSTALL="$INSTALL"
Sam Hocevar's avatar
 
Sam Hocevar committed
5134

Sam Hocevar's avatar
 
Sam Hocevar committed
5135
trap 'rm -fr `echo "Makefile.opts include/config.h include/defs.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
5136
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5137
cat >> $CONFIG_STATUS <<EOF
5138

Sam Hocevar's avatar
 
Sam Hocevar committed
5139 5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173
# Protect against being on the right side of a sed subst in config.status.
sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
$ac_vpsub
$extrasub
s%@SHELL@%$SHELL%g
s%@CFLAGS@%$CFLAGS%g
s%@CPPFLAGS@%$CPPFLAGS%g
s%@CXXFLAGS@%$CXXFLAGS%g
s%@FFLAGS@%$FFLAGS%g
s%@DEFS@%$DEFS%g
s%@LDFLAGS@%$LDFLAGS%g
s%@LIBS@%$LIBS%g
s%@exec_prefix@%$exec_prefix%g
s%@prefix@%$prefix%g
s%@program_transform_name@%$program_transform_name%g
s%@bindir@%$bindir%g
s%@sbindir@%$sbindir%g
s%@libexecdir@%$libexecdir%g
s%@datadir@%$datadir%g
s%@sysconfdir@%$sysconfdir%g
s%@sharedstatedir@%$sharedstatedir%g
s%@localstatedir@%$localstatedir%g
s%@libdir@%$libdir%g
s%@includedir@%$includedir%g
s%@oldincludedir@%$oldincludedir%g
s%@infodir@%$infodir%g
s%@mandir@%$mandir%g
s%@host@%$host%g
s%@host_alias@%$host_alias%g
s%@host_cpu@%$host_cpu%g
s%@host_vendor@%$host_vendor%g
s%@host_os@%$host_os%g
s%@VLC_VERSION@%$VLC_VERSION%g
s%@VLC_CODENAME@%$VLC_CODENAME%g
Sam Hocevar's avatar
 
Sam Hocevar committed
5174
s%@LIBDVDCSS_VERSION@%$LIBDVDCSS_VERSION%g
Sam Hocevar's avatar
 
Sam Hocevar committed
5175 5176 5177 5178 5179 5180 5181 5182
s%@SET_MAKE@%$SET_MAKE%g
s%@CC@%$CC%g
s%@CPP@%$CPP%g
s%@RANLIB@%$RANLIB%g
s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
s%@INSTALL_DATA@%$INSTALL_DATA%g
s%@ESD_CONFIG@%$ESD_CONFIG%g
Sam Hocevar's avatar
 
Sam Hocevar committed
5183
s%@SDL12_CONFIG@%$SDL12_CONFIG%g
5184 5185
s%@SDL11_CONFIG@%$SDL11_CONFIG%g
s%@SDL_CONFIG@%$SDL_CONFIG%g
Sam Hocevar's avatar
 
Sam Hocevar committed
5186 5187 5188 5189 5190 5191 5192 5193 5194 5195
s%@GTK_CONFIG@%$GTK_CONFIG%g
s%@SYS@%$SYS%g
s%@ARCH@%$ARCH%g
s%@PLUGINS@%$PLUGINS%g
s%@BUILTINS@%$BUILTINS%g
s%@ALIASES@%$ALIASES%g
s%@DEFINE@%$DEFINE%g
s%@INCLUDE@%$INCLUDE%g
s%@DEBUG@%$DEBUG%g
s%@STATS@%$STATS%g
Sam Hocevar's avatar
 
Sam Hocevar committed
5196
s%@ASM@%$ASM%g
Sam Hocevar's avatar
 
Sam Hocevar committed
5197
s%@TRACE@%$TRACE%g
Sam Hocevar's avatar
 
Sam Hocevar committed
5198
s%@PROFILING@%$PROFILING%g
Sam Hocevar's avatar
 
Sam Hocevar committed
5199
s%@OPTIMS@%$OPTIMS%g
Sam Hocevar's avatar
 
Sam Hocevar committed
5200
s%@NEED_GETOPT@%$NEED_GETOPT%g
Sam Hocevar's avatar
 
Sam Hocevar committed
5201
s%@MOC@%$MOC%g
Sam Hocevar's avatar
 
Sam Hocevar committed
5202
s%@WINDRES@%$WINDRES%g
Sam Hocevar's avatar
 
Sam Hocevar committed
5203
s%@LCFLAGS@%$LCFLAGS%g
Sam Hocevar's avatar
 
Sam Hocevar committed
5204
s%@PLCFLAGS@%$PLCFLAGS%g
Sam Hocevar's avatar
 
Sam Hocevar committed
5205
s%@SOFLAGS@%$SOFLAGS%g
Sam Hocevar's avatar
 
Sam Hocevar committed
5206 5207 5208 5209
s%@LIB@%$LIB%g
s%@LIB_ALSA@%$LIB_ALSA%g
s%@LIB_BEOS@%$LIB_BEOS%g
s%@LIB_DARWIN@%$LIB_DARWIN%g
Sam Hocevar's avatar
 
Sam Hocevar committed
5210
s%@LIB_DVD@%$LIB_DVD%g
Sam Hocevar's avatar
 
Sam Hocevar committed
5211
s%@LIB_DVD_PLUGIN@%$LIB_DVD_PLUGIN%g
Sam Hocevar's avatar
 
Sam Hocevar committed
5212 5213 5214 5215 5216 5217
s%@LIB_ESD@%$LIB_ESD%g
s%@LIB_GGI@%$LIB_GGI%g
s%@LIB_GLIDE@%$LIB_GLIDE%g
s%@LIB_GNOME@%$LIB_GNOME%g
s%@LIB_GTK@%$LIB_GTK%g
s%@LIB_IDCTALTIVEC@%$LIB_IDCTALTIVEC%g
Sam Hocevar's avatar
 
Sam Hocevar committed
5218
s%@LIB_LIBDVDCSS@%$LIB_LIBDVDCSS%g
Sam Hocevar's avatar
 
Sam Hocevar committed
5219
s%@LIB_KDE@%$LIB_KDE%g
Sam Hocevar's avatar
 
Sam Hocevar committed
5220
s%@LIB_MACOSX@%$LIB_MACOSX%g
5221
s%@LIB_QNX@%$LIB_QNX%g
Sam Hocevar's avatar
 
Sam Hocevar committed
5222 5223 5224 5225
s%@LIB_NCURSES@%$LIB_NCURSES%g
s%@LIB_QT@%$LIB_QT%g
s%@LIB_TS@%$LIB_TS%g
s%@LIB_SDL@%$LIB_SDL%g
Sam Hocevar's avatar
 
Sam Hocevar committed
5226
s%@LIB_DIRECTX@%$LIB_DIRECTX%g
Sam Hocevar's avatar
 
Sam Hocevar committed
5227 5228 5229 5230
s%@LIB_X11@%$LIB_X11%g
s%@LIB_XVIDEO@%$LIB_XVIDEO%g
s%@LIB_YUV@%$LIB_YUV%g
s%@CFLAGS_VLC@%$CFLAGS_VLC%g
Sam Hocevar's avatar
 
Sam Hocevar committed
5231
s%@CFLAGS_DVD@%$CFLAGS_DVD%g
Sam Hocevar's avatar
 
Sam Hocevar committed
5232
s%@CFLAGS_LIBDVDCSS@%$CFLAGS_LIBDVDCSS%g
Sam Hocevar's avatar
 
Sam Hocevar committed
5233
s%@CFLAGS_GTK@%$CFLAGS_GTK%g
Sam Hocevar's avatar
 
Sam Hocevar committed
5234
s%@CFLAGS_SDL@%$CFLAGS_SDL%g
Sam Hocevar's avatar
 
Sam Hocevar committed
5235
s%@CFLAGS_X11@%$CFLAGS_X11%g
Sam Hocevar's avatar
 
Sam Hocevar committed
5236
s%@OBJ_DVD@%$OBJ_DVD%g
Sam Hocevar's avatar
 
Sam Hocevar committed
5237
s%@OBJ_LIBDVDCSS@%$OBJ_LIBDVDCSS%g
Sam Hocevar's avatar
 
Sam Hocevar committed
5238
s%@NEED_LIBDVDCSS@%$NEED_LIBDVDCSS%g
Sam Hocevar's avatar
 
Sam Hocevar committed
5239 5240 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264

CEOF
EOF

cat >> $CONFIG_STATUS <<\EOF

# Split the substitutions into bite-sized pieces for seds with
# small command number limits, like on Digital OSF/1 and HP-UX.
ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
ac_file=1 # Number of current file.
ac_beg=1 # First line for current file.
ac_end=$ac_max_sed_cmds # Line after last line for current file.
ac_more_lines=:
ac_sed_cmds=""
while $ac_more_lines; do
  if test $ac_beg -gt 1; then
    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
  else
    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
  fi
  if test ! -s conftest.s$ac_file; then
    ac_more_lines=false
    rm -f conftest.s$ac_file
  else
    if test -z "$ac_sed_cmds"; then
      ac_sed_cmds="sed -f conftest.s$ac_file"
Sam Hocevar's avatar
 
Sam Hocevar committed
5265
    else
Sam Hocevar's avatar
 
Sam Hocevar committed
5266
      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
5267
    fi
Sam Hocevar's avatar
 
Sam Hocevar committed
5268 5269 5270
    ac_file=`expr $ac_file + 1`
    ac_beg=$ac_end
    ac_end=`expr $ac_end + $ac_max_sed_cmds`
5271
  fi
Sam Hocevar's avatar
 
Sam Hocevar committed
5272 5273 5274 5275 5276
done
if test -z "$ac_sed_cmds"; then
  ac_sed_cmds=cat
fi
EOF
5277

Sam Hocevar's avatar
 
Sam Hocevar committed
5278 5279 5280
cat >> $CONFIG_STATUS <<EOF

CONFIG_FILES=\${CONFIG_FILES-"Makefile.opts include/config.h"}
5281
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5282 5283
cat >> $CONFIG_STATUS <<\EOF
for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
5284
  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Sam Hocevar's avatar
 
Sam Hocevar committed
5285 5286 5287 5288
  case "$ac_file" in
  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  *) ac_file_in="${ac_file}.in" ;;
5289 5290
  esac

Sam Hocevar's avatar
 
Sam Hocevar committed
5291
  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
Sam Hocevar's avatar
 
Sam Hocevar committed
5292

Sam Hocevar's avatar
 
Sam Hocevar committed
5293 5294 5295 5296 5297 5298
  # Remove last slash and all that follows it.  Not all systems have dirname.
  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
    # The file is in a subdirectory.
    test ! -d "$ac_dir" && mkdir "$ac_dir"
    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
5299
    # A "../" for each directory in $ac_dir_suffix.
Sam Hocevar's avatar
 
Sam Hocevar committed
5300
    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
5301 5302 5303 5304
  else
    ac_dir_suffix= ac_dots=
  fi

Sam Hocevar's avatar
 
Sam Hocevar committed
5305 5306 5307 5308 5309
  case "$ac_given_srcdir" in
  .)  srcdir=.
      if test -z "$ac_dots"; then top_srcdir=.
      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
5310
  *) # Relative path.
Sam Hocevar's avatar
 
Sam Hocevar committed
5311 5312
    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
    top_srcdir="$ac_dots$ac_given_srcdir" ;;
5313 5314
  esac

Sam Hocevar's avatar
 
Sam Hocevar committed
5315 5316 5317
  case "$ac_given_INSTALL" in
  [/$]*) INSTALL="$ac_given_INSTALL" ;;
  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
5318 5319
  esac

Sam Hocevar's avatar
 
Sam Hocevar committed
5320 5321 5322 5323 5324 5325 5326 5327
  echo creating "$ac_file"
  rm -f "$ac_file"
  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
  case "$ac_file" in
  *Makefile*) ac_comsub="1i\\
# $configure_input" ;;
  *) ac_comsub= ;;
  esac
5328

Sam Hocevar's avatar
 
Sam Hocevar committed
5329 5330 5331 5332 5333 5334 5335 5336 5337
  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
  sed -e "$ac_comsub
s%@configure_input@%$configure_input%g
s%@srcdir@%$srcdir%g
s%@top_srcdir@%$top_srcdir%g
s%@INSTALL@%$INSTALL%g
" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
fi; done
rm -f conftest.s*
5338 5339 5340 5341 5342

# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
# NAME is the cpp macro being defined and VALUE is the value it is being given.
#
# ac_d sets the value in "#define NAME VALUE" lines.
Sam Hocevar's avatar
 
Sam Hocevar committed
5343 5344 5345 5346 5347 5348 5349
ac_dA='s%^\([ 	]*\)#\([ 	]*define[ 	][ 	]*\)'
ac_dB='\([ 	][ 	]*\)[^ 	]*%\1#\2'
ac_dC='\3'
ac_dD='%g'
# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
ac_uA='s%^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
ac_uB='\([ 	]\)%\1#\2define\3'
5350
ac_uC=' '
Sam Hocevar's avatar
 
Sam Hocevar committed
5351 5352 5353 5354 5355 5356 5357 5358 5359 5360 5361 5362 5363 5364 5365
ac_uD='\4%g'
# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
ac_eA='s%^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
ac_eB='$%\1#\2define\3'
ac_eC=' '
ac_eD='%g'

if test "${CONFIG_HEADERS+set}" != set; then
EOF
cat >> $CONFIG_STATUS <<EOF
  CONFIG_HEADERS="include/defs.h"
EOF
cat >> $CONFIG_STATUS <<\EOF
fi
for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
5366
  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Sam Hocevar's avatar
 
Sam Hocevar committed
5367 5368 5369 5370
  case "$ac_file" in
  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  *) ac_file_in="${ac_file}.in" ;;
5371 5372
  esac

Sam Hocevar's avatar
 
Sam Hocevar committed
5373 5374 5375 5376 5377
  echo creating $ac_file

  rm -f conftest.frag conftest.in conftest.out
  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
  cat $ac_file_inputs > conftest.in
5378 5379 5380

EOF

Sam Hocevar's avatar
 
Sam Hocevar committed
5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 5391
# Transform confdefs.h into a sed script conftest.vals that substitutes
# the proper values into config.h.in to produce config.h.  And first:
# Protect against being on the right side of a sed subst in config.status.
# Protect against being in an unquoted here document in config.status.
rm -f conftest.vals
cat > conftest.hdr <<\EOF
s/[\\&%]/\\&/g
s%[\\$`]%\\&%g
s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
s%ac_d%ac_u%gp
s%ac_u%ac_e%gp
5392
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5393 5394
sed -n -f conftest.hdr confdefs.h > conftest.vals
rm -f conftest.hdr
5395 5396 5397 5398

# This sed command replaces #undef with comments.  This is necessary, for
# example, in the case of _POSIX_SOURCE, which is predefined and required
# on some systems where configure will not decide to define it.
Sam Hocevar's avatar
 
Sam Hocevar committed
5399 5400
cat >> conftest.vals <<\EOF
s%^[ 	]*#[ 	]*undef[ 	][ 	]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
5401 5402
EOF

Sam Hocevar's avatar
 
Sam Hocevar committed
5403 5404
# Break up conftest.vals because some shells have a limit on
# the size of here documents, and old seds have small limits too.
5405 5406

rm -f conftest.tail
Sam Hocevar's avatar
 
Sam Hocevar committed
5407
while :
5408
do
Sam Hocevar's avatar
 
Sam Hocevar committed
5409 5410 5411 5412 5413 5414
  ac_lines=`grep -c . conftest.vals`
  # grep -c gives empty output for an empty file on some AIX systems.
  if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  # Write a limited-size here document to conftest.frag.
  echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
  sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
5415
  echo 'CEOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5416 5417 5418 5419 5420 5421 5422
  sed -f conftest.frag conftest.in > conftest.out
  rm -f conftest.in
  mv conftest.out conftest.in
' >> $CONFIG_STATUS
  sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
  rm -f conftest.vals
  mv conftest.tail conftest.vals
5423
done
Sam Hocevar's avatar
 
Sam Hocevar committed
5424 5425 5426 5427 5428 5429 5430 5431 5432 5433
rm -f conftest.vals

cat >> $CONFIG_STATUS <<\EOF
  rm -f conftest.frag conftest.h
  echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
  cat conftest.in >> conftest.h
  rm -f conftest.in
  if cmp -s $ac_file conftest.h 2>/dev/null; then
    echo "$ac_file is unchanged"
    rm -f conftest.h
5434
  else
Sam Hocevar's avatar
 
Sam Hocevar committed
5435 5436
    # Remove last slash and all that follows it.  Not all systems have dirname.
      ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5437
      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
Sam Hocevar's avatar
 
Sam Hocevar committed
5438 5439
      # The file is in a subdirectory.
      test ! -d "$ac_dir" && mkdir "$ac_dir"
5440
    fi
Sam Hocevar's avatar
 
Sam Hocevar committed
5441 5442
    rm -f $ac_file
    mv conftest.h $ac_file
5443
  fi
Sam Hocevar's avatar
 
Sam Hocevar committed
5444 5445
fi; done

5446
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5447
cat >> $CONFIG_STATUS <<EOF
5448

Sam Hocevar's avatar
 
Sam Hocevar committed
5449 5450
EOF
cat >> $CONFIG_STATUS <<\EOF
5451

Sam Hocevar's avatar
 
Sam Hocevar committed
5452
exit 0
5453 5454
EOF
chmod +x $CONFIG_STATUS
Sam Hocevar's avatar
 
Sam Hocevar committed
5455 5456 5457
rm -fr confdefs* $ac_clean_files
test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1

5458

5459
echo "
Sam Hocevar's avatar
 
Sam Hocevar committed
5460 5461 5462 5463
global configuration
--------------------
system                : ${SYS}
architecture          : ${ARCH}
Sam Hocevar's avatar
 
Sam Hocevar committed
5464
optimizations         : ${OPTIMS}"
Sam Hocevar's avatar
 
Sam Hocevar committed
5465

Sam Hocevar's avatar
 
Sam Hocevar committed
5466 5467 5468
if test x${HAVE_VLC} = x1
then
  echo "
5469 5470 5471
vlc configuration
-----------------
vlc version           : ${VLC_VERSION}
5472 5473
debug mode            : ${DEBUG}
statistics            : ${STATS}
5474
trace mode            : ${TRACE}
Sam Hocevar's avatar
 
Sam Hocevar committed
5475
profiling             : ${PROFILING}
Sam Hocevar's avatar
 
Sam Hocevar committed
5476
need builtin getopt   : ${NEED_GETOPT}
Sam Hocevar's avatar
 
Sam Hocevar committed
5477
built-in modules      :${BUILTINS}
Sam Hocevar's avatar
 
Sam Hocevar committed
5478
plugin modules        :${PLUGINS}
Sam Hocevar's avatar
 
Sam Hocevar committed
5479 5480
vlc aliases           :${ALIASES}"
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
5481

Sam Hocevar's avatar
 
Sam Hocevar committed
5482
echo "
Sam Hocevar's avatar
 
Sam Hocevar committed
5483 5484
libdvdcss configuration
-----------------------
Sam Hocevar's avatar
 
Sam Hocevar committed
5485
can be built          : ${CAN_BUILD_LIBDVDCSS}
Sam Hocevar's avatar
 
Sam Hocevar committed
5486 5487
will be built         : ${NEED_LIBDVDCSS}"
if test x${NEED_LIBDVDCSS} = x1
Sam Hocevar's avatar
 
Sam Hocevar committed
5488
then
Sam Hocevar's avatar
 
Sam Hocevar committed
5489
  echo "need BSDI libdvd      : ${NEED_BSDI_LIBDVD}"
Sam Hocevar's avatar
 
Sam Hocevar committed
5490 5491 5492
  echo "link statically       : ${STATIC_LIBDVDCSS}"
else
  echo "use dummy replacement : ${DUMMY_LIBDVDCSS}"
Sam Hocevar's avatar
 
Sam Hocevar committed
5493 5494 5495
fi

echo "
Sam Hocevar's avatar
 
Sam Hocevar committed
5496 5497 5498 5499 5500 5501 5502 5503 5504 5505 5506 5507
You may now tune Makefile.opts at your convenience, for instance to choose
which modules get compiled as plugins.
"
if test x${HAVE_VLC} = x1
then
  echo "To build vlc and its plugins, type \`make vlc'."
fi
if test x${HAVE_LIBDVDCSS} = x1
then
  echo "To build libdvdcss only, type \`make libdvdcss'."
fi
echo ""
5508