configure 124 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13
#! /bin/sh

# Guess values for system-dependent variables and create Makefiles.
# Generated automatically using autoconf version 2.13 
# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
#
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.

# Defaults:
ac_help=
ac_default_prefix=/usr/local
# Any additions from configure.in:
Sam Hocevar's avatar
 
Sam Hocevar committed
14 15 16 17
ac_help="$ac_help
  --disable-dummy         dummy module (default enabled)"
ac_help="$ac_help
  --disable-null          Null module (default enabled)"
Sam Hocevar's avatar
 
Sam Hocevar committed
18 19
ac_help="$ac_help
  --disable-rc            rc module (default enabled)"
20
ac_help="$ac_help
21
  --disable-ppro          Disable PentiumPro optimizations (default enabled for x86)"
22
ac_help="$ac_help
23
  --disable-mmx           Disable MMX optimizations (default enabled for x86)"
24
ac_help="$ac_help
25
  --enable-altivec        Enable altivec optimizations (default disabled since it is broken)"
Sam Hocevar's avatar
 
Sam Hocevar committed
26 27
ac_help="$ac_help
  --disable-css           Disable DVD CSS decryption (default enabled)"
28
ac_help="$ac_help
29
  --enable-debug          Enable debug mode (default disabled)"
30
ac_help="$ac_help
31
  --enable-stats          Enable printing of statistics (default disabled)"
32 33
ac_help="$ac_help
  --enable-trace          Enable trace mode (default disabled)"
34
ac_help="$ac_help
35
  --disable-optimizations Disable compiler optimizations (default enabled)"
36
ac_help="$ac_help
37
  --disable-dsp           Linux /dev/dsp support (default enabled)"
38
ac_help="$ac_help
39
  --enable-esd            Esound library support (default disabled)"
Sam Hocevar's avatar
 
Sam Hocevar committed
40 41 42
ac_help="$ac_help
  --enable-darwin         Darwin sound support (default disabled)"
ac_help="$ac_help
43
  --enable-macosx         Mac OS X interface support (default enabled in Mac OS X)"
44
ac_help="$ac_help
45
  --enable-fb             Linux framebuffer support (default disabled)"
46
ac_help="$ac_help
Christophe Massiot's avatar
Christophe Massiot committed
47
  --with-ggi[=name]       GGI support (default disabled)"
Pierre Baillet's avatar
Pierre Baillet committed
48
ac_help="$ac_help
Sam Hocevar's avatar
 
Sam Hocevar committed
49
  --with-sdl[=name]       SDL support (default enabled)"
50
ac_help="$ac_help
Christophe Massiot's avatar
Christophe Massiot committed
51
  --with-glide[=name]     Glide (3dfx) support (default disabled)"
Sam Hocevar's avatar
 
Sam Hocevar committed
52 53
ac_help="$ac_help
  --enable-ncurses        ncurses interface support (default disabled)"
Sam Hocevar's avatar
 
Sam Hocevar committed
54 55
ac_help="$ac_help
  --enable-qt             Qt interface support (default disabled)"
56 57
ac_help="$ac_help
  --enable-kde            KDE interface support (default disabled)"
58
ac_help="$ac_help
Sam Hocevar's avatar
 
Sam Hocevar committed
59 60 61
  --enable-gnome          Gnome interface support (default disabled)"
ac_help="$ac_help
  --disable-gtk           Gtk+ support (default enabled)"
62
ac_help="$ac_help
Sam Hocevar's avatar
 
Sam Hocevar committed
63
  --disable-x11           X11 support (default enabled)"
Sam Hocevar's avatar
 
Sam Hocevar committed
64
ac_help="$ac_help
Sam Hocevar's avatar
 
Sam Hocevar committed
65
  --disable-xvideo        XVideo support (default enabled)"
Henri Fallon's avatar
 
Henri Fallon committed
66
ac_help="$ac_help
67
  --enable-alsa           Alsa sound drivers support (Only for linux) (default disabled)"
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 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 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578

# Initialize some variables set by options.
# The variables have the same names as the options, with
# dashes changed to underlines.
build=NONE
cache_file=./config.cache
exec_prefix=NONE
host=NONE
no_create=
nonopt=NONE
no_recursion=
prefix=NONE
program_prefix=NONE
program_suffix=NONE
program_transform_name=s,x,x,
silent=
site=
srcdir=
target=NONE
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'

# 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

ac_prev=
for ac_option
do

  # If the previous option needs an argument, assign it.
  if test -n "$ac_prev"; then
    eval "$ac_prev=\$ac_option"
    ac_prev=
    continue
  fi

  case "$ac_option" in
  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  *) ac_optarg= ;;
  esac

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

  case "$ac_option" in

  -bindir | --bindir | --bindi | --bind | --bin | --bi)
    ac_prev=bindir ;;
  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
    bindir="$ac_optarg" ;;

  -build | --build | --buil | --bui | --bu)
    ac_prev=build ;;
  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
    build="$ac_optarg" ;;

  -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=*)
    cache_file="$ac_optarg" ;;

  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
    ac_prev=datadir ;;
  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
  | --da=*)
    datadir="$ac_optarg" ;;

  -disable-* | --disable-*)
    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
    # Reject names that are not valid shell variable names.
    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" ;;

  -enable-* | --enable-*)
    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
    # Reject names that are not valid shell variable names.
    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
      *=*) ;;
      *) ac_optarg=yes ;;
    esac
    eval "enable_${ac_feature}='$ac_optarg'" ;;

  -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=*)
    exec_prefix="$ac_optarg" ;;

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

  -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 ;;

  -host | --host | --hos | --ho)
    ac_prev=host ;;
  -host=* | --host=* | --hos=* | --ho=*)
    host="$ac_optarg" ;;

  -includedir | --includedir | --includedi | --included | --include \
  | --includ | --inclu | --incl | --inc)
    ac_prev=includedir ;;
  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
  | --includ=* | --inclu=* | --incl=* | --inc=*)
    includedir="$ac_optarg" ;;

  -infodir | --infodir | --infodi | --infod | --info | --inf)
    ac_prev=infodir ;;
  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
    infodir="$ac_optarg" ;;

  -libdir | --libdir | --libdi | --libd)
    ac_prev=libdir ;;
  -libdir=* | --libdir=* | --libdi=* | --libd=*)
    libdir="$ac_optarg" ;;

  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
  | --libexe | --libex | --libe)
    ac_prev=libexecdir ;;
  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
  | --libexe=* | --libex=* | --libe=*)
    libexecdir="$ac_optarg" ;;

  -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=*)
    localstatedir="$ac_optarg" ;;

  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
    ac_prev=mandir ;;
  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
    mandir="$ac_optarg" ;;

  -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=*)
    oldincludedir="$ac_optarg" ;;

  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
    ac_prev=prefix ;;
  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
    prefix="$ac_optarg" ;;

  -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=*)
    program_prefix="$ac_optarg" ;;

  -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=*)
    program_suffix="$ac_optarg" ;;

  -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=*)
    program_transform_name="$ac_optarg" ;;

  -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=*)
    sbindir="$ac_optarg" ;;

  -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=*)
    sharedstatedir="$ac_optarg" ;;

  -site | --site | --sit)
    ac_prev=site ;;
  -site=* | --site=* | --sit=*)
    site="$ac_optarg" ;;

  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
    ac_prev=srcdir ;;
  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
    srcdir="$ac_optarg" ;;

  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
  | --syscon | --sysco | --sysc | --sys | --sy)
    ac_prev=sysconfdir ;;
  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
    sysconfdir="$ac_optarg" ;;

  -target | --target | --targe | --targ | --tar | --ta | --t)
    ac_prev=target ;;
  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
    target="$ac_optarg" ;;

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

  -version | --version | --versio | --versi | --vers)
    echo "configure generated by autoconf version 2.13"
    exit 0 ;;

  -with-* | --with-*)
    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
    # Reject names that are not valid shell variable names.
    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'`
    case "$ac_option" in
      *=*) ;;
      *) ac_optarg=yes ;;
    esac
    eval "with_${ac_package}='$ac_optarg'" ;;

  -without-* | --without-*)
    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
    # Reject names that are not valid shell variable names.
    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" ;;

  --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=*)
    x_includes="$ac_optarg" ;;

  -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=*)
    x_libraries="$ac_optarg" ;;

  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
    ;;

  *)
    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"
    ;;

  esac
done

if test -n "$ac_prev"; then
  { 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
fi
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

# 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
do
  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" ;;
  esac
done

# 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

# 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

# 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.
ac_unique_file=src/interface/main.c

# 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
  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  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
    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
  else
    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
  fi
fi
srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`

# 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
    echo "loading site script $ac_site_file"
    . "$ac_site_file"
  fi
done

if test -r "$cache_file"; then
  echo "loading cache $cache_file"
  . $cache_file
else
  echo "creating cache $cache_file"
  > $cache_file
fi

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

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
else
  ac_n= ac_c='\c' ac_t=
fi



579

580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605
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
  { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
fi
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.


# Make sure we can run config.sub.
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
606
echo "configure:607: checking host system type" >&5
607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626

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


Henri Fallon's avatar
 
Henri Fallon committed
627
VLC_VERSION=0.2.73
628

Sam Hocevar's avatar
 
Sam Hocevar committed
629
VLC_CODENAME=Ourumov
630 631


Sam Hocevar's avatar
 
Sam Hocevar committed
632 633
save_CFLAGS="${CFLAGS}"

634
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
635
echo "configure:636: checking whether ${MAKE-make} sets \${MAKE}" >&5
636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 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
else
  cat > conftestmake <<\EOF
all:
	@echo 'ac_maketemp="${MAKE}"'
EOF
# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
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
rm -f conftestmake
fi
if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  SET_MAKE=
else
  echo "$ac_t""no" 1>&6
  SET_MAKE="MAKE=${MAKE-make}"
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
661
# Extract the first word of "gcc", so it can be a program name with args.
662 663
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
664
echo "configure:665: checking for $ac_word" >&5
665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
  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"
fi
fi
CC="$ac_cv_prog_CC"
if test -n "$CC"; then
  echo "$ac_t""$CC" 1>&6
else
  echo "$ac_t""no" 1>&6
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
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
694
echo "configure:695: checking for $ac_word" >&5
695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_prog_rejected=no
  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"
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
  if test $# -gt 0; then
    # 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
    set dummy "$ac_dir/$ac_word" "$@"
    shift
    ac_cv_prog_CC="$@"
  fi
fi
fi
fi
CC="$ac_cv_prog_CC"
if test -n "$CC"; then
  echo "$ac_t""$CC" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

  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
Sam Hocevar's avatar
 
Sam Hocevar committed
745
echo "configure:746: checking for $ac_word" >&5
746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
  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"
fi
fi
CC="$ac_cv_prog_CC"
if test -n "$CC"; then
  echo "$ac_t""$CC" 1>&6
else
  echo "$ac_t""no" 1>&6
fi
 ;;
    esac
  fi
  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
fi

echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
777
echo "configure:778: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
778 779 780 781 782 783 784 785 786 787

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

cat > conftest.$ac_ext << EOF

Sam Hocevar's avatar
 
Sam Hocevar committed
788
#line 789 "configure"
789 790 791 792
#include "confdefs.h"

main(){return(0);}
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
793
if { (eval echo configure:794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818
  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
  else
    ac_cv_prog_cc_cross=yes
  fi
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_prog_cc_works=no
fi
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
Sam Hocevar's avatar
 
Sam Hocevar committed
819
echo "configure:820: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
820 821 822 823
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
Sam Hocevar's avatar
 
Sam Hocevar committed
824
echo "configure:825: checking whether we are using GNU C" >&5
825 826 827 828 829 830 831 832
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
Sam Hocevar's avatar
 
Sam Hocevar committed
833
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:834: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851
  ac_cv_prog_gcc=yes
else
  ac_cv_prog_gcc=no
fi
fi

echo "$ac_t""$ac_cv_prog_gcc" 1>&6

if test $ac_cv_prog_gcc = yes; then
  GCC=yes
else
  GCC=
fi

ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
852
echo "configure:853: checking whether ${CC-cc} accepts -g" >&5
853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  echo 'void f(){}' > conftest.c
if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
  ac_cv_prog_cc_g=yes
else
  ac_cv_prog_cc_g=no
fi
rm -f conftest*

fi

echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
if test "$ac_test_CFLAGS" = set; then
  CFLAGS="$ac_save_CFLAGS"
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
883
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
884
echo "configure:885: checking how to run the C preprocessor" >&5
885 886 887 888 889 890 891 892 893 894 895 896 897 898
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
  CPP=
fi
if test -z "$CPP"; then
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"
  # On the NeXT, cc -E runs the code through the compiler's parser,
  # not just through cpp.
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
899
#line 900 "configure"
900 901 902 903 904
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Sam Hocevar's avatar
 
Sam Hocevar committed
905
{ (eval echo configure:906: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
906 907 908 909 910 911 912 913 914 915
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  :
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  CPP="${CC-cc} -E -traditional-cpp"
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
916
#line 917 "configure"
917 918 919 920 921
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Sam Hocevar's avatar
 
Sam Hocevar committed
922
{ (eval echo configure:923: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
923 924 925 926 927 928 929 930 931 932
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  :
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  CPP="${CC-cc} -nologo -E"
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
933
#line 934 "configure"
934 935 936 937 938
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Sam Hocevar's avatar
 
Sam Hocevar committed
939
{ (eval echo configure:940: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  :
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  CPP=/lib/cpp
fi
rm -f conftest*
fi
rm -f conftest*
fi
rm -f conftest*
  ac_cv_prog_CPP="$CPP"
fi
  CPP="$ac_cv_prog_CPP"
else
  ac_cv_prog_CPP="$CPP"
fi
echo "$ac_t""$CPP" 1>&6

Sam Hocevar's avatar
 
Sam Hocevar committed
963 964 965
# 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
Sam Hocevar's avatar
 
Sam Hocevar committed
966
echo "configure:967: checking for $ac_word" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$RANLIB"; then
  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
else
  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=":"
fi
fi
RANLIB="$ac_cv_prog_RANLIB"
if test -n "$RANLIB"; then
  echo "$ac_t""$RANLIB" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005

# 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.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1006
echo "configure:1007: checking for a BSD compatible install" >&5
1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
    IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS=":"
  for ac_dir in $PATH; do
    # Account for people who put trailing slashes in PATH elements.
    case "$ac_dir/" in
    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
    *)
      # 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
        if test -f $ac_dir/$ac_prog; then
	  if test $ac_prog = install &&
            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
	    # 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
  IFS="$ac_save_IFS"

fi
  if test "${ac_cv_path_install+set}" = set; then
    INSTALL="$ac_cv_path_install"
  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.
    INSTALL="$ac_install_sh"
  fi
fi
echo "$ac_t""$INSTALL" 1>&6

# 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}'

test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'

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


echo $ac_n "checking for working const""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1060
echo "configure:1061: checking for working const" >&5
1061 1062 1063 1064
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1065
#line 1066 "configure"
1066 1067 1068 1069 1070
#include "confdefs.h"

int main() {

/* Ultrix mips cc rejects this.  */
Sam Hocevar's avatar
 
Sam Hocevar committed
1071
typedef int charset[2]; const charset x;
1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113
/* 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;
}
{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
  const int foo = 10;
}

; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1114
if { (eval echo configure:1115: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133
  rm -rf conftest*
  ac_cv_c_const=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_c_const=no
fi
rm -f conftest*
fi

echo "$ac_t""$ac_cv_c_const" 1>&6
if test $ac_cv_c_const = no; then
  cat >> confdefs.h <<\EOF
#define const 
EOF

fi

Sam Hocevar's avatar
 
Sam Hocevar committed
1134 1135 1136

if test x${cross_compiling} != xyes; then
  echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1137
echo "configure:1138: checking whether byte ordering is bigendian" >&5
1138 1139 1140 1141 1142 1143
if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_cv_c_bigendian=unknown
# See if sys/param.h defines the BYTE_ORDER macro.
cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1144
#line 1145 "configure"
1145 1146 1147 1148 1149 1150 1151 1152 1153 1154
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
int main() {

#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
 bogus endian macros
#endif
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1155
if { (eval echo configure:1156: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1156 1157 1158
  rm -rf conftest*
  # It does; now see whether it defined to BIG_ENDIAN or not.
cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1159
#line 1160 "configure"
1160 1161 1162 1163 1164 1165 1166 1167 1168 1169
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
int main() {

#if BYTE_ORDER != BIG_ENDIAN
 not big endian
#endif
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1170
if { (eval echo configure:1171: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189
  rm -rf conftest*
  ac_cv_c_bigendian=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_c_bigendian=no
fi
rm -f conftest*
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
if test $ac_cv_c_bigendian = unknown; then
if test "$cross_compiling" = yes; then
    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1190
#line 1191 "configure"
1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202
#include "confdefs.h"
main () {
  /* 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);
}
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1203
if { (eval echo configure:1204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225
then
  ac_cv_c_bigendian=no
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_c_bigendian=yes
fi
rm -fr conftest*
fi

fi
fi

echo "$ac_t""$ac_cv_c_bigendian" 1>&6
if test $ac_cv_c_bigendian = yes; then
  cat >> confdefs.h <<\EOF
#define WORDS_BIGENDIAN 1
EOF

fi

Sam Hocevar's avatar
 
Sam Hocevar committed
1226
fi
1227 1228 1229 1230

for ac_func in gettimeofday select strerror strtod strtol
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1231
echo "configure:1232: checking for $ac_func" >&5
1232 1233 1234 1235
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
Sam Hocevar's avatar
 
Sam Hocevar committed
1236
#line 1237 "configure"
1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258
#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
Sam Hocevar's avatar
 
Sam Hocevar committed
1259
if { (eval echo configure:1260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285
  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 setenv putenv
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1286
echo "configure:1287: checking for $ac_func" >&5
1287 1288 1289 1290
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
Sam Hocevar's avatar
 
Sam Hocevar committed
1291
#line 1292 "configure"
1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313
#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
Sam Hocevar's avatar
 
Sam Hocevar committed
1314
if { (eval echo configure:1315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338
  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

echo $ac_n "checking for connect""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1339
echo "configure:1340: checking for connect" >&5
1340 1341 1342 1343
if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1344
#line 1345 "configure"
1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char connect(); 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 connect();

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_connect) || defined (__stub___connect)
choke me
#else
connect();
#endif

; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1367
if { (eval echo configure:1368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383
  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
  :
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1384 1385

  echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1386
echo "configure:1387: checking for connect in -lsocket" >&5
1387 1388 1389 1390 1391 1392 1393
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
else
  ac_save_LIBS="$LIBS"
LIBS="-lsocket  $LIBS"
cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1394
#line 1395 "configure"
1395 1396 1397 1398 1399 1400 1401 1402 1403 1404
#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 connect();

int main() {
connect()
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1405
if { (eval echo configure:1406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419
  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
1420
  LIB="${LIB} -lsocket"
1421 1422 1423 1424
else
  echo "$ac_t""no" 1>&6
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
1425

1426 1427 1428
fi

echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1429
echo "configure:1430: checking for gethostbyname" >&5
1430 1431 1432 1433
if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1434
#line 1435 "configure"
1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char gethostbyname(); 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 gethostbyname();

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_gethostbyname) || defined (__stub___gethostbyname)
choke me
#else
gethostbyname();
#endif

; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1457
if { (eval echo configure:1458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473
  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
  :
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1474 1475

  echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1476
echo "configure:1477: checking for gethostbyname in -lnsl" >&5
1477 1478 1479 1480 1481 1482 1483
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
else
  ac_save_LIBS="$LIBS"
LIBS="-lnsl  $LIBS"
cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1484
#line 1485 "configure"
1485 1486 1487 1488 1489 1490 1491 1492 1493 1494
#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 gethostbyname();

int main() {
gethostbyname()
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1495
if { (eval echo configure:1496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509
  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
1510
  LIB="${LIB} -lnsl"
1511 1512 1513 1514
else
  echo "$ac_t""no" 1>&6
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
1515

1516 1517 1518
fi

echo $ac_n "checking for nanosleep""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1519
echo "configure:1520: checking for nanosleep" >&5
1520 1521 1522 1523
if eval "test \"`echo '$''{'ac_cv_func_nanosleep'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1524
#line 1525 "configure"
1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char nanosleep(); 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 nanosleep();

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_nanosleep) || defined (__stub___nanosleep)
choke me
#else
nanosleep();
#endif

; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1547
if { (eval echo configure:1548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563
  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
  :
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1564 1565

  echo $ac_n "checking for nanosleep in -lrt""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1566
echo "configure:1567: checking for nanosleep in -lrt" >&5
1567 1568 1569 1570 1571 1572 1573
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
else
  ac_save_LIBS="$LIBS"
LIBS="-lrt  $LIBS"
cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1574
#line 1575 "configure"
1575 1576 1577 1578 1579 1580 1581 1582 1583 1584
#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 nanosleep();

int main() {
nanosleep()
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1585
if { (eval echo configure:1586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599
  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
1600
  LIB="${LIB} -lrt"
1601 1602
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1603 1604

    echo $ac_n "checking for nanosleep in -lposix4""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1605
echo "configure:1606: checking for nanosleep in -lposix4" >&5
1606 1607 1608 1609 1610 1611 1612
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
else
  ac_save_LIBS="$LIBS"
LIBS="-lposix4  $LIBS"
cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1613
#line 1614 "configure"
1614 1615 1616 1617 1618 1619 1620 1621 1622 1623
#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 nanosleep();

int main() {
nanosleep()
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1624
if { (eval echo configure:1625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638
  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
1639
  LIB="${LIB} -lposix4"
1640 1641 1642 1643
else
  echo "$ac_t""no" 1>&6
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
1644
  
1645 1646
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
1647

1648 1649 1650 1651 1652
fi

for ac_func in usleep
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1653
echo "configure:1654: checking for $ac_func" >&5
1654 1655 1656 1657
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
Sam Hocevar's avatar
 
Sam Hocevar committed
1658
#line 1659 "configure"
1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680
#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
Sam Hocevar's avatar
 
Sam Hocevar committed
1681
if { (eval echo configure:1682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705
  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

echo $ac_n "checking for inet_aton""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1706
echo "configure:1707: checking for inet_aton" >&5
1707 1708 1709 1710
if eval "test \"`echo '$''{'ac_cv_func_inet_aton'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1711
#line 1712 "configure"
1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char inet_aton(); 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 inet_aton();

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_inet_aton) || defined (__stub___inet_aton)
choke me
#else
inet_aton();
#endif

; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1734
if { (eval echo configure:1735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750
  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
  :
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1751 1752

  echo $ac_n "checking for inet_aton in -lresolv""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1753
echo "configure:1754: checking for inet_aton in -lresolv" >&5
1754 1755 1756 1757 1758 1759 1760
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
else
  ac_save_LIBS="$LIBS"
LIBS="-lresolv  $LIBS"
cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1761
#line 1762 "configure"
1762 1763 1764 1765 1766 1767 1768 1769 1770 1771
#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 inet_aton();

int main() {
inet_aton()
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1772
if { (eval echo configure:1773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786
  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
1787
  LIB="${LIB} -lresolv"
1788 1789 1790 1791
else
  echo "$ac_t""no" 1>&6
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
1792

1793 1794
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
1795 1796 1797
for ac_func in vasprintf
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1798
echo "configure:1799: checking for $ac_func" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
1799 1800 1801 1802
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
Sam Hocevar's avatar
 
Sam Hocevar committed
1803
#line 1804 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825
#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
Sam Hocevar's avatar
 
Sam Hocevar committed
1826
if { (eval echo configure:1827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849
  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

Sam Hocevar's avatar
 
Sam Hocevar committed
1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904
for ac_func in swab
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:1854: checking for $ac_func" >&5
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
#line 1859 "configure"
#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
if { (eval echo configure:1882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  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

Sam Hocevar's avatar
 
Sam Hocevar committed
1905 1906

echo $ac_n "checking for getopt_long""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1907
echo "configure:1908: checking for getopt_long" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
1908 1909 1910 1911
if eval "test \"`echo '$''{'ac_cv_func_getopt_long'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1912
#line 1913 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char getopt_long(); 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 getopt_long();

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_getopt_long) || defined (__stub___getopt_long)
choke me
#else
getopt_long();
#endif

; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1935
if { (eval echo configure:1936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956
  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
#define HAVE_GETOPT_LONG 1
EOF

else
  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
Sam Hocevar's avatar
 
Sam Hocevar committed
1957
echo "configure:1958: checking for getopt_long in -lgnugetopt" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
1958 1959 1960 1961 1962 1963 1964
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
else
  ac_save_LIBS="$LIBS"
LIBS="-lgnugetopt  $LIBS"
cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1965
#line 1966 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
1966 1967 1968 1969 1970 1971 1972 1973 1974 1975
#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 getopt_long();

int main() {
getopt_long()
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1976
if { (eval echo configure:1977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
 
Sam Hocevar committed
1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993
  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
#define HAVE_GETOPT_LONG 1
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1994
 LIB="${LIB} -lgnugetopt"
Sam Hocevar's avatar
 
Sam Hocevar committed
1995 1996
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1997
GETOPT=1
Sam Hocevar's avatar
 
Sam Hocevar committed
1998 1999 2000 2001 2002 2003
fi

fi



2004 2005 2006 2007
for ac_hdr in unistd.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
2008
echo "configure:2009: checking for $ac_hdr" >&5
2009 2010 2011 2012
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
2013
#line 2014 "configure"
2014 2015 2016 2017
#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
2018
{ (eval echo configure:2019: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046
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
fi
done

for ac_func in getpagesize
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2047
echo "configure:2048: checking for $ac_func" >&5
2048 2049 2050 2051
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
Sam Hocevar's avatar
 
Sam Hocevar committed
2052
#line 2053 "configure"
2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074
#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
Sam Hocevar's avatar
 
Sam Hocevar committed
2075
if { (eval echo configure:2076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099
  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

echo $ac_n "checking for working mmap""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2100
echo "configure:2101: checking for working mmap" >&5
2101 2102 2103 2104 2105 2106 2107
if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
  ac_cv_func_mmap_fixed_mapped=no
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2108
#line 2109 "configure"
2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137
#include "confdefs.h"

/* 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
   VM page cache was not coherent with the filesystem buffer cache
   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>

/* This mess was copied from the GNU getpagesize.h.  */
#ifndef HAVE_GETPAGESIZE
Sam Hocevar's avatar
 
Sam Hocevar committed
2138 2139 2140
# ifdef HAVE_UNISTD_H
#  include <unistd.h>
# endif
2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 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 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194

/* Assume that all systems that can run configure have sys/param.h.  */
# ifndef HAVE_SYS_PARAM_H
#  define HAVE_SYS_PARAM_H 1
# endif

# ifdef _SC_PAGESIZE
#  define getpagesize() sysconf(_SC_PAGESIZE)
# else /* no _SC_PAGESIZE */
#  ifdef HAVE_SYS_PARAM_H
#   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 */

#ifdef __cplusplus
extern "C" { void *malloc(unsigned); }
#else
char *malloc();
#endif

int
main()
{
	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
2195
	data = malloc(pagesize);
2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215
	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
2216
	data2 = malloc(2 * pagesize);
2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233
	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
2234
	data3 = malloc(pagesize);
2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247
	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);
}

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

fi

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
#define HAVE_MMAP 1
EOF

fi

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

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

echo "$ac_t""$ac_cv_type_signal" 1>&6
cat >> confdefs.h <<EOF
#define RETSIGTYPE $ac_cv_type_signal
EOF


echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2312
echo "configure:2313: checking for dlopen in -ldl" >&5
2313 2314 2315 2316 2317 2318 2319
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
else
  ac_save_LIBS="$LIBS"
LIBS="-ldl  $LIBS"
cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2320
#line 2321 "configure"
2321 2322 2323 2324 2325 2326 2327 2328 2329 2330
#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 dlopen();

int main() {
dlopen()
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2331
if { (eval echo configure:2332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345
  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
2346
  LIB="${LIB} -ldl"
2347 2348 2349 2350
else
  echo "$ac_t""no" 1>&6
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
2351
echo $ac_n "checking for pow in -lm""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2352
echo "configure:2353: checking for pow in -lm" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
2353
ac_lib_var=`echo m'_'pow | sed 'y%./+-%__p_%'`
2354 2355 2356 2357 2358 2359
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="-lm  $LIBS"
cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2360
#line 2361 "configure"
2361 2362 2363 2364
#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.  */
Sam Hocevar's avatar
 
Sam Hocevar committed
2365
char pow();
2366 2367

int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
2368
pow()
2369 2370
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2371
if { (eval echo configure:2372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385
  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
2386
  LIB_YUV="${LIB_YUV} -lm"
2387 2388 2389 2390
else
  echo "$ac_t""no" 1>&6
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
2391
echo $ac_n "checking for old style FreeBSD -pthread flag""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2392
echo "configure:2393: checking for old style FreeBSD -pthread flag" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
2393
cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2394
#line 2395 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409
#include "confdefs.h"
#if defined(__FreeBSD_cc_version) && __FreeBSD_cc_version <= 500001
	  yes
	#endif
	
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "yes" >/dev/null 2>&1; then
  rm -rf conftest*
  echo "$ac_t""yes" 1>&6
	DEFINE="${DEFINE} -D_THREAD_SAFE" LIB="${LIB} -pthread"
else
  rm -rf conftest*
  echo "$ac_t""no" 1>&6
	echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2410
echo "configure:2411: checking for pthread_create in -lpthread" >&5
2411 2412 2413 2414 2415 2416 2417
ac_lib_var=`echo pthread'_'pthread_create | 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="-lpthread  $LIBS"
cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2418
#line 2419 "configure"
2419 2420 2421 2422 2423 2424 2425 2426 2427 2428
#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 pthread_create();

int main() {
pthread_create()
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2429
if { (eval echo configure:2430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443
  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
2444
  LIB="${LIB} -lpthread"
2445 2446 2447 2448
else
  echo "$ac_t""no" 1>&6
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
2449 2450 2451
fi
rm -f conftest*

2452
echo $ac_n "checking for thread_create in -lthreads""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2453
echo "configure:2454: checking for thread_create in -lthreads" >&5
2454 2455 2456 2457 2458 2459 2460
ac_lib_var=`echo threads'_'thread_create | 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="-lthreads  $LIBS"
cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2461
#line 2462 "configure"
2462 2463 2464 2465 2466 2467 2468 2469 2470 2471
#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 thread_create();

int main() {
thread_create()
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2472
if { (eval echo configure:2473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486
  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
2487
  LIB="${LIB} -lthreads"
2488 2489 2490 2491 2492
else
  echo "$ac_t""no" 1>&6
fi


Christophe Massiot's avatar
Christophe Massiot committed
2493
CPPFLAGS="${CPPFLAGS} -I/usr/local/include"
Sam Hocevar's avatar
 
Sam Hocevar committed
2494 2495

for ac_hdr in stddef.h getopt.h strings.h
Christophe Massiot's avatar
Christophe Massiot committed
2496 2497 2498
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
2499
echo "configure:2500: checking for $ac_hdr" >&5
Christophe Massiot's avatar
Christophe Massiot committed
2500 2501 2502 2503
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
2504
#line 2505 "configure"
Christophe Massiot's avatar
Christophe Massiot committed
2505 2506 2507 2508
#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
2509
{ (eval echo configure:2510: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Christophe Massiot's avatar
Christophe Massiot committed
2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534
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
fi
done

Sam Hocevar's avatar
 
Sam Hocevar committed
2535
for ac_hdr in sys/sockio.h fcntl.h sys/time.h unistd.h
2536 2537 2538
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
2539
echo "configure:2540: checking for $ac_hdr" >&5
2540 2541 2542 2543
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
2544
#line 2545 "configure"
2545 2546 2547 2548
#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
2549
{ (eval echo configure:2550: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574
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
fi
done

Sam Hocevar's avatar
 
Sam Hocevar committed
2575
for ac_hdr in sys/soundcard.h machine/soundcard.h
2576 2577 2578
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
2579
echo "configure:2580: checking for $ac_hdr" >&5
2580 2581 2582 2583
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
2584
#line 2585 "configure"
2585 2586 2587 2588
#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
2589
{ (eval echo configure:2590: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614
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
fi
done

Sam Hocevar's avatar
 
Sam Hocevar committed
2615
for ac_hdr in dlfcn.h image.h
2616 2617 2618
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
2619
echo "configure:2620: checking for $ac_hdr" >&5
2620 2621 2622 2623
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
2624
#line 2625 "configure"
2625 2626 2627 2628
#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
2629
{ (eval echo configure:2630: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654
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
fi
done

Sam Hocevar's avatar
 
Sam Hocevar committed
2655
for ac_hdr in arpa/inet.h net/if.h netinet/in.h sys/socket.h
2656 2657 2658
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
2659
echo "configure:2660: checking for $ac_hdr" >&5
2660 2661 2662 2663
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
2664
#line 2665 "configure"
2665 2666 2667 2668
#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
2669
{ (eval echo configure:2670: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694
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
fi
done

Sam Hocevar's avatar
 
Sam Hocevar committed
2695
for ac_hdr in machine/param.h
Benoit Steiner's avatar
 
Benoit Steiner committed
2696 2697 2698
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
2699
echo "configure:2700: checking for $ac_hdr" >&5
Benoit Steiner's avatar
 
Benoit Steiner committed
2700 2701 2702 2703
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
2704
#line 2705 "configure"
Benoit Steiner's avatar
 
Benoit Steiner committed
2705 2706 2707 2708
#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
2709
{ (eval echo configure:2710: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Benoit Steiner's avatar
 
Benoit Steiner committed
2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734
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
fi
done

Sam Hocevar's avatar
 
Sam Hocevar committed
2735 2736

for ac_hdr in cthreads.h pthread.h kernel/scheduler.h kernel/OS.h
Benoit Steiner's avatar
 
Benoit Steiner committed
2737 2738 2739
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
2740
echo "configure:2741: checking for $ac_hdr" >&5
Christophe Massiot's avatar
Christophe Massiot committed
2741 2742 2743 2744
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
2745
#line 2746 "configure"
Christophe Massiot's avatar
Christophe Massiot committed
2746 2747 2748 2749
#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
2750
{ (eval echo configure:2751: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Christophe Massiot's avatar
Christophe Massiot committed
2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775
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
fi
done

Sam Hocevar's avatar
 
Sam Hocevar committed
2776 2777

cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2778
#line 2779 "configure"
Benoit Steiner's avatar
 
Benoit Steiner committed
2779
#include "confdefs.h"
Sam Hocevar's avatar
 
Sam Hocevar committed
2780
#include <pthread.h>
Benoit Steiner's avatar
 
Benoit Steiner committed
2781
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2782 2783
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "pthread_cond_t" >/dev/null 2>&1; then
Benoit Steiner's avatar
 
Benoit Steiner committed
2784
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
2785 2786 2787
  
  cat >> confdefs.h <<\EOF
#define PTHREAD_COND_T_IN_PTHREAD_H 1
Benoit Steiner's avatar
 
Benoit Steiner committed
2788 2789
EOF

2790

Sam Hocevar's avatar
 
Sam Hocevar committed
2791 2792 2793 2794
fi
rm -f conftest*

cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2795
#line 2796 "configure"
2796
#include "confdefs.h"
Sam Hocevar's avatar
 
Sam Hocevar committed
2797
#include <strings.h>
2798
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2799 2800
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "strncasecmp" >/dev/null 2>&1; then
2801
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
2802 2803 2804
  
  cat >> confdefs.h <<\EOF
#define STRNCASECMP_IN_STRINGS_H 1
2805
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2806 2807


2808
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
2809
rm -f conftest*
2810 2811


Christophe Massiot's avatar
Christophe Massiot committed
2812 2813
CFLAGS="${CFLAGS} -Wall -Werror"
echo $ac_n "checking for ntohl in sys/param.h""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2814
echo "configure:2815: checking for ntohl in sys/param.h" >&5
Christophe Massiot's avatar
Christophe Massiot committed
2815
cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2816
#line 2817 "configure"
Christophe Massiot's avatar
Christophe Massiot committed
2817 2818 2819 2820 2821 2822 2823
#include "confdefs.h"
#include <sys/param.h>
void foo() { int meuh; ntohl(meuh); }
int main() {

; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2824
if { (eval echo configure:2825: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Christophe Massiot's avatar
Christophe Massiot committed
2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837
  rm -rf conftest*
  cat >> confdefs.h <<\EOF
#define NTOHL_IN_SYS_PARAM_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
2838

2839
CFLAGS="${CFLAGS} -rdynamic -Wall -Werror"
Sam Hocevar's avatar
 
Sam Hocevar committed
2840
echo $ac_n "checking if \$CC groks -rdynamic without complaining too much""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2841
echo "configure:2842: checking if \$CC groks -rdynamic without complaining too much" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
2842
cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2843
#line 2844 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
2844 2845 2846 2847 2848 2849
#include "confdefs.h"

int main() {

; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2850
if { (eval echo configure:2851: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Sam Hocevar's avatar
 
Sam Hocevar committed
2851
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
2852
  LCFLAGS="${LCFLAGS} -rdynamic"
Sam Hocevar's avatar
 
Sam Hocevar committed
2853 2854 2855 2856 2857 2858 2859 2860 2861
 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
2862
CFLAGS="${save_CFLAGS}"
Christophe Massiot's avatar
Christophe Massiot committed
2863

Sam Hocevar's avatar
 
Sam Hocevar committed
2864
echo $ac_n "checking for boolean_t in sys/types.h""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2865
echo "configure:2866: checking for boolean_t in sys/types.h" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
2866
cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2867
#line 2868 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
2868 2869 2870 2871 2872 2873 2874
#include "confdefs.h"
#include <sys/types.h>
void quux() { boolean_t foo; }
int main() {

; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2875
if { (eval echo configure:2876: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Sam Hocevar's avatar
 
Sam Hocevar committed
2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888
  rm -rf conftest*
  cat >> confdefs.h <<\EOF
#define BOOLEAN_T_IN_SYS_TYPES_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*
2889
echo $ac_n "checking for boolean_t in pthread.h""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2890
echo "configure:2891: checking for boolean_t in pthread.h" >&5
2891
cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2892
#line 2893 "configure"
2893 2894 2895 2896 2897 2898 2899
#include "confdefs.h"
#include <pthread.h>
void quux() { boolean_t foo; }
int main() {

; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2900
if { (eval echo configure:2901: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913
  rm -rf conftest*
  cat >> confdefs.h <<\EOF
#define BOOLEAN_T_IN_PTHREAD_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
2914

2915
echo $ac_n "checking for working const""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2916
echo "configure:2917: checking for working const" >&5
2917 2918 2919 2920
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2921
#line 2922 "configure"
2922 2923 2924 2925 2926
#include "confdefs.h"

int main() {

/* Ultrix mips cc rejects this.  */
Sam Hocevar's avatar
 
Sam Hocevar committed
2927
typedef int charset[2]; const charset x;
2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969
/* 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;
}
{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
  const int foo = 10;
}

; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2970
if { (eval echo configure:2971: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990
  rm -rf conftest*
  ac_cv_c_const=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_c_const=no
fi
rm -f conftest*
fi

echo "$ac_t""$ac_cv_c_const" 1>&6
if test $ac_cv_c_const = no; then
  cat >> confdefs.h <<\EOF
#define const 
EOF

fi

echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2991
echo "configure:2992: checking for ANSI C header files" >&5
2992 2993 2994 2995
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2996
#line 2997 "configure"
2997 2998 2999 3000 3001 3002 3003
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Sam Hocevar's avatar
 
Sam Hocevar committed
3004
{ (eval echo configure:3005: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  ac_cv_header_stdc=yes
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_header_stdc=no
fi
rm -f conftest*

if test $ac_cv_header_stdc = yes; then
  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3021
#line 3022 "configure"
3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038
#include "confdefs.h"
#include <string.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "memchr" >/dev/null 2>&1; then
  :
else
  rm -rf conftest*
  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.
cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3039
#line 3040 "configure"
3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059
#include "confdefs.h"
#include <stdlib.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "free" >/dev/null 2>&1; then
  :
else
  rm -rf conftest*
  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.
if test "$cross_compiling" = yes; then
  :
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3060
#line 3061 "configure"
3061 3062 3063 3064 3065 3066 3067 3068 3069 3070
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
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
3071
if { (eval echo configure:3072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094
then
  :
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_header_stdc=no
fi
rm -fr conftest*
fi

fi
fi

echo "$ac_t""$ac_cv_header_stdc" 1>&6
if test $ac_cv_header_stdc = yes; then
  cat >> confdefs.h <<\EOF
#define STDC_HEADERS 1
EOF

fi

echo $ac_n "checking for size_t""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3095
echo "configure:3096: checking for size_t" >&5
3096 3097 3098 3099
if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3100
#line 3101 "configure"
3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127
#include "confdefs.h"
#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*
  ac_cv_type_size_t=yes
else
  rm -rf conftest*
  ac_cv_type_size_t=no
fi
rm -f conftest*

fi
echo "$ac_t""$ac_cv_type_size_t" 1>&6
if test $ac_cv_type_size_t = no; then
  cat >> confdefs.h <<\EOF
#define size_t unsigned
EOF

fi

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
3128
echo "configure:3129: checking whether time.h and sys/time.h may both be included" >&5
3129 3130 3131 3132
if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3133
#line 3134 "configure"
3134 3135 3136 3137 3138 3139 3140 3141
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
#include <time.h>
int main() {
struct tm *tp;
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3142
if { (eval echo configure:3143: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162
  rm -rf conftest*
  ac_cv_header_time=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_header_time=no
fi
rm -f conftest*
fi

echo "$ac_t""$ac_cv_header_time" 1>&6
if test $ac_cv_header_time = yes; then
  cat >> confdefs.h <<\EOF
#define TIME_WITH_SYS_TIME 1
EOF

fi


Sam Hocevar's avatar
 
Sam Hocevar committed
3163 3164
ARCH=${host_cpu}

Sam Hocevar's avatar
 
Sam Hocevar committed
3165
BUILTINS="${BUILTINS} es ps ts yuv idct idctclassic motion"
Sam Hocevar's avatar
 
Sam Hocevar committed
3166 3167
case x$host_os in
  xbeos|xnto-qnx)
Sam Hocevar's avatar
 
Sam Hocevar committed
3168
    ACCEL_PLUGINS="yuvmmx idctmmx motionmmx"
Sam Hocevar's avatar
 
Sam Hocevar committed
3169 3170 3171 3172 3173
    ;;
  xmingw32msvc)
    ACCEL_PLUGINS="idctmmx idctmmxext motionmmx motionmmxext"
    ;;
  *)
Sam Hocevar's avatar
 
Sam Hocevar committed
3174
    ACCEL_PLUGINS="yuvmmx idctmmx idctmmxext motionmmx motionmmxext"
Sam Hocevar's avatar
 
Sam Hocevar committed
3175 3176
    ;;
esac
Sam Hocevar's avatar
 
Sam Hocevar committed
3177

3178 3179 3180 3181
for ac_hdr in sys/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
3182
echo "configure:3183: checking for $ac_hdr" >&5
3183 3184 3185 3186
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
3187
#line 3188 "configure"
3188 3189 3190 3191
#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
3192
{ (eval echo configure:3193: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211
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
3212
 
Sam Hocevar's avatar
 
Sam Hocevar committed
3213
  BUILTINS="${BUILTINS} dvd"
Sam Hocevar's avatar
 
Sam Hocevar committed
3214
  for ac_hdr in linux/cdrom.h
3215 3216 3217
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
3218
echo "configure:3219: checking for $ac_hdr" >&5
3219 3220 3221 3222
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
3223
#line 3224 "configure"
3224 3225 3226 3227
#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
3228
{ (eval echo configure:3229: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253
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
fi
done

Sam Hocevar's avatar
 
Sam Hocevar committed
3254
  cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3255
#line 3256 "configure"
3256 3257 3258 3259 3260 3261
#include "confdefs.h"
#include <linux/cdrom.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "dvd" >/dev/null 2>&1; then
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
3262 3263
  
    cat >> confdefs.h <<\EOF
3264 3265 3266
#define LINUX_DVD 1
EOF

Sam Hocevar's avatar
 
Sam Hocevar committed
3267
  
3268 3269 3270
fi
rm -f conftest*

Sam Hocevar's avatar
 
Sam Hocevar committed
3271

3272 3273 3274 3275 3276
else
  echo "$ac_t""no" 1>&6
fi
done

3277

Sam Hocevar's avatar
 
Sam Hocevar committed
3278 3279 3280 3281 3282 3283
# 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
3284
if test x$enable_dummy != xno; then
Sam Hocevar's avatar
 
Sam Hocevar committed
3285
  BUILTINS="${BUILTINS} dummy"; fi
Sam Hocevar's avatar
 
Sam Hocevar committed
3286

Sam Hocevar's avatar
 
Sam Hocevar committed
3287 3288 3289 3290 3291 3292
# 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
3293
if test x$enable_null != xno; then
Sam Hocevar's avatar
 
Sam Hocevar committed
3294
  BUILTINS="${BUILTINS} null"; fi
Sam Hocevar's avatar
 
Sam Hocevar committed
3295

Sam Hocevar's avatar
 
Sam Hocevar committed
3296 3297 3298 3299 3300 3301 3302 3303 3304
# Check whether --enable-rc or --disable-rc was given.
if test "${enable_rc+set}" = set; then
  enableval="$enable_rc"
  :
fi

if test x$enable_rc != xno; then
  BUILTINS="${BUILTINS} rc"; fi

3305 3306 3307
# Check whether --enable-ppro or --disable-ppro was given.
if test "${enable_ppro+set}" = set; then
  enableval="$enable_ppro"
Sam Hocevar's avatar
 
Sam Hocevar committed
3308
   if test x$enableval = xyes; then ARCH="${ARCH} ppro"; fi 
3309
else
Sam Hocevar's avatar
 
Sam Hocevar committed
3310
   if test x${host_cpu} = xi686; then ARCH="${ARCH} ppro"; fi 
3311 3312
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
3313

3314 3315 3316
# Check whether --enable-mmx or --disable-mmx was given.
if test "${enable_mmx+set}" = set; then
  enableval="$enable_mmx"
Sam Hocevar's avatar
 
Sam Hocevar committed
3317 3318
   if test x$enableval = xyes; then ARCH="${ARCH} mmx";
  BUILTINS="${BUILTINS} ${ACCEL_PLUGINS}"; fi 
Christophe Massiot's avatar
Christophe Massiot committed
3319
else
Sam Hocevar's avatar
 
Sam Hocevar committed
3320
   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";
Sam Hocevar's avatar
 
Sam Hocevar committed
3321
  BUILTINS="${BUILTINS} ${ACCEL_PLUGINS}"; fi 
3322 3323
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
3324

3325 3326 3327
# 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
3328 3329
   if test x$enableval = xyes; then ARCH="${ARCH} altivec";
    BUILTINS="${BUILTINS} idctaltivec"
Sam Hocevar's avatar
 
Sam Hocevar committed
3330 3331
    LIB_IDCTALTIVEC="-framework vecLib"
  fi 
3332 3333
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
3334
#[ if test -d /System/Library/Frameworks/vecLib.framework; then ARCH="${ARCH} altivec"; PLUGINS="${PLUGINS} idctaltivec"; fi ])
Sam Hocevar's avatar
 
Sam Hocevar committed
3335

Sam Hocevar's avatar
 
Sam Hocevar committed
3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347
# Check whether --enable-css or --disable-css was given.
if test "${enable_css+set}" = set; then
  enableval="$enable_css"
   if test x$enableval = xyes; then CSS=1; else CSS=0; fi 
else
   CSS=1; 
fi

if test x${CSS} = x1; then cat >> confdefs.h <<\EOF
#define HAVE_CSS 1
EOF
 fi
Sam Hocevar's avatar
 
Sam Hocevar committed
3348

3349 3350 3351 3352 3353 3354
# 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
3355

3356 3357 3358
# Check whether --enable-stats or --disable-stats was given.
if test "${enable_stats+set}" = set; then
  enableval="$enable_stats"
3359
   if test x$enableval = xyes; then STATS=1; fi 
3360 3361
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
3362

3363 3364 3365 3366 3367 3368 3369
# 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


Henri Fallon's avatar
 
Henri Fallon committed
3370 3371 3372
# Check whether --enable-optimizations or --disable-optimizations was given.
if test "${enable_optimizations+set}" = set; then
  enableval="$enable_optimizations"
3373
   if test x$enableval = xno; then OPTIMS=0; fi 
3374 3375
else
   OPTIMS=1 
3376 3377
fi

3378 3379 3380 3381

SYS=${host_os}

if test x$host_os = xbeos; then
Sam Hocevar's avatar
 
Sam Hocevar committed
3382
    BUILTINS="${BUILTINS} beos"
Sam Hocevar's avatar
 
Sam Hocevar committed
3383
    LIB_BEOS="-lbe -lgame -lroot -ltracker"
3384 3385 3386 3387 3388 3389 3390 3391 3392

else

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

3393
if test x$enable_dsp != xno; then
3394
  if test -c /dev/dsp; then
Sam Hocevar's avatar
 
Sam Hocevar committed
3395
    PLUGINS="${PLUGINS} dsp"
3396 3397
  fi
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
3398

3399 3400 3401
# 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
3402
  if test x$enable_esd = xyes; then
Sam Hocevar's avatar
 
Sam Hocevar committed
3403 3404 3405
     # Extract the first word of "esd-config", so it can be a program name with args.
set dummy esd-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3406
echo "configure:3407: checking for $ac_word" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439
if eval "test \"`echo '$''{'ac_cv_path_ESD_CONFIG'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$ESD_CONFIG" in
  /*)
  ac_cv_path_ESD_CONFIG="$ESD_CONFIG" # Let the user override the test with a path.
  ;;
  ?:/*)			 
  ac_cv_path_ESD_CONFIG="$ESD_CONFIG" # Let the user override the test with a dos path.
  ;;
  *)
  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"
  test -z "$ac_cv_path_ESD_CONFIG" && ac_cv_path_ESD_CONFIG="no"
  ;;
esac
fi
ESD_CONFIG="$ac_cv_path_ESD_CONFIG"
if test -n "$ESD_CONFIG"; then
  echo "$ac_t""$ESD_CONFIG" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

     if test x${ESD_CONFIG} != xno; then
Sam Hocevar's avatar
 
Sam Hocevar committed
3440
       PLUGINS="${PLUGINS} esd"
Sam Hocevar's avatar
 
Sam Hocevar committed
3441 3442
       LIB_ESD="`${ESD_CONFIG} --libs`"
     fi
Sam Hocevar's avatar
 
Sam Hocevar committed
3443
   fi
3444 3445
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
3446

Sam Hocevar's avatar
 
Sam Hocevar committed
3447 3448 3449
# 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
3450
  if test x$enable_darwin = xyes; then
Sam Hocevar's avatar
 
Sam Hocevar committed
3451
     PLUGINS="${PLUGINS} darwin"
Sam Hocevar's avatar
 
Sam Hocevar committed
3452 3453
     LIB_DARWIN="-framework CoreAudio"
   fi
3454 3455
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
3456

3457 3458 3459
# 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
3460
  if test x$enable_macosx = xyes; then
Sam Hocevar's avatar
 
Sam Hocevar committed
3461
     BUILTINS="${BUILTINS} macosx"
Sam Hocevar's avatar
 
Sam Hocevar committed
3462
     LIB_MACOSX="-framework CoreAudio -framework Carbon -framework AGL"
Sam Hocevar's avatar
 
Sam Hocevar committed
3463 3464
     LIB_TS="${LIB_TS} -framework AGL -framework Carbon"
     LIB_SDL="${LIB_SDL} -framework AGL -framework Carbon"
Sam Hocevar's avatar
 
Sam Hocevar committed
3465
   fi
3466
else
3467
  for ac_hdr in Carbon/Carbon.h
3468 3469 3470
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
3471
echo "configure:3472: checking for $ac_hdr" >&5
3472 3473 3474 3475
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
3476
#line 3477 "configure"
3477 3478 3479 3480
#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
3481
{ (eval echo configure:3482: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500
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
3501
 BUILTINS="${BUILTINS} macosx"
Sam Hocevar's avatar
 
Sam Hocevar committed
3502
     LIB_MACOSX="-framework CoreAudio -framework Carbon -framework AGL"
Sam Hocevar's avatar
 
Sam Hocevar committed
3503 3504
     LIB_TS="${LIB_TS} -framework AGL -framework Carbon"
     LIB_SDL="${LIB_SDL} -framework AGL -framework Carbon"
Sam Hocevar's avatar
 
Sam Hocevar committed
3505
   
3506 3507 3508 3509 3510
else
  echo "$ac_t""no" 1>&6
fi
done

Sam Hocevar's avatar
 
Sam Hocevar committed
3511 3512
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
3513

3514 3515 3516
# 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
3517
  if test x$enable_fb = xyes; then PLUGINS="${PLUGINS} fb"; fi
3518 3519
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
3520

Christophe Massiot's avatar
Christophe Massiot committed
3521 3522 3523
# 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
3524
   if test "x$withval" != "xno";
Christophe Massiot's avatar
Christophe Massiot committed
3525
    then
Sam Hocevar's avatar
 
Sam Hocevar committed
3526
      PLUGINS="${PLUGINS} ggi";
Sam Hocevar's avatar
 
Sam Hocevar committed
3527 3528 3529 3530 3531 3532
      if test "x$withval" != "xyes";
      then
        LIB_GGI="-l"$withval
      else
        LIB_GGI="-lggi"
      fi
Christophe Massiot's avatar
Christophe Massiot committed
3533 3534 3535
    fi 
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
3536

Christophe Massiot's avatar
Christophe Massiot committed
3537 3538 3539
# Check whether --with-sdl or --without-sdl was given.
if test "${with_sdl+set}" = set; then
  withval="$with_sdl"
Sam Hocevar's avatar
 
Sam Hocevar committed
3540
   if test "x$withval" != "xno";
Christophe Massiot's avatar
Christophe Massiot committed
3541
    then
Sam Hocevar's avatar
 
Sam Hocevar committed
3542
      PLUGINS="${PLUGINS} sdl";
Sam Hocevar's avatar
 
Sam Hocevar committed
3543 3544
      if test "x$withval" != "xyes";
      then
Sam Hocevar's avatar
 
Sam Hocevar committed
3545
        LIB_SDL="${LIB_SDL} -L/usr/X11R6/lib -L"$withval"/lib -lSDL"
Sam Hocevar's avatar
 
Sam Hocevar committed
3546
        INCLUDE="${INCLUDE} -I"$withval"/include"
Sam Hocevar's avatar
 
Sam Hocevar committed
3547
      else
3548 3549 3550 3551
        for ac_hdr in SDL/SDL.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
3552
echo "configure:3553: checking for $ac_hdr" >&5
3553 3554 3555 3556
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
3557
#line 3558 "configure"
3558 3559 3560 3561
#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
3562
{ (eval echo configure:3563: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588
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 SDL headers !"; exit
fi
done

Sam Hocevar's avatar
 
Sam Hocevar committed
3589
        LIB_SDL="${LIB_SDL} -L/usr/X11R6/lib -lSDL"
Sam Hocevar's avatar
 
Sam Hocevar committed
3590
      fi
Christophe Massiot's avatar
Christophe Massiot committed
3591 3592 3593
    fi 
fi

3594
    if test "x$withval" = "x";
Sam Hocevar's avatar
 
Sam Hocevar committed
3595
    then
3596 3597 3598 3599
      for ac_hdr in SDL/SDL.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
3600
echo "configure:3601: checking for $ac_hdr" >&5
3601 3602 3603 3604
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
3605
#line 3606 "configure"
3606 3607 3608 3609
#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
3610
{ (eval echo configure:3611: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629
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
3630 3631
 PLUGINS="${PLUGINS} sdl"
       LIB_SDL="${LIB_SDL} -L/usr/X11R6/lib -lSDL"
3632 3633 3634 3635 3636
else
  echo "$ac_t""no" 1>&6
fi
done

Sam Hocevar's avatar
 
Sam Hocevar committed
3637
    fi
Sam Hocevar's avatar
 
Sam Hocevar committed
3638

Christophe Massiot's avatar
Christophe Massiot committed
3639 3640 3641
# 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
3642
   if test "x$withval" != "xno";
Christophe Massiot's avatar
Christophe Massiot committed
3643
    then
Sam Hocevar's avatar
 
Sam Hocevar committed
3644
      PLUGINS="${PLUGINS} glide";
Sam Hocevar's avatar
 
Sam Hocevar committed
3645 3646 3647 3648 3649 3650
      if test "x$withval" != "xyes";
      then
        LIB_GLIDE="-l"$withval
      else
        LIB_GLIDE="-lglide2x"
      fi
Christophe Massiot's avatar
Christophe Massiot committed
3651
    fi 
3652 3653
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
3654

Sam Hocevar's avatar
 
Sam Hocevar committed
3655 3656 3657
# 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
3658
  if test x$enable_ncurses = xyes; then
Sam Hocevar's avatar
 
Sam Hocevar committed
3659
     PLUGINS="${PLUGINS} ncurses"
Sam Hocevar's avatar
 
Sam Hocevar committed
3660 3661
     LIB_NCURSES="-lncurses"
   fi
Sam Hocevar's avatar
 
Sam Hocevar committed
3662 3663
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
3664

Sam Hocevar's avatar
 
Sam Hocevar committed
3665 3666 3667
# 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
3668
  if test x$enable_qt = xyes; then
Sam Hocevar's avatar
 
Sam Hocevar committed
3669 3670
     PLUGINS="${PLUGINS} qt"
     ALIASES="${ALIASES} qvlc"
Sam Hocevar's avatar
 
Sam Hocevar committed
3671
     LIB_QT="-lqt -L${QTDIR}/lib"
Sam Hocevar's avatar
 
Sam Hocevar committed
3672 3673 3674 3675 3676 3677
     if test -x ${QTDIR}/bin/moc ;
     then
       MOC=${QTDIR}/bin/moc
     else
       MOC=moc
     fi
Sam Hocevar's avatar
 
Sam Hocevar committed
3678
   fi
Sam Hocevar's avatar
 
Sam Hocevar committed
3679 3680
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
3681

3682 3683 3684
# 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
3685
  if test x$enable_kde = xyes; then PLUGINS="${PLUGINS} kde"; ALIASES="${ALIASES} kvlc"; fi
3686 3687
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
3688

3689 3690 3691
# 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
3692
  if test x$enable_gnome = xyes; then
Sam Hocevar's avatar
 
Sam Hocevar committed
3693 3694
     PLUGINS="${PLUGINS} gnome"
     ALIASES="${ALIASES} gnome-vlc"
Sam Hocevar's avatar
 
Sam Hocevar committed
3695 3696
     LIB_GNOME="`gnome-config --libs gnomeui | sed 's,-rdynamic,,'`"
   fi
Sam Hocevar's avatar
 
Sam Hocevar committed
3697 3698
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
3699

Sam Hocevar's avatar
 
Sam Hocevar committed
3700 3701 3702
# 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
3703
  :
3704 3705
fi

3706
if test x$enable_gtk != xno; then
Sam Hocevar's avatar
 
Sam Hocevar committed
3707 3708 3709
  # Extract the first word of "gtk-config", so it can be a program name with args.
set dummy gtk-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3710
echo "configure:3711: checking for $ac_word" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743
if eval "test \"`echo '$''{'ac_cv_path_GTK_CONFIG'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$GTK_CONFIG" in
  /*)
  ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a path.
  ;;
  ?:/*)			 
  ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a dos path.
  ;;
  *)
  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"
  test -z "$ac_cv_path_GTK_CONFIG" && ac_cv_path_GTK_CONFIG="no"
  ;;
esac
fi
GTK_CONFIG="$ac_cv_path_GTK_CONFIG"
if test -n "$GTK_CONFIG"; then
  echo "$ac_t""$GTK_CONFIG" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

  if test x${GTK_CONFIG} != xno; then
Sam Hocevar's avatar
 
Sam Hocevar committed
3744 3745
    PLUGINS="${PLUGINS} gtk"
    ALIASES="${ALIASES} gvlc"
Sam Hocevar's avatar
 
Sam Hocevar committed
3746 3747
    CFLAGS_GTK="`${GTK_CONFIG} --cflags gtk`"
    LIB_GTK="`${GTK_CONFIG} --libs gtk | sed 's,-rdynamic,,'`"
3748 3749
  fi
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
3750

3751 3752 3753
# 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
3754
  :
Henri Fallon's avatar
 
Henri Fallon committed
3755 3756
fi

3757
if test x$enable_x11 != xno; then
Sam Hocevar's avatar
 
Sam Hocevar committed
3758 3759 3760 3761 3762 3763 3764 3765
  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"
3766 3767 3768 3769
  for ac_hdr in X11/Xlib.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
3770
echo "configure:3771: checking for $ac_hdr" >&5
3771 3772 3773 3774
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
3775
#line 3776 "configure"
3776 3777 3778 3779
#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
3780
{ (eval echo configure:3781: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799
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
3800
 
Sam Hocevar's avatar
 
Sam Hocevar committed
3801
    PLUGINS="${PLUGINS} x11"
Sam Hocevar's avatar
 
Sam Hocevar committed
3802 3803
    LIB_X11="-L$x_libraries -lX11 -lXext"
    CFLAGS_X11="-I$x_includes"
Sam Hocevar's avatar
 
Sam Hocevar committed
3804
  
Sam Hocevar's avatar
 
Sam Hocevar committed
3805
  CPPFLAGS=$saved_CPPFLAGS
3806 3807 3808 3809 3810 3811
else
  echo "$ac_t""no" 1>&6
fi
done

fi
Sam Hocevar's avatar
 
Sam Hocevar committed
3812

Sam Hocevar's avatar
 
Sam Hocevar committed
3813 3814 3815
# 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
3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831
  :
fi

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"
  for ac_hdr in X11/extensions/Xv.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
3832
echo "configure:3833: checking for $ac_hdr" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
3833 3834 3835 3836
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
3837
#line 3838 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
3838 3839 3840 3841
#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
3842
{ (eval echo configure:3843: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Sam Hocevar's avatar
 
Sam Hocevar committed
3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854
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*
Sam Hocevar's avatar
 
Sam Hocevar committed
3855
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871
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} xvideo"
    LIB_XVIDEO="-L$x_libraries -lX11 -lXext -lXv"
    CFLAGS_X11="-I$x_includes"
  
  CPPFLAGS=$saved_CPPFLAGS
else
  echo "$ac_t""no" 1>&6
fi
done
Sam Hocevar's avatar
 
Sam Hocevar committed
3872

Sam Hocevar's avatar
 
Sam Hocevar committed
3873
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
3874

Henri Fallon's avatar
 
Henri Fallon committed
3875 3876 3877
# Check whether --enable-alsa or --disable-alsa was given.
if test "${enable_alsa+set}" = set; then
  enableval="$enable_alsa"
Henri Fallon's avatar
 
Henri Fallon committed
3878 3879
  if test x$enable_alsa = xyes; then ac_safe=`echo "sys/asoundlib.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for sys/asoundlib.h""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3880
echo "configure:3881: checking for sys/asoundlib.h" >&5
Henri Fallon's avatar
 
Henri Fallon committed
3881 3882 3883 3884
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
3885
#line 3886 "configure"
Henri Fallon's avatar
 
Henri Fallon committed
3886 3887 3888 3889
#include "confdefs.h"
#include <sys/asoundlib.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Sam Hocevar's avatar
 
Sam Hocevar committed
3890
{ (eval echo configure:3891: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Henri Fallon's avatar
 
Henri Fallon committed
3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906
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
  echo $ac_n "checking for main in -lasound""... $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3907
echo "configure:3908: checking for main in -lasound" >&5
Henri Fallon's avatar
 
Henri Fallon committed
3908 3909 3910 3911 3912 3913 3914
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
else
  ac_save_LIBS="$LIBS"
LIBS="-lasound  $LIBS"
cat > conftest.$ac_ext <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3915
#line 3916 "configure"
Henri Fallon's avatar
 
Henri Fallon committed
3916 3917 3918 3919 3920 3921
#include "confdefs.h"

int main() {
main()
; return 0; }
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3922
if { (eval echo configure:3923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Henri Fallon's avatar
 
Henri Fallon committed
3923 3924 3925 3926 3927 3928 3929
  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"
Henri Fallon's avatar
 
Henri Fallon committed
3930
fi
Henri Fallon's avatar
 
Henri Fallon committed
3931 3932
rm -f conftest*
LIBS="$ac_save_LIBS"
Henri Fallon's avatar
 
Henri Fallon committed
3933

Henri Fallon's avatar
 
Henri Fallon committed
3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  have_alsa="true"
else
  echo "$ac_t""no" 1>&6
have_alsa="false"
fi

else
  echo "$ac_t""no" 1>&6
have_alsa="false"
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
3947 3948
 if test x$have_alsa = xtrue; then
     PLUGINS="${PLUGINS} alsa"
Sam Hocevar's avatar
 
Sam Hocevar committed
3949 3950
     LIB_ALSA="-lasound"
   fi; fi
3951 3952
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
3953

3954 3955 3956 3957 3958 3959 3960
fi






Henri Fallon's avatar
 
Henri Fallon committed
3961 3962 3963



Christophe Massiot's avatar
Christophe Massiot committed
3964 3965 3966



Sam Hocevar's avatar
 
Sam Hocevar committed
3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980














Sam Hocevar's avatar
 
Sam Hocevar committed
3981

Sam Hocevar's avatar
 
Sam Hocevar committed
3982

Sam Hocevar's avatar
 
Sam Hocevar committed
3983 3984 3985 3986




Sam Hocevar's avatar
 
Sam Hocevar committed
3987

Sam Hocevar's avatar
 
Sam Hocevar committed
3988 3989


3990

Sam Hocevar's avatar
 
Sam Hocevar committed
3991

Sam Hocevar's avatar
 
Sam Hocevar committed
3992

Sam Hocevar's avatar
 
Sam Hocevar committed
3993

Sam Hocevar's avatar
 
Sam Hocevar committed
3994

3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095
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
fi
rm -f confcache

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

test "x$prefix" = xNONE && prefix=$ac_default_prefix
# Let make expand exec_prefix.
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'

# 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

# Without the "./", some shells look in PATH for config.status.
: ${CONFIG_STATUS=./config.status}

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`:
#
# $0 $ac_configure_args
#
# Compiler output produced by configure, useful for debugging
# configure, is in ./config.log if it exists.

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
4096
trap 'rm -fr `echo "Makefile.opts include/config.h include/defs.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137
EOF
cat >> $CONFIG_STATUS <<EOF

# 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
s%@SET_MAKE@%$SET_MAKE%g
s%@CC@%$CC%g
s%@CPP@%$CPP%g
Sam Hocevar's avatar
 
Sam Hocevar committed
4138
s%@RANLIB@%$RANLIB%g
4139 4140 4141
s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
s%@INSTALL_DATA@%$INSTALL_DATA%g
Sam Hocevar's avatar
 
Sam Hocevar committed
4142
s%@GETOPT@%$GETOPT%g
Sam Hocevar's avatar
 
Sam Hocevar committed
4143 4144
s%@ESD_CONFIG@%$ESD_CONFIG%g
s%@GTK_CONFIG@%$GTK_CONFIG%g
4145 4146
s%@SYS@%$SYS%g
s%@ARCH@%$ARCH%g
4147
s%@PLUGINS@%$PLUGINS%g
Sam Hocevar's avatar
 
Sam Hocevar committed
4148
s%@BUILTINS@%$BUILTINS%g
4149
s%@ALIASES@%$ALIASES%g
Sam Hocevar's avatar
 
Sam Hocevar committed
4150
s%@DEFINE@%$DEFINE%g
Sam Hocevar's avatar
 
Sam Hocevar committed
4151
s%@INCLUDE@%$INCLUDE%g
4152 4153
s%@DEBUG@%$DEBUG%g
s%@STATS@%$STATS%g
4154
s%@TRACE@%$TRACE%g
4155
s%@OPTIMS@%$OPTIMS%g
Sam Hocevar's avatar
 
Sam Hocevar committed
4156
s%@CSS@%$CSS%g
Sam Hocevar's avatar
 
Sam Hocevar committed
4157
s%@MOC@%$MOC%g
Sam Hocevar's avatar
 
Sam Hocevar committed
4158 4159
s%@LCFLAGS@%$LCFLAGS%g
s%@LIB@%$LIB%g
Sam Hocevar's avatar
 
Sam Hocevar committed
4160 4161 4162 4163
s%@LIB_ALSA@%$LIB_ALSA%g
s%@LIB_BEOS@%$LIB_BEOS%g
s%@LIB_DARWIN@%$LIB_DARWIN%g
s%@LIB_ESD@%$LIB_ESD%g
Christophe Massiot's avatar
Christophe Massiot committed
4164
s%@LIB_GGI@%$LIB_GGI%g
Sam Hocevar's avatar
 
Sam Hocevar committed
4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176
s%@LIB_GLIDE@%$LIB_GLIDE%g
s%@LIB_GNOME@%$LIB_GNOME%g
s%@LIB_GTK@%$LIB_GTK%g
s%@LIB_IDCTALTIVEC@%$LIB_IDCTALTIVEC%g
s%@LIB_MACOSX@%$LIB_MACOSX%g
s%@LIB_NCURSES@%$LIB_NCURSES%g
s%@LIB_QT@%$LIB_QT%g
s%@LIB_TS@%$LIB_TS%g
s%@LIB_SDL@%$LIB_SDL%g
s%@LIB_X11@%$LIB_X11%g
s%@LIB_XVIDEO@%$LIB_XVIDEO%g
s%@LIB_YUV@%$LIB_YUV%g
Sam Hocevar's avatar
 
Sam Hocevar committed
4177
s%@CFLAGS_VLC@%$CFLAGS_VLC%g
Sam Hocevar's avatar
 
Sam Hocevar committed
4178 4179
s%@CFLAGS_GTK@%$CFLAGS_GTK%g
s%@CFLAGS_X11@%$CFLAGS_X11%g
4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220

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"
    else
      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
    fi
    ac_file=`expr $ac_file + 1`
    ac_beg=$ac_end
    ac_end=`expr $ac_end + $ac_max_sed_cmds`
  fi
done
if test -z "$ac_sed_cmds"; then
  ac_sed_cmds=cat
fi
EOF

cat >> $CONFIG_STATUS <<EOF

Sam Hocevar's avatar
 
Sam Hocevar committed
4221
CONFIG_FILES=\${CONFIG_FILES-"Makefile.opts include/config.h"}
4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 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 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399
EOF
cat >> $CONFIG_STATUS <<\EOF
for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  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" ;;
  esac

  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.

  # 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%^\./%%'`"
    # A "../" for each directory in $ac_dir_suffix.
    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  else
    ac_dir_suffix= ac_dots=
  fi

  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" ;;
  *) # Relative path.
    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
    top_srcdir="$ac_dots$ac_given_srcdir" ;;
  esac

  case "$ac_given_INSTALL" in
  [/$]*) INSTALL="$ac_given_INSTALL" ;;
  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
  esac

  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

  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*

# 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.
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'
ac_uC=' '
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
  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  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" ;;
  esac

  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

EOF

# 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
EOF
sed -n -f conftest.hdr confdefs.h > conftest.vals
rm -f conftest.hdr

# 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.
cat >> conftest.vals <<\EOF
s%^[ 	]*#[ 	]*undef[ 	][ 	]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
EOF

# Break up conftest.vals because some shells have a limit on
# the size of here documents, and old seds have small limits too.

rm -f conftest.tail
while :
do
  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
  echo 'CEOF
  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
done
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
  else
    # 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"
    fi
    rm -f $ac_file
    mv conftest.h $ac_file
  fi
fi; done

EOF
cat >> $CONFIG_STATUS <<EOF

EOF
cat >> $CONFIG_STATUS <<\EOF

exit 0
EOF
chmod +x $CONFIG_STATUS
rm -fr confdefs* $ac_clean_files
test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1


4400 4401 4402 4403 4404 4405
echo "
vlc configuration
-----------------
vlc version           : ${VLC_VERSION}
system                : ${SYS}
architecture          : ${ARCH}
4406 4407
debug mode            : ${DEBUG}
statistics            : ${STATS}
4408
trace mode            : ${TRACE}
4409
optimizations         : ${OPTIMS}
Sam Hocevar's avatar
 
Sam Hocevar committed
4410
CSS decryption        : ${CSS}
Sam Hocevar's avatar
 
Sam Hocevar committed
4411
need builtin getopt   : ${GETOPT}
Sam Hocevar's avatar
 
Sam Hocevar committed
4412
built-in modules      :${BUILTINS}
Sam Hocevar's avatar
 
Sam Hocevar committed
4413
plugin modules        :${PLUGINS}
Sam Hocevar's avatar
 
Sam Hocevar committed
4414
vlc aliases           :${ALIASES}
Sam Hocevar's avatar
 
Sam Hocevar committed
4415 4416

You may now tune Makefile.opts at your convenience."
4417