configure 266 KB
Newer Older
1
#! /bin/sh
2

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

10 11
# Defaults:
ac_help=
12
ac_default_prefix=/usr/local
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
# Any additions from configure.in:
ac_help="$ac_help
  --with-libiconv-prefix=DIR  search for libiconv in DIR/include and DIR/lib"
ac_help="$ac_help
  --disable-nls           do not use Native Language Support"
ac_help="$ac_help
  --with-included-gettext use the GNU gettext library included here"
ac_help="$ac_help
"
ac_help="$ac_help
Optimization options:"
ac_help="$ac_help
  --with-tuning=ARCH      enable special tuning for an architecture
                          (default i686 on IA-32 and 750 on PPC)"
ac_help="$ac_help
  --disable-optimizations disable compiler optimizations (default enabled)"
ac_help="$ac_help
Sam Hocevar's avatar
Sam Hocevar committed
30
  --disable-altivec       disable AltiVec optimizations (default enabled on PPC)"
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
ac_help="$ac_help
  --enable-debug          debug mode (default disabled)"
ac_help="$ac_help
  --enable-release        activate extra optimizations (default disabled)"
ac_help="$ac_help
Input plugins:"
ac_help="$ac_help
  --enable-dvd            DVD input module (default enabled)"
ac_help="$ac_help
    --with-dvdcss=PATH    libdvdcss headers and libraries"
ac_help="$ac_help
    --with-dvdcss-tree=PATH libdvdcss tree for static linking"
ac_help="$ac_help
  --enable-dvdread        dvdread input module (default disabled)"
ac_help="$ac_help
    --with-dvdread=PATH   libdvdread headers and libraries"
ac_help="$ac_help
  --enable-dvbpsi        dvbpsi ts demux module (default disabled)"
ac_help="$ac_help
    --with-dvbpsi=PATH    libdvbpsi headers and libraries"
51 52
ac_help="$ac_help
    --with-dvbpsi-tree=PATH libdvbpsi tree for static linking"
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
ac_help="$ac_help
  --enable-vcd            VCD support for Linux, FreeBSD and MacOS X (default enabled)"
ac_help="$ac_help
  --enable-satellite      satellite card support (default disabled)"
ac_help="$ac_help
  --enable-avi            AVI demux module (default enabled)"
ac_help="$ac_help
Codec plugins:"
ac_help="$ac_help
  --enable-mad            libmad module (default disabled)"
ac_help="$ac_help
    --with-mad=PATH       path to libmad"
ac_help="$ac_help
    --with-mad-tree=PATH  mad tree for static linking"
ac_help="$ac_help
  --enable-ffmpeg         ffmpeg codec (default disabled)"
69 70
ac_help="$ac_help
    --with-ffmpeg=PATH    path to ffmpeg installation"
71 72
ac_help="$ac_help
    --with-ffmpeg-tree=PATH ffmpeg tree for static linking"
73
ac_help="$ac_help
74
  --enable-mp4            MP4 demux module (default disabled)"
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93
ac_help="$ac_help
  --enable-a52            AC3 support with liba52 (default enabled)"
ac_help="$ac_help
    --with-a52-tree=PATH  a52dec tree for static linking "
ac_help="$ac_help
  --enable-vorbis         Ogg/Vorbis decoder support (default enabled)"
ac_help="$ac_help
Video plugins:"
ac_help="$ac_help
  --enable-x11            X11 support (default enabled)"
ac_help="$ac_help
  --enable-xvideo         XVideo support (default enabled)"
ac_help="$ac_help
  --enable-sdl            SDL support (default enabled)"
ac_help="$ac_help
    --with-sdl-config-path=PATH sdl-config path (default search in \$PATH)"
ac_help="$ac_help
  --enable-directx        Win32 DirectX support (default enabled on Win32)"
ac_help="$ac_help
Gildas Bazin's avatar
 
Gildas Bazin committed
94
    --with-directx=PATH   Win32 DirectX headers"
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
ac_help="$ac_help
  --enable-fb             Linux framebuffer support (default enabled on Linux)"
ac_help="$ac_help
  --enable-mga            Linux kernel Matrox support (default disabled)"
ac_help="$ac_help
  --enable-ggi            GGI support (default disabled)"
ac_help="$ac_help
    --with-ggi=PATH       path to libggi"
ac_help="$ac_help
  --enable-glide          Glide (3dfx) support (default disabled)"
ac_help="$ac_help
    --with-glide=PATH     path to libglide"
ac_help="$ac_help
  --enable-aa             aalib output (default disabled)"
ac_help="$ac_help
Audio plugins:"
ac_help="$ac_help
  --enable-dsp            Linux /dev/dsp support (enabled on Linux)"
ac_help="$ac_help
  --enable-esd            Esound library support (default disabled)"
ac_help="$ac_help
  --enable-arts           aRts sound server (default disabled)"
ac_help="$ac_help
  --enable-alsa           ALSA sound support for Linux (default disabled)"
ac_help="$ac_help
  --enable-waveout        Win32 waveOut module (default enabled on Win32)"
ac_help="$ac_help
Interface plugins:"
ac_help="$ac_help
  --enable-gtk            Gtk+ support (default enabled)"
ac_help="$ac_help
    --with-gtk-config-path=PATH gtk-config path (default search in \$PATH)"
ac_help="$ac_help
  --enable-gnome          Gnome interface support (default disabled)"
ac_help="$ac_help
  --enable-qt             Qt interface support (default disabled)"
ac_help="$ac_help
  --enable-kde            KDE interface support (default disabled)"
ac_help="$ac_help
  --enable-macosx         MacOS X support (default enabled on MacOS X)"
ac_help="$ac_help
  --enable-qnx            QNX RTOS support (default enabled on QNX RTOS)"
ac_help="$ac_help
  --enable-intfwin        Win32 interface support (default disabled)"
ac_help="$ac_help
    --with-bcbuilder=PATH Borland C++ Builder installation path"
ac_help="$ac_help
  --enable-ncurses        ncurses interface support (default disabled)"
ac_help="$ac_help
144 145 146 147 148 149 150
  --enable-xosd           xosd interface support (default disabled)"
ac_help="$ac_help
  --enable-lirc           lirc support (default disabled)"
ac_help="$ac_help
Misc options:"
ac_help="$ac_help
  --with-words=endianness set endianness (big or little)"
151 152 153 154 155 156 157 158
ac_help="$ac_help
  --enable-gprof          gprof profiling (default disabled)"
ac_help="$ac_help
  --enable-cprof          cprof profiling (default disabled)"
ac_help="$ac_help
  --enable-pth            GNU Pth support (default disabled)"
ac_help="$ac_help
  --enable-st             State Threads (default disabled)"
159 160
ac_help="$ac_help
  --enable-mozilla        build a vlc-based Mozilla plugin (default disabled)"
161 162
ac_help="$ac_help
  --disable-plugins       make all plug-ins built-in (default plug-ins enabled)"
163 164 165 166

# Initialize some variables set by options.
# The variables have the same names as the options, with
# dashes changed to underlines.
167 168
build=NONE
cache_file=./config.cache
169
exec_prefix=NONE
170
host=NONE
171
no_create=
172
nonopt=NONE
173 174 175 176 177 178 179 180
no_recursion=
prefix=NONE
program_prefix=NONE
program_suffix=NONE
program_transform_name=s,x,x,
silent=
site=
srcdir=
181
target=NONE
182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197
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'

198 199 200 201 202 203 204
# 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

205 206 207
ac_prev=
for ac_option
do
208

209 210 211 212 213 214 215
  # If the previous option needs an argument, assign it.
  if test -n "$ac_prev"; then
    eval "$ac_prev=\$ac_option"
    ac_prev=
    continue
  fi

216 217 218 219
  case "$ac_option" in
  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  *) ac_optarg= ;;
  esac
220 221 222

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

223
  case "$ac_option" in
224 225 226 227

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

  -build | --build | --buil | --bui | --bu)
231
    ac_prev=build ;;
232
  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
233
    build="$ac_optarg" ;;
234 235 236 237 238 239

  -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=*)
240
    cache_file="$ac_optarg" ;;
241 242 243 244 245

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

  -disable-* | --disable-*)
249
    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
250
    # Reject names that are not valid shell variable names.
251 252 253 254 255
    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" ;;
256 257

  -enable-* | --enable-*)
258
    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
259
    # Reject names that are not valid shell variable names.
260 261 262 263 264 265
    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
      *=*) ;;
266 267
      *) ac_optarg=yes ;;
    esac
268
    eval "enable_${ac_feature}='$ac_optarg'" ;;
269 270 271 272 273 274 275 276

  -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=*)
277
    exec_prefix="$ac_optarg" ;;
278 279 280 281 282

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

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

  -host | --host | --hos | --ho)
339
    ac_prev=host ;;
340
  -host=* | --host=* | --hos=* | --ho=*)
341
    host="$ac_optarg" ;;
342 343 344 345 346 347

  -includedir | --includedir | --includedi | --included | --include \
  | --includ | --inclu | --incl | --inc)
    ac_prev=includedir ;;
  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
  | --includ=* | --inclu=* | --incl=* | --inc=*)
348
    includedir="$ac_optarg" ;;
349 350 351 352

  -infodir | --infodir | --infodi | --infod | --info | --inf)
    ac_prev=infodir ;;
  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
353
    infodir="$ac_optarg" ;;
354 355 356 357

  -libdir | --libdir | --libdi | --libd)
    ac_prev=libdir ;;
  -libdir=* | --libdir=* | --libdi=* | --libd=*)
358
    libdir="$ac_optarg" ;;
359 360 361 362 363 364

  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
  | --libexe | --libex | --libe)
    ac_prev=libexecdir ;;
  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
  | --libexe=* | --libex=* | --libe=*)
365
    libexecdir="$ac_optarg" ;;
366 367 368 369 370 371 372 373

  -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=*)
374
    localstatedir="$ac_optarg" ;;
375 376 377 378

  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
    ac_prev=mandir ;;
  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
379
    mandir="$ac_optarg" ;;
380 381 382 383 384 385

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

  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
386
  | --no-cr | --no-c)
387 388 389 390 391 392 393 394 395 396 397 398 399
    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=*)
400
    oldincludedir="$ac_optarg" ;;
401 402 403 404

  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
    ac_prev=prefix ;;
  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
405
    prefix="$ac_optarg" ;;
406 407 408 409 410 411

  -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=*)
412
    program_prefix="$ac_optarg" ;;
413 414 415 416 417 418

  -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=*)
419
    program_suffix="$ac_optarg" ;;
420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435

  -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=*)
436
    program_transform_name="$ac_optarg" ;;
437 438 439 440 441 442 443 444 445

  -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=*)
446
    sbindir="$ac_optarg" ;;
447 448 449 450 451 452 453 454 455 456

  -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=*)
457
    sharedstatedir="$ac_optarg" ;;
458 459 460 461

  -site | --site | --sit)
    ac_prev=site ;;
  -site=* | --site=* | --sit=*)
462
    site="$ac_optarg" ;;
463 464 465 466

  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
    ac_prev=srcdir ;;
  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
467
    srcdir="$ac_optarg" ;;
468 469 470 471 472 473

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

  -target | --target | --targe | --targ | --tar | --ta | --t)
477
    ac_prev=target ;;
478
  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
479
    target="$ac_optarg" ;;
480 481 482 483

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

484 485 486
  -version | --version | --versio | --versi | --vers)
    echo "configure generated by autoconf version 2.13"
    exit 0 ;;
487 488

  -with-* | --with-*)
489
    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
490
    # Reject names that are not valid shell variable names.
491 492 493
    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
494
    ac_package=`echo $ac_package| sed 's/-/_/g'`
495 496
    case "$ac_option" in
      *=*) ;;
497 498
      *) ac_optarg=yes ;;
    esac
499
    eval "with_${ac_package}='$ac_optarg'" ;;
500 501

  -without-* | --without-*)
502
    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
503
    # Reject names that are not valid shell variable names.
504 505 506 507 508
    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" ;;
509 510 511 512 513 514 515 516 517 518

  --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=*)
519
    x_includes="$ac_optarg" ;;
520 521 522 523 524 525

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

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

  *)
532 533 534 535 536 537 538
    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"
539 540 541 542 543 544
    ;;

  esac
done

if test -n "$ac_prev"; then
545
  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
546
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
547

548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568
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
569

570 571 572 573
# 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
574
do
575 576 577 578 579 580 581 582
  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" ;;
583 584 585
  esac
done

586 587 588 589 590 591 592 593 594
# 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
595

596 597 598 599
# 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
600

601 602 603
# 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=include/main.h
604 605 606 607 608

# 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.
609 610 611
  ac_prog=$0
  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
612 613 614 615 616 617 618 619 620
  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
621
    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
622
  else
623
    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
624 625
  fi
fi
626
srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
627 628 629 630 631 632 633 634 635 636 637

# 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
638
    echo "loading site script $ac_site_file"
639 640 641 642 643
    . "$ac_site_file"
  fi
done

if test -r "$cache_file"; then
644 645
  echo "loading cache $cache_file"
  . $cache_file
646
else
647 648
  echo "creating cache $cache_file"
  > $cache_file
649 650 651
fi

ac_ext=c
652
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
653
ac_cpp='$CPP $CPPFLAGS'
654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670
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
671 672 673



674 675 676 677 678 679 680 681 682 683 684 685 686
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
687
  { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
688
fi
689 690 691
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.
Sam Hocevar's avatar
 
Sam Hocevar committed
692

693

694 695 696 697 698 699 700 701 702 703 704 705
# Do some error checking and defaulting for the host and target type.
# The inputs are:
#    configure --host=HOST --target=TARGET --build=BUILD NONOPT
#
# The rules are:
# 1. You are not allowed to specify --host, --target, and nonopt at the
#    same time.
# 2. Host defaults to nonopt.
# 3. If nonopt is not specified, then host defaults to the current host,
#    as determined by config.guess.
# 4. Target and build default to nonopt.
# 5. If nonopt is not specified, then target and build default to host.
706 707 708

# The aliases save the names the user supplied, while $host etc.
# will get canonicalized.
709 710 711 712 713 714 715 716 717 718 719 720
case $host---$target---$nonopt in
NONE---*---* | *---NONE---* | *---*---NONE) ;;
*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
esac


# 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
721
echo "configure:722: checking host system type" >&5
722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741

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

echo $ac_n "checking target system type""... $ac_c" 1>&6
742
echo "configure:743: checking target system type" >&5
743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759

target_alias=$target
case "$target_alias" in
NONE)
  case $nonopt in
  NONE) target_alias=$host_alias ;;
  *) target_alias=$nonopt ;;
  esac ;;
esac

target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$target" 1>&6

echo $ac_n "checking build system type""... $ac_c" 1>&6
760
echo "configure:761: checking build system type" >&5
761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777

build_alias=$build
case "$build_alias" in
NONE)
  case $nonopt in
  NONE) build_alias=$host_alias ;;
  *) build_alias=$nonopt ;;
  esac ;;
esac

build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$build" 1>&6

test "$host_alias" != "$target_alias" &&
778 779 780 781
  test "$program_prefix$program_suffix$program_transform_name" = \
    NONENONEs,x,x, &&
  program_prefix=${target_alias}-

782

Sam Hocevar's avatar
Sam Hocevar committed
783 784
CONFIGURE_LINE="$0 $*"

Sam Hocevar's avatar
 
Sam Hocevar committed
785
PACKAGE="vlc"
Sam Hocevar's avatar
Sam Hocevar committed
786 787
VERSION="0.5.0-cvs"
CODENAME="Natalya"
Sam Hocevar's avatar
 
Sam Hocevar committed
788

789
save_CPPFLAGS="${CPPFLAGS}"
Sam Hocevar's avatar
Sam Hocevar committed
790
save_CFLAGS="${CFLAGS}"
Sam Hocevar's avatar
 
Sam Hocevar committed
791
save_LDFLAGS="${LDFLAGS}"
Sam Hocevar's avatar
 
Sam Hocevar committed
792

793
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
794
echo "configure:795: checking whether ${MAKE-make} sets \${MAKE}" >&5
795 796 797
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
798
else
799
  cat > conftestmake <<\EOF
800 801
all:
	@echo 'ac_maketemp="${MAKE}"'
802
EOF
803
# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
804
eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
805 806 807 808 809
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
810
rm -f conftestmake
811 812
fi
if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
813
  echo "$ac_t""yes" 1>&6
814 815
  SET_MAKE=
else
816
  echo "$ac_t""no" 1>&6
817 818 819
  SET_MAKE="MAKE=${MAKE-make}"
fi

820 821 822
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
823
echo "configure:824: checking for $ac_word" >&5
824 825
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
826 827 828 829
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
830 831 832 833 834 835 836 837 838 839
  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"
840 841
fi
fi
842
CC="$ac_cv_prog_CC"
843
if test -n "$CC"; then
844
  echo "$ac_t""$CC" 1>&6
845
else
846
  echo "$ac_t""no" 1>&6
847 848 849 850 851
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
852
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
853
echo "configure:854: checking for $ac_word" >&5
854 855
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
856 857 858 859
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
860
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
861
  ac_prog_rejected=no
862 863 864 865 866 867 868 869 870 871 872 873 874
  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"
875 876 877 878
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
879
  if test $# -gt 0; then
880 881 882 883
    # 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
884
    set dummy "$ac_dir/$ac_word" "$@"
885 886 887 888 889 890
    shift
    ac_cv_prog_CC="$@"
  fi
fi
fi
fi
891
CC="$ac_cv_prog_CC"
892
if test -n "$CC"; then
893
  echo "$ac_t""$CC" 1>&6
894
else
895
  echo "$ac_t""no" 1>&6
896 897
fi

898 899 900 901 902 903
  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
904
echo "configure:905: checking for $ac_word" >&5
905 906
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
907 908 909 910
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
911 912 913 914 915 916 917 918 919 920
  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"
921 922
fi
fi
923
CC="$ac_cv_prog_CC"
924
if test -n "$CC"; then
925
  echo "$ac_t""$CC" 1>&6
926
else
927
  echo "$ac_t""no" 1>&6
928
fi
929 930
 ;;
    esac
Sam Hocevar's avatar
 
Sam Hocevar committed
931
  fi
932
  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
933
fi
934

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

938 939 940 941 942 943
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
944

945
cat > conftest.$ac_ext << EOF
946

947
#line 948 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
948 949
#include "confdefs.h"

950 951
main(){return(0);}
EOF
952
if { (eval echo configure:953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
953 954 955 956
  ac_cv_prog_cc_works=yes
  # If we can't run a trivial program, we are probably using a cross compiler.
  if (./conftest; exit) 2>/dev/null; then
    ac_cv_prog_cc_cross=no
Sam Hocevar's avatar
 
Sam Hocevar committed
957
  else
958
    ac_cv_prog_cc_cross=yes
Sam Hocevar's avatar
 
Sam Hocevar committed
959
  fi
Sam Hocevar's avatar
 
Sam Hocevar committed
960
else
961 962 963
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_prog_cc_works=no
964
fi
965 966 967 968 969 970 971
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
Sam Hocevar's avatar
 
Sam Hocevar committed
972

973 974 975 976 977
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
978
echo "configure:979: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
979 980
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
Sam Hocevar's avatar
 
Sam Hocevar committed
981

982
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
983
echo "configure:984: checking whether we are using GNU C" >&5
984 985
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
986
else
987 988 989
  cat > conftest.c <<EOF
#ifdef __GNUC__
  yes;
Sam Hocevar's avatar
 
Sam Hocevar committed
990
#endif
991
EOF
992
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:993: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
993
  ac_cv_prog_gcc=yes
Sam Hocevar's avatar
 
Sam Hocevar committed
994
else
995
  ac_cv_prog_gcc=no
Sam Hocevar's avatar
 
Sam Hocevar committed
996
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
997 998
fi

999
echo "$ac_t""$ac_cv_prog_gcc" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1000

1001 1002 1003 1004 1005
if test $ac_cv_prog_gcc = yes; then
  GCC=yes
else
  GCC=
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
1006

1007 1008 1009 1010
ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1011
echo "configure:1012: checking whether ${CC-cc} accepts -g" >&5
1012 1013 1014 1015 1016
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
Sam Hocevar's avatar
 
Sam Hocevar committed
1017 1018
  ac_cv_prog_cc_g=yes
else
1019
  ac_cv_prog_cc_g=no
Sam Hocevar's avatar
 
Sam Hocevar committed
1020
fi
1021 1022
rm -f conftest*

Sam Hocevar's avatar
 
Sam Hocevar committed
1023
fi
1024 1025

echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1026
if test "$ac_test_CFLAGS" = set; then
1027
  CFLAGS="$ac_save_CFLAGS"
1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040
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
1041

1042
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1043
echo "configure:1044: checking how to run the C preprocessor" >&5
1044 1045 1046 1047 1048
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
  CPP=
fi
if test -z "$CPP"; then
1049 1050 1051 1052 1053 1054
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"
1055
  # On the NeXT, cc -E runs the code through the compiler's parser,
1056 1057
  # not just through cpp.
  cat > conftest.$ac_ext <<EOF
1058
#line 1059 "configure"
1059 1060
#include "confdefs.h"
#include <assert.h>
1061 1062 1063
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1064
{ (eval echo configure:1065: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1065 1066
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
1067 1068
  :
else
1069 1070
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
1071
  cat conftest.$ac_ext >&5
1072 1073 1074
  rm -rf conftest*
  CPP="${CC-cc} -E -traditional-cpp"
  cat > conftest.$ac_ext <<EOF
1075
#line 1076 "configure"
1076 1077 1078 1079 1080
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1081
{ (eval echo configure:1082: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1082 1083 1084
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  :
1085
else
1086 1087
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
1088
  cat conftest.$ac_ext >&5
1089 1090 1091
  rm -rf conftest*
  CPP="${CC-cc} -nologo -E"
  cat > conftest.$ac_ext <<EOF
1092
#line 1093 "configure"
1093 1094
#include "confdefs.h"
#include <assert.h>
1095 1096 1097
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1098
{ (eval echo configure:1099: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1099 1100
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
1101 1102
  :
else
1103 1104
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
1105
  cat conftest.$ac_ext >&5
1106 1107
  rm -rf conftest*
  CPP=/lib/cpp
Sam Hocevar's avatar
 
Sam Hocevar committed
1108
fi
1109
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
1110
fi
1111 1112 1113 1114 1115 1116
rm -f conftest*
fi
rm -f conftest*
  ac_cv_prog_CPP="$CPP"
fi
  CPP="$ac_cv_prog_CPP"
Gildas Bazin's avatar
 
Gildas Bazin committed
1117
else
1118
  ac_cv_prog_CPP="$CPP"
Gildas Bazin's avatar
 
Gildas Bazin committed
1119
fi
1120
echo "$ac_t""$CPP" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
1121

1122

1123 1124 1125 1126 1127
if test $host != $build; then
  ac_tool_prefix=${host_alias}-
else
  ac_tool_prefix=
fi
1128

1129
# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
Gildas Bazin's avatar
 
Gildas Bazin committed
1130
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
1131
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1132
echo "configure:1133: checking for $ac_word" >&5
1133 1134
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
1135 1136 1137 1138
else
  if test -n "$RANLIB"; then
  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
else
1139 1140 1141 1142 1143 1144 1145 1146 1147 1148
  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="${ac_tool_prefix}ranlib"
      break
    fi
  done
  IFS="$ac_save_ifs"
Gildas Bazin's avatar
 
Gildas Bazin committed
1149 1150
fi
fi
1151
RANLIB="$ac_cv_prog_RANLIB"
Gildas Bazin's avatar
 
Gildas Bazin committed
1152
if test -n "$RANLIB"; then
1153
  echo "$ac_t""$RANLIB" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
1154
else
1155
  echo "$ac_t""no" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
1156 1157
fi

1158

Gildas Bazin's avatar
 
Gildas Bazin committed
1159
if test -z "$ac_cv_prog_RANLIB"; then
1160
if test -n "$ac_tool_prefix"; then
Gildas Bazin's avatar
 
Gildas Bazin committed
1161 1162
  # Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
1163
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1164
echo "configure:1165: checking for $ac_word" >&5
1165 1166
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
1167
else
1168 1169
  if test -n "$RANLIB"; then
  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
Gildas Bazin's avatar
 
Gildas Bazin committed
1170
else
1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181
  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=":"
Gildas Bazin's avatar
 
Gildas Bazin committed
1182 1183
fi
fi
1184 1185 1186
RANLIB="$ac_cv_prog_RANLIB"
if test -n "$RANLIB"; then
  echo "$ac_t""$RANLIB" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
1187
else
1188
  echo "$ac_t""no" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
1189 1190 1191
fi

else
1192 1193
  RANLIB=":"
fi
Gildas Bazin's avatar
 
Gildas Bazin committed
1194 1195
fi

1196
# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
Sam Hocevar's avatar
 
Sam Hocevar committed
1197
set dummy ${ac_tool_prefix}strip; ac_word=$2
1198
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1199
echo "configure:1200: checking for $ac_word" >&5
1200 1201
if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1202 1203 1204 1205
else
  if test -n "$STRIP"; then
  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
else
1206 1207 1208 1209 1210 1211 1212 1213 1214 1215
  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_STRIP="${ac_tool_prefix}strip"
      break
    fi
  done
  IFS="$ac_save_ifs"
Sam Hocevar's avatar
 
Sam Hocevar committed
1216 1217
fi
fi
1218
STRIP="$ac_cv_prog_STRIP"
Sam Hocevar's avatar
 
Sam Hocevar committed
1219
if test -n "$STRIP"; then
1220
  echo "$ac_t""$STRIP" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1221
else
1222
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1223 1224
fi

1225

Sam Hocevar's avatar
 
Sam Hocevar committed
1226
if test -z "$ac_cv_prog_STRIP"; then
1227
if test -n "$ac_tool_prefix"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
1228 1229
  # Extract the first word of "strip", so it can be a program name with args.
set dummy strip; ac_word=$2
1230
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1231
echo "configure:1232: checking for $ac_word" >&5
1232 1233
if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1234
else
1235 1236
  if test -n "$STRIP"; then
  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
Sam Hocevar's avatar
 
Sam Hocevar committed
1237
else
1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248
  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_STRIP="strip"
      break
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
Sam Hocevar's avatar
 
Sam Hocevar committed
1249 1250
fi
fi
1251 1252 1253
STRIP="$ac_cv_prog_STRIP"
if test -n "$STRIP"; then
  echo "$ac_t""$STRIP" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1254
else
1255
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1256 1257 1258
fi

else
1259 1260
  STRIP=":"
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
1261 1262
fi

Gildas Bazin's avatar
 
Gildas Bazin committed
1263

Christophe Massiot's avatar
Christophe Massiot committed
1264 1265
# Extract the first word of "gmake", so it can be a program name with args.
set dummy gmake; ac_word=$2
1266
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1267
echo "configure:1268: checking for $ac_word" >&5
1268 1269
if eval "test \"`echo '$''{'ac_cv_path_GMAKE'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
1270
else
1271 1272
  case "$GMAKE" in
  /*)
1273 1274
  ac_cv_path_GMAKE="$GMAKE" # Let the user override the test with a path.
  ;;
1275 1276 1277
  ?:/*)			 
  ac_cv_path_GMAKE="$GMAKE" # Let the user override the test with a dos path.
  ;;
1278
  *)
1279 1280 1281 1282 1283 1284 1285 1286 1287 1288
  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_GMAKE="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
Christophe Massiot's avatar
Christophe Massiot committed
1289 1290 1291 1292
  test -z "$ac_cv_path_GMAKE" && ac_cv_path_GMAKE="no"
  ;;
esac
fi
1293
GMAKE="$ac_cv_path_GMAKE"
Christophe Massiot's avatar
Christophe Massiot committed
1294
if test -n "$GMAKE"; then
1295
  echo "$ac_t""$GMAKE" 1>&6
Christophe Massiot's avatar
Christophe Massiot committed
1296
else
1297
  echo "$ac_t""no" 1>&6
Christophe Massiot's avatar
Christophe Massiot committed
1298 1299
fi

1300
if test "x${GMAKE}" = "xno"; then
1301
  echo $ac_n "checking whether GNU make is installed""... $ac_c" 1>&6
1302
echo "configure:1303: checking whether GNU make is installed" >&5
1303 1304
if eval "test \"`echo '$''{'ac_cv_gmake'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Christophe Massiot's avatar
Christophe Massiot committed
1305 1306 1307 1308 1309 1310 1311 1312 1313
else
  if make --version | grep -q -i gnu; then
         ac_cv_gmake="yes"
       else
         echo "This software needs you to install GNU make to compile properly."
         echo "You can get it from http://www.gnu.org/."
         exit
       fi
fi
1314 1315

echo "$ac_t""$ac_cv_gmake" 1>&6
Christophe Massiot's avatar
Christophe Massiot committed
1316 1317 1318 1319 1320
  VLC_MAKE="make"
else
  VLC_MAKE="gmake"
fi

1321
ALL_LINGUAS="de en_GB fr ja no ru nl pl"
Sam Hocevar's avatar
Sam Hocevar committed
1322

1323
cat >> confdefs.h <<EOF
1324
#define VLC_PACKAGE "${PACKAGE}"
1325
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1326

1327
cat >> confdefs.h <<EOF
1328
#define VLC_VERSION "${VERSION}"
1329
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1330

1331 1332 1333
# 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
1334
echo "configure:1335: checking for $ac_word" >&5
1335 1336
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1337 1338 1339 1340
else
  if test -n "$RANLIB"; then
  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
else
1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_prog_RANLIB="ranlib"
      break
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
Sam Hocevar's avatar
 
Sam Hocevar committed
1352 1353
fi
fi
1354
RANLIB="$ac_cv_prog_RANLIB"
Sam Hocevar's avatar
 
Sam Hocevar committed
1355
if test -n "$RANLIB"; then
1356
  echo "$ac_t""$RANLIB" 1>&6
1357
else
1358
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1359
fi
1360 1361


1362
        echo $ac_n "checking for strerror in -lcposix""... $ac_c" 1>&6
1363
echo "configure:1364: checking for strerror in -lcposix" >&5
1364 1365 1366
ac_lib_var=`echo cposix'_'strerror | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1367
else
1368
  ac_save_LIBS="$LIBS"
1369
LIBS="-lcposix  $LIBS"
1370
cat > conftest.$ac_ext <<EOF
1371
#line 1372 "configure"
1372 1373 1374
#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
1375 1376
    builtin and then its argument prototype would still apply.  */
char strerror();
Sam Hocevar's avatar
 
Sam Hocevar committed
1377

1378 1379 1380 1381
int main() {
strerror()
; return 0; }
EOF
1382
if { (eval echo configure:1383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1383 1384 1385 1386 1387 1388 1389 1390 1391 1392
  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"
Sam Hocevar's avatar
 
Sam Hocevar committed
1393

1394 1395 1396 1397 1398 1399 1400
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  LIBS="$LIBS -lcposix"
else
  echo "$ac_t""no" 1>&6
fi
1401

1402
  
1403

1404
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1405
echo "configure:1406: checking for ANSI C header files" >&5
1406 1407
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1408
else
1409
  cat > conftest.$ac_ext <<EOF
1410
#line 1411 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
1411 1412 1413 1414 1415
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <float.h>
1416 1417
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1418
{ (eval echo configure:1419: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1419 1420 1421
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
1422 1423
  ac_cv_header_stdc=yes
else
1424 1425
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
1426
  cat conftest.$ac_ext >&5
1427
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
1428 1429
  ac_cv_header_stdc=no
fi
1430
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
1431 1432 1433

if test $ac_cv_header_stdc = yes; then
  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1434
cat > conftest.$ac_ext <<EOF
1435
#line 1436 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
1436 1437
#include "confdefs.h"
#include <string.h>
1438
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1439 1440 1441 1442
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "memchr" >/dev/null 2>&1; then
  :
else
1443
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
1444 1445 1446 1447 1448 1449 1450 1451
  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.
1452
cat > conftest.$ac_ext <<EOF
1453
#line 1454 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
1454 1455
#include "confdefs.h"
#include <stdlib.h>
1456
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1457 1458 1459 1460
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "free" >/dev/null 2>&1; then
  :
else
1461
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
1462 1463 1464 1465 1466 1467 1468 1469
  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.
1470
if test "$cross_compiling" = yes; then
Sam Hocevar's avatar
 
Sam Hocevar committed
1471 1472
  :
else
1473
  cat > conftest.$ac_ext <<EOF
1474
#line 1475 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
1475 1476
#include "confdefs.h"
#include <ctype.h>
1477 1478
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1479
#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1480 1481 1482 1483 1484
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
1485
if { (eval echo configure:1486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1486
then
Sam Hocevar's avatar
 
Sam Hocevar committed
1487 1488
  :
else
1489 1490 1491 1492
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_header_stdc=no
Sam Hocevar's avatar
 
Sam Hocevar committed
1493
fi
1494
rm -fr conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
1495
fi
1496

Sam Hocevar's avatar
 
Sam Hocevar committed
1497 1498
fi
fi
1499

1500 1501 1502
echo "$ac_t""$ac_cv_header_stdc" 1>&6
if test $ac_cv_header_stdc = yes; then
  cat >> confdefs.h <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1503
#define STDC_HEADERS 1
1504
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1505 1506 1507

fi

1508
echo $ac_n "checking for working const""... $ac_c" 1>&6
1509
echo "configure:1510: checking for working const" >&5
1510 1511 1512 1513
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
1514
#line 1515 "configure"
1515 1516 1517 1518 1519
#include "confdefs.h"

int main() {

/* Ultrix mips cc rejects this.  */
1520
typedef int charset[2]; const charset x;
1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540
/* 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;
Sam Hocevar's avatar
 
Sam Hocevar committed
1541
}
1542 1543 1544 1545
{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
  int x[] = {25, 17};
  const int *foo = &x[0];
  ++foo;
Sam Hocevar's avatar
 
Sam Hocevar committed
1546
}
1547 1548 1549 1550
{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
  typedef const int *iptr;
  iptr p = 0;
  ++p;
Sam Hocevar's avatar
 
Sam Hocevar committed
1551
}
1552 1553 1554 1555 1556 1557 1558
{ /* 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;
1559
}
1560 1561 1562

; return 0; }
EOF
1563
if { (eval echo configure:1564: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1564
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
1565 1566
  ac_cv_c_const=yes
else
1567 1568 1569 1570
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_c_const=no
Sam Hocevar's avatar
 
Sam Hocevar committed
1571
fi
1572
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
1573
fi
1574

1575 1576 1577 1578 1579
echo "$ac_t""$ac_cv_c_const" 1>&6
if test $ac_cv_c_const = no; then
  cat >> confdefs.h <<\EOF
#define const 
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1580 1581 1582

fi

1583
echo $ac_n "checking for inline""... $ac_c" 1>&6
1584
echo "configure:1585: checking for inline" >&5
1585 1586
if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1587 1588 1589
else
  ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
1590
  cat > conftest.$ac_ext <<EOF
1591
#line 1592 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
1592 1593
#include "confdefs.h"

1594
int main() {
1595
} $ac_kw foo() {
1596 1597
; return 0; }
EOF
1598
if { (eval echo configure:1599: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1599
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
1600 1601
  ac_cv_c_inline=$ac_kw; break
else
1602 1603
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
1604
fi
1605
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
1606 1607 1608
done

fi
1609 1610 1611

echo "$ac_t""$ac_cv_c_inline" 1>&6
case "$ac_cv_c_inline" in
Sam Hocevar's avatar
 
Sam Hocevar committed
1612
  inline | yes) ;;
1613 1614 1615
  no) cat >> confdefs.h <<\EOF
#define inline 
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1616
 ;;
1617
  *)  cat >> confdefs.h <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1618
#define inline $ac_cv_c_inline
1619
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1620 1621 1622
 ;;
esac

1623
echo $ac_n "checking for off_t""... $ac_c" 1>&6
1624
echo "configure:1625: checking for off_t" >&5
1625 1626
if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1627
else
1628
  cat > conftest.$ac_ext <<EOF
1629
#line 1630 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
1630
#include "confdefs.h"
1631 1632 1633 1634
#include <sys/types.h>
#if STDC_HEADERS
#include <stdlib.h>
#include <stddef.h>
Sam Hocevar's avatar
 
Sam Hocevar committed
1635
#endif
1636 1637 1638 1639
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
1640 1641
  ac_cv_type_off_t=yes
else
1642 1643
  rm -rf conftest*
  ac_cv_type_off_t=no
Sam Hocevar's avatar
 
Sam Hocevar committed
1644
fi
1645
rm -f conftest*
1646

1647 1648 1649 1650
fi
echo "$ac_t""$ac_cv_type_off_t" 1>&6
if test $ac_cv_type_off_t = no; then
  cat >> confdefs.h <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1651
#define off_t long
1652
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1653 1654 1655

fi

1656
echo $ac_n "checking for size_t""... $ac_c" 1>&6
1657
echo "configure:1658: checking for size_t" >&5
1658 1659
if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1660
else
1661
  cat > conftest.$ac_ext <<EOF
1662
#line 1663 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
1663
#include "confdefs.h"
1664 1665 1666 1667
#include <sys/types.h>
#if STDC_HEADERS
#include <stdlib.h>
#include <stddef.h>
Sam Hocevar's avatar
 
Sam Hocevar committed
1668
#endif
1669 1670 1671 1672
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*
Sam Hocevar's avatar
 
Sam Hocevar committed
1673 1674
  ac_cv_type_size_t=yes
else
1675 1676
  rm -rf conftest*
  ac_cv_type_size_t=no
Sam Hocevar's avatar
 
Sam Hocevar committed
1677
fi
1678
rm -f conftest*
1679

1680 1681 1682 1683
fi
echo "$ac_t""$ac_cv_type_size_t" 1>&6
if test $ac_cv_type_size_t = no; then
  cat >> confdefs.h <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1684
#define size_t unsigned
1685
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1686 1687 1688 1689 1690

fi

# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments.  Useless!
1691
echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
1692
echo "configure:1693: checking for working alloca.h" >&5
1693 1694
if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1695
else
1696
  cat > conftest.$ac_ext <<EOF
1697
#line 1698 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
1698 1699
#include "confdefs.h"
#include <alloca.h>
1700
int main() {
1701
char *p = alloca(2 * sizeof(int));
1702 1703
; return 0; }
EOF
1704
if { (eval echo configure:1705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718
  rm -rf conftest*
  ac_cv_header_alloca_h=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_header_alloca_h=no
fi
rm -f conftest*
fi

echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
if test $ac_cv_header_alloca_h = yes; then
  cat >> confdefs.h <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1719
#define HAVE_ALLOCA_H 1
1720
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1721 1722 1723

fi

1724
echo $ac_n "checking for alloca""... $ac_c" 1>&6
1725
echo "configure:1726: checking for alloca" >&5
1726 1727
if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1728
else
1729
  cat > conftest.$ac_ext <<EOF
1730
#line 1731 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
1731
#include "confdefs.h"
1732

Sam Hocevar's avatar
 
Sam Hocevar committed
1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753
#ifdef __GNUC__
# define alloca __builtin_alloca
#else
# ifdef _MSC_VER
#  include <malloc.h>
#  define alloca _alloca
# else
#  if HAVE_ALLOCA_H
#   include <alloca.h>
#  else
#   ifdef _AIX
 #pragma alloca
#   else
#    ifndef alloca /* predefined by HP cc +Olibcalls */
char *alloca ();
#    endif
#   endif
#  endif
# endif
#endif

1754 1755 1756 1757
int main() {
char *p = (char *) alloca(1);
; return 0; }
EOF
1758
if { (eval echo configure:1759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1759
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
1760 1761
  ac_cv_func_alloca_works=yes
else
1762 1763 1764 1765
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_func_alloca_works=no
Sam Hocevar's avatar
 
Sam Hocevar committed
1766
fi
1767
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
1768 1769
fi

1770
echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1771
if test $ac_cv_func_alloca_works = yes; then
1772
  cat >> confdefs.h <<\EOF
1773
#define HAVE_ALLOCA 1
1774
EOF
1775

1776
fi
1777

1778 1779 1780 1781 1782 1783 1784
if test $ac_cv_func_alloca_works = no; then
  # The SVR3 libPW and SVR4 libucb both contain incompatible functions
  # that cause trouble.  Some versions do not even contain alloca or
  # contain a buggy version.  If you still want to use their alloca,
  # use ar to extract alloca.o from them instead of compiling alloca.c.
  ALLOCA=alloca.${ac_objext}
  cat >> confdefs.h <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1785
#define C_ALLOCA 1
1786
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1787 1788


1789
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
1790
echo "configure:1791: checking whether alloca needs Cray hooks" >&5
1791 1792
if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1793
else
1794
  cat > conftest.$ac_ext <<EOF
1795
#line 1796 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
1796 1797 1798 1799 1800 1801 1802
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
#else
wenotbecray
#endif

1803
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1804 1805
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "webecray" >/dev/null 2>&1; then
1806
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
1807 1808
  ac_cv_os_cray=yes
else
1809
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
1810 1811 1812 1813 1814
  ac_cv_os_cray=no
fi
rm -f conftest*

fi
1815 1816

echo "$ac_t""$ac_cv_os_cray" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1817
if test $ac_cv_os_cray = yes; then
1818 1819
for ac_func in _getb67 GETB67 getb67; do
  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1820
echo "configure:1821: checking for $ac_func" >&5
1821 1822
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1823
else
1824
  cat > conftest.$ac_ext <<EOF
1825
#line 1826 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
1826 1827
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
1828
    which can conflict with char $ac_func(); below.  */
Sam Hocevar's avatar
 
Sam Hocevar committed
1829 1830 1831
#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
1832 1833 1834 1835
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
1836 1837 1838 1839 1840 1841 1842

/* 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
1843
$ac_func();
Sam Hocevar's avatar
 
Sam Hocevar committed
1844 1845
#endif

1846 1847
; return 0; }
EOF
1848
if { (eval echo configure:1849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862
  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
  cat >> confdefs.h <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1863
#define CRAY_STACKSEG_END $ac_func
1864
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1865

1866 1867 1868
  break
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1869 1870
fi

1871
done
Sam Hocevar's avatar
 
Sam Hocevar committed
1872 1873
fi

1874
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
1875
echo "configure:1876: checking stack direction for C alloca" >&5
1876 1877
if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1878 1879 1880 1881
else
  if test "$cross_compiling" = yes; then
  ac_cv_c_stack_direction=0
else
1882
  cat > conftest.$ac_ext <<EOF
1883
#line 1884 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898
#include "confdefs.h"
find_stack_direction ()
{
  static char *addr = 0;
  auto char dummy;
  if (addr == 0)
    {
      addr = &dummy;
      return find_stack_direction ();
    }
  else
    return (&dummy > addr) ? 1 : -1;
}
main ()
{
1899
  exit (find_stack_direction() < 0);
Sam Hocevar's avatar
 
Sam Hocevar committed
1900
}
1901
EOF
1902
if { (eval echo configure:1903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1903
then
Sam Hocevar's avatar
 
Sam Hocevar committed
1904 1905
  ac_cv_c_stack_direction=1
else
1906 1907 1908 1909
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_c_stack_direction=-1
Sam Hocevar's avatar
 
Sam Hocevar committed
1910
fi
1911
rm -fr conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
1912
fi
1913

Sam Hocevar's avatar
 
Sam Hocevar committed
1914 1915
fi

1916 1917
echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
cat >> confdefs.h <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1918
#define STACK_DIRECTION $ac_cv_c_stack_direction
1919
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1920 1921 1922

fi

1923
for ac_hdr in unistd.h
Sam Hocevar's avatar
 
Sam Hocevar committed
1924
do
1925 1926
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1927
echo "configure:1928: checking for $ac_hdr" >&5
1928 1929
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
1930
else
1931
  cat > conftest.$ac_ext <<EOF
1932
#line 1933 "configure"
1933 1934 1935 1936
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1937
{ (eval echo configure:1938: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1938 1939 1940 1941 1942 1943 1944
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
1945
  cat conftest.$ac_ext >&5
1946 1947
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
Sam Hocevar's avatar
 
Sam Hocevar committed
1948
fi
1949
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
1950
fi
1951 1952 1953 1954 1955 1956 1957 1958 1959
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
Sam Hocevar's avatar
 
Sam Hocevar committed
1960 1961 1962 1963 1964
fi
done

for ac_func in getpagesize
do
1965
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1966
echo "configure:1967: checking for $ac_func" >&5
1967 1968
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1969
else
1970
  cat > conftest.$ac_ext <<EOF
1971
#line 1972 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
1972 1973
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
1974
    which can conflict with char $ac_func(); below.  */
Sam Hocevar's avatar
 
Sam Hocevar committed
1975 1976 1977
#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
1978 1979 1980 1981
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
1982 1983 1984 1985 1986 1987 1988

/* 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
1989
$ac_func();
Sam Hocevar's avatar
 
Sam Hocevar committed
1990 1991
#endif

1992 1993
; return 0; }
EOF
1994
if { (eval echo configure:1995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1995 1996 1997 1998 1999 2000 2001 2002 2003 2004
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
2005

2006 2007 2008 2009 2010 2011 2012 2013 2014
if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2015 2016 2017
fi
done

2018
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
2019
echo "configure:2020: checking for working mmap" >&5
2020 2021
if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2022 2023 2024 2025
else
  if test "$cross_compiling" = yes; then
  ac_cv_func_mmap_fixed_mapped=no
else
2026
  cat > conftest.$ac_ext <<EOF
2027
#line 2028 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041
#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
2042
   VM page cache was not coherent with the filesystem buffer cache
Sam Hocevar's avatar
 
Sam Hocevar committed
2043 2044
   like early versions of FreeBSD and possibly contemporary NetBSD.)
   For shared mappings, we should conversely verify that changes get
2045
   propogated back to all the places they're supposed to be.
Sam Hocevar's avatar
 
Sam Hocevar committed
2046 2047 2048 2049 2050

   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)  */
2051
#include <sys/types.h>
Sam Hocevar's avatar
 
Sam Hocevar committed
2052 2053 2054
#include <fcntl.h>
#include <sys/mman.h>

2055
/* This mess was copied from the GNU getpagesize.h.  */
2056
#ifndef HAVE_GETPAGESIZE
2057 2058 2059
# ifdef HAVE_UNISTD_H
#  include <unistd.h>
# endif
2060

Sam Hocevar's avatar
 
Sam Hocevar committed
2061
/* Assume that all systems that can run configure have sys/param.h.  */
2062
# ifndef HAVE_SYS_PARAM_H
Sam Hocevar's avatar
 
Sam Hocevar committed
2063 2064 2065 2066 2067 2068
#  define HAVE_SYS_PARAM_H 1
# endif

# ifdef _SC_PAGESIZE
#  define getpagesize() sysconf(_SC_PAGESIZE)
# else /* no _SC_PAGESIZE */
2069
#  ifdef HAVE_SYS_PARAM_H
Sam Hocevar's avatar
 
Sam Hocevar committed
2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095
#   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 */

2096 2097 2098 2099 2100 2101
#ifdef __cplusplus
extern "C" { void *malloc(unsigned); }
#else
char *malloc();
#endif

Sam Hocevar's avatar
 
Sam Hocevar committed
2102
int
2103
main()
Sam Hocevar's avatar
 
Sam Hocevar committed
2104
{
2105 2106 2107 2108 2109 2110 2111 2112 2113
	char *data, *data2, *data3;
	int i, pagesize;
	int fd;

	pagesize = getpagesize();

	/*
	 * First, make a file with some known garbage in it.
	 */
2114
	data = malloc(pagesize);
2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134
	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);
2135
	data2 = malloc(2 * pagesize);
2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152
	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;
2153
	data3 = malloc(pagesize);
2154 2155 2156 2157 2158 2159 2160 2161 2162 2163
	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);
Sam Hocevar's avatar
 
Sam Hocevar committed
2164
}
2165 2166

EOF
2167
if { (eval echo configure:2168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2168
then
Sam Hocevar's avatar
 
Sam Hocevar committed
2169 2170
  ac_cv_func_mmap_fixed_mapped=yes
else
2171 2172 2173 2174
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  ac_cv_func_mmap_fixed_mapped=no
Sam Hocevar's avatar
 
Sam Hocevar committed
2175
fi
2176
rm -fr conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
2177
fi
2178

Sam Hocevar's avatar
 
Sam Hocevar committed
2179
fi
2180

2181 2182 2183
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
Sam Hocevar's avatar
 
Sam Hocevar committed
2184
#define HAVE_MMAP 1
2185
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2186 2187 2188 2189

fi


2190
    echo $ac_n "checking whether we are using the GNU C Library 2.1 or newer""... $ac_c" 1>&6
2191
echo "configure:2192: checking whether we are using the GNU C Library 2.1 or newer" >&5
2192 2193
if eval "test \"`echo '$''{'ac_cv_gnu_library_2_1'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2194
else
2195
  cat > conftest.$ac_ext <<EOF
2196
#line 2197 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
2197 2198 2199 2200 2201 2202 2203 2204
#include "confdefs.h"

#include <features.h>
#ifdef __GNU_LIBRARY__
 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
  Lucky GNU user
 #endif
#endif
2205 2206
	
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2207 2208
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "Lucky GNU user" >/dev/null 2>&1; then
2209
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
2210 2211
  ac_cv_gnu_library_2_1=yes
else
2212
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
2213 2214 2215 2216
  ac_cv_gnu_library_2_1=no
fi
rm -f conftest*

2217 2218
      
    
Sam Hocevar's avatar
 
Sam Hocevar committed
2219 2220
fi

2221 2222
echo "$ac_t""$ac_cv_gnu_library_2_1" 1>&6
    
Sam Hocevar's avatar
 
Sam Hocevar committed
2223
    GLIBC21="$ac_cv_gnu_library_2_1"
2224
  
Sam Hocevar's avatar
 
Sam Hocevar committed
2225

2226 2227
                                    
   for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
Sam Hocevar's avatar
 
Sam Hocevar committed
2228 2229
stdlib.h string.h unistd.h sys/param.h
do
2230 2231
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2232
echo "configure:2233: checking for $ac_hdr" >&5
2233 2234
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
2235
else
2236
  cat > conftest.$ac_ext <<EOF
2237
#line 2238 "configure"
2238 2239 2240 2241
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2242
{ (eval echo configure:2243: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2243 2244 2245 2246 2247 2248 2249
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
2250
  cat conftest.$ac_ext >&5
2251 2252
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
Sam Hocevar's avatar
 
Sam Hocevar committed
2253
fi
2254
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
2255
fi
2256 2257 2258 2259 2260 2261 2262 2263 2264
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
Sam Hocevar's avatar
 
Sam Hocevar committed
2265 2266 2267
fi
done

2268
   for ac_func in feof_unlocked fgets_unlocked getcwd getegid geteuid \
Sam Hocevar's avatar
 
Sam Hocevar committed
2269 2270 2271
getgid getuid mempcpy munmap putenv setenv setlocale stpcpy strchr strcasecmp \
strdup strtoul tsearch __argz_count __argz_stringify __argz_next
do
2272
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2273
echo "configure:2274: checking for $ac_func" >&5
2274 2275
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2276
else
2277
  cat > conftest.$ac_ext <<EOF
2278
#line 2279 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
2279 2280
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
2281
    which can conflict with char $ac_func(); below.  */
Sam Hocevar's avatar
 
Sam Hocevar committed
2282 2283 2284
#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
2285 2286 2287 2288
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
2289 2290 2291 2292 2293 2294 2295

/* 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
2296
$ac_func();
Sam Hocevar's avatar
 
Sam Hocevar committed
2297 2298
#endif

2299 2300
; return 0; }
EOF
2301
if { (eval echo configure:2302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2302 2303 2304 2305 2306 2307 2308 2309 2310 2311
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
2312

2313 2314 2315 2316 2317 2318 2319 2320 2321
if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2322 2323 2324 2325
fi
done


2326 2327 2328
   
    
  # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
Sam Hocevar's avatar
 
Sam Hocevar committed
2329 2330
if test "${with_libiconv_prefix+set}" = set; then
  withval="$with_libiconv_prefix"
2331
  
Sam Hocevar's avatar
 
Sam Hocevar committed
2332 2333 2334 2335
    for dir in `echo "$withval" | tr : ' '`; do
      if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
      if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi
    done
2336 2337
   
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
2338 2339


2340
  echo $ac_n "checking for iconv""... $ac_c" 1>&6
2341
echo "configure:2342: checking for iconv" >&5
2342 2343
if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2344
else
2345
  
Sam Hocevar's avatar
 
Sam Hocevar committed
2346 2347
    am_cv_func_iconv="no, consider installing GNU libiconv"
    am_cv_lib_iconv=no
2348
    cat > conftest.$ac_ext <<EOF
2349
#line 2350 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
2350 2351 2352
#include "confdefs.h"
#include <stdlib.h>
#include <iconv.h>
2353
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
2354 2355 2356
iconv_t cd = iconv_open("","");
       iconv(cd,NULL,NULL,NULL,NULL);
       iconv_close(cd);
2357 2358
; return 0; }
EOF
2359
if { (eval echo configure:2360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2360
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
2361 2362
  am_cv_func_iconv=yes
else
2363 2364
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
2365
fi
2366
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
2367 2368 2369
    if test "$am_cv_func_iconv" != yes; then
      am_save_LIBS="$LIBS"
      LIBS="$LIBS -liconv"
2370
      cat > conftest.$ac_ext <<EOF
2371
#line 2372 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
2372 2373 2374
#include "confdefs.h"
#include <stdlib.h>
#include <iconv.h>
2375
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
2376 2377 2378
iconv_t cd = iconv_open("","");
         iconv(cd,NULL,NULL,NULL,NULL);
         iconv_close(cd);
2379 2380
; return 0; }
EOF
2381
if { (eval echo configure:2382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2382
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
2383 2384 2385
  am_cv_lib_iconv=yes
        am_cv_func_iconv=yes
else
2386 2387
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
2388
fi
2389
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
2390 2391
      LIBS="$am_save_LIBS"
    fi
2392
  
2393 2394
fi

2395 2396 2397
echo "$ac_t""$am_cv_func_iconv" 1>&6
  if test "$am_cv_func_iconv" = yes; then
    cat >> confdefs.h <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2398
#define HAVE_ICONV 1
2399
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2400

2401
    echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
2402
echo "configure:2403: checking for iconv declaration" >&5
2403 2404
    if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2405
else
2406 2407
  
      cat > conftest.$ac_ext <<EOF
2408
#line 2409 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422
#include "confdefs.h"

#include <stdlib.h>
#include <iconv.h>
extern
#ifdef __cplusplus
"C"
#endif
#if defined(__STDC__) || defined(__cplusplus)
size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
#else
size_t iconv();
#endif

2423
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
2424

2425 2426
; return 0; }
EOF
2427
if { (eval echo configure:2428: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2428
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
2429 2430
  am_cv_proto_iconv_arg1=""
else
2431 2432 2433 2434
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  am_cv_proto_iconv_arg1="const"
Sam Hocevar's avatar
 
Sam Hocevar committed
2435
fi
2436
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
2437 2438 2439 2440
      am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"
fi

    am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
2441 2442 2443
    echo "$ac_t""${ac_t:-
         }$am_cv_proto_iconv" 1>&6
    cat >> confdefs.h <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2444
#define ICONV_CONST $am_cv_proto_iconv_arg1
2445
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2446 2447 2448 2449 2450 2451

  fi
  LIBICONV=
  if test "$am_cv_lib_iconv" = yes; then
    LIBICONV="-liconv"
  fi
2452
  
Sam Hocevar's avatar
 
Sam Hocevar committed
2453

2454 2455
   
  echo $ac_n "checking for nl_langinfo and CODESET""... $ac_c" 1>&6
2456
echo "configure:2457: checking for nl_langinfo and CODESET" >&5
2457 2458
if eval "test \"`echo '$''{'am_cv_langinfo_codeset'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2459
else
2460
  cat > conftest.$ac_ext <<EOF
2461
#line 2462 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
2462 2463
#include "confdefs.h"
#include <langinfo.h>
2464
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
2465
char* cs = nl_langinfo(CODESET);
2466 2467
; return 0; }
EOF
2468
if { (eval echo configure:2469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2469
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
2470 2471
  am_cv_langinfo_codeset=yes
else
2472 2473 2474 2475
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  am_cv_langinfo_codeset=no
Sam Hocevar's avatar
 
Sam Hocevar committed
2476
fi
2477 2478
rm -f conftest*
    
2479 2480
fi

2481 2482 2483
echo "$ac_t""$am_cv_langinfo_codeset" 1>&6
  if test $am_cv_langinfo_codeset = yes; then
    cat >> confdefs.h <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2484
#define HAVE_LANGINFO_CODESET 1
2485
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2486 2487 2488 2489

  fi

   if test $ac_cv_header_locale_h = yes; then
2490
    echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
2491
echo "configure:2492: checking for LC_MESSAGES" >&5
2492 2493
if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2494
else
2495
  cat > conftest.$ac_ext <<EOF
2496
#line 2497 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
2497 2498
#include "confdefs.h"
#include <locale.h>
2499
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
2500
return LC_MESSAGES
2501 2502
; return 0; }
EOF
2503
if { (eval echo configure:2504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2504
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
2505 2506
  am_cv_val_LC_MESSAGES=yes
else
2507 2508 2509 2510
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  am_cv_val_LC_MESSAGES=no
Sam Hocevar's avatar
 
Sam Hocevar committed
2511
fi
2512
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
2513
fi
2514

2515 2516 2517
echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
    if test $am_cv_val_LC_MESSAGES = yes; then
      cat >> confdefs.h <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2518
#define HAVE_LC_MESSAGES 1
2519
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2520 2521 2522

    fi
  fi
2523
   echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
2524
echo "configure:2525: checking whether NLS is requested" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
2525 2526 2527 2528 2529 2530
        # Check whether --enable-nls or --disable-nls was given.
if test "${enable_nls+set}" = set; then
  enableval="$enable_nls"
  USE_NLS=$enableval
else
  USE_NLS=yes
2531
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
2532

2533 2534
    echo "$ac_t""$USE_NLS" 1>&6
    
Sam Hocevar's avatar
 
Sam Hocevar committed
2535 2536 2537 2538 2539 2540

    BUILD_INCLUDED_LIBINTL=no
    USE_INCLUDED_LIBINTL=no
    INTLLIBS=

        if test "$USE_NLS" = "yes"; then
2541
      cat >> confdefs.h <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2542
#define ENABLE_NLS 1
2543
EOF
2544

2545
      echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
2546
echo "configure:2547: checking whether included gettext is requested" >&5
2547
      # Check whether --with-included-gettext or --without-included-gettext was given.
Sam Hocevar's avatar
 
Sam Hocevar committed
2548 2549 2550 2551 2552
if test "${with_included_gettext+set}" = set; then
  withval="$with_included_gettext"
  nls_cv_force_use_gnu_gettext=$withval
else
  nls_cv_force_use_gnu_gettext=no
2553 2554 2555
fi

      echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2556 2557 2558 2559 2560

      nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
      if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
                        	CATOBJEXT=NONE

2561 2562
                
        
Sam Hocevar's avatar
 
Sam Hocevar committed
2563

2564 2565
	ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
2566
echo "configure:2567: checking for libintl.h" >&5
2567 2568
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2569
else
2570
  cat > conftest.$ac_ext <<EOF
2571
#line 2572 "configure"
2572 2573
#include "confdefs.h"
#include <libintl.h>
2574 2575
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2576
{ (eval echo configure:2577: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2577 2578 2579 2580 2581 2582 2583
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
2584
  cat conftest.$ac_ext >&5
2585 2586
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
Sam Hocevar's avatar
 
Sam Hocevar committed
2587
fi
2588
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
2589
fi
2590 2591 2592
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  echo $ac_n "checking for GNU gettext in libc""... $ac_c" 1>&6
2593
echo "configure:2594: checking for GNU gettext in libc" >&5
2594 2595
if eval "test \"`echo '$''{'gt_cv_func_gnugettext1_libc'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2596
else
2597
  cat > conftest.$ac_ext <<EOF
2598
#line 2599 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
2599 2600 2601
#include "confdefs.h"
#include <libintl.h>
extern int _nl_msg_cat_cntr;
2602
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
2603 2604
bindtextdomain ("", "");
return (int) gettext ("") + _nl_msg_cat_cntr
2605 2606
; return 0; }
EOF
2607
if { (eval echo configure:2608: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2608
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
2609 2610
  gt_cv_func_gnugettext1_libc=yes
else
2611 2612 2613 2614
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  gt_cv_func_gnugettext1_libc=no
Sam Hocevar's avatar
 
Sam Hocevar committed
2615
fi
2616
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
2617
fi
2618 2619

echo "$ac_t""$gt_cv_func_gnugettext1_libc" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2620 2621

	   if test "$gt_cv_func_gnugettext1_libc" != "yes"; then
2622
	     echo $ac_n "checking for GNU gettext in libintl""... $ac_c" 1>&6
2623
echo "configure:2624: checking for GNU gettext in libintl" >&5
2624 2625
if eval "test \"`echo '$''{'gt_cv_func_gnugettext1_libintl'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2626 2627 2628
else
  gt_save_LIBS="$LIBS"
		LIBS="$LIBS -lintl $LIBICONV"
2629
		cat > conftest.$ac_ext <<EOF
2630
#line 2631 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
2631 2632 2633
#include "confdefs.h"
#include <libintl.h>
extern int _nl_msg_cat_cntr;
2634
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
2635 2636
bindtextdomain ("", "");
return (int) gettext ("") + _nl_msg_cat_cntr
2637 2638
; return 0; }
EOF
2639
if { (eval echo configure:2640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2640
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
2641 2642
  gt_cv_func_gnugettext1_libintl=yes
else
2643 2644 2645 2646
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  gt_cv_func_gnugettext1_libintl=no
Sam Hocevar's avatar
 
Sam Hocevar committed
2647
fi
2648
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
2649 2650
		LIBS="$gt_save_LIBS"
fi
2651 2652

echo "$ac_t""$gt_cv_func_gnugettext1_libintl" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2653 2654 2655 2656 2657
	   fi

	   	   	   	   	   if test "$gt_cv_func_gnugettext1_libc" = "yes" \
	      || { test "$gt_cv_func_gnugettext1_libintl" = "yes" \
		   && test "$PACKAGE" != gettext; }; then
2658
	     cat >> confdefs.h <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2659
#define HAVE_GETTEXT 1
2660
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2661 2662 2663 2664 2665 2666 2667 2668


	     if test "$gt_cv_func_gnugettext1_libintl" = "yes"; then
	       	       	       	       INTLLIBS="-lintl $LIBICONV"
	     fi

	     gt_save_LIBS="$LIBS"
	     LIBS="$LIBS $INTLLIBS"
2669
	     for ac_func in dcgettext
Sam Hocevar's avatar
 
Sam Hocevar committed
2670
do
2671
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2672
echo "configure:2673: checking for $ac_func" >&5
2673 2674
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2675
else
2676
  cat > conftest.$ac_ext <<EOF
2677
#line 2678 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
2678 2679
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
2680
    which can conflict with char $ac_func(); below.  */
Sam Hocevar's avatar
 
Sam Hocevar committed
2681 2682 2683
#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
2684 2685 2686 2687 2688
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {

Sam Hocevar's avatar
 
Sam Hocevar committed
2689 2690 2691 2692 2693 2694
/* 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
2695
$ac_func();
Sam Hocevar's avatar
 
Sam Hocevar committed
2696 2697
#endif

2698 2699
; return 0; }
EOF
2700
if { (eval echo configure:2701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2701 2702 2703 2704 2705 2706 2707 2708 2709 2710
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
2711

2712 2713 2714 2715 2716 2717 2718 2719 2720
if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2721 2722 2723 2724 2725 2726 2727
fi
done

	     LIBS="$gt_save_LIBS"

	     	     # Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
2728
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2729
echo "configure:2730: checking for $ac_word" >&5
2730 2731
if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754
else
  case "$MSGFMT" in
  /*)
  ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $PATH; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1; then
	ac_cv_path_MSGFMT="$ac_dir/$ac_word"
	break
      fi
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
  ;;
esac
fi
MSGFMT="$ac_cv_path_MSGFMT"
if test "$MSGFMT" != ":"; then
2755
  echo "$ac_t""$MSGFMT" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2756
else
2757
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2758 2759 2760 2761
fi

	     # Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
2762
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2763
echo "configure:2764: checking for $ac_word" >&5
2764 2765
if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2766
else
2767 2768
  case "$GMSGFMT" in
  /*)
Sam Hocevar's avatar
 
Sam Hocevar committed
2769 2770
  ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
  ;;
2771 2772 2773
  ?:/*)			 
  ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
  ;;
2774
  *)
2775 2776 2777 2778 2779 2780 2781 2782 2783 2784
  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_GMSGFMT="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
Sam Hocevar's avatar
 
Sam Hocevar committed
2785 2786 2787 2788
  test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
  ;;
esac
fi
2789
GMSGFMT="$ac_cv_path_GMSGFMT"
Sam Hocevar's avatar
 
Sam Hocevar committed
2790
if test -n "$GMSGFMT"; then
2791
  echo "$ac_t""$GMSGFMT" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2792
else
2793
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2794 2795 2796 2797 2798
fi


	     	     # Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
2799
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2800
echo "configure:2801: checking for $ac_word" >&5
2801 2802
if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825
else
  case "$XGETTEXT" in
  /*)
  ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $PATH; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      if $ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1; then
	ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
	break
      fi
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
  ;;
esac
fi
XGETTEXT="$ac_cv_path_XGETTEXT"
if test "$XGETTEXT" != ":"; then
2826
  echo "$ac_t""$XGETTEXT" 1>&6
2827
else
2828
  echo "$ac_t""no" 1>&6
2829 2830
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
2831 2832 2833

	     CATOBJEXT=.gmo
	   fi
2834 2835 2836
	
else
  echo "$ac_t""no" 1>&6
2837 2838
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
2839 2840 2841 2842 2843 2844 2845 2846 2847 2848

        if test "$CATOBJEXT" = "NONE"; then
	  	  	  nls_cv_use_gnu_gettext=yes
        fi
      fi

      if test "$nls_cv_use_gnu_gettext" = "yes"; then
                INTLOBJS="\$(GETTOBJS)"
        # Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
2849
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2850
echo "configure:2851: checking for $ac_word" >&5
2851 2852
if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
2853
else
Sam Hocevar's avatar
 
Sam Hocevar committed
2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875
  case "$MSGFMT" in
  /*)
  ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $PATH; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1; then
	ac_cv_path_MSGFMT="$ac_dir/$ac_word"
	break
      fi
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
  ;;
esac
fi
MSGFMT="$ac_cv_path_MSGFMT"
if test "$MSGFMT" != ":"; then
2876
  echo "$ac_t""$MSGFMT" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2877
else
2878
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2879 2880 2881 2882
fi

        # Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
2883
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2884
echo "configure:2885: checking for $ac_word" >&5
2885 2886
if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
2887
else
2888 2889
  case "$GMSGFMT" in
  /*)
Sam Hocevar's avatar
 
Sam Hocevar committed
2890 2891
  ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
  ;;
2892 2893 2894
  ?:/*)			 
  ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
  ;;
Sam Hocevar's avatar
 
Sam Hocevar committed
2895
  *)
2896 2897 2898 2899 2900 2901 2902 2903 2904 2905
  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_GMSGFMT="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
Sam Hocevar's avatar
 
Sam Hocevar committed
2906 2907 2908
  test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
  ;;
esac
2909
fi
2910
GMSGFMT="$ac_cv_path_GMSGFMT"
Sam Hocevar's avatar
 
Sam Hocevar committed
2911
if test -n "$GMSGFMT"; then
2912
  echo "$ac_t""$GMSGFMT" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2913
else
2914
  echo "$ac_t""no" 1>&6
2915
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
2916 2917 2918

        # Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
2919
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2920
echo "configure:2921: checking for $ac_word" >&5
2921 2922
if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945
else
  case "$XGETTEXT" in
  /*)
  ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $PATH; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      if $ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1; then
	ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
	break
      fi
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
  ;;
esac
fi
XGETTEXT="$ac_cv_path_XGETTEXT"
if test "$XGETTEXT" != ":"; then
2946
  echo "$ac_t""$XGETTEXT" 1>&6
2947
else
2948
  echo "$ac_t""no" 1>&6
2949 2950
fi

2951
        
Sam Hocevar's avatar
 
Sam Hocevar committed
2952 2953 2954 2955 2956 2957
	BUILD_INCLUDED_LIBINTL=yes
	USE_INCLUDED_LIBINTL=yes
        CATOBJEXT=.gmo
	INTLLIBS="\$(top_builddir)/intl/libintl.a $LIBICONV"
	LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
      fi
2958

Sam Hocevar's avatar
 
Sam Hocevar committed
2959 2960 2961 2962
                  if test "$GMSGFMT" != ":"; then
			if $GMSGFMT --statistics /dev/null >/dev/null 2>&1; then
	  : ;
	else
2963
	  echo "$ac_t""found msgfmt program is not GNU msgfmt; ignore it" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2964 2965 2966 2967 2968 2969 2970 2971
	  GMSGFMT=":"
	fi
      fi

                  if test "$XGETTEXT" != ":"; then
			if $XGETTEXT --omit-header /dev/null >/dev/null 2>&1; then
	  : ;
	else
2972
	  echo "$ac_t""found xgettext program is not GNU xgettext; ignore it" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2973 2974 2975 2976 2977 2978
	  XGETTEXT=":"
	fi
      fi

            POSUB=po
    fi
2979
    
Sam Hocevar's avatar
 
Sam Hocevar committed
2980 2981 2982 2983 2984 2985 2986 2987


            if test "$PACKAGE" = gettext; then
      BUILD_INCLUDED_LIBINTL=yes
    fi

                                            for ac_prog in bison
do
2988
# Extract the first word of "$ac_prog", so it can be a program name with args.
Sam Hocevar's avatar
 
Sam Hocevar committed
2989
set dummy $ac_prog; ac_word=$2
2990
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2991
echo "configure:2992: checking for $ac_word" >&5
2992 2993
if eval "test \"`echo '$''{'ac_cv_prog_INTLBISON'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2994
else
Sam Hocevar's avatar
 
Sam Hocevar committed
2995 2996
  if test -n "$INTLBISON"; then
  ac_cv_prog_INTLBISON="$INTLBISON" # Let the user override the test.
Sam Hocevar's avatar
 
Sam Hocevar committed
2997
else
2998 2999 3000 3001 3002 3003 3004 3005 3006 3007
  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_INTLBISON="$ac_prog"
      break
    fi
  done
  IFS="$ac_save_ifs"
Sam Hocevar's avatar
 
Sam Hocevar committed
3008 3009
fi
fi
3010
INTLBISON="$ac_cv_prog_INTLBISON"
Sam Hocevar's avatar
 
Sam Hocevar committed
3011
if test -n "$INTLBISON"; then
3012
  echo "$ac_t""$INTLBISON" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3013
else
3014
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3015 3016
fi

3017
test -n "$INTLBISON" && break
Sam Hocevar's avatar
 
Sam Hocevar committed
3018 3019 3020 3021 3022
done

    if test -z "$INTLBISON"; then
      ac_verc_fail=yes
    else
3023
            echo $ac_n "checking version of bison""... $ac_c" 1>&6
3024
echo "configure:3025: checking version of bison" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
3025 3026 3027 3028 3029 3030 3031
      ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
      case $ac_prog_version in
        '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
        1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
           ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
        *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
      esac
3032
      echo "$ac_t""$ac_prog_version" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3033 3034 3035 3036 3037 3038 3039 3040 3041 3042
    fi
    if test $ac_verc_fail = yes; then
      INTLBISON=:
    fi

                for lang in $ALL_LINGUAS; do
      GMOFILES="$GMOFILES $lang.gmo"
      POFILES="$POFILES $lang.po"
    done

3043 3044 3045 3046 3047 3048 3049 3050 3051
        
    
    
    
    
    
    
    
    
Sam Hocevar's avatar
 
Sam Hocevar committed
3052 3053 3054 3055 3056

        nls_cv_header_intl=
    nls_cv_header_libgt=

        DATADIRNAME=share
3057
    
Sam Hocevar's avatar
 
Sam Hocevar committed
3058 3059

        INSTOBJEXT=.mo
3060
    
Sam Hocevar's avatar
 
Sam Hocevar committed
3061 3062

        GENCAT=gencat
3063 3064
    
  
Sam Hocevar's avatar
 
Sam Hocevar committed
3065 3066 3067 3068 3069

   if test "x$CATOBJEXT" != "x"; then
     if test "x$ALL_LINGUAS" = "x"; then
       LINGUAS=
     else
3070
       echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
3071
echo "configure:3072: checking for catalogs to be installed" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089
       NEW_LINGUAS=
       for presentlang in $ALL_LINGUAS; do
         useit=no
         for desiredlang in ${LINGUAS-$ALL_LINGUAS}; do
           # Use the presentlang catalog if desiredlang is
           #   a. equal to presentlang, or
           #   b. a variant of presentlang (because in this case,
           #      presentlang can be used as a fallback for messages
           #      which are not translated in the desiredlang catalog).
           case "$desiredlang" in
             "$presentlang"*) useit=yes;;
           esac
         done
         if test $useit = yes; then
           NEW_LINGUAS="$NEW_LINGUAS $presentlang"
         fi
       done
       LINGUAS=$NEW_LINGUAS
3090
       echo "$ac_t""$LINGUAS" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104
     fi

          if test -n "$LINGUAS"; then
       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
     fi
   fi

            MKINSTALLDIRS=
   if test -n "$ac_aux_dir"; then
     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
   fi
   if test -z "$MKINSTALLDIRS"; then
     MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
   fi
3105
   
3106

Sam Hocevar's avatar
 
Sam Hocevar committed
3107
      INTL_LIBTOOL_SUFFIX_PREFIX=
3108 3109
   
  
3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121

# 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.
3122
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
3123
echo "configure:3124: checking for a BSD compatible install" >&5
3124
if test -z "$INSTALL"; then
3125 3126
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
3127
else
3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147
    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
3148
      done
3149 3150 3151 3152
      ;;
    esac
  done
  IFS="$ac_save_IFS"
3153 3154 3155

fi
  if test "${ac_cv_path_install+set}" = set; then
3156
    INSTALL="$ac_cv_path_install"
3157 3158 3159 3160 3161
  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.
3162
    INSTALL="$ac_install_sh"
3163 3164
  fi
fi
3165
echo "$ac_t""$INSTALL" 1>&6
3166 3167 3168 3169 3170

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

3171
test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3172 3173 3174

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

Sam Hocevar's avatar
 
Sam Hocevar committed
3175

Sam Hocevar's avatar
Sam Hocevar committed
3176 3177
vlc_LDFLAGS="${LDFLAGS}"

3178
case "x${target_os}" in
Gildas Bazin's avatar
 
Gildas Bazin committed
3179 3180 3181 3182 3183 3184 3185 3186
  x)
    SYS=unknown
    ;;
  xlinux*)
    SYS=linux
    ;;
  xbsdi*)
    SYS=bsdi
3187
    save_CFLAGS="${save_CFLAGS} -pthread"; CFLAGS="${save_CFLAGS}"
Sam Hocevar's avatar
 
Sam Hocevar committed
3188 3189 3190 3191 3192
    dvd_LDFLAGS="${dvd_LDFLAGS} -ldvd"
    vcd_LDFLAGS="${vcd_LDFLAGS} -ldvd"
    ;;
  x*bsd*)
    SYS="${target_os}"
3193
    save_CFLAGS="${save_CFLAGS} -pthread"; CFLAGS="${save_CFLAGS}"
Gildas Bazin's avatar
 
Gildas Bazin committed
3194 3195 3196
    ;;
  xdarwin*)
    SYS=darwin
3197
    save_CFLAGS="${save_CFLAGS} -no-cpp-precomp"; CFLAGS="${save_CFLAGS}"
3198
    vlc_LDFLAGS="${vlc_LDFLAGS} -all_load"
Gildas Bazin's avatar
 
Gildas Bazin committed
3199 3200 3201
    ;;
  x*mingw32*)
    SYS=mingw32
3202
    # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
Gildas Bazin's avatar
 
Gildas Bazin committed
3203
set dummy ${ac_tool_prefix}windres; ac_word=$2
3204
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3205
echo "configure:3206: checking for $ac_word" >&5
3206 3207
if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
3208 3209 3210 3211
else
  if test -n "$WINDRES"; then
  ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
else
3212 3213 3214 3215 3216 3217 3218 3219 3220 3221
  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_WINDRES="${ac_tool_prefix}windres"
      break
    fi
  done
  IFS="$ac_save_ifs"
Gildas Bazin's avatar
 
Gildas Bazin committed
3222 3223
fi
fi
3224
WINDRES="$ac_cv_prog_WINDRES"
Gildas Bazin's avatar
 
Gildas Bazin committed
3225
if test -n "$WINDRES"; then
3226
  echo "$ac_t""$WINDRES" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
3227
else
3228
  echo "$ac_t""no" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
3229 3230
fi

3231

Gildas Bazin's avatar
 
Gildas Bazin committed
3232
if test -z "$ac_cv_prog_WINDRES"; then
3233
if test -n "$ac_tool_prefix"; then
Gildas Bazin's avatar
 
Gildas Bazin committed
3234 3235
  # Extract the first word of "windres", so it can be a program name with args.
set dummy windres; ac_word=$2
3236
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3237
echo "configure:3238: checking for $ac_word" >&5
3238 3239
if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
3240
else
3241 3242
  if test -n "$WINDRES"; then
  ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
Gildas Bazin's avatar
 
Gildas Bazin committed
3243
else
3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254
  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_WINDRES="windres"
      break
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_prog_WINDRES" && ac_cv_prog_WINDRES=":"
Gildas Bazin's avatar
 
Gildas Bazin committed
3255 3256
fi
fi
3257 3258 3259
WINDRES="$ac_cv_prog_WINDRES"
if test -n "$WINDRES"; then
  echo "$ac_t""$WINDRES" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
3260
else
3261
  echo "$ac_t""no" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
3262 3263 3264
fi

else
3265 3266
  WINDRES=":"
fi
Gildas Bazin's avatar
 
Gildas Bazin committed
3267 3268
fi

3269
    save_CFLAGS="${save_CFLAGS} -fnative-struct -D_OFF_T_ -D_off_t=long"; CFLAGS="${save_CFLAGS}"
Sam Hocevar's avatar
 
Sam Hocevar committed
3270
    vlc_LDFLAGS="${vlc_LDFLAGS} -mwindows -Xlinker --force-exe-suffix"
Sam Hocevar's avatar
 
Sam Hocevar committed
3271 3272
    vlc_LDFLAGS="${vlc_LDFLAGS} -lws2_32 -lnetapi32"
    ipv4_LDFLAGS="${ipv4_LDFLAGS} -lws2_32"
Gildas Bazin's avatar
 
Gildas Bazin committed
3273
    ipv6_LDFLAGS="${ipv6_LDFLAGS} -lws2_32"
3274
    http_LDFLAGS="${http_LDFLAGS} -lws2_32"
Sam Hocevar's avatar
 
Sam Hocevar committed
3275
    rc_LDFLAGS="${rc_LDFLAGS} -lws2_32"
Gildas Bazin's avatar
 
Gildas Bazin committed
3276 3277 3278
    ;;
  x*nto*)
    SYS=nto
Sam Hocevar's avatar
 
Sam Hocevar committed
3279 3280
    x11_LDFLAGS="${x11_LDFLAGS} -lsocket"
    xvideo_LDFLAGS="${xvideo_LDFLAGS} -lsocket"
Gildas Bazin's avatar
 
Gildas Bazin committed
3281 3282 3283
    ;;
  xbeos)
    SYS=beos
3284
    save_CFLAGS="${save_CFLAGS} -Wno-multichar -Wno-ctor-dtor-privacy -Woverloaded-virtual"; CFLAGS="${save_CFLAGS}"
Sam Hocevar's avatar
 
Sam Hocevar committed
3285 3286 3287 3288
    vlc_LDFLAGS="${vlc_LDFLAGS} -lbe"
    plugins_LDFLAGS="${plugins_LDFLAGS} -nostart"
    beos_LDFLAGS="${beos_LDFLAGS} -lbe -lgame -lroot -ltracker"
    ipv4_LDFLAGS="${ipv4_LDFLAGS} -lbind"
Gildas Bazin's avatar
 
Gildas Bazin committed
3289 3290
    ;;
  x*)
Sam Hocevar's avatar
 
Sam Hocevar committed
3291
    SYS="${target_os}"
Gildas Bazin's avatar
 
Gildas Bazin committed
3292 3293 3294
    ;;
esac

3295
if test "x${SYS}" = "xmingw32"
Sam Hocevar's avatar
 
Sam Hocevar committed
3296 3297 3298 3299
then
  plugins_CFLAGS="${plugins_CFLAGS} -fnative-struct"
else
  plugins_CFLAGS="${plugins_CFLAGS} -fPIC"
3300
  plugins_LDFLAGS="${plugins_LDFLAGS} -fPIC"
Sam Hocevar's avatar
 
Sam Hocevar committed
3301 3302
fi

3303
save_CFLAGS="${save_CFLAGS} -DSYS_`echo ${SYS} | sed -e 's/-.*//' | tr 'abcdefghijklmnopqrstuvwxyz.' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`"; CFLAGS="${save_CFLAGS}"
Sam Hocevar's avatar
 
Sam Hocevar committed
3304

3305
for ac_func in gettimeofday select strerror strtod strtol isatty vasprintf swab sigrelse getpwuid memalign posix_memalign gethostbyname2 atoll strndup
3306
do
3307
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3308
echo "configure:3309: checking for $ac_func" >&5
3309 3310
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
3311
else
3312
  cat > conftest.$ac_ext <<EOF
3313
#line 3314 "configure"
3314 3315
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
3316
    which can conflict with char $ac_func(); below.  */
3317 3318 3319
#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
3320 3321 3322 3323
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {
3324 3325 3326 3327 3328 3329 3330

/* 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
3331
$ac_func();
3332 3333
#endif

3334 3335
; return 0; }
EOF
3336
if { (eval echo configure:3337: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3337 3338 3339 3340 3341 3342 3343 3344 3345 3346
  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
3347

3348 3349 3350 3351 3352 3353 3354 3355 3356
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
3357 3358 3359
fi
done

Sam Hocevar's avatar
 
Sam Hocevar committed
3360

3361
echo $ac_n "checking for connect""... $ac_c" 1>&6
3362
echo "configure:3363: checking for connect" >&5
3363 3364
if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
3365
else
3366
  cat > conftest.$ac_ext <<EOF
3367
#line 3368 "configure"
3368 3369
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
3370
    which can conflict with char connect(); below.  */
3371 3372 3373
#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
3374 3375 3376 3377
    builtin and then its argument prototype would still apply.  */
char connect();

int main() {
3378 3379 3380 3381 3382 3383 3384

/* 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
3385
connect();
3386 3387
#endif

3388 3389
; return 0; }
EOF
3390
if { (eval echo configure:3391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403
  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
3404 3405
  :
else
3406
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3407

3408
  echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
3409
echo "configure:3410: checking for connect in -lsocket" >&5
3410 3411 3412
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
3413
else
3414
  ac_save_LIBS="$LIBS"
3415
LIBS="-lsocket  $LIBS"
3416
cat > conftest.$ac_ext <<EOF
3417
#line 3418 "configure"
3418 3419 3420
#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
3421 3422 3423 3424 3425 3426 3427
    builtin and then its argument prototype would still apply.  */
char connect();

int main() {
connect()
; return 0; }
EOF
3428
if { (eval echo configure:3429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442
  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
3443 3444
  ipv4_LDFLAGS="${ipv4_LDFLAGS} -lsocket"
    vlc_LDFLAGS="${vlc_LDFLAGS} -lsocket"
Sam Hocevar's avatar
 
Sam Hocevar committed
3445

3446 3447
else
  echo "$ac_t""no" 1>&6
3448 3449 3450 3451
fi

fi

Sam Hocevar's avatar
Sam Hocevar committed
3452
echo $ac_n "checking for send""... $ac_c" 1>&6
3453
echo "configure:3454: checking for send" >&5
Sam Hocevar's avatar
Sam Hocevar committed
3454 3455 3456 3457
if eval "test \"`echo '$''{'ac_cv_func_send'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
3458
#line 3459 "configure"
Sam Hocevar's avatar
Sam Hocevar committed
3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char send(); 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 send();

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_send) || defined (__stub___send)
choke me
#else
send();
#endif

; return 0; }
EOF
3481
if { (eval echo configure:3482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
Sam Hocevar committed
3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499
  rm -rf conftest*
  eval "ac_cv_func_send=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_send=no"
fi
rm -f conftest*
fi

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

  echo $ac_n "checking for send in -lsocket""... $ac_c" 1>&6
3500
echo "configure:3501: checking for send in -lsocket" >&5
Sam Hocevar's avatar
Sam Hocevar committed
3501 3502 3503 3504 3505 3506 3507
ac_lib_var=`echo socket'_'send | 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
3508
#line 3509 "configure"
Sam Hocevar's avatar
Sam Hocevar committed
3509 3510 3511 3512 3513 3514 3515 3516 3517 3518
#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 send();

int main() {
send()
; return 0; }
EOF
3519
if { (eval echo configure:3520: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Sam Hocevar's avatar
Sam Hocevar committed
3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541
  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
  http_LDFLAGS="${http_LDFLAGS} -lsocket"

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

fi

3542
echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
3543
echo "configure:3544: checking for gethostbyname" >&5
3544 3545
if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
3546
else
3547
  cat > conftest.$ac_ext <<EOF
3548
#line 3549 "configure"
3549 3550
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
3551
    which can conflict with char gethostbyname(); below.  */
3552 3553 3554
#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
3555 3556 3557 3558
    builtin and then its argument prototype would still apply.  */
char gethostbyname();

int main() {
3559 3560 3561 3562 3563 3564 3565

/* 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
3566
gethostbyname();
3567 3568
#endif

3569 3570
; return 0; }
EOF
3571
if { (eval echo configure:3572: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584
  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
3585 3586
  :
else
3587
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3588

3589
  echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
3590
echo "configure:3591: checking for gethostbyname in -lnsl" >&5
3591 3592 3593
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
3594
else
3595
  ac_save_LIBS="$LIBS"
3596
LIBS="-lnsl  $LIBS"
3597
cat > conftest.$ac_ext <<EOF
3598
#line 3599 "configure"
3599 3600 3601
#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
3602 3603 3604 3605 3606 3607 3608
    builtin and then its argument prototype would still apply.  */
char gethostbyname();

int main() {
gethostbyname()
; return 0; }
EOF
3609
if { (eval echo configure:3610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623
  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
3624
  ipv4_LDFLAGS="${ipv4_LDFLAGS} -lnsl"
3625 3626
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3627 3628 3629 3630 3631
fi


fi

3632
echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
3633
echo "configure:3634: checking for gethostbyname" >&5
3634 3635
if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3636
else
3637
  cat > conftest.$ac_ext <<EOF
3638
#line 3639 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
3639 3640
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
3641
    which can conflict with char gethostbyname(); below.  */
Sam Hocevar's avatar
 
Sam Hocevar committed
3642 3643 3644
#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
3645 3646 3647 3648
    builtin and then its argument prototype would still apply.  */
char gethostbyname();

int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
3649 3650 3651 3652 3653 3654 3655

/* 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
3656
gethostbyname();
Sam Hocevar's avatar
 
Sam Hocevar committed
3657 3658
#endif

3659 3660
; return 0; }
EOF
3661
if { (eval echo configure:3662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674
  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
Sam Hocevar's avatar
 
Sam Hocevar committed
3675 3676
  :
else
3677
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3678

3679
  echo $ac_n "checking for gethostbyname in -lbind""... $ac_c" 1>&6
3680
echo "configure:3681: checking for gethostbyname in -lbind" >&5
3681 3682 3683
ac_lib_var=`echo bind'_'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
Sam Hocevar's avatar
 
Sam Hocevar committed
3684
else
3685
  ac_save_LIBS="$LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
3686
LIBS="-lbind  $LIBS"
3687
cat > conftest.$ac_ext <<EOF
3688
#line 3689 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
3689 3690 3691
#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
3692 3693 3694 3695 3696 3697 3698
    builtin and then its argument prototype would still apply.  */
char gethostbyname();

int main() {
gethostbyname()
; return 0; }
EOF
3699
if { (eval echo configure:3700: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713
  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
3714
  ipv4_LDFLAGS="${ipv4_LDFLAGS} -lbind"
3715 3716
else
  echo "$ac_t""no" 1>&6
3717 3718
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
3719

3720 3721
fi

3722 3723
have_nanosleep=0
echo $ac_n "checking for nanosleep""... $ac_c" 1>&6
3724
echo "configure:3725: checking for nanosleep" >&5
3725
if eval "test \"`echo '$''{'ac_cv_func_nanosleep'+set}'`\" = set"; then
3726
  echo $ac_n "(cached) $ac_c" 1>&6
3727
else
3728
  cat > conftest.$ac_ext <<EOF
3729
#line 3730 "configure"
3730 3731
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
3732
    which can conflict with char nanosleep(); below.  */
3733 3734 3735
#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
3736
    builtin and then its argument prototype would still apply.  */
3737
char nanosleep();
3738 3739

int main() {
3740 3741 3742 3743

/* 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.  */
3744
#if defined (__stub_nanosleep) || defined (__stub___nanosleep)
3745 3746
choke me
#else
3747
nanosleep();
3748 3749
#endif

3750 3751
; return 0; }
EOF
3752
if { (eval echo configure:3753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3753
  rm -rf conftest*
3754
  eval "ac_cv_func_nanosleep=yes"
3755 3756 3757 3758
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
3759
  eval "ac_cv_func_nanosleep=no"
3760 3761 3762 3763
fi
rm -f conftest*
fi

3764
if eval "test \"`echo '$ac_cv_func_'nanosleep`\" = yes"; then
3765
  echo "$ac_t""yes" 1>&6
3766
  have_nanosleep=1
3767 3768
else
  echo "$ac_t""no" 1>&6
3769 3770

  echo $ac_n "checking for nanosleep in -lrt""... $ac_c" 1>&6
3771
echo "configure:3772: checking for nanosleep in -lrt" >&5
3772 3773 3774 3775 3776
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"
3777
LIBS="-lrt  $LIBS"
3778
cat > conftest.$ac_ext <<EOF
3779
#line 3780 "configure"
3780
#include "confdefs.h"
3781 3782
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
3783 3784 3785 3786 3787 3788 3789
    builtin and then its argument prototype would still apply.  */
char nanosleep();

int main() {
nanosleep()
; return 0; }
EOF
3790
if { (eval echo configure:3791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804
  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
3805
  vlc_LDFLAGS="${vlc_LDFLAGS} -lrt"; have_nanosleep=1
3806
else
3807 3808
  echo "$ac_t""no" 1>&6
echo $ac_n "checking for nanosleep in -lposix4""... $ac_c" 1>&6
3809
echo "configure:3810: checking for nanosleep in -lposix4" >&5
3810 3811 3812
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
3813
else
3814
  ac_save_LIBS="$LIBS"
3815
LIBS="-lposix4  $LIBS"
3816
cat > conftest.$ac_ext <<EOF
3817
#line 3818 "configure"
3818 3819 3820
#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
3821 3822 3823 3824 3825 3826 3827
    builtin and then its argument prototype would still apply.  */
char nanosleep();

int main() {
nanosleep()
; return 0; }
EOF
3828
if { (eval echo configure:3829: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3829 3830 3831 3832 3833 3834 3835
  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"
3836
fi
3837 3838
rm -f conftest*
LIBS="$ac_save_LIBS"
3839

3840 3841 3842
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
3843
  vlc_LDFLAGS="${vlc_LDFLAGS} -lposix4"; have_nanosleep=1
3844 3845 3846
else
  echo "$ac_t""no" 1>&6
fi
3847

3848
  
3849 3850
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
3851

3852 3853
fi

3854 3855 3856 3857 3858 3859
if test x$have_nanosleep = x1; then
  cat >> confdefs.h <<\EOF
#define HAVE_NANOSLEEP 1
EOF

fi
3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901
# HP/UX port
echo $ac_n "checking for sem_init in -lrt""... $ac_c" 1>&6
echo "configure:3863: checking for sem_init in -lrt" >&5
ac_lib_var=`echo rt'_'sem_init | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lrt  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 3871 "configure"
#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 sem_init();

int main() {
sem_init()
; return 0; }
EOF
if { (eval echo configure:3882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  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
  vlc_LDFLAGS="${vlc_LDFLAGS} -lrt"
else
  echo "$ac_t""no" 1>&6
fi


3902
echo $ac_n "checking for inet_aton""... $ac_c" 1>&6
3903
echo "configure:3904: checking for inet_aton" >&5
3904 3905
if eval "test \"`echo '$''{'ac_cv_func_inet_aton'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
3906
else
3907
  cat > conftest.$ac_ext <<EOF
3908
#line 3909 "configure"
3909 3910
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
3911
    which can conflict with char inet_aton(); below.  */
3912 3913 3914
#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
3915 3916 3917 3918
    builtin and then its argument prototype would still apply.  */
char inet_aton();

int main() {
3919 3920 3921 3922 3923 3924 3925

/* 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
3926
inet_aton();
3927 3928
#endif

3929 3930
; return 0; }
EOF
3931
if { (eval echo configure:3932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944
  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
3945 3946
  :
else
3947
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3948

3949
  echo $ac_n "checking for inet_aton in -lresolv""... $ac_c" 1>&6
3950
echo "configure:3951: checking for inet_aton in -lresolv" >&5
3951 3952 3953
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
3954
else
3955
  ac_save_LIBS="$LIBS"
3956
LIBS="-lresolv  $LIBS"
3957
cat > conftest.$ac_ext <<EOF
3958
#line 3959 "configure"
3959 3960 3961
#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
3962 3963 3964 3965 3966 3967 3968
    builtin and then its argument prototype would still apply.  */
char inet_aton();

int main() {
inet_aton()
; return 0; }
EOF
3969
if { (eval echo configure:3970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983
  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
3984
  ipv4_LDFLAGS="${ipv4_LDFLAGS} -lresolv"
3985 3986
else
  echo "$ac_t""no" 1>&6
3987 3988 3989 3990 3991
fi


fi

3992
echo $ac_n "checking for textdomain""... $ac_c" 1>&6
3993
echo "configure:3994: checking for textdomain" >&5
3994 3995
if eval "test \"`echo '$''{'ac_cv_func_textdomain'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
3996
else
3997
  cat > conftest.$ac_ext <<EOF
3998
#line 3999 "configure"
3999 4000
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
4001
    which can conflict with char textdomain(); below.  */
4002 4003 4004
#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
4005 4006 4007 4008
    builtin and then its argument prototype would still apply.  */
char textdomain();

int main() {
4009 4010 4011 4012 4013 4014 4015

/* 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_textdomain) || defined (__stub___textdomain)
choke me
#else
4016
textdomain();
4017 4018
#endif

4019 4020
; return 0; }
EOF
4021
if { (eval echo configure:4022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034
  rm -rf conftest*
  eval "ac_cv_func_textdomain=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_textdomain=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'textdomain`\" = yes"; then
  echo "$ac_t""yes" 1>&6
4035 4036
  :
else
4037
  echo "$ac_t""no" 1>&6
4038

4039
  echo $ac_n "checking for textdomain in -lintl""... $ac_c" 1>&6
4040
echo "configure:4041: checking for textdomain in -lintl" >&5
4041 4042 4043
ac_lib_var=`echo intl'_'textdomain | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
4044
else
4045
  ac_save_LIBS="$LIBS"
4046
LIBS="-lintl  $LIBS"
4047
cat > conftest.$ac_ext <<EOF
4048
#line 4049 "configure"
4049 4050 4051
#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
4052 4053 4054 4055 4056 4057 4058
    builtin and then its argument prototype would still apply.  */
char textdomain();

int main() {
textdomain()
; return 0; }
EOF
4059
if { (eval echo configure:4060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073
  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
4074
  vlc_LDFLAGS="${vlc_LDFLAGS} -lintl"
4075 4076
    plugins_LDFLAGS="${plugins_LDFLAGS} -lintl"
  
4077 4078
else
  echo "$ac_t""no" 1>&6
4079 4080
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
4081

4082 4083
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
4084

Sam Hocevar's avatar
 
Sam Hocevar committed
4085
NEED_GETOPT=0
4086
echo $ac_n "checking for getopt_long""... $ac_c" 1>&6
4087
echo "configure:4088: checking for getopt_long" >&5
4088 4089
if eval "test \"`echo '$''{'ac_cv_func_getopt_long'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4090
else
4091
  cat > conftest.$ac_ext <<EOF
4092
#line 4093 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
4093 4094
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
4095
    which can conflict with char getopt_long(); below.  */
Sam Hocevar's avatar
 
Sam Hocevar committed
4096 4097 4098
#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
4099 4100 4101 4102
    builtin and then its argument prototype would still apply.  */
char getopt_long();

int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
4103 4104 4105 4106 4107 4108 4109

/* 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
4110
getopt_long();
Sam Hocevar's avatar
 
Sam Hocevar committed
4111 4112
#endif

4113 4114
; return 0; }
EOF
4115
if { (eval echo configure:4116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129
  rm -rf conftest*
  eval "ac_cv_func_getopt_long=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_getopt_long=no"
fi
rm -f conftest*
fi

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

else
4134 4135 4136
  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
4137
echo "configure:4138: checking for getopt_long in -lgnugetopt" >&5
4138 4139 4140
ac_lib_var=`echo gnugetopt'_'getopt_long | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4141
else
4142
  ac_save_LIBS="$LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
4143
LIBS="-lgnugetopt  $LIBS"
4144
cat > conftest.$ac_ext <<EOF
4145
#line 4146 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
4146 4147 4148
#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
4149 4150 4151 4152 4153 4154 4155
    builtin and then its argument prototype would still apply.  */
char getopt_long();

int main() {
getopt_long()
; return 0; }
EOF
4156
if { (eval echo configure:4157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"

fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  cat >> confdefs.h <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4172
#define HAVE_GETOPT_LONG 1
4173
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4174
 vlc_LDFLAGS="${vlc_LDFLAGS} -lgnugetopt"
Sam Hocevar's avatar
 
Sam Hocevar committed
4175
else
4176 4177
  echo "$ac_t""no" 1>&6
NEED_GETOPT=1
Sam Hocevar's avatar
 
Sam Hocevar committed
4178
fi
4179 4180 4181

fi

Sam Hocevar's avatar
 
Sam Hocevar committed
4182

4183
echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
4184
echo "configure:4185: checking return type of signal handlers" >&5
4185 4186
if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
4187
else
4188
  cat > conftest.$ac_ext <<EOF
4189
#line 4190 "configure"
4190 4191 4192 4193
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
#ifdef signal
4194
#undef signal
4195 4196 4197 4198 4199 4200 4201
#endif
#ifdef __cplusplus
extern "C" void (*signal (int, void (*)(int)))(int);
#else
void (*signal ()) ();
#endif

4202
int main() {
4203
int i;
4204 4205
; return 0; }
EOF
4206
if { (eval echo configure:4207: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4207
  rm -rf conftest*
4208 4209
  ac_cv_type_signal=void
else
4210 4211 4212 4213
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_type_signal=int
4214
fi
4215
rm -f conftest*
4216 4217
fi

4218 4219
echo "$ac_t""$ac_cv_type_signal" 1>&6
cat >> confdefs.h <<EOF
4220
#define RETSIGTYPE $ac_cv_type_signal
4221
EOF
4222

Sam Hocevar's avatar
 
Sam Hocevar committed
4223

4224
echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
4225
echo "configure:4226: checking for dlopen in -ldl" >&5
4226 4227 4228
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
4229
else
4230
  ac_save_LIBS="$LIBS"
4231
LIBS="-ldl  $LIBS"
4232
cat > conftest.$ac_ext <<EOF
4233
#line 4234 "configure"
4234 4235 4236
#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
4237 4238 4239 4240 4241 4242 4243
    builtin and then its argument prototype would still apply.  */
char dlopen();

int main() {
dlopen()
; return 0; }
EOF
4244
if { (eval echo configure:4245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258
  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
4259
  vlc_LDFLAGS="${vlc_LDFLAGS} -ldl"
4260 4261
else
  echo "$ac_t""no" 1>&6
4262 4263
fi

4264
echo $ac_n "checking for cos in -lm""... $ac_c" 1>&6
4265
echo "configure:4266: checking for cos in -lm" >&5
4266 4267 4268
ac_lib_var=`echo m'_'cos | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4269
else
4270
  ac_save_LIBS="$LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
4271
LIBS="-lm  $LIBS"
4272
cat > conftest.$ac_ext <<EOF
4273
#line 4274 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
4274 4275 4276
#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
4277 4278 4279 4280 4281 4282 4283
    builtin and then its argument prototype would still apply.  */
char cos();

int main() {
cos()
; return 0; }
EOF
4284
if { (eval echo configure:4285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298
  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
4299 4300
  imdct_LDFLAGS="${imdct_LDFLAGS} -lm"
  filter_distort_LDFLAGS="${filter_distort_LDFLAGS} -lm"
4301 4302
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4303 4304
fi

4305
echo $ac_n "checking for pow in -lm""... $ac_c" 1>&6
4306
echo "configure:4307: checking for pow in -lm" >&5
4307 4308 4309
ac_lib_var=`echo m'_'pow | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
4310
else
4311
  ac_save_LIBS="$LIBS"
4312
LIBS="-lm  $LIBS"
4313
cat > conftest.$ac_ext <<EOF
4314
#line 4315 "configure"
4315 4316 4317
#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
4318 4319 4320 4321 4322 4323 4324
    builtin and then its argument prototype would still apply.  */
char pow();

int main() {
pow()
; return 0; }
EOF
4325
if { (eval echo configure:4326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339
  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
4340
  ffmpeg_LDFLAGS="${ffmpeg_LDFLAGS} -lm"
Sam Hocevar's avatar
 
Sam Hocevar committed
4341 4342 4343 4344
  imdct_LDFLAGS="${imdct_LDFLAGS} -lm"
  imdct3dn_LDFLAGS="${imdct3dn_LDFLAGS} -lm"
  imdctsse_LDFLAGS="${imdctsse_LDFLAGS} -lm"
  chroma_i420_rgb_LDFLAGS="${chroma_i420_rgb_LDFLAGS} -lm"
Sam Hocevar's avatar
 
Sam Hocevar committed
4345

4346 4347
else
  echo "$ac_t""no" 1>&6
4348 4349
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
4350

Sam Hocevar's avatar
 
Sam Hocevar committed
4351
THREAD_LIB=error
4352
if test "x${THREAD_LIB}" = "xerror"; then
4353
  echo $ac_n "checking for main in -lpthread""... $ac_c" 1>&6
4354
echo "configure:4355: checking for main in -lpthread" >&5
4355
ac_lib_var=`echo pthread'_'main | sed 'y%./+-%__p_%'`
4356 4357
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4358
else
4359
  ac_save_LIBS="$LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
4360
LIBS="-lpthread  $LIBS"
4361
cat > conftest.$ac_ext <<EOF
4362
#line 4363 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
4363
#include "confdefs.h"
4364 4365

int main() {
4366
main()
4367 4368
; return 0; }
EOF
4369
if { (eval echo configure:4370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383
  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
4384
  THREAD_LIB="-lpthread"
4385 4386
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4387
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4388

Sam Hocevar's avatar
 
Sam Hocevar committed
4389
fi
4390
if test "x${THREAD_LIB}" = "xerror"; then
4391
  echo $ac_n "checking for main in -lpthreads""... $ac_c" 1>&6
4392
echo "configure:4393: checking for main in -lpthreads" >&5
4393
ac_lib_var=`echo pthreads'_'main | sed 'y%./+-%__p_%'`
4394 4395
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
4396
else
4397
  ac_save_LIBS="$LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
4398
LIBS="-lpthreads  $LIBS"
4399
cat > conftest.$ac_ext <<EOF
4400
#line 4401 "configure"
4401
#include "confdefs.h"
4402 4403

int main() {
4404
main()
4405 4406
; return 0; }
EOF
4407
if { (eval echo configure:4408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421
  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
4422
  THREAD_LIB="-lpthreads"
4423 4424
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4425 4426
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
4427
fi
4428
if test "x${THREAD_LIB}" = "xerror"; then
4429
  echo $ac_n "checking for main in -lc_r""... $ac_c" 1>&6
4430
echo "configure:4431: checking for main in -lc_r" >&5
4431
ac_lib_var=`echo c_r'_'main | sed 'y%./+-%__p_%'`
4432 4433
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4434
else
4435
  ac_save_LIBS="$LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
4436
LIBS="-lc_r  $LIBS"
4437
cat > conftest.$ac_ext <<EOF
4438
#line 4439 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
4439
#include "confdefs.h"
4440 4441

int main() {
4442
main()
4443 4444
; return 0; }
EOF
4445
if { (eval echo configure:4446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459
  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
4460
  THREAD_LIB="-lc_r"
4461 4462
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4463
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4464

Sam Hocevar's avatar
 
Sam Hocevar committed
4465
fi
4466
if test "x${THREAD_LIB}" = "xerror"; then
4467
  echo $ac_n "checking for pthread_mutex_lock""... $ac_c" 1>&6
4468
echo "configure:4469: checking for pthread_mutex_lock" >&5
4469
if eval "test \"`echo '$''{'ac_cv_func_pthread_mutex_lock'+set}'`\" = set"; then
4470
  echo $ac_n "(cached) $ac_c" 1>&6
4471
else
4472
  cat > conftest.$ac_ext <<EOF
4473
#line 4474 "configure"
4474
#include "confdefs.h"
Sam Hocevar's avatar
 
Sam Hocevar committed
4475
/* System header to define __stub macros and hopefully few prototypes,
4476
    which can conflict with char pthread_mutex_lock(); below.  */
Sam Hocevar's avatar
 
Sam Hocevar committed
4477
#include <assert.h>
4478 4479
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
4480
    builtin and then its argument prototype would still apply.  */
4481
char pthread_mutex_lock();
4482 4483

int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
4484 4485 4486 4487

/* 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.  */
4488
#if defined (__stub_pthread_mutex_lock) || defined (__stub___pthread_mutex_lock)
Sam Hocevar's avatar
 
Sam Hocevar committed
4489 4490
choke me
#else
4491
pthread_mutex_lock();
Sam Hocevar's avatar
 
Sam Hocevar committed
4492 4493
#endif

4494 4495
; return 0; }
EOF
4496
if { (eval echo configure:4497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4497
  rm -rf conftest*
4498
  eval "ac_cv_func_pthread_mutex_lock=yes"
4499 4500 4501 4502
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
4503
  eval "ac_cv_func_pthread_mutex_lock=no"
4504 4505 4506 4507
fi
rm -f conftest*
fi

4508
if eval "test \"`echo '$ac_cv_func_'pthread_mutex_lock`\" = yes"; then
4509 4510 4511 4512 4513
  echo "$ac_t""yes" 1>&6
  :
else
  echo "$ac_t""no" 1>&6
fi
4514

Sam Hocevar's avatar
 
Sam Hocevar committed
4515
  THREAD_LIB=""
Sam Hocevar's avatar
 
Sam Hocevar committed
4516
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4517

4518
echo $ac_n "checking for cthread_fork in -lthreads""... $ac_c" 1>&6
4519
echo "configure:4520: checking for cthread_fork in -lthreads" >&5
4520 4521 4522
ac_lib_var=`echo threads'_'cthread_fork | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4523
else
4524
  ac_save_LIBS="$LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
4525
LIBS="-lthreads  $LIBS"
4526
cat > conftest.$ac_ext <<EOF
4527
#line 4528 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
4528 4529 4530
#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
4531 4532 4533 4534 4535 4536 4537
    builtin and then its argument prototype would still apply.  */
char cthread_fork();

int main() {
cthread_fork()
; return 0; }
EOF
4538
if { (eval echo configure:4539: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552
  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
4553
  THREAD_LIB="-lthreads"
4554 4555
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4556
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4557 4558


4559
cat > conftest.$ac_ext <<EOF
4560
#line 4561 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
4561 4562
#include "confdefs.h"
#include <pthread.h>
4563
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4564 4565
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "pthread_cond_t" >/dev/null 2>&1; then
4566 4567 4568
  rm -rf conftest*
  
  cat >> confdefs.h <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4569
#define PTHREAD_COND_T_IN_PTHREAD_H 1
4570
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4571 4572 4573 4574

fi
rm -f conftest*

4575
cat > conftest.$ac_ext <<EOF
4576
#line 4577 "configure"
Sam Hocevar's avatar
Sam Hocevar committed
4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591
#include "confdefs.h"
#include <pthread.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "pthread_once" >/dev/null 2>&1; then
  rm -rf conftest*
  
  cat >> confdefs.h <<\EOF
#define PTHREAD_ONCE_IN_PTHREAD_H 1
EOF

fi
rm -f conftest*

cat > conftest.$ac_ext <<EOF
4592
#line 4593 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
4593 4594
#include "confdefs.h"
#include <strings.h>
4595
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4596 4597
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "strncasecmp" >/dev/null 2>&1; then
4598 4599 4600
  rm -rf conftest*
  
  cat >> confdefs.h <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4601
#define STRNCASECMP_IN_STRINGS_H 1
4602
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4603 4604 4605

fi
rm -f conftest*
4606

Sam Hocevar's avatar
 
Sam Hocevar committed
4607

Sam Hocevar's avatar
Sam Hocevar committed
4608
for ac_hdr in stdint.h getopt.h strings.h inttypes.h sys/int_types.h
Christophe Massiot's avatar
Christophe Massiot committed
4609
do
4610 4611
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4612
echo "configure:4613: checking for $ac_hdr" >&5
4613 4614
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
4615
else
4616
  cat > conftest.$ac_ext <<EOF
4617
#line 4618 "configure"
4618 4619 4620 4621
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4622
{ (eval echo configure:4623: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4623 4624 4625 4626 4627 4628 4629
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
Christophe Massiot's avatar
Christophe Massiot committed
4630
  cat conftest.$ac_ext >&5
4631 4632
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
Christophe Massiot's avatar
Christophe Massiot committed
4633
fi
4634
rm -f conftest*
Christophe Massiot's avatar
Christophe Massiot committed
4635
fi
4636 4637 4638 4639 4640 4641 4642 4643 4644
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
Christophe Massiot's avatar
Christophe Massiot committed
4645 4646 4647
fi
done

4648
for ac_hdr in sys/sockio.h fcntl.h sys/types.h sys/time.h sys/times.h
4649
do
4650 4651
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4652
echo "configure:4653: checking for $ac_hdr" >&5
4653 4654
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
4655
else
4656
  cat > conftest.$ac_ext <<EOF
4657
#line 4658 "configure"
4658 4659 4660 4661
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4662
{ (eval echo configure:4663: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4663 4664 4665 4666 4667 4668 4669
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
4670
  cat conftest.$ac_ext >&5
4671 4672
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
4673
fi
4674
rm -f conftest*
4675
fi
4676 4677 4678 4679 4680 4681 4682 4683 4684
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
4685 4686 4687
fi
done

4688
for ac_hdr in dlfcn.h image.h
4689
do
4690 4691
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4692
echo "configure:4693: checking for $ac_hdr" >&5
4693 4694
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
4695
else
4696
  cat > conftest.$ac_ext <<EOF
4697
#line 4698 "configure"
4698 4699 4700 4701
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4702
{ (eval echo configure:4703: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4703 4704 4705 4706 4707 4708 4709
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
4710
  cat conftest.$ac_ext >&5
4711 4712
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
4713
fi
4714
rm -f conftest*
4715
fi
4716 4717 4718 4719 4720 4721 4722 4723 4724
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
4725 4726 4727
fi
done

4728
for ac_hdr in arpa/inet.h net/if.h netinet/in.h sys/socket.h
4729
do
4730 4731
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4732
echo "configure:4733: checking for $ac_hdr" >&5
4733 4734
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
4735
else
4736
  cat > conftest.$ac_ext <<EOF
4737
#line 4738 "configure"
4738 4739 4740 4741
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4742
{ (eval echo configure:4743: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4743 4744 4745 4746 4747 4748 4749
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
4750
  cat conftest.$ac_ext >&5
4751 4752
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
4753
fi
4754
rm -f conftest*
4755
fi
4756 4757 4758 4759 4760 4761 4762 4763 4764
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
4765 4766 4767
fi
done

4768
for ac_hdr in machine/param.h sys/shm.h
4769
do
4770 4771
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4772
echo "configure:4773: checking for $ac_hdr" >&5
4773 4774
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
4775
else
4776
  cat > conftest.$ac_ext <<EOF
4777
#line 4778 "configure"
4778 4779 4780 4781
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4782
{ (eval echo configure:4783: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4783 4784 4785 4786 4787 4788 4789
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
4790
  cat conftest.$ac_ext >&5
4791 4792
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
4793
fi
4794
rm -f conftest*
4795
fi
4796 4797 4798 4799 4800 4801 4802 4803 4804
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
4805 4806 4807
fi
done

4808
for ac_hdr in linux/version.h
4809
do
4810 4811
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4812
echo "configure:4813: checking for $ac_hdr" >&5
4813 4814
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
4815
else
4816
  cat > conftest.$ac_ext <<EOF
4817
#line 4818 "configure"
4818 4819 4820 4821
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4822
{ (eval echo configure:4823: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4823 4824 4825 4826 4827 4828 4829
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
4830
  cat conftest.$ac_ext >&5
4831 4832
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
4833
fi
4834
rm -f conftest*
4835
fi
4836 4837 4838 4839 4840 4841 4842 4843 4844
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
4845 4846 4847
fi
done

Sam Hocevar's avatar
 
Sam Hocevar committed
4848

4849
echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
4850
echo "configure:4851: checking whether time.h and sys/time.h may both be included" >&5
4851 4852
if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4853
else
4854
  cat > conftest.$ac_ext <<EOF
4855
#line 4856 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
4856 4857 4858 4859
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
#include <time.h>
4860 4861 4862 4863
int main() {
struct tm *tp;
; return 0; }
EOF
4864
if { (eval echo configure:4865: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4865
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
4866 4867
  ac_cv_header_time=yes
else
4868 4869 4870 4871
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_header_time=no
Sam Hocevar's avatar
 
Sam Hocevar committed
4872
fi
4873
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
4874
fi
4875

4876 4877 4878
echo "$ac_t""$ac_cv_header_time" 1>&6
if test $ac_cv_header_time = yes; then
  cat >> confdefs.h <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4879
#define TIME_WITH_SYS_TIME 1
4880
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4881 4882 4883 4884

fi


4885
cat > conftest.$ac_ext <<EOF
4886
#line 4887 "configure"
Christophe Massiot's avatar
Christophe Massiot committed
4887
#include "confdefs.h"
4888 4889 4890 4891 4892 4893 4894
#include <time.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "nanosleep" >/dev/null 2>&1; then
  rm -rf conftest*
  
  cat >> confdefs.h <<\EOF
4895
#define HAVE_DECL_NANOSLEEP 1
4896
EOF
4897 4898 4899


fi
4900
rm -f conftest*
4901 4902


4903
cat > conftest.$ac_ext <<EOF
4904
#line 4905 "configure"
4905
#include "confdefs.h"
4906 4907 4908 4909 4910 4911 4912
#include <sys/time.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "timespec" >/dev/null 2>&1; then
  rm -rf conftest*
  
  cat >> confdefs.h <<\EOF
4913
#define HAVE_STRUCT_TIMESPEC 1
4914
EOF
4915 4916 4917


fi
4918
rm -f conftest*
4919 4920


4921
for ac_hdr in cthreads.h pthread.h kernel/scheduler.h kernel/OS.h
4922
do
4923 4924
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4925
echo "configure:4926: checking for $ac_hdr" >&5
4926 4927
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
4928
else
4929
  cat > conftest.$ac_ext <<EOF
4930
#line 4931 "configure"
4931 4932 4933 4934
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4935
{ (eval echo configure:4936: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4936 4937 4938 4939 4940 4941 4942
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
4943
  cat conftest.$ac_ext >&5
4944 4945
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
4946
fi
4947
rm -f conftest*
Christophe Massiot's avatar
Christophe Massiot committed
4948
fi
4949 4950 4951 4952 4953 4954 4955 4956 4957
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
4958
fi
Christophe Massiot's avatar
Christophe Massiot committed
4959 4960
done

Sam Hocevar's avatar
 
Sam Hocevar committed
4961

4962 4963 4964 4965 4966 4967 4968 4969
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

if test "x${SYS}" != "xmingw32"
Sam Hocevar's avatar
 
Sam Hocevar committed
4970
then
4971
  CPPFLAGS="${save_CPPFLAGS} -I${x_includes}"
4972
  for ac_hdr in X11/extensions/dpms.h
Sam Hocevar's avatar
 
Sam Hocevar committed
4973
do
4974 4975
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4976
echo "configure:4977: checking for $ac_hdr" >&5
4977 4978
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
4979
else
4980
  cat > conftest.$ac_ext <<EOF
4981
#line 4982 "configure"
4982 4983 4984 4985
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4986
{ (eval echo configure:4987: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4987 4988 4989 4990 4991 4992 4993
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
4994
  cat conftest.$ac_ext >&5
4995 4996
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
Sam Hocevar's avatar
 
Sam Hocevar committed
4997
fi
4998
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
4999
fi
5000 5001 5002 5003 5004 5005 5006 5007
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
 
    cat > conftest.$ac_ext <<EOF
5008
#line 5009 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
5009 5010
#include "confdefs.h"
#include <X11/extensions/dpms.h>
5011
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5012 5013
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "DPMSInfo" >/dev/null 2>&1; then
5014 5015 5016
  rm -rf conftest*
  
      cat >> confdefs.h <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5017
#define DPMSINFO_IN_DPMS_H 1
5018
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5019

5020
    
Sam Hocevar's avatar
 
Sam Hocevar committed
5021 5022 5023
fi
rm -f conftest*

5024 5025 5026
  
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
5027 5028 5029
fi
done

5030
  CPPFLAGS="${save_CPPFLAGS}"
Sam Hocevar's avatar
 
Sam Hocevar committed
5031 5032
fi

5033
echo $ac_n "checking for ntohl in sys/param.h""... $ac_c" 1>&6
5034
echo "configure:5035: checking for ntohl in sys/param.h" >&5
5035 5036
if eval "test \"`echo '$''{'ac_cv_c_ntohl_sys_param_h'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
5037 5038
else
  CFLAGS="${save_CFLAGS} -Wall -Werror"
5039
     cat > conftest.$ac_ext <<EOF
5040
#line 5041 "configure"
Christophe Massiot's avatar
Christophe Massiot committed
5041 5042
#include "confdefs.h"
#include <sys/param.h>
5043
int main() {
5044
void foo() { int meuh; ntohl(meuh); }
5045 5046
; return 0; }
EOF
5047
if { (eval echo configure:5048: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5048
  rm -rf conftest*
5049
  ac_cv_c_ntohl_sys_param_h=yes
Christophe Massiot's avatar
Christophe Massiot committed
5050
else
5051 5052 5053 5054
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_c_ntohl_sys_param_h=no
Christophe Massiot's avatar
Christophe Massiot committed
5055
fi
5056
rm -f conftest*
5057
fi
5058

5059
echo "$ac_t""$ac_cv_c_ntohl_sys_param_h" 1>&6
5060
if test "x${ac_cv_c_ntohl_sys_param_h}" != "xno"; then
5061
    cat >> confdefs.h <<\EOF
5062
#define NTOHL_IN_SYS_PARAM_H 1
5063
EOF
5064 5065

fi
Sam Hocevar's avatar
 
Sam Hocevar committed
5066

5067
echo $ac_n "checking if \$CC accepts -finline-limit""... $ac_c" 1>&6
5068
echo "configure:5069: checking if \$CC accepts -finline-limit" >&5
5069 5070
if eval "test \"`echo '$''{'ac_cv_c_inline_limit'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
5071 5072
else
  CFLAGS="${save_CFLAGS} -finline-limit-30000"
5073
     cat > conftest.$ac_ext <<EOF
5074
#line 5075 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
5075 5076
#include "confdefs.h"

5077
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
5078

5079 5080
; return 0; }
EOF
5081
if { (eval echo configure:5082: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5082
  rm -rf conftest*
5083
  ac_cv_c_inline_limit=yes
Sam Hocevar's avatar
 
Sam Hocevar committed
5084
else
5085 5086 5087 5088
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_c_inline_limit=no
Sam Hocevar's avatar
 
Sam Hocevar committed
5089
fi
5090
rm -f conftest*
5091
fi
5092 5093

echo "$ac_t""$ac_cv_c_inline_limit" 1>&6
5094 5095
if test "x${ac_cv_c_inline_limit}" != "xno"; then
    save_CFLAGS="${save_CFLAGS} -finline-limit-30000"; CFLAGS="${save_CFLAGS}"
5096 5097
fi

5098
echo $ac_n "checking if \$CC accepts -Wall -Winline""... $ac_c" 1>&6
5099
echo "configure:5100: checking if \$CC accepts -Wall -Winline" >&5
5100 5101
if eval "test \"`echo '$''{'ac_cv_c_Wall_Winline'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
5102
else
Sam Hocevar's avatar
Sam Hocevar committed
5103
  CFLAGS="-Wall -Winline ${save_CFLAGS}"
5104
     cat > conftest.$ac_ext <<EOF
5105
#line 5106 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
5106 5107
#include "confdefs.h"

5108
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
5109

5110 5111
; return 0; }
EOF
5112
if { (eval echo configure:5113: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5113
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
5114 5115
  ac_cv_c_Wall_Winline=yes
else
5116 5117 5118 5119
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_c_Wall_Winline=no
Sam Hocevar's avatar
 
Sam Hocevar committed
5120
fi
5121
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
5122
fi
5123 5124

echo "$ac_t""$ac_cv_c_Wall_Winline" 1>&6
5125 5126
if test "x${ac_cv_c_Wall_Winline}" != "xno"; then
    save_CFLAGS="-Wall -Winline ${save_CFLAGS}"; CFLAGS="${save_CFLAGS}"
Sam Hocevar's avatar
 
Sam Hocevar committed
5127
else
5128
    echo $ac_n "checking if \$CC accepts -wall -winline""... $ac_c" 1>&6
5129
echo "configure:5130: checking if \$CC accepts -wall -winline" >&5
5130 5131
if eval "test \"`echo '$''{'ac_cv_c_wall_winline'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
5132
else
Sam Hocevar's avatar
Sam Hocevar committed
5133
  CFLAGS="-wall -winline ${save_CFLAGS}"
5134
         cat > conftest.$ac_ext <<EOF
5135
#line 5136 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
5136 5137
#include "confdefs.h"

5138
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
5139

5140 5141
; return 0; }
EOF
5142
if { (eval echo configure:5143: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5143
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
5144 5145
  ac_cv_c_wall_winline=yes
else
5146 5147 5148 5149
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_c_wall_winline=no
Sam Hocevar's avatar
 
Sam Hocevar committed
5150
fi
5151
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
5152
fi
5153 5154

echo "$ac_t""$ac_cv_c_wall_winline" 1>&6
5155 5156
    if test "x${ac_cv_c_wall_winline}" != "xno"; then
        save_CFLAGS="-wall -winline ${save_CFLAGS}"; CFLAGS="${save_CFLAGS}"
Sam Hocevar's avatar
 
Sam Hocevar committed
5157 5158 5159
    fi
fi

5160
echo $ac_n "checking if \$CC accepts -pipe""... $ac_c" 1>&6
5161
echo "configure:5162: checking if \$CC accepts -pipe" >&5
5162 5163
if eval "test \"`echo '$''{'ac_cv_c_pipe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
5164 5165
else
  CFLAGS="${save_CFLAGS} -pipe"
5166
     cat > conftest.$ac_ext <<EOF
5167
#line 5168 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
5168 5169
#include "confdefs.h"

5170
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
5171

5172 5173
; return 0; }
EOF
5174
if { (eval echo configure:5175: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5175
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
5176 5177
  ac_cv_c_pipe=yes
else
5178 5179 5180 5181
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_c_pipe=no
Sam Hocevar's avatar
 
Sam Hocevar committed
5182
fi
5183
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
5184
fi
5185 5186

echo "$ac_t""$ac_cv_c_pipe" 1>&6
5187 5188
if test "x${ac_cv_c_pipe}" != "xno"; then
    save_CFLAGS="${save_CFLAGS} -pipe"; CFLAGS="${save_CFLAGS}"
Sam Hocevar's avatar
 
Sam Hocevar committed
5189 5190
fi

5191
echo $ac_n "checking if \$CC accepts -O3""... $ac_c" 1>&6
5192
echo "configure:5193: checking if \$CC accepts -O3" >&5
5193 5194
if eval "test \"`echo '$''{'ac_cv_c_o3'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
5195 5196
else
  CFLAGS="${save_CFLAGS} -O3"
5197
     cat > conftest.$ac_ext <<EOF
5198
#line 5199 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
5199 5200
#include "confdefs.h"

5201
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
5202

5203 5204
; return 0; }
EOF
5205
if { (eval echo configure:5206: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5206
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
5207 5208
  ac_cv_c_o3=yes
else
5209 5210 5211 5212
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_c_o3=no
Sam Hocevar's avatar
 
Sam Hocevar committed
5213
fi
5214
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
5215
fi
5216 5217

echo "$ac_t""$ac_cv_c_o3" 1>&6
5218
if test "x${ac_cv_c_o3}" != "xno"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
5219 5220
    CFLAGS_OPTIM="${CFLAGS_OPTIM} -O3"
else
5221
    echo $ac_n "checking if \$CC accepts -O2""... $ac_c" 1>&6
5222
echo "configure:5223: checking if \$CC accepts -O2" >&5
5223 5224
if eval "test \"`echo '$''{'ac_cv_c_o2'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
5225 5226
else
  CFLAGS="${save_CFLAGS} -O2"
5227
         cat > conftest.$ac_ext <<EOF
5228
#line 5229 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
5229 5230
#include "confdefs.h"

5231
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
5232

5233 5234
; return 0; }
EOF
5235
if { (eval echo configure:5236: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5236
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
5237 5238
  ac_cv_c_o2=yes
else
5239 5240 5241 5242
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_c_o2=no
Sam Hocevar's avatar
 
Sam Hocevar committed
5243
fi
5244
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
5245
fi
5246 5247

echo "$ac_t""$ac_cv_c_o2" 1>&6
5248
    if test "x${ac_cv_c_o2}" != "xno"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
5249 5250
        CFLAGS_OPTIM="${CFLAGS_OPTIM} -O2"
    else
5251
        echo $ac_n "checking if \$CC accepts -O""... $ac_c" 1>&6
5252
echo "configure:5253: checking if \$CC accepts -O" >&5
5253 5254
if eval "test \"`echo '$''{'ac_cv_c_o'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
5255 5256
else
  CFLAGS="${save_CFLAGS} -O"
5257
             cat > conftest.$ac_ext <<EOF
5258
#line 5259 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
5259 5260
#include "confdefs.h"

5261
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
5262

5263 5264
; return 0; }
EOF
5265
if { (eval echo configure:5266: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5266
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
5267 5268
  ac_cv_c_o=yes
else
5269 5270 5271 5272
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_c_o=no
Sam Hocevar's avatar
 
Sam Hocevar committed
5273
fi
5274
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
5275
fi
5276 5277

echo "$ac_t""$ac_cv_c_o" 1>&6
5278
        if test "x${ac_cv_c_o}" != "xno"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
5279 5280 5281 5282 5283
            CFLAGS_OPTIM="${CFLAGS_OPTIM} -O"
        fi
    fi
fi

5284
echo $ac_n "checking if \$CC accepts -ffast-math""... $ac_c" 1>&6
5285
echo "configure:5286: checking if \$CC accepts -ffast-math" >&5
5286 5287
if eval "test \"`echo '$''{'ac_cv_c_fast_math'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
5288 5289
else
  CFLAGS="${save_CFLAGS} -ffast-math"
5290
     cat > conftest.$ac_ext <<EOF
5291
#line 5292 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
5292 5293
#include "confdefs.h"

5294
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
5295

5296 5297
; return 0; }
EOF
5298
if { (eval echo configure:5299: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5299
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
5300 5301
  ac_cv_c_fast_math=yes
else
5302 5303 5304 5305
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_c_fast_math=no
Sam Hocevar's avatar
 
Sam Hocevar committed
5306
fi
5307
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
5308
fi
5309 5310

echo "$ac_t""$ac_cv_c_fast_math" 1>&6
5311
if test "x${ac_cv_c_fast_math}" != "xno"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
5312 5313 5314
    CFLAGS_OPTIM="${CFLAGS_OPTIM} -ffast-math"
fi

5315
echo $ac_n "checking if \$CC accepts -funroll-loops""... $ac_c" 1>&6
5316
echo "configure:5317: checking if \$CC accepts -funroll-loops" >&5
5317 5318
if eval "test \"`echo '$''{'ac_cv_c_unroll_loops'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
5319 5320
else
  CFLAGS="${save_CFLAGS} -funroll-loops"
5321
     cat > conftest.$ac_ext <<EOF
5322
#line 5323 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
5323 5324
#include "confdefs.h"

5325
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
5326

5327 5328
; return 0; }
EOF
5329
if { (eval echo configure:5330: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5330
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
5331 5332
  ac_cv_c_unroll_loops=yes
else
5333 5334 5335 5336
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_c_unroll_loops=no
Sam Hocevar's avatar
 
Sam Hocevar committed
5337
fi
5338
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
5339
fi
5340 5341

echo "$ac_t""$ac_cv_c_unroll_loops" 1>&6
5342
if test "x${ac_cv_c_unroll_loops}" != "xno"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
5343 5344 5345
    CFLAGS_OPTIM="${CFLAGS_OPTIM} -funroll-loops"
fi

5346
echo $ac_n "checking if \$CC accepts -fomit-frame-pointer""... $ac_c" 1>&6
5347
echo "configure:5348: checking if \$CC accepts -fomit-frame-pointer" >&5
5348 5349
if eval "test \"`echo '$''{'ac_cv_c_omit_frame_pointer'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
5350 5351
else
  CFLAGS="${save_CFLAGS} -fomit-frame-pointer"
5352
     cat > conftest.$ac_ext <<EOF
5353
#line 5354 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
5354 5355
#include "confdefs.h"

5356
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
5357

5358 5359
; return 0; }
EOF
5360
if { (eval echo configure:5361: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5361
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
5362 5363
  ac_cv_c_omit_frame_pointer=yes
else
5364 5365 5366 5367
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_c_omit_frame_pointer=no
Sam Hocevar's avatar
 
Sam Hocevar committed
5368
fi
5369
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
5370
fi
5371 5372

echo "$ac_t""$ac_cv_c_omit_frame_pointer" 1>&6
5373
if test "x${ac_cv_c_omit_frame_pointer}" != "xno"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
5374
    CFLAGS_OPTIM_NODEBUG="${CFLAGS_OPTIM_NODEBUG} -fomit-frame-pointer"
Sam Hocevar's avatar
Sam Hocevar committed
5375 5376
    # this plugin does not compile without -fomit-frame-pointer, damn gcc!
    chroma_i420_yuy2_mmx_CFLAGS="${chroma_i420_yuy2_mmx_CFLAGS} -fomit-frame-pointer"
Sam Hocevar's avatar
 
Sam Hocevar committed
5377 5378
fi

5379
echo $ac_n "checking if \$CC accepts -bundle -undefined error -lcc_dynamic""... $ac_c" 1>&6
5380
echo "configure:5381: checking if \$CC accepts -bundle -undefined error -lcc_dynamic" >&5
5381 5382
if eval "test \"`echo '$''{'ac_cv_ld_darwin'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
5383
else
Christophe Massiot's avatar
Christophe Massiot committed
5384
  CFLAGS="${save_CFLAGS} -bundle -undefined error -lcc_dynamic"
5385
     cat > conftest.$ac_ext <<EOF
5386
#line 5387 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
5387 5388
#include "confdefs.h"

5389
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
5390

5391 5392
; return 0; }
EOF
5393
if { (eval echo configure:5394: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5394
  rm -rf conftest*
5395
  ac_cv_ld_darwin=yes
Sam Hocevar's avatar
 
Sam Hocevar committed
5396
else
5397 5398 5399 5400
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_ld_darwin=no
Sam Hocevar's avatar
 
Sam Hocevar committed
5401
fi
5402
rm -f conftest*
5403
fi
5404 5405

echo "$ac_t""$ac_cv_ld_darwin" 1>&6
5406
if test "x${ac_cv_ld_darwin}" != "xno"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
5407
    plugins_LDFLAGS="${plugins_LDFLAGS} -bundle -undefined error -lcc_dynamic"
5408
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
5409

5410
echo $ac_n "checking if \$CC accepts -shared""... $ac_c" 1>&6
5411
echo "configure:5412: checking if \$CC accepts -shared" >&5
5412 5413
if eval "test \"`echo '$''{'ac_cv_ld_plugins'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
5414 5415
else
  CFLAGS="${save_CFLAGS} -shared"
5416
     cat > conftest.$ac_ext <<EOF
5417
#line 5418 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
5418 5419
#include "confdefs.h"

5420
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
5421

5422 5423
; return 0; }
EOF
5424
if { (eval echo configure:5425: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5425
  rm -rf conftest*
5426
  ac_cv_ld_plugins=yes
Sam Hocevar's avatar
 
Sam Hocevar committed
5427
else
5428 5429 5430 5431
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_ld_plugins=no
Sam Hocevar's avatar
 
Sam Hocevar committed
5432
fi
5433
rm -f conftest*
5434
fi
5435 5436

echo "$ac_t""$ac_cv_ld_plugins" 1>&6
5437
if test "x${ac_cv_ld_plugins}" != "xno"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
5438
    plugins_LDFLAGS="${plugins_LDFLAGS} -shared"
5439
fi
5440 5441
        
echo $ac_n "checking for variadic cpp macros""... $ac_c" 1>&6
5442
echo "configure:5443: checking for variadic cpp macros" >&5
5443 5444
if eval "test \"`echo '$''{'ac_cv_cpp_variadic_macros'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
5445 5446
else
  CFLAGS="${save_CFLAGS}"
5447
     cat > conftest.$ac_ext <<EOF
5448
#line 5449 "configure"
5449 5450 5451
#include "confdefs.h"
#include <stdio.h>
          #define a(b,c...) printf(b,##c)
5452
int main() {
5453
a("foo");a("%s","bar");a("%s%s","baz","quux");
5454 5455
; return 0; }
EOF
5456
if { (eval echo configure:5457: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5457
  rm -rf conftest*
5458 5459
  ac_cv_cpp_variadic_macros=yes
else
5460 5461 5462 5463
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_cpp_variadic_macros=no
5464
fi
5465
rm -f conftest*
5466
fi
5467

5468
echo "$ac_t""$ac_cv_cpp_variadic_macros" 1>&6
5469
if test "x${ac_cv_cpp_variadic_macros}" != "xno"; then
5470
    cat >> confdefs.h <<\EOF
5471
#define HAVE_VARIADIC_MACROS 1
5472
EOF
5473 5474 5475

fi

5476
echo $ac_n "checking __attribute__ ((aligned ())) support""... $ac_c" 1>&6
5477
echo "configure:5478: checking __attribute__ ((aligned ())) support" >&5
5478 5479
if eval "test \"`echo '$''{'ac_cv_c_attribute_aligned'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
5480 5481
else
  ac_cv_c_attribute_aligned=0
Sam Hocevar's avatar
 
Sam Hocevar committed
5482
        CFLAGS="${save_CFLAGS} -Werror"
5483
    for ac_cv_c_attr_align_try in 2 4 8 16 32 64; do
5484
        cat > conftest.$ac_ext <<EOF
5485
#line 5486 "configure"
5486 5487
#include "confdefs.h"

5488
int main() {
5489
static char c __attribute__ ((aligned(${ac_cv_c_attr_align_try}))) = 0; return c;
5490 5491
; return 0; }
EOF
5492
if { (eval echo configure:5493: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5493
  rm -rf conftest*
5494
  ac_cv_c_attribute_aligned="${ac_cv_c_attr_align_try}"
5495
else
5496 5497
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
5498
fi
5499
rm -f conftest*
5500
    done
5501
        CFLAGS="${save_CFLAGS}"
5502
fi
5503

5504
echo "$ac_t""$ac_cv_c_attribute_aligned" 1>&6
5505
if test "x${ac_cv_c_attribute_aligned}" != "x0"; then
5506
    cat >> confdefs.h <<EOF
5507
#define ATTRIBUTE_ALIGNED_MAX ${ac_cv_c_attribute_aligned}
5508
EOF
5509 5510 5511

fi

5512
case "x${target_cpu}" in
Sam Hocevar's avatar
 
Sam Hocevar committed
5513 5514 5515 5516
  x)
    ARCH=unknown
    ;;
  *)
Sam Hocevar's avatar
 
Sam Hocevar committed
5517
    ARCH="${target_cpu}"
Sam Hocevar's avatar
 
Sam Hocevar committed
5518 5519
    ;;
esac
Sam Hocevar's avatar
 
Sam Hocevar committed
5520

Sam Hocevar's avatar
Sam Hocevar committed
5521 5522
BUILTINS="${BUILTINS} idct idctclassic motion imdct downmix mpeg_adec ac3_adec mpeg_vdec"
PLUGINS="${PLUGINS} dummy null rc logger mpeg_es mpeg_audio mpeg_ps mpeg_ts file udp http ipv4 memcpy lpcm_adec ac3_spdif spudec filter_deinterlace filter_invert filter_wall filter_transform filter_distort filter_clone filter_crop fx_scope chroma_i420_rgb chroma_i420_yuy2 chroma_i422_yuy2 chroma_i420_ymga"
Sam Hocevar's avatar
 
Sam Hocevar committed
5523

Sam Hocevar's avatar
 
Sam Hocevar committed
5524
MMX_MODULES="memcpymmx idctmmx motionmmx chroma_i420_rgb_mmx chroma_i420_yuy2_mmx chroma_i422_yuy2_mmx chroma_i420_ymga_mmx"
Sam Hocevar's avatar
 
Sam Hocevar committed
5525 5526
MMXEXT_MODULES="memcpymmxext idctmmxext motionmmxext"
THREEDNOW_MODULES="memcpy3dn imdct3dn downmix3dn"
Gildas Bazin's avatar
 
Gildas Bazin committed
5527
SSE_MODULES="imdctsse downmixsse"
5528
ALTIVEC_MODULES="idctaltivec motionaltivec memcpyaltivec"
Sam Hocevar's avatar
 
Sam Hocevar committed
5529

5530
echo $ac_n "checking if \$CC groks MMX inline assembly""... $ac_c" 1>&6
5531
echo "configure:5532: checking if \$CC groks MMX inline assembly" >&5
5532 5533
if eval "test \"`echo '$''{'ac_cv_mmx_inline'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
5534
else
Sam Hocevar's avatar
Sam Hocevar committed
5535 5536
  CFLAGS="${save_CFLAGS}"
     cat > conftest.$ac_ext <<EOF
5537
#line 5538 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
5538 5539
#include "confdefs.h"

5540
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
5541
void *p;asm volatile("packuswb %%mm1,%%mm2"::"r"(p));
5542 5543
; return 0; }
EOF
5544
if { (eval echo configure:5545: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5545
  rm -rf conftest*
5546
  ac_cv_mmx_inline=yes
Sam Hocevar's avatar
 
Sam Hocevar committed
5547
else
5548 5549 5550 5551
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_mmx_inline=no
Sam Hocevar's avatar
 
Sam Hocevar committed
5552
fi
5553
rm -f conftest*
5554
fi
5555 5556

echo "$ac_t""$ac_cv_mmx_inline" 1>&6
5557
if test "x${ac_cv_mmx_inline}" != "xno"; then
5558 5559
  ACCEL_MODULES="${ACCEL_MODULES} ${MMX_MODULES}"
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
5560

5561
echo $ac_n "checking if \$CC groks MMX EXT inline assembly""... $ac_c" 1>&6
5562
echo "configure:5563: checking if \$CC groks MMX EXT inline assembly" >&5
5563 5564
if eval "test \"`echo '$''{'ac_cv_mmxext_inline'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
5565
else
Sam Hocevar's avatar
Sam Hocevar committed
5566 5567
  CFLAGS="${save_CFLAGS}"
     cat > conftest.$ac_ext <<EOF
5568
#line 5569 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
5569 5570
#include "confdefs.h"

5571
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
5572
void *p;asm volatile("maskmovq %%mm1,%%mm2"::"r"(p));
5573 5574
; return 0; }
EOF
5575
if { (eval echo configure:5576: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5576
  rm -rf conftest*
5577
  ac_cv_mmxext_inline=yes
Sam Hocevar's avatar
 
Sam Hocevar committed
5578
else
5579 5580 5581 5582
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_mmxext_inline=no
Sam Hocevar's avatar
 
Sam Hocevar committed
5583
fi
5584
rm -f conftest*
5585
fi
5586 5587

echo "$ac_t""$ac_cv_mmxext_inline" 1>&6
5588
if test "x${ac_cv_mmxext_inline}" != "xno"; then
5589 5590
  ACCEL_MODULES="${ACCEL_MODULES} ${MMXEXT_MODULES}"
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
5591

5592
echo $ac_n "checking if \$CC groks 3D Now! inline assembly""... $ac_c" 1>&6
5593
echo "configure:5594: checking if \$CC groks 3D Now! inline assembly" >&5
5594 5595
if eval "test \"`echo '$''{'ac_cv_3dnow_inline'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
5596
else
Sam Hocevar's avatar
Sam Hocevar committed
5597 5598
  CFLAGS="${save_CFLAGS}"
     cat > conftest.$ac_ext <<EOF
5599
#line 5600 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
5600 5601
#include "confdefs.h"

5602
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
5603
void *p;asm volatile("pfadd %%mm1,%%mm2"::"r"(p));
5604 5605
; return 0; }
EOF
5606
if { (eval echo configure:5607: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5607
  rm -rf conftest*
5608
  ac_cv_3dnow_inline=yes
Sam Hocevar's avatar
 
Sam Hocevar committed
5609
else
5610 5611 5612 5613
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_3dnow_inline=no
Sam Hocevar's avatar
 
Sam Hocevar committed
5614
fi
5615
rm -f conftest*
5616
fi
5617

5618
echo "$ac_t""$ac_cv_3dnow_inline" 1>&6
5619
if test "x${ac_cv_3dnow_inline}" != "xno"; then
5620
  cat >> confdefs.h <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5621
#define CAN_COMPILE_3DNOW 1
5622
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5623

5624 5625
  ACCEL_MODULES="${ACCEL_MODULES} ${THREEDNOW_MODULES}"
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
5626

5627
echo $ac_n "checking if \$CC groks SSE inline assembly""... $ac_c" 1>&6
5628
echo "configure:5629: checking if \$CC groks SSE inline assembly" >&5
5629 5630
if eval "test \"`echo '$''{'ac_cv_sse_inline'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
5631
else
Sam Hocevar's avatar
Sam Hocevar committed
5632 5633
  CFLAGS="${save_CFLAGS}"
     cat > conftest.$ac_ext <<EOF
5634
#line 5635 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
5635 5636
#include "confdefs.h"

5637
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
5638
void *p;asm volatile("xorps %%xmm1,%%xmm2"::"r"(p));
5639 5640
; return 0; }
EOF
5641
if { (eval echo configure:5642: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5642
  rm -rf conftest*
5643
  ac_cv_sse_inline=yes
Sam Hocevar's avatar
 
Sam Hocevar committed
5644
else
5645 5646 5647 5648
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_sse_inline=no
Sam Hocevar's avatar
 
Sam Hocevar committed
5649
fi
5650
rm -f conftest*
5651
fi
5652

5653
echo "$ac_t""$ac_cv_sse_inline" 1>&6
5654
if test "x${ac_cv_sse_inline}" != "xno" -a "x${SYS}" != "xmingw32"; then
5655
  cat >> confdefs.h <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5656
#define CAN_COMPILE_SSE 1
5657
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5658

5659 5660 5661
  ACCEL_MODULES="${ACCEL_MODULES} ${SSE_MODULES}"
fi

Sam Hocevar's avatar
Sam Hocevar committed
5662
# don't try to grok AltiVec with native mingw32 it doesn't work right now
Gildas Bazin's avatar
 
Gildas Bazin committed
5663
# we should be able to remove this test with future versions of mingw32
5664
if test "x${SYS}" != "xmingw32"; then
Sam Hocevar's avatar
Sam Hocevar committed
5665
echo $ac_n "checking if \$CC groks AltiVec inline assembly""... $ac_c" 1>&6
5666
echo "configure:5667: checking if \$CC groks AltiVec inline assembly" >&5
5667 5668
if eval "test \"`echo '$''{'ac_cv_altivec_inline'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
5669
else
Sam Hocevar's avatar
Sam Hocevar committed
5670 5671
  CFLAGS="${save_CFLAGS}"
     cat > conftest.$ac_ext <<EOF
5672
#line 5673 "configure"
5673 5674
#include "confdefs.h"

5675
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
5676
asm volatile("vperm 0,1,2,3");
5677 5678
; return 0; }
EOF
5679
if { (eval echo configure:5680: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5680
  rm -rf conftest*
5681
  ac_cv_altivec_inline=yes
5682
else
5683 5684 5685
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
5686
  CFLAGS="${save_CFLAGS} -Wa,-m7400"
5687
          cat > conftest.$ac_ext <<EOF
5688
#line 5689 "configure"
5689 5690
#include "confdefs.h"

5691
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
5692
asm volatile("vperm 0,1,2,3");
5693 5694
; return 0; }
EOF
5695
if { (eval echo configure:5696: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5696
  rm -rf conftest*
5697
  ac_cv_altivec_inline="-Wa,-m7400"
5698
else
5699 5700 5701 5702
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_altivec_inline=no
5703
fi
5704 5705
rm -f conftest*
         
5706
fi
5707
rm -f conftest*
5708
fi
5709

5710
echo "$ac_t""$ac_cv_altivec_inline" 1>&6
5711
if test "x${ac_cv_altivec_inline}" != "xno"; then
5712
  cat >> confdefs.h <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5713
#define CAN_COMPILE_ALTIVEC 1
5714
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5715

5716 5717 5718 5719 5720
  if test "x${ac_cv_altivec_inline}" != "xyes"; then
    idctaltivec_CFLAGS="${idctaltivec_CFLAGS} ${ac_cv_altivec_inline}"
    motionaltivec_CFLAGS="${motionaltivec_CFLAGS} ${ac_cv_altivec_inline}"
    memcpyaltivec_CFLAGS="${memcpyaltivec_CFLAGS} ${ac_cv_altivec_inline}"
    vlc_CFLAGS="${vlc_CFLAGS} ${ac_cv_altivec_inline}"
5721
  fi
5722 5723
  ACCEL_MODULES="${ACCEL_MODULES} ${ALTIVEC_MODULES}"
fi
5724

Sam Hocevar's avatar
Sam Hocevar committed
5725
echo $ac_n "checking if \$CC groks AltiVec C extensions""... $ac_c" 1>&6
5726
echo "configure:5727: checking if \$CC groks AltiVec C extensions" >&5
5727 5728
if eval "test \"`echo '$''{'ac_cv_c_altivec'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
5729
else
5730
  CFLAGS="${save_CFLAGS} -faltivec"
5731
     # Darwin test
5732
     cat > conftest.$ac_ext <<EOF
5733
#line 5734 "configure"
5734
#include "confdefs.h"
5735

5736
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
5737
vec_mtvscr((vector unsigned int)(0));
5738 5739
; return 0; }
EOF
5740
if { (eval echo configure:5741: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5741
  rm -rf conftest*
5742 5743
  ac_cv_c_altivec=-faltivec
else
5744 5745 5746 5747
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  
5748
        # Linux/PPC test
5749
        CFLAGS="${save_CFLAGS} ${idctaltivec_CFLAGS} -fvec"
5750
        cat > conftest.$ac_ext <<EOF
5751
#line 5752 "configure"
5752
#include "confdefs.h"
5753

5754
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
5755
vec_mtvscr((vector unsigned int)(0));
5756 5757
; return 0; }
EOF
5758
if { (eval echo configure:5759: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5759
  rm -rf conftest*
5760
  ac_cv_c_altivec="-fvec"
5761
else
5762 5763 5764 5765
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_c_altivec=no
5766
fi
5767 5768
rm -f conftest*
        
5769
fi
5770
rm -f conftest*
5771
     CFLAGS="${save_CFLAGS}"
5772 5773
fi

5774
echo "$ac_t""$ac_cv_c_altivec" 1>&6
5775
if test "x${ac_cv_c_altivec}" != "xno"; then
5776
  cat >> confdefs.h <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5777
#define CAN_COMPILE_C_ALTIVEC 1
5778
EOF
5779

5780 5781 5782 5783
  idctaltivec_CFLAGS="${idctaltivec_CFLAGS} ${ac_cv_c_altivec}"
  motionaltivec_CFLAGS="${motionaltivec_CFLAGS} ${ac_cv_c_altivec}"
  memcpyaltivec_CFLAGS="${memcpyaltivec_CFLAGS} ${ac_cv_c_altivec}"
  vlc_CFLAGS="${vlc_CFLAGS} ${ac_cv_c_altivec}"
5784
  ACCEL_MODULES="${ACCEL_MODULES} ${ALTIVEC_MODULES}"
5785 5786
fi

5787
echo $ac_n "checking if linker needs -framework vecLib""... $ac_c" 1>&6
5788
echo "configure:5789: checking if linker needs -framework vecLib" >&5
5789 5790
if eval "test \"`echo '$''{'ac_cv_ld_altivec'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
5791
else
5792
  LDFLAGS="${vlc_LDFLAGS} -framework vecLib"
5793
     cat > conftest.$ac_ext <<EOF
5794
#line 5795 "configure"
5795 5796
#include "confdefs.h"

5797
int main() {
5798

5799 5800
; return 0; }
EOF
5801
if { (eval echo configure:5802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5802
  rm -rf conftest*
5803 5804
  ac_cv_ld_altivec=yes
else
5805 5806 5807 5808
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_ld_altivec=no
5809
fi
5810
rm -f conftest*
5811
     LDFLAGS="${save_LDFLAGS}"
5812
    
5813
fi
5814 5815

echo "$ac_t""$ac_cv_ld_altivec" 1>&6
5816
if test "x${ac_cv_ld_altivec}" != "xno"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
5817 5818 5819 5820
  idctaltivec_LDFLAGS="${idctaltivec_LDFLAGS} -framework vecLib"
  motionaltivec_LDFLAGS="${motionaltivec_LDFLAGS} -framework vecLib"
  memcpyaltivec_LDFLAGS="${memcpyaltivec_LDFLAGS} -framework vecLib"
  vlc_LDFLAGS="${vlc_LDFLAGS} -framework vecLib"
5821
fi
Gildas Bazin's avatar
 
Gildas Bazin committed
5822
fi # end if mingw32
Sam Hocevar's avatar
 
Sam Hocevar committed
5823

5824

Sam Hocevar's avatar
 
Sam Hocevar committed
5825 5826 5827
# Check whether --with- or --without- was given.
if test "${with_+set}" = set; then
  withval="$with_"
5828 5829
  :
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
5830

Sam Hocevar's avatar
 
Sam Hocevar committed
5831 5832 5833
# Check whether --with- or --without- was given.
if test "${with_+set}" = set; then
  withval="$with_"
5834 5835
  :
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
5836

Sam Hocevar's avatar
 
Sam Hocevar committed
5837 5838 5839 5840

# Check whether --with-tuning or --without-tuning was given.
if test "${with_tuning+set}" = set; then
  withval="$with_tuning"
5841 5842
  :
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
5843

5844 5845
if test "x${with_tuning}" != "x"; then
    TUNING="${with_tuning}"
Sam Hocevar's avatar
 
Sam Hocevar committed
5846
else
5847
    if test "x${target_cpu}" = "xi686" -o "x${target_cpu}" = "xi586" -o "x${target_cpu}" = "xi486" -o "x${target_cpu}" = "xi386"; then TUNING="pentiumpro"
Sam Hocevar's avatar
 
Sam Hocevar committed
5848
    else
5849
        if test "x${target_cpu}" = "xpowerpc"; then TUNING="750"; fi
Sam Hocevar's avatar
 
Sam Hocevar committed
5850 5851 5852
    fi
fi

5853
if test "x${target_cpu}" = "xi686" -o "x${target_cpu}" = "xi586" -o "x${target_cpu}" = "xx86" -o "x${target_cpu}" = "xi386"
Sam Hocevar's avatar
 
Sam Hocevar committed
5854 5855
then
    ARCH="${ARCH} mmx"
Sam Hocevar's avatar
Sam Hocevar committed
5856
    PLUGINS="${PLUGINS} ${ACCEL_MODULES}"
Sam Hocevar's avatar
 
Sam Hocevar committed
5857 5858 5859 5860 5861
fi

# Check whether --enable-optimizations or --disable-optimizations was given.
if test "${enable_optimizations+set}" = set; then
  enableval="$enable_optimizations"
5862
   if test "x${enable_optimizations}" = "xno"; then OPTIMS=0; fi 
Sam Hocevar's avatar
 
Sam Hocevar committed
5863
else
5864 5865 5866
   OPTIMS=1 
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
5867 5868 5869 5870

# Check whether --enable-altivec or --disable-altivec was given.
if test "${enable_altivec+set}" = set; then
  enableval="$enable_altivec"
5871
   if test "x${enable_altivec}" = "xyes"; then ARCH="${ARCH} altivec";
5872
    BUILTINS="${BUILTINS} ${ACCEL_MODULES}"; fi 
Sam Hocevar's avatar
 
Sam Hocevar committed
5873
else
5874
   if test "x${target_cpu}" = "xpowerpc"; then ARCH="${ARCH} altivec";
5875 5876 5877
    BUILTINS="${BUILTINS} ${ACCEL_MODULES}"; fi 
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
5878 5879 5880 5881 5882

DEBUG=0
# Check whether --enable-debug or --disable-debug was given.
if test "${enable_debug+set}" = set; then
  enableval="$enable_debug"
5883
   if test "x${enable_debug}" = "xyes"; then DEBUG=1; fi 
5884 5885
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
5886

Sam Hocevar's avatar
 
Sam Hocevar committed
5887
RELEASE=0
Sam Hocevar's avatar
 
Sam Hocevar committed
5888 5889 5890
# Check whether --enable-release or --disable-release was given.
if test "${enable_release+set}" = set; then
  enableval="$enable_release"
5891
   if test "x${enable_release}" = "xyes"; then RELEASE=1; fi 
Sam Hocevar's avatar
 
Sam Hocevar committed
5892
else
5893 5894
   VERSION="${VERSION}_`date +%Y-%m-%d`" 
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
5895 5896 5897 5898 5899 5900



# Check whether --with- or --without- was given.
if test "${with_+set}" = set; then
  withval="$with_"
5901 5902
  :
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
5903 5904 5905 5906 5907


# Check whether --enable-dvd or --disable-dvd was given.
if test "${enable_dvd+set}" = set; then
  enableval="$enable_dvd"
5908 5909
  :
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
5910

5911
if test "x${enable_dvd}" != "xno"
Sam Hocevar's avatar
 
Sam Hocevar committed
5912
then
5913
  # Check whether --with-dvdcss or --without-dvdcss was given.
Sam Hocevar's avatar
 
Sam Hocevar committed
5914 5915
if test "${with_dvdcss+set}" = set; then
  withval="$with_dvdcss"
5916 5917
  :
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
5918

5919
  # Check whether --with-dvdcss-tree or --without-dvdcss-tree was given.
Sam Hocevar's avatar
 
Sam Hocevar committed
5920 5921
if test "${with_dvdcss_tree+set}" = set; then
  withval="$with_dvdcss_tree"
5922 5923
  :
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
5924

5925
  case "x${with_dvdcss}" in
Sam Hocevar's avatar
 
Sam Hocevar committed
5926
  x|xyes)
5927
    if test "x${with_dvdcss_tree}" = x
Sam Hocevar's avatar
 
Sam Hocevar committed
5928
    then
5929
      for ac_hdr in dvdcss/dvdcss.h
5930
do
5931 5932
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5933
echo "configure:5934: checking for $ac_hdr" >&5
5934 5935
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
5936
else
5937
  cat > conftest.$ac_ext <<EOF
5938
#line 5939 "configure"
5939 5940 5941 5942
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5943
{ (eval echo configure:5944: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5944 5945 5946 5947 5948 5949 5950
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
5951
  cat conftest.$ac_ext >&5
5952 5953
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
5954
fi
5955
rm -f conftest*
5956
fi
5957 5958 5959 5960 5961 5962
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
5963
  PLUGINS="${PLUGINS} dvd"
5964
          dvd_LDFLAGS="${dvd_LDFLAGS} -ldvdcss" 
Sam Hocevar's avatar
 
Sam Hocevar committed
5965
else
5966 5967 5968
  echo "$ac_t""no" 1>&6
echo "configure: warning: libdvdcss is no longer provided with vlc; please get libdvdcss from http://www.videolan.org/libdvdcss/ and build it. Then either use --with-dvdcss=<path/where/libdvdcss/was/installed> for dynamic linking (recommended under Unix) or --with-dvdcss-tree=<path/where/libdvdcss/was/built> for static linking (recommended under BeOS, Windows, MacOS X). Alternatively you can use --disable-dvd to disable the DVD plugin." 1>&2
          { echo "configure: error: cannot find libdvdcss headers" 1>&2; exit 1; } 
Sam Hocevar's avatar
 
Sam Hocevar committed
5969 5970 5971
fi
done

Sam Hocevar's avatar
 
Sam Hocevar committed
5972
    else
5973
      echo $ac_n "checking for libdvdcss.a in ${with_dvdcss_tree}""... $ac_c" 1>&6
5974
echo "configure:5975: checking for libdvdcss.a in ${with_dvdcss_tree}" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
5975
      real_dvdcss_tree="`cd ${with_dvdcss_tree} 2>/dev/null && pwd`"
5976
      if test "x${real_dvdcss_tree}" = "x"
Sam Hocevar's avatar
 
Sam Hocevar committed
5977
      then
5978 5979
                echo "$ac_t""no" 1>&6
        { echo "configure: error: cannot cd to ${with_dvdcss_tree}" 1>&2; exit 1; }
Sam Hocevar's avatar
 
Sam Hocevar committed
5980 5981 5982
      fi
      if test -f "${real_dvdcss_tree}/src/.libs/libdvdcss.a"
      then
5983
                echo "$ac_t""${real_dvdcss_tree}/src/.libs/libdvdcss.a" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
5984
        BUILTINS="${BUILTINS} dvd"
Sam Hocevar's avatar
 
Sam Hocevar committed
5985 5986
        dvd_LDFLAGS="${dvd_LDFLAGS} ${real_dvdcss_tree}/src/.libs/libdvdcss.a"
        dvd_CFLAGS="${dvd_CFLAGS} -I${real_dvdcss_tree}/src"
Sam Hocevar's avatar
 
Sam Hocevar committed
5987
      else
5988 5989
                echo "$ac_t""no" 1>&6
        { echo "configure: error: cannot find ${real_dvdcss_tree}/src/.libs/libdvdcss.a, make sure you compiled libdvdcss in ${with_dvdcss_tree}" 1>&2; exit 1; }
Sam Hocevar's avatar
 
Sam Hocevar committed
5990 5991
      fi
    fi
Sam Hocevar's avatar
 
Sam Hocevar committed
5992 5993
  ;;
  xno)
Sam Hocevar's avatar
 
Sam Hocevar committed
5994
        PLUGINS="${PLUGINS} dvd"
Sam Hocevar's avatar
 
Sam Hocevar committed
5995 5996
    dvd_CFLAGS="${dvd_CFLAGS} -DGOD_DAMN_DMCA"
    dvd_LDFLAGS="${dvd_LDFLAGS} -ldl"
Sam Hocevar's avatar
 
Sam Hocevar committed
5997 5998
  ;;
  *)
5999
    echo $ac_n "checking for dvdcss headers in ${with_dvdcss}""... $ac_c" 1>&6
6000
echo "configure:6001: checking for dvdcss headers in ${with_dvdcss}" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
6001
    if test -f ${with_dvdcss}/include/dvdcss/dvdcss.h
Sam Hocevar's avatar
 
Sam Hocevar committed
6002
    then
6003
            echo "$ac_t""yes" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
6004
      PLUGINS="${PLUGINS} dvd"
Sam Hocevar's avatar
 
Sam Hocevar committed
6005 6006
      dvd_LDFLAGS="${dvd_LDFLAGS} -L${with_dvdcss}/lib -ldvdcss"
      dvd_CFLAGS="${dvd_CFLAGS} -I${with_dvdcss}/include"
Sam Hocevar's avatar
 
Sam Hocevar committed
6007
    else
6008 6009
            echo "$ac_t""no" 1>&6
      { echo "configure: error: cannot find ${with_dvdcss}/include/dvdcss/dvdcss.h" 1>&2; exit 1; }
Sam Hocevar's avatar
 
Sam Hocevar committed
6010 6011 6012 6013 6014 6015 6016 6017
    fi
  ;;
  esac
fi

# Check whether --enable-dvdread or --disable-dvdread was given.
if test "${enable_dvdread+set}" = set; then
  enableval="$enable_dvdread"
6018 6019
  :
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
6020

6021
if test "x${enable_dvdread}" != "xno"
Sam Hocevar's avatar
 
Sam Hocevar committed
6022
then
6023
  # Check whether --with-dvdread or --without-dvdread was given.
Sam Hocevar's avatar
 
Sam Hocevar committed
6024 6025
if test "${with_dvdread+set}" = set; then
  withval="$with_dvdread"
6026 6027
  :
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
6028

6029
  if test "x${with_dvdread}" = "x"
Sam Hocevar's avatar
 
Sam Hocevar committed
6030 6031 6032 6033
  then
    test_LDFLAGS=""
    test_CFLAGS=""
  else
6034 6035
    test_LDFLAGS="-L${with_dvdread}/lib"
    test_CFLAGS="-I${with_dvdread}/include"
Sam Hocevar's avatar
 
Sam Hocevar committed
6036
  fi
6037
  CPPFLAGS="${save_CPPFLAGS} ${test_CFLAGS}"
6038
  for ac_hdr in dvdread/dvd_reader.h
6039
do
6040 6041
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6042
echo "configure:6043: checking for $ac_hdr" >&5
6043 6044
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
6045
else
6046
  cat > conftest.$ac_ext <<EOF
6047
#line 6048 "configure"
6048 6049 6050 6051
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6052
{ (eval echo configure:6053: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6053 6054 6055 6056 6057 6058 6059
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
6060
  cat conftest.$ac_ext >&5
6061 6062
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
6063
fi
6064
rm -f conftest*
6065
fi
6066 6067 6068 6069 6070 6071 6072 6073
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
 
     cat > conftest.$ac_ext <<EOF
6074
#line 6075 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
6075 6076
#include "confdefs.h"
#include <dvdread/dvd_reader.h>
6077
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
6078
void foo() { int i=DVD_VIDEO_LB_LEN; }
6079 6080
; return 0; }
EOF
6081
if { (eval echo configure:6082: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6082 6083
  rm -rf conftest*
  
Sam Hocevar's avatar
 
Sam Hocevar committed
6084 6085 6086
          PLUGINS="${PLUGINS} dvdread"
          dvdread_LDFLAGS="${dvdread_LDFLAGS} ${test_LDFLAGS} -ldvdread"
          dvdread_CFLAGS="${dvdread_CFLAGS} ${test_CFLAGS}"
6087
        
Sam Hocevar's avatar
 
Sam Hocevar committed
6088
else
6089 6090 6091 6092
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  
6093
          if test "x${enable_dvdread}" != "x"
Sam Hocevar's avatar
 
Sam Hocevar committed
6094
          then
6095
            { echo "configure: error: Cannot find DVD_VIDEO_LB_LEN in dvdread/dvd_reader.h, please install libdvdread version 0.9.2 or later" 1>&2; exit 1; }
Sam Hocevar's avatar
 
Sam Hocevar committed
6096
          fi
6097
        
Sam Hocevar's avatar
 
Sam Hocevar committed
6098
fi
6099 6100
rm -f conftest*
  
Sam Hocevar's avatar
 
Sam Hocevar committed
6101
else
6102
  echo "$ac_t""no" 1>&6
6103
if test "x${enable_dvdread}" != "x"
Sam Hocevar's avatar
 
Sam Hocevar committed
6104
    then
6105
      if test "x${with_dvdread}" != "x"
Sam Hocevar's avatar
 
Sam Hocevar committed
6106
      then
6107
        { echo "configure: error: Cannot find dvdread/dvd_reader.h in ${with_dvdread}/include" 1>&2; exit 1; }
Sam Hocevar's avatar
 
Sam Hocevar committed
6108
      else
6109
        { echo "configure: error: Cannot find dvdread/dvd_reader.h" 1>&2; exit 1; }
Sam Hocevar's avatar
 
Sam Hocevar committed
6110 6111
      fi
    fi
6112
  
6113 6114 6115
fi
done

6116
  CPPFLAGS="${save_CPPFLAGS}"
Sam Hocevar's avatar
 
Sam Hocevar committed
6117 6118
fi

6119 6120 6121
# Check whether --enable-dvbpsi or --disable-dvbpsi was given.
if test "${enable_dvbpsi+set}" = set; then
  enableval="$enable_dvbpsi"
6122 6123
  :
fi
6124

6125
if test "x${enable_dvbpsi}" != "xno"
6126
then
6127
  # Check whether --with-dvbpsi or --without-dvbpsi was given.
6128 6129
if test "${with_dvbpsi+set}" = set; then
  withval="$with_dvbpsi"
6130 6131
  :
fi
6132

6133 6134 6135 6136 6137 6138
  # Check whether --with-dvbpsi or --without-dvbpsi was given.
if test "${with_dvbpsi+set}" = set; then
  withval="$with_dvbpsi"
  :
fi

6139
  case "x${with_dvbpsi}" in
6140
  x|xyes)
6141
    if test "x${with_dvbpsi_tree}" = "x"
6142
    then
Sam Hocevar's avatar
Sam Hocevar committed
6143
      for ac_hdr in dvbpsi/dr.h
6144 6145 6146
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6147
echo "configure:6148: checking for $ac_hdr" >&5
6148 6149 6150 6151
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
6152
#line 6153 "configure"
6153
#include "confdefs.h"
6154
#include <$ac_hdr>
6155 6156
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6157
{ (eval echo configure:6158: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6158 6159 6160 6161 6162 6163 6164
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
6165
  cat conftest.$ac_ext >&5
6166 6167
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
6168
fi
6169
rm -f conftest*
6170
fi
6171 6172
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
6173 6174 6175 6176
    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
6177
  PLUGINS="${PLUGINS} mpeg_ts_dvbpsi"
6178
          mpeg_ts_dvbpsi_LDFLAGS="${mpeg_ts_dvbpsi_LDFLAGS} -ldvbpsi" 
6179
else
6180
  echo "$ac_t""no" 1>&6
6181 6182
fi
done
6183

6184 6185
    else
      echo $ac_n "checking for libdvbpsi.a in ${with_dvbpsi_tree}""... $ac_c" 1>&6
6186
echo "configure:6187: checking for libdvbpsi.a in ${with_dvbpsi_tree}" >&5
6187
      real_dvbpsi_tree="`cd ${with_dvbpsi_tree} 2>/dev/null && pwd`"
6188
      if test "x${real_dvbpsi_tree}" = "x"
6189 6190 6191 6192 6193 6194 6195 6196 6197 6198 6199 6200 6201 6202 6203 6204 6205 6206 6207 6208
      then
                echo "$ac_t""no" 1>&6
        { echo "configure: error: cannot cd to ${with_dvbpsi_tree}" 1>&2; exit 1; }
      fi
      if test -f "${real_dvbpsi_tree}/src/.libs/libdvbpsi.a"
      then
                echo "$ac_t""${real_dvbpsi_tree}/src/.libs/libdvbpsi.a" 1>&6
        BUILTINS="${BUILTINS} mpeg_ts_dvbpsi"
        mpeg_ts_dvbpsi_LDFLAGS="${mpeg_ts_dvbpsi_LDFLAGS} ${real_dvbpsi_tree}/src/.libs/libdvbpsi.a"
        mpeg_ts_dvbpsi_CFLAGS="${mpeg_ts_dvbpsi_CFLAGS} -I${real_dvbpsi_tree}/src"
      else
                echo "$ac_t""no" 1>&6
        { echo "configure: error: cannot find ${real_dvbpsi_tree}/src/.libs/libdvbpsi.a, make sure you compiled libdvbpsi in ${with_dvbpsi_tree}" 1>&2; exit 1; }
      fi
    fi
  ;;
  xno)
      ;;
  *)
    echo $ac_n "checking for dvbpsi headers in ${with_dvbpsi}""... $ac_c" 1>&6
6209
echo "configure:6210: checking for dvbpsi headers in ${with_dvbpsi}" >&5
6210
    if test "x${with_dvbpsi}" = "x"
6211
    then
6212 6213 6214 6215 6216
      test_LDFLAGS=""
      test_CFLAGS=""
    else
      test_LDFLAGS="-L${with_dvbpsi}/lib"
      test_CFLAGS="-I${with_dvbpsi}/include"
6217
    fi
6218
    CPPFLAGS="${save_CPPFLAGS} ${test_CFLAGS}"
6219 6220
    ac_safe=`echo "dvbpsi/dr.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for dvbpsi/dr.h""... $ac_c" 1>&6
6221
echo "configure:6222: checking for dvbpsi/dr.h" >&5
6222 6223 6224 6225
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
6226
#line 6227 "configure"
6227 6228 6229 6230
#include "confdefs.h"
#include <dvbpsi/dr.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6231
{ (eval echo configure:6232: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6232 6233 6234 6235 6236 6237 6238 6239 6240 6241 6242 6243 6244 6245 6246
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
6247
  
6248 6249 6250 6251 6252 6253 6254
      PLUGINS="${PLUGINS} mpeg_ts_dvbpsi"
      mpeg_ts_dvbpsi_LDFLAGS="${mpeg_ts_dvbpsi_LDFLAGS} ${test_LDFLAGS} -ldvbpsi"
      mpeg_ts_dvbpsi_CFLAGS="${mpeg_ts_dvbpsi_CFLAGS} ${test_CFLAGS}"
      
else
  echo "$ac_t""no" 1>&6

6255
      if test "x${enable_dvbpsi}" != "x"
6256 6257 6258 6259
      then
        { echo "configure: error: Could not find libdvbpsi on your system: you may get it from www.videolan.org, you'll need at least version 0.1.1" 1>&2; exit 1; }
      fi
    
6260 6261
fi

6262
    CPPFLAGS="${save_CPPFLAGS}"
6263 6264
  ;;
  esac
6265
fi
6266

Sam Hocevar's avatar
 
Sam Hocevar committed
6267 6268 6269
# Check whether --enable-vcd or --disable-vcd was given.
if test "${enable_vcd+set}" = set; then
  enableval="$enable_vcd"
6270 6271
  :
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
6272

Sam Hocevar's avatar
 
Sam Hocevar committed
6273

6274
if test "x${enable_vcd}" != "xno"
Sam Hocevar's avatar
 
Sam Hocevar committed
6275
then
6276
  cat > conftest.$ac_ext <<EOF
6277
#line 6278 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
6278 6279
#include "confdefs.h"
#include <linux/cdrom.h>
6280
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
6281
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Sam Hocevar's avatar
 
Sam Hocevar committed
6282
  egrep "cdrom_msf0" >/dev/null 2>&1; then
6283 6284
  rm -rf conftest*
  
Sam Hocevar's avatar
 
Sam Hocevar committed
6285
    PLUGINS="${PLUGINS} vcd"
6286
  
Sam Hocevar's avatar
 
Sam Hocevar committed
6287 6288 6289
fi
rm -f conftest*

6290 6291
  
  cat > conftest.$ac_ext <<EOF
6292
#line 6293 "configure"
6293 6294
#include "confdefs.h"
#include <sys/cdio.h>
6295
EOF
6296 6297
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "ioc_toc_header " >/dev/null 2>&1; then
6298 6299
  rm -rf conftest*
  
6300
    PLUGINS="${PLUGINS} vcd"
6301
    cat >> confdefs.h <<\EOF
6302
#define HAVE_IOC_TOC_HEADER_IN_SYS_CDIO_H 1
6303
EOF
6304

6305
  
6306 6307 6308
fi
rm -f conftest*

6309
  
Sam Hocevar's avatar
 
Sam Hocevar committed
6310 6311 6312 6313
  if test "x${SYS}" = "xbsdi"
  then
    PLUGINS="${PLUGINS} vcd"
  fi
6314

Sam Hocevar's avatar
 
Sam Hocevar committed
6315 6316
  if test "x${SYS}" = "xdarwin"
  then
6317
    # No need to add vcd to PLUGINS, Darwin is already based on FreeBSD
6318
    vcd_LDFLAGS="${vcd_LDFLAGS} -framework IOKit -framework CoreFoundation" 
Sam Hocevar's avatar
 
Sam Hocevar committed
6319
  fi
6320 6321
fi

Johan Bilien's avatar
Johan Bilien committed
6322 6323 6324
# Check whether --enable-satellite or --disable-satellite was given.
if test "${enable_satellite+set}" = set; then
  enableval="$enable_satellite"
6325
   if test "x${enable_satellite}" = "xyes"
Johan Bilien's avatar
Johan Bilien committed
6326
    then
6327
      PLUGINS="${PLUGINS} satellite"
Johan Bilien's avatar
Johan Bilien committed
6328
    fi
6329 6330
fi

Johan Bilien's avatar
Johan Bilien committed
6331

6332
if test "x${SYS}" != "xnto" && test "x${SYS}" != "xmingw32"
6333
then
6334
  echo $ac_n "checking for inet_pton""... $ac_c" 1>&6
6335
echo "configure:6336: checking for inet_pton" >&5
6336 6337
if eval "test \"`echo '$''{'ac_cv_func_inet_pton'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
6338
else
6339
  cat > conftest.$ac_ext <<EOF
6340
#line 6341 "configure"
6341
#include "confdefs.h"
6342
/* System header to define __stub macros and hopefully few prototypes,
6343
    which can conflict with char inet_pton(); below.  */
6344 6345 6346
#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
6347 6348 6349 6350
    builtin and then its argument prototype would still apply.  */
char inet_pton();

int main() {
6351 6352 6353 6354 6355 6356 6357

/* 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_pton) || defined (__stub___inet_pton)
choke me
#else
6358
inet_pton();
6359 6360
#endif

6361 6362
; return 0; }
EOF
6363
if { (eval echo configure:6364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6364 6365 6366 6367 6368 6369 6370 6371 6372 6373 6374 6375 6376
  rm -rf conftest*
  eval "ac_cv_func_inet_pton=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_inet_pton=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'inet_pton`\" = yes"; then
  echo "$ac_t""yes" 1>&6
Christophe Massiot's avatar
Christophe Massiot committed
6377
  PLUGINS="${PLUGINS} ipv6"
6378 6379
else
  echo "$ac_t""no" 1>&6
6380 6381

    echo $ac_n "checking for inet_pton in -lresolv""... $ac_c" 1>&6
6382
echo "configure:6383: checking for inet_pton in -lresolv" >&5
6383 6384 6385 6386 6387 6388 6389
ac_lib_var=`echo resolv'_'inet_pton | 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
6390
#line 6391 "configure"
6391 6392 6393 6394 6395 6396 6397 6398 6399 6400
#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_pton();

int main() {
inet_pton()
; return 0; }
EOF
6401
if { (eval echo configure:6402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6402 6403 6404 6405 6406 6407 6408 6409 6410 6411 6412 6413 6414 6415 6416 6417 6418 6419 6420 6421 6422
  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
  PLUGINS="${PLUGINS} ipv6"
       ipv6_LDFLAGS="${ipv6_LDFLAGS} -lresolv"
else
  echo "$ac_t""no" 1>&6
fi

  
6423
fi
6424

Gildas Bazin's avatar
 
Gildas Bazin committed
6425
fi
6426
if test "x${SYS}" = "xmingw32"
Gildas Bazin's avatar
 
Gildas Bazin committed
6427 6428
then
  echo $ac_n "checking for getaddrinfo in ws2tcpip.h""... $ac_c" 1>&6
6429
echo "configure:6430: checking for getaddrinfo in ws2tcpip.h" >&5
Gildas Bazin's avatar
 
Gildas Bazin committed
6430
  cat > conftest.$ac_ext <<EOF
6431
#line 6432 "configure"
Gildas Bazin's avatar
 
Gildas Bazin committed
6432 6433 6434 6435 6436 6437 6438 6439 6440 6441 6442 6443 6444 6445
#include "confdefs.h"
#include <ws2tcpip.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "addrinfo" >/dev/null 2>&1; then
  rm -rf conftest*
  echo "$ac_t""yes" 1>&6
    PLUGINS="${PLUGINS} ipv6"
else
  rm -rf conftest*
  echo "$ac_t""no" 1>&6
fi
rm -f conftest*

6446
fi
6447

6448 6449 6450
# Check whether --enable-avi or --disable-avi was given.
if test "${enable_avi+set}" = set; then
  enableval="$enable_avi"
6451 6452
  :
fi
6453

6454
if test "x${enable_avi}" != "xno"
6455 6456 6457 6458
then
  PLUGINS="${PLUGINS} avi"
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
6459 6460 6461 6462

# Check whether --with- or --without- was given.
if test "${with_+set}" = set; then
  withval="$with_"
6463 6464
  :
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
6465

Sam Hocevar's avatar
 
Sam Hocevar committed
6466

Sam Hocevar's avatar
 
Sam Hocevar committed
6467 6468 6469
# Check whether --enable-mad or --disable-mad was given.
if test "${enable_mad+set}" = set; then
  enableval="$enable_mad"
6470 6471
  :
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
6472

6473
if test "x${enable_mad}" = "xyes"
Sam Hocevar's avatar
 
Sam Hocevar committed
6474
then
6475
  # Check whether --with-mad or --without-mad was given.
Sam Hocevar's avatar
 
Sam Hocevar committed
6476 6477
if test "${with_mad+set}" = set; then
  withval="$with_mad"
6478 6479
  :
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
6480

6481
  if test "x${with_mad}" != "xno" -a "x${with_mad}" != "x"
Gildas Bazin's avatar
 
Gildas Bazin committed
6482
  then
6483 6484
    mad_CFLAGS="${mad_CFLAGS} -I${with_mad}/include"
    mad_LDFLAGS="${mad_LDFLAGS} -L${with_mad}/lib"
Gildas Bazin's avatar
 
Gildas Bazin committed
6485 6486
  fi

6487
  # Check whether --with-mad-tree or --without-mad-tree was given.
Gildas Bazin's avatar
 
Gildas Bazin committed
6488 6489
if test "${with_mad_tree+set}" = set; then
  withval="$with_mad_tree"
6490 6491
  :
fi
Gildas Bazin's avatar
 
Gildas Bazin committed
6492

6493
  if test "x${with_mad_tree}" != "xno" -a "x${with_mad_tree}" != "x"
Gildas Bazin's avatar
 
Gildas Bazin committed
6494 6495
  then
    real_mad_tree="`cd ${with_mad_tree} 2>/dev/null && pwd`"
6496
    if test "x${real_mad_tree}" = "x"
Gildas Bazin's avatar
 
Gildas Bazin committed
6497
    then
6498 6499
            echo "$ac_t""no" 1>&6
      { echo "configure: error: ${with_mad_tree} directory doesn't exist" 1>&2; exit 1; }
Gildas Bazin's avatar
 
Gildas Bazin committed
6500
    fi
6501
        echo $ac_n "checking for mad.h in ${real_mad_tree}/libmad""... $ac_c" 1>&6
6502
echo "configure:6503: checking for mad.h in ${real_mad_tree}/libmad" >&5
Gildas Bazin's avatar
 
Gildas Bazin committed
6503 6504
    if test -f ${real_mad_tree}/libmad/mad.h
    then
6505
      echo "$ac_t""yes" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
6506 6507
      mad_CFLAGS="${mad_CFLAGS} -I${real_mad_tree}/libmad"
      mad_LDFLAGS="${mad_LDFLAGS} -L${real_mad_tree}/libmad/.libs"
6508
      LDFLAGS="${save_LDFLAGS} ${mad_LDFLAGS}"
6509
      echo $ac_n "checking for mad_bit_init in -lmad""... $ac_c" 1>&6
6510
echo "configure:6511: checking for mad_bit_init in -lmad" >&5
6511 6512 6513
ac_lib_var=`echo mad'_'mad_bit_init | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
6514
else
6515
  ac_save_LIBS="$LIBS"
Gildas Bazin's avatar
 
Gildas Bazin committed
6516
LIBS="-lmad  $LIBS"
6517
cat > conftest.$ac_ext <<EOF
6518
#line 6519 "configure"
Gildas Bazin's avatar
 
Gildas Bazin committed
6519 6520 6521
#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
6522 6523 6524 6525 6526 6527 6528
    builtin and then its argument prototype would still apply.  */
char mad_bit_init();

int main() {
mad_bit_init()
; return 0; }
EOF
6529
if { (eval echo configure:6530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6530 6531 6532 6533 6534 6535 6536 6537 6538 6539
  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"
Gildas Bazin's avatar
 
Gildas Bazin committed
6540

6541 6542 6543 6544
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  
Gildas Bazin's avatar
 
Gildas Bazin committed
6545 6546
        BUILTINS="${BUILTINS} mad"
        mad_LDFLAGS="${mad_LDFLAGS} -lmad"
6547
        
Gildas Bazin's avatar
 
Gildas Bazin committed
6548
else
6549 6550 6551
  echo "$ac_t""no" 1>&6
 { echo "configure: error: the specified tree hasn't been compiled " 1>&2; exit 1; }
      
Gildas Bazin's avatar
 
Gildas Bazin committed
6552 6553
fi

6554
      LDFLAGS="${save_LDFLAGS}"
Gildas Bazin's avatar
 
Gildas Bazin committed
6555
    else
6556 6557
      echo "$ac_t""no" 1>&6
      { echo "configure: error: the specified tree doesn't have mad.h" 1>&2; exit 1; }
Gildas Bazin's avatar
 
Gildas Bazin committed
6558 6559
    fi
  else
6560 6561
    CFLAGS="${save_CFLAGS} ${mad_CFLAGS}"
    LDFLAGS="${save_LDFLAGS} ${mad_LDFLAGS}"
6562
    for ac_hdr in mad.h
6563
do
6564 6565
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6566
echo "configure:6567: checking for $ac_hdr" >&5
6567 6568
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
6569
else
6570
  cat > conftest.$ac_ext <<EOF
6571
#line 6572 "configure"
6572 6573 6574 6575
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6576
{ (eval echo configure:6577: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6577 6578 6579 6580 6581 6582 6583
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
6584
  cat conftest.$ac_ext >&5
6585 6586
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
6587
fi
6588
rm -f conftest*
6589
fi
6590 6591 6592 6593 6594 6595 6596
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
 
6597
else
6598 6599
  echo "$ac_t""no" 1>&6
{ echo "configure: error: Cannot find development headers for libmad..." 1>&2; exit 1; } 
6600 6601 6602
fi
done

6603
    echo $ac_n "checking for mad_bit_init in -lmad""... $ac_c" 1>&6
6604
echo "configure:6605: checking for mad_bit_init in -lmad" >&5
6605 6606 6607
ac_lib_var=`echo mad'_'mad_bit_init | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
6608
else
6609
  ac_save_LIBS="$LIBS"
6610
LIBS="-lmad  $LIBS"
6611
cat > conftest.$ac_ext <<EOF
6612
#line 6613 "configure"
6613 6614 6615
#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
6616 6617 6618 6619 6620 6621 6622
    builtin and then its argument prototype would still apply.  */
char mad_bit_init();

int main() {
mad_bit_init()
; return 0; }
EOF
6623
if { (eval echo configure:6624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6624 6625 6626 6627 6628 6629 6630 6631 6632 6633 6634 6635 6636 6637
  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
6638 6639 6640
  
      PLUGINS="${PLUGINS} mad"
      mad_LDFLAGS="${mad_LDFLAGS} -lmad" 
6641
else
6642 6643
  echo "$ac_t""no" 1>&6
 { echo "configure: error: Cannot find libmad library..." 1>&2; exit 1; } 
6644 6645
fi

6646 6647
    CFLAGS="${save_CFLAGS}"
    LDFLAGS="${save_LDFLAGS}"
Gildas Bazin's avatar
 
Gildas Bazin committed
6648
  fi
6649 6650
fi

6651 6652 6653
# Check whether --enable-ffmpeg or --disable-ffmpeg was given.
if test "${enable_ffmpeg+set}" = set; then
  enableval="$enable_ffmpeg"
6654 6655
  :
fi
6656

6657
if test "x${enable_ffmpeg}" = "xyes"
6658
then
6659 6660 6661 6662 6663 6664
  # Check whether --with-ffmpeg or --without-ffmpeg was given.
if test "${with_ffmpeg+set}" = set; then
  withval="$with_ffmpeg"
  :
fi

6665
  if test "x${with_ffmpeg}" != "xno" -a "x${with_ffmpeg}" != "x"
6666
  then
6667 6668
    ffmpeg_CFLAGS="${ffmpeg_CFLAGS} -I${with_ffmpeg}/include/libffmpeg"
    ffmpeg_LDFLAGS="${ffmpeg_LDFLAGS} -L${with_ffmpeg}/lib"
6669 6670
  fi

6671
  # Check whether --with-ffmpeg-tree or --without-ffmpeg-tree was given.
6672 6673
if test "${with_ffmpeg_tree+set}" = set; then
  withval="$with_ffmpeg_tree"
6674 6675
  :
fi
6676

6677
  if test "x${with_ffmpeg_tree}" != "x"
6678
  then
6679
    echo $ac_n "checking for libavcodec.a in ${with_ffmpeg_tree}""... $ac_c" 1>&6
6680
echo "configure:6681: checking for libavcodec.a in ${with_ffmpeg_tree}" >&5
6681
    real_ffmpeg_tree="`cd ${with_ffmpeg_tree} 2>/dev/null && pwd`"
6682
    if test "x${real_ffmpeg_tree}" = x
6683
    then
6684 6685
            echo "$ac_t""no" 1>&6
      { echo "configure: error: cannot cd to ${with_ffmpeg_tree}" 1>&2; exit 1; }
6686 6687 6688
    fi
    if test -f "${real_ffmpeg_tree}/libavcodec/libavcodec.a"
    then
6689
            echo "$ac_t""${real_ffmpeg_tree}/libavcodec/libavcodec.a" 1>&6
6690
      BUILTINS="${BUILTINS} ffmpeg"
6691
      ffmpeg_LDFLAGS="${ffmpeg_LDFLAGS} ${real_ffmpeg_tree}/libavcodec/libavcodec.a -lm"
6692 6693
      ffmpeg_CFLAGS="${ffmpeg_CFLAGS} -I${real_ffmpeg_tree}/libavcodec"
    else
6694 6695
            echo "$ac_t""no" 1>&6
      { echo "configure: error: cannot find ${real_ffmpeg_tree}/libavcodec/libavcodec.a, make sure you compiled libavcodec in ${with_ffmpeg_tree}" 1>&2; exit 1; }
6696
    fi
6697
  else
6698 6699
    CFLAGS="${save_CFLAGS} ${ffmpeg_CFLAGS}"
    LDFLAGS="${save_LDFLAGS} ${ffmpeg_LDFLAGS} -lm"
6700
    echo $ac_n "checking for avcodec_init in -lavcodec""... $ac_c" 1>&6
6701
echo "configure:6702: checking for avcodec_init in -lavcodec" >&5
6702 6703 6704 6705 6706 6707 6708
ac_lib_var=`echo avcodec'_'avcodec_init | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-lavcodec  $LIBS"
cat > conftest.$ac_ext <<EOF
6709
#line 6710 "configure"
6710 6711 6712 6713 6714 6715 6716 6717 6718 6719
#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 avcodec_init();

int main() {
avcodec_init()
; return 0; }
EOF
6720
if { (eval echo configure:6721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6721 6722 6723 6724 6725 6726 6727 6728 6729 6730 6731 6732 6733 6734
  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
6735 6736
  
      BUILTINS="${BUILTINS} ffmpeg"
6737
      ffmpeg_LDFLAGS="${ffmpeg_LDFLAGS} -lavcodec -lm" 
6738 6739 6740 6741 6742
else
  echo "$ac_t""no" 1>&6
 { echo "configure: error: Cannot find libavcodec library..." 1>&2; exit 1; } 
fi

6743 6744
    LDFLAGS="${save_LDFLAGS}"
    CFLAGS="${save_CFLAGS}"
6745 6746 6747
  fi
fi

6748 6749 6750 6751 6752 6753 6754 6755 6756 6757
# Check whether --enable-mp4 or --disable-mp4 was given.
if test "${enable_mp4+set}" = set; then
  enableval="$enable_mp4"
  :
fi

if test "x${enable_mp4}" = "xyes"
then
    ac_safe=`echo "zlib.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for zlib.h""... $ac_c" 1>&6
6758
echo "configure:6759: checking for zlib.h" >&5
6759 6760 6761 6762
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
6763
#line 6764 "configure"
6764 6765 6766 6767
#include "confdefs.h"
#include <zlib.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6768
{ (eval echo configure:6769: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6769 6770 6771 6772 6773 6774 6775 6776 6777 6778 6779 6780 6781 6782 6783 6784
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 inflateEnd in -lz""... $ac_c" 1>&6
6785
echo "configure:6786: checking for inflateEnd in -lz" >&5
6786 6787 6788 6789 6790 6791 6792
ac_lib_var=`echo z'_'inflateEnd | 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="-lz  $LIBS"
cat > conftest.$ac_ext <<EOF
6793
#line 6794 "configure"
6794 6795 6796 6797 6798 6799 6800 6801 6802 6803
#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 inflateEnd();

int main() {
inflateEnd()
; return 0; }
EOF
6804
if { (eval echo configure:6805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6805 6806 6807 6808 6809 6810 6811 6812 6813 6814 6815 6816 6817 6818 6819 6820 6821 6822 6823 6824 6825 6826 6827 6828 6829 6830 6831
  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
   PLUGINS="${PLUGINS} mp4"
              mp4_LDFLAGS="${mp4_LDFLAGS} -lz" 
else
  echo "$ac_t""no" 1>&6
 { echo "configure: error: cannot find zlib library..." 1>&2; exit 1; } 
fi

else
  echo "$ac_t""no" 1>&6
  { echo "configure: error: cannot find zlib header..." 1>&2; exit 1; } 
fi

fi
6832

6833
if test "x${SYS}" = "xbeos"
Sam Hocevar's avatar
 
Sam Hocevar committed
6834
then
Sam Hocevar's avatar
 
Sam Hocevar committed
6835
    PLUGINS="${PLUGINS} beos"
Sam Hocevar's avatar
 
Sam Hocevar committed
6836
fi
6837

Sam Hocevar's avatar
 
Sam Hocevar committed
6838 6839 6840
# Check whether --enable-a52 or --disable-a52 was given.
if test "${enable_a52+set}" = set; then
  enableval="$enable_a52"
6841 6842
  :
fi
6843

6844
if test "x${enable_a52}" != "xno"
Gildas Bazin's avatar
 
Gildas Bazin committed
6845
then
6846
  # Check whether --with-a52-tree or --without-a52-tree was given.
Gildas Bazin's avatar
 
Gildas Bazin committed
6847 6848
if test "${with_a52_tree+set}" = set; then
  withval="$with_a52_tree"
6849 6850
  :
fi
Gildas Bazin's avatar
 
Gildas Bazin committed
6851

6852
  if test "x${with_a52_tree}" != "xno" -a "x${with_a52_tree}" != "x"
Sam Hocevar's avatar
 
Sam Hocevar committed
6853
  then
Gildas Bazin's avatar
 
Gildas Bazin committed
6854
    real_a52_tree="`cd ${with_a52_tree} 2>/dev/null && pwd`"
6855
    if test "x${real_a52_tree}" = "x"
Gildas Bazin's avatar
 
Gildas Bazin committed
6856
    then
6857 6858
            echo "$ac_t""no" 1>&6
      { echo "configure: error: ${with_a52_tree} directory doesn't exist" 1>&2; exit 1; }
Gildas Bazin's avatar
 
Gildas Bazin committed
6859
    fi
6860
        echo $ac_n "checking for a52.h in ${real_a52_tree}/include""... $ac_c" 1>&6
6861
echo "configure:6862: checking for a52.h in ${real_a52_tree}/include" >&5
Gildas Bazin's avatar
 
Gildas Bazin committed
6862 6863
    if test -f ${real_a52_tree}/include/a52.h
    then
6864
      echo "$ac_t""yes" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
6865 6866
      a52_CFLAGS="${a52_CFLAGS} -I${real_a52_tree}"
      a52_LDFLAGS="${a52_LDFLAGS} -L${real_a52_tree}/liba52/.libs"
6867
      LDFLAGS="${save_LDFLAGS} ${a52_LDFLAGS}"
6868
      echo $ac_n "checking for a52_free in -la52""... $ac_c" 1>&6
6869
echo "configure:6870: checking for a52_free in -la52" >&5
6870 6871 6872
ac_lib_var=`echo a52'_'a52_free | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
6873
else
6874
  ac_save_LIBS="$LIBS"
Gildas Bazin's avatar
 
Gildas Bazin committed
6875
LIBS="-la52 -lm $LIBS"
6876
cat > conftest.$ac_ext <<EOF
6877
#line 6878 "configure"
Gildas Bazin's avatar
 
Gildas Bazin committed
6878 6879 6880
#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
6881 6882 6883 6884 6885 6886 6887
    builtin and then its argument prototype would still apply.  */
char a52_free();

int main() {
a52_free()
; return 0; }
EOF
6888
if { (eval echo configure:6889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6889 6890 6891 6892 6893 6894 6895 6896 6897 6898
  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"
Gildas Bazin's avatar
 
Gildas Bazin committed
6899

6900 6901 6902 6903
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  
Gildas Bazin's avatar
 
Gildas Bazin committed
6904 6905 6906
        BUILTINS="${BUILTINS} a52"
        a52_LDFLAGS="${a52_LDFLAGS} -la52 -lm"
        a52_CFLAGS="${a52_CFLAGS} -DUSE_A52DEC_TREE"
6907
        
Gildas Bazin's avatar
 
Gildas Bazin committed
6908
else
6909
  echo "$ac_t""no" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
6910 6911 6912

        if test -f ${real_a52_tree}/liba52/.libs/liba52.a
        then
6913
          { echo "configure: error: make sure you have at least a52dec-0.7.3" 1>&2; exit 1; }
Gildas Bazin's avatar
 
Gildas Bazin committed
6914
        else
6915
          { echo "configure: error: the specified tree hasn't been compiled" 1>&2; exit 1; }
Gildas Bazin's avatar
 
Gildas Bazin committed
6916
        fi
6917
      
Gildas Bazin's avatar
 
Gildas Bazin committed
6918 6919
fi

6920
      LDFLAGS="${save_LDFLAGS}"
Gildas Bazin's avatar
 
Gildas Bazin committed
6921
    else
6922 6923
      echo "$ac_t""no" 1>&6
      { echo "configure: error: the specified tree doesn't have a52.h" 1>&2; exit 1; }
Gildas Bazin's avatar
 
Gildas Bazin committed
6924
    fi
6925
  else     for ac_hdr in a52dec/a52.h
6926
do
6927 6928
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6929
echo "configure:6930: checking for $ac_hdr" >&5
6930 6931
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
6932
else
6933
  cat > conftest.$ac_ext <<EOF
6934
#line 6935 "configure"
6935 6936 6937 6938
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6939
{ (eval echo configure:6940: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6940 6941 6942 6943 6944 6945 6946
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
6947
  cat conftest.$ac_ext >&5
6948 6949
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
Sam Hocevar's avatar
 
Sam Hocevar committed
6950
fi
6951
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
6952
fi
6953 6954 6955 6956 6957 6958 6959 6960
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
 
      echo $ac_n "checking for a52_free in -la52""... $ac_c" 1>&6
6961
echo "configure:6962: checking for a52_free in -la52" >&5
6962 6963 6964 6965 6966
ac_lib_var=`echo a52'_'a52_free | 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"
Gildas Bazin's avatar
 
Gildas Bazin committed
6967
LIBS="-la52 -lm $LIBS"
6968
cat > conftest.$ac_ext <<EOF
6969
#line 6970 "configure"
Gildas Bazin's avatar
 
Gildas Bazin committed
6970 6971 6972
#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
6973 6974 6975 6976 6977 6978 6979
    builtin and then its argument prototype would still apply.  */
char a52_free();

int main() {
a52_free()
; return 0; }
EOF
6980
if { (eval echo configure:6981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6981 6982 6983 6984 6985 6986 6987 6988 6989 6990
  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"
Gildas Bazin's avatar
 
Gildas Bazin committed
6991

6992 6993 6994 6995
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  
Gildas Bazin's avatar
 
Gildas Bazin committed
6996 6997 6998
        BUILTINS="${BUILTINS} a52"
        a52_LDFLAGS="${a52_LDFLAGS} -la52 -lm"
        a52_CFLAGS="${a52_CFLAGS}"
6999 7000 7001
      
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
7002 7003
fi

7004 7005 7006
    
else
  echo "$ac_t""no" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
7007
fi
7008
done
Gildas Bazin's avatar
 
Gildas Bazin committed
7009 7010

  fi
Sam Hocevar's avatar
 
Sam Hocevar committed
7011
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
7012

Sam Hocevar's avatar
 
Sam Hocevar committed
7013 7014 7015
# Check whether --enable-vorbis or --disable-vorbis was given.
if test "${enable_vorbis+set}" = set; then
  enableval="$enable_vorbis"
7016 7017
  :
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
7018

7019
if test "x${enable_vorbis}" != "xno"
Sam Hocevar's avatar
 
Sam Hocevar committed
7020
then
7021
  for ac_hdr in ogg/ogg.h
Sam Hocevar's avatar
 
Sam Hocevar committed
7022
do
7023 7024
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7025
echo "configure:7026: checking for $ac_hdr" >&5
7026 7027
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
7028
else
7029
  cat > conftest.$ac_ext <<EOF
7030
#line 7031 "configure"
7031 7032 7033 7034
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7035
{ (eval echo configure:7036: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7036 7037 7038 7039 7040 7041 7042
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
7043
  cat conftest.$ac_ext >&5
7044 7045
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
Sam Hocevar's avatar
 
Sam Hocevar committed
7046
fi
7047
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
7048
fi
7049 7050 7051 7052 7053 7054 7055
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
 
7056
        #PLUGINS="${PLUGINS} vorbis"
Sam Hocevar's avatar
 
Sam Hocevar committed
7057
    vorbis_LDFLAGS="${vorbis_LDFLAGS} -lvorbis"
7058 7059 7060
   
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
7061 7062 7063 7064 7065
fi
done

fi

Sam Hocevar's avatar
 
Sam Hocevar committed
7066

Sam Hocevar's avatar
 
Sam Hocevar committed
7067 7068 7069
# Check whether --with- or --without- was given.
if test "${with_+set}" = set; then
  withval="$with_"
7070 7071
  :
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
7072

Sam Hocevar's avatar
 
Sam Hocevar committed
7073

Sam Hocevar's avatar
 
Sam Hocevar committed
7074 7075 7076
# Check whether --enable-x11 or --disable-x11 was given.
if test "${enable_x11+set}" = set; then
  enableval="$enable_x11"
7077 7078
  :
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
7079

7080 7081 7082
if test "x${enable_x11}" != "xno" &&
  (test "x${SYS}" != "xmingw32" || test "x${enable_x11}" = "xyes"); then
  CPPFLAGS="${save_CPPFLAGS} -I${x_includes}"
7083
  for ac_hdr in X11/Xlib.h
7084
do
7085 7086
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7087
echo "configure:7088: checking for $ac_hdr" >&5
7088 7089
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
7090
else
7091
  cat > conftest.$ac_ext <<EOF
7092
#line 7093 "configure"
7093 7094 7095 7096
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7097
{ (eval echo configure:7098: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7098 7099 7100 7101 7102 7103 7104
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
7105
  cat conftest.$ac_ext >&5
7106 7107
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
7108
fi
7109
rm -f conftest*
7110
fi
7111 7112 7113 7114 7115 7116 7117
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
7118
    PLUGINS="${PLUGINS} x11"
7119 7120
    x11_LDFLAGS="${x11_LDFLAGS} -L${x_libraries} -lX11 -lXext"
    x11_CFLAGS="${x11_CFLAGS} -I${x_includes}"
7121 7122 7123
  
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
7124
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
7125
done
Sam Hocevar's avatar
 
Sam Hocevar committed
7126

7127
  CPPFLAGS="${save_CPPFLAGS}"
Sam Hocevar's avatar
 
Sam Hocevar committed
7128 7129
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
7130 7131 7132
# Check whether --enable-xvideo or --disable-xvideo was given.
if test "${enable_xvideo+set}" = set; then
  enableval="$enable_xvideo"
7133 7134
  :
fi
7135

7136 7137 7138
if test "x${enable_xvideo}" != "xno" &&
  (test "x${SYS}" != "xmingw32" || test "x${enable_xvideo}" = "xyes"); then
  CPPFLAGS="${save_CPPFLAGS} -I${x_includes}"
7139
  for ac_hdr in X11/extensions/Xv.h
7140
do
7141 7142
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7143
echo "configure:7144: checking for $ac_hdr" >&5
7144 7145
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
7146
else
7147
  cat > conftest.$ac_ext <<EOF
7148
#line 7149 "configure"
7149 7150 7151 7152
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7153
{ (eval echo configure:7154: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7154 7155 7156 7157 7158 7159 7160
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
7161
  cat conftest.$ac_ext >&5
7162 7163
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
7164
fi
7165
rm -f conftest*
7166
fi
7167 7168 7169 7170 7171 7172 7173
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
 
7174
    CFLAGS="${save_CFLAGS} -L${x_libraries} -lX11 -lXext"
7175
    echo $ac_n "checking for XvPutImage in -lXv_pic""... $ac_c" 1>&6
7176
echo "configure:7177: checking for XvPutImage in -lXv_pic" >&5
7177
ac_lib_var=`echo Xv_pic'_'XvPutImage | sed 'y%./+-%__p_%'`
7178 7179
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
7180
else
7181
  ac_save_LIBS="$LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
7182
LIBS="-lXv_pic  $LIBS"
7183
cat > conftest.$ac_ext <<EOF
7184
#line 7185 "configure"
Gildas Bazin's avatar
 
Gildas Bazin committed
7185
#include "confdefs.h"
Sam Hocevar's avatar
 
Sam Hocevar committed
7186 7187
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
7188
    builtin and then its argument prototype would still apply.  */
7189
char XvPutImage();
7190 7191

int main() {
7192
XvPutImage()
7193 7194
; return 0; }
EOF
7195
if { (eval echo configure:7196: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7196 7197 7198 7199 7200 7201 7202 7203 7204 7205 7206 7207 7208 7209
  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
7210 7211
  # We have Xv_pic, that's good, we can build an xvideo.so plugin !
      PLUGINS="${PLUGINS} xvideo"
7212 7213
      xvideo_LDFLAGS="${xvideo_LDFLAGS} -L${x_libraries} -lX11 -lXext -lXv_pic"
      xvideo_CFLAGS="${xvideo_CFLAGS} -I${x_includes}"
Sam Hocevar's avatar
 
Sam Hocevar committed
7214
else
7215
  echo "$ac_t""no" 1>&6
7216
echo $ac_n "checking for XvPutImage in -lXv""... $ac_c" 1>&6
7217
echo "configure:7218: checking for XvPutImage in -lXv" >&5
7218 7219 7220 7221 7222 7223 7224
ac_lib_var=`echo Xv'_'XvPutImage | 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="-lXv  $LIBS"
cat > conftest.$ac_ext <<EOF
7225
#line 7226 "configure"
7226 7227 7228 7229 7230 7231 7232 7233 7234 7235
#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 XvPutImage();

int main() {
XvPutImage()
; return 0; }
EOF
7236
if { (eval echo configure:7237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7237 7238 7239 7240 7241 7242 7243 7244 7245 7246 7247 7248 7249 7250 7251 7252
  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
  # We don't have Xv_pic, but we have Xv, let's make xvideo.a as builtin
        PLUGINS="${PLUGINS} xvideo"
7253 7254
        xvideo_LDFLAGS="${xvideo_LDFLAGS} -L${x_libraries} -lX11 -lXext -lXv"
        xvideo_CFLAGS="${xvideo_CFLAGS} -I${x_includes}"
7255 7256 7257 7258 7259 7260 7261
else
  echo "$ac_t""no" 1>&6
# Otherwise... well, do nothing.
      
fi

    
Sam Hocevar's avatar
 
Sam Hocevar committed
7262 7263
fi

7264
    CFLAGS="${save_CFLAGS}"
7265
  
7266
  CPPFLAGS="${save_CPPFLAGS}"
7267 7268
else
  echo "$ac_t""no" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
7269 7270 7271 7272 7273
fi
done

fi

Sam Hocevar's avatar
 
Sam Hocevar committed
7274 7275 7276
# Check whether --enable-sdl or --disable-sdl was given.
if test "${enable_sdl+set}" = set; then
  enableval="$enable_sdl"
7277 7278
  :
fi
7279

7280
if test "x${enable_sdl}" != "xno"
7281
then
7282
  SDL_PATH="${PATH}"
7283
  # Check whether --with-sdl-config-path or --without-sdl-config-path was given.
7284 7285
if test "${with_sdl_config_path+set}" = set; then
  withval="$with_sdl_config_path"
7286
   if test "x${with_sdl_config_path}" != "xno"
7287
      then
7288
        SDL_PATH="${with_sdl_config_path}:${PATH}"
7289 7290 7291
      fi 
fi

7292 7293
  # Extract the first word of "sdl12-config", so it can be a program name with args.
set dummy sdl12-config; ac_word=$2
7294
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7295
echo "configure:7296: checking for $ac_word" >&5
7296 7297
if eval "test \"`echo '$''{'ac_cv_path_SDL12_CONFIG'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
7298
else
7299 7300
  case "$SDL12_CONFIG" in
  /*)
7301
  ac_cv_path_SDL12_CONFIG="$SDL12_CONFIG" # Let the user override the test with a path.
7302
  ;;
7303 7304 7305
  ?:/*)			 
  ac_cv_path_SDL12_CONFIG="$SDL12_CONFIG" # Let the user override the test with a dos path.
  ;;
7306
  *)
7307
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
7308
  ac_dummy="${SDL_PATH}"
7309 7310 7311 7312 7313 7314 7315 7316
  for ac_dir in $ac_dummy; do 
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_SDL12_CONFIG="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
7317
  test -z "$ac_cv_path_SDL12_CONFIG" && ac_cv_path_SDL12_CONFIG="no"
7318 7319 7320
  ;;
esac
fi
7321
SDL12_CONFIG="$ac_cv_path_SDL12_CONFIG"
7322
if test -n "$SDL12_CONFIG"; then
7323
  echo "$ac_t""$SDL12_CONFIG" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
7324
else
7325
  echo "$ac_t""no" 1>&6
7326
fi
7327

7328
  SDL_CONFIG="${SDL12_CONFIG}"
7329
  SDL_HEADER="SDL12/SDL.h"
7330
  if test "x${SDL_CONFIG}" = "xno"
Sam Hocevar's avatar
 
Sam Hocevar committed
7331
  then
7332 7333
    # Extract the first word of "sdl11-config", so it can be a program name with args.
set dummy sdl11-config; ac_word=$2
7334
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7335
echo "configure:7336: checking for $ac_word" >&5
7336 7337
if eval "test \"`echo '$''{'ac_cv_path_SDL11_CONFIG'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
7338
else
7339 7340
  case "$SDL11_CONFIG" in
  /*)
Sam Hocevar's avatar
 
Sam Hocevar committed
7341
  ac_cv_path_SDL11_CONFIG="$SDL11_CONFIG" # Let the user override the test with a path.
7342
  ;;
7343 7344 7345
  ?:/*)			 
  ac_cv_path_SDL11_CONFIG="$SDL11_CONFIG" # Let the user override the test with a dos path.
  ;;
7346
  *)
7347
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
7348
  ac_dummy="${SDL_PATH}"
7349 7350 7351 7352 7353 7354 7355 7356
  for ac_dir in $ac_dummy; do 
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_SDL11_CONFIG="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
Sam Hocevar's avatar
 
Sam Hocevar committed
7357
  test -z "$ac_cv_path_SDL11_CONFIG" && ac_cv_path_SDL11_CONFIG="no"
7358 7359
  ;;
esac
7360
fi
7361
SDL11_CONFIG="$ac_cv_path_SDL11_CONFIG"
Sam Hocevar's avatar
 
Sam Hocevar committed
7362
if test -n "$SDL11_CONFIG"; then
7363
  echo "$ac_t""$SDL11_CONFIG" 1>&6
7364
else
7365
  echo "$ac_t""no" 1>&6
7366 7367
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
7368
    SDL_CONFIG=${SDL11_CONFIG}
7369 7370
    SDL_HEADER="SDL11/SDL.h"
  fi
7371
  if test "x${SDL_CONFIG}" = "xno"
Sam Hocevar's avatar
 
Sam Hocevar committed
7372
  then
7373 7374
    # Extract the first word of "sdl-config", so it can be a program name with args.
set dummy sdl-config; ac_word=$2
7375
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7376
echo "configure:7377: checking for $ac_word" >&5
7377 7378
if eval "test \"`echo '$''{'ac_cv_path_SDL_CONFIG'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
7379
else
7380 7381
  case "$SDL_CONFIG" in
  /*)
7382
  ac_cv_path_SDL_CONFIG="$SDL_CONFIG" # Let the user override the test with a path.
7383
  ;;
7384 7385 7386
  ?:/*)			 
  ac_cv_path_SDL_CONFIG="$SDL_CONFIG" # Let the user override the test with a dos path.
  ;;
7387
  *)
7388
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
7389
  ac_dummy="${SDL_PATH}"
7390 7391 7392 7393 7394 7395 7396 7397
  for ac_dir in $ac_dummy; do 
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_SDL_CONFIG="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
7398
  test -z "$ac_cv_path_SDL_CONFIG" && ac_cv_path_SDL_CONFIG="no"
7399 7400 7401
  ;;
esac
fi
7402
SDL_CONFIG="$ac_cv_path_SDL_CONFIG"
7403
if test -n "$SDL_CONFIG"; then
7404
  echo "$ac_t""$SDL_CONFIG" 1>&6
7405
else
7406
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
7407 7408
fi

7409
    SDL_HEADER="SDL/SDL.h"
7410
  fi
7411
  if test "x${SDL_CONFIG}" != "xno"
Sam Hocevar's avatar
 
Sam Hocevar committed
7412
  then
7413
    PLUGINS="${PLUGINS} sdl"
Sam Hocevar's avatar
 
Sam Hocevar committed
7414 7415
    sdl_CFLAGS="${sdl_CFLAGS} `${SDL_CONFIG} --cflags`"
    sdl_LDFLAGS="${sdl_LDFLAGS} `${SDL_CONFIG} --libs | sed 's,-rdynamic,,'`"
7416
    CPPFLAGS="${save_CPPFLAGS} ${sdl_CFLAGS}"
7417
    for ac_hdr in ${SDL_HEADER}
7418
do
7419 7420
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7421
echo "configure:7422: checking for $ac_hdr" >&5
7422 7423
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
7424
else
7425
  cat > conftest.$ac_ext <<EOF
7426
#line 7427 "configure"
7427 7428 7429 7430
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7431
{ (eval echo configure:7432: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7432 7433 7434 7435 7436 7437 7438
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
7439
  cat conftest.$ac_ext >&5
7440 7441
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
7442
fi
7443
rm -f conftest*
7444
fi
7445 7446 7447 7448 7449 7450 7451
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
 cat >> confdefs.h <<EOF
7452
#define SDL_INCLUDE_FILE <${SDL_HEADER}>
7453
EOF
7454

Sam Hocevar's avatar
 
Sam Hocevar committed
7455
else
7456 7457 7458 7459 7460
  echo "$ac_t""no" 1>&6
{ echo "configure: error: The development package for SDL is not installed. 
Please install it and try again. Alternatively you can also configure with 
--disable-sdl." 1>&2; exit 1; }
      
7461 7462 7463
fi
done

7464 7465
    CPPFLAGS="${save_CPPFLAGS}"
    if expr 1.1.5 \> `${SDL_CONFIG} --version` >/dev/null
Sam Hocevar's avatar
 
Sam Hocevar committed
7466
    then
7467
      { echo "configure: error: The development package for SDL is not installed.
7468
Please install it and try again. Alternatively you can also configure with
7469
--disable-sdl." 1>&2; exit 1; }
Sam Hocevar's avatar
 
Sam Hocevar committed
7470
    fi
7471
  elif test "x${enable_sdl}" =  "xyes"
Sam Hocevar's avatar
 
Sam Hocevar committed
7472
  then
7473
    { echo "configure: error: I couldn't find the SDL package. You can download libSDL
7474
from http://www.libsdl.org/, or configure with --disable-sdl. Have a nice day.
7475
    " 1>&2; exit 1; }
7476 7477
  fi
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
7478

7479 7480 7481
# Check whether --enable-directx or --disable-directx was given.
if test "${enable_directx+set}" = set; then
  enableval="$enable_directx"
7482 7483
  :
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
7484

7485
if test "x${enable_directx}" != "xno"
7486
then
7487
  if test "x${SYS}" = "xmingw32"
7488
  then
7489
    # Check whether --with-directx or --without-directx was given.
Xavier Marchesini's avatar
 
Xavier Marchesini committed
7490 7491
if test "${with_directx+set}" = set; then
  withval="$with_directx"
7492 7493
  :
fi
Gildas Bazin's avatar
 
Gildas Bazin committed
7494

7495
    if test "x${with_directx}" = "x"
7496
    then
7497
      for ac_hdr in ddraw.h
Sam Hocevar's avatar
 
Sam Hocevar committed
7498
do
7499 7500
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7501
echo "configure:7502: checking for $ac_hdr" >&5
7502 7503
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
7504
else
7505
  cat > conftest.$ac_ext <<EOF
7506
#line 7507 "configure"
7507 7508 7509 7510
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7511
{ (eval echo configure:7512: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7512 7513 7514 7515 7516 7517 7518
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
7519
  cat conftest.$ac_ext >&5
7520 7521
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
Sam Hocevar's avatar
 
Sam Hocevar committed
7522
fi
7523
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
7524
fi
7525 7526 7527 7528 7529 7530
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
7531
  PLUGINS="${PLUGINS} directx"
7532 7533 7534
        directx_LDFLAGS="${directx_LDFLAGS} -lgdi32" 
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
7535 7536 7537
fi
done

7538
    else
7539
      echo $ac_n "checking for directX headers in ${with_directx}""... $ac_c" 1>&6
7540
echo "configure:7541: checking for directX headers in ${with_directx}" >&5
7541
      if test -f ${with_directx}/ddraw.h
7542 7543
      then
        PLUGINS="${PLUGINS} directx"
Gildas Bazin's avatar
 
Gildas Bazin committed
7544
        directx_LDFLAGS="${directx_LDFLAGS} -lgdi32"
7545
        directx_CFLAGS="${directx_CFLAGS} -I${with_directx}"
7546
        echo "$ac_t""yes" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
7547
      else
7548 7549
        echo "$ac_t""no" 1>&6
        { echo "configure: error: Cannot find ${with_directx}/ddraw.h!" 1>&2; exit 1; }
Gildas Bazin's avatar
 
Gildas Bazin committed
7550
      fi
7551 7552
    fi
  fi
7553 7554
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
7555 7556 7557
# Check whether --enable-fb or --disable-fb was given.
if test "${enable_fb+set}" = set; then
  enableval="$enable_fb"
7558 7559
  :
fi
Gildas Bazin's avatar
 
Gildas Bazin committed
7560

7561
    if test "x${enable_fb}" != "xno"
Sam Hocevar's avatar
 
Sam Hocevar committed
7562
    then
7563
      for ac_hdr in linux/fb.h
Sam Hocevar's avatar
 
Sam Hocevar committed
7564
do
7565 7566
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7567
echo "configure:7568: checking for $ac_hdr" >&5
7568 7569
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
7570
else
7571
  cat > conftest.$ac_ext <<EOF
7572
#line 7573 "configure"
7573 7574 7575 7576
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7577
{ (eval echo configure:7578: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7578 7579 7580 7581 7582 7583 7584
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
7585
  cat conftest.$ac_ext >&5
7586 7587
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
Sam Hocevar's avatar
 
Sam Hocevar committed
7588
fi
7589
rm -f conftest*
Gildas Bazin's avatar
 
Gildas Bazin committed
7590
fi
7591 7592 7593 7594 7595 7596 7597
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
7598
        PLUGINS="${PLUGINS} fb"
7599 7600 7601
      
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
7602 7603
fi
done
Gildas Bazin's avatar
 
Gildas Bazin committed
7604

Sam Hocevar's avatar
 
Sam Hocevar committed
7605 7606 7607 7608 7609
    fi

# Check whether --enable-mga or --disable-mga was given.
if test "${enable_mga+set}" = set; then
  enableval="$enable_mga"
7610
   if test "x${enable_mga}" = "xyes"
Sam Hocevar's avatar
 
Sam Hocevar committed
7611
    then
Sam Hocevar's avatar
 
Sam Hocevar committed
7612
      PLUGINS="${PLUGINS} mga xmga"
7613 7614 7615
    fi 
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
7616

Sam Hocevar's avatar
 
Sam Hocevar committed
7617 7618 7619
# Check whether --enable-ggi or --disable-ggi was given.
if test "${enable_ggi+set}" = set; then
  enableval="$enable_ggi"
7620 7621
  :
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
7622

7623
if test "x${enable_ggi}" = "xyes"
Sam Hocevar's avatar
 
Sam Hocevar committed
7624 7625
then
  PLUGINS="${PLUGINS} ggi"
Sam Hocevar's avatar
 
Sam Hocevar committed
7626
  ggi_LDFLAGS="${ggi_LDFLAGS} -lggi"
7627
  # Check whether --with-ggi or --without-ggi was given.
Sam Hocevar's avatar
 
Sam Hocevar committed
7628 7629
if test "${with_ggi+set}" = set; then
  withval="$with_ggi"
7630
   if test "x${with_ggi}" != "xno" -a "x${with_ggi}" != "x"
Sam Hocevar's avatar
 
Sam Hocevar committed
7631
      then
7632 7633
        CFLAGS_GGI="${CFLAGS_GGI} -I${with_ggi}/include"
        ggi_LDFLAGS="${ggi_LDFLAGS} -L${with_ggi}/lib"
7634 7635 7636
      fi 
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
7637 7638 7639 7640 7641
fi

# Check whether --enable-glide or --disable-glide was given.
if test "${enable_glide+set}" = set; then
  enableval="$enable_glide"
7642 7643
  :
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
7644

7645
if test "x${enable_glide}" = "xyes"
Sam Hocevar's avatar
 
Sam Hocevar committed
7646 7647
then
  PLUGINS="${PLUGINS} glide"
Sam Hocevar's avatar
 
Sam Hocevar committed
7648 7649
  glide_LDFLAGS="${glide_LDFLAGS} -lglide2x -lm"
  glide_CFLAGS="${glide_CFLAGS} -I/usr/include/glide"
7650
  # Check whether --with-glide or --without-glide was given.
Christophe Massiot's avatar
Christophe Massiot committed
7651 7652
if test "${with_glide+set}" = set; then
  withval="$with_glide"
7653
   if test "x${with_glide}" != "xno" -a "x${with_glide}" != "x"
Sam Hocevar's avatar
 
Sam Hocevar committed
7654
      then
7655 7656
        glide_CFLAGS="${glide_CFLAGS} -I${with_glide}/include"
        glide_LDFLAGS="${glide_LDFLAGS} -L${with_glide}/lib"
7657 7658 7659
      fi 
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
7660
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
7661

Sam Hocevar's avatar
 
Sam Hocevar committed
7662 7663 7664
# Check whether --enable-aa or --disable-aa was given.
if test "${enable_aa+set}" = set; then
  enableval="$enable_aa"
7665 7666
  :
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
7667

7668
if test "x${enable_aa}" = "xyes"
Sam Hocevar's avatar
 
Sam Hocevar committed
7669
then
7670 7671
  ac_safe=`echo "aalib.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for aalib.h""... $ac_c" 1>&6
7672
echo "configure:7673: checking for aalib.h" >&5
7673 7674 7675 7676
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
7677
#line 7678 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
7678 7679
#include "confdefs.h"
#include <aalib.h>
7680 7681
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7682
{ (eval echo configure:7683: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7683 7684 7685 7686 7687 7688 7689
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
7690
  cat conftest.$ac_ext >&5
7691 7692
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
Sam Hocevar's avatar
 
Sam Hocevar committed
7693
fi
7694
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
7695
fi
7696 7697
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
7698 7699
  have_aa="true"
else
7700 7701
  echo "$ac_t""no" 1>&6
have_aa="false"
Sam Hocevar's avatar
 
Sam Hocevar committed
7702 7703
fi

7704
  if test "x${have_aa}" = "xtrue"
Sam Hocevar's avatar
 
Sam Hocevar committed
7705 7706
  then
    PLUGINS="${PLUGINS} aa"
Sam Hocevar's avatar
 
Sam Hocevar committed
7707
    aa_LDFLAGS="${aa_LDFLAGS} -laa"
Sam Hocevar's avatar
 
Sam Hocevar committed
7708 7709 7710
  fi
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
7711 7712 7713 7714

# Check whether --with- or --without- was given.
if test "${with_+set}" = set; then
  withval="$with_"
7715 7716
  :
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
7717

Sam Hocevar's avatar
 
Sam Hocevar committed
7718

Sam Hocevar's avatar
 
Sam Hocevar committed
7719 7720 7721
# Check whether --enable-dsp or --disable-dsp was given.
if test "${enable_dsp+set}" = set; then
  enableval="$enable_dsp"
7722 7723
  :
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
7724

Sam Hocevar's avatar
 
Sam Hocevar committed
7725

7726 7727
if test "x${enable_dsp}" != "xno" &&
  (test "x${SYS}" != "xmingw32" || test "x${enable_dsp}" = "xyes")
Sam Hocevar's avatar
 
Sam Hocevar committed
7728
then
7729
  for ac_hdr in soundcard.h sys/soundcard.h machine/soundcard.h
Sam Hocevar's avatar
 
Sam Hocevar committed
7730
do
7731 7732
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7733
echo "configure:7734: checking for $ac_hdr" >&5
7734 7735
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
7736
else
7737
  cat > conftest.$ac_ext <<EOF
7738
#line 7739 "configure"
7739 7740 7741 7742
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7743
{ (eval echo configure:7744: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7744 7745 7746 7747 7748 7749 7750
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
7751
  cat conftest.$ac_ext >&5
7752 7753
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
Sam Hocevar's avatar
 
Sam Hocevar committed
7754
fi
7755
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
7756
fi
7757 7758 7759 7760 7761 7762 7763
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
7764
    PLUGINS="${PLUGINS} dsp"
7765
    echo $ac_n "checking for main in -lossaudio""... $ac_c" 1>&6
7766
echo "configure:7767: checking for main in -lossaudio" >&5
7767 7768 7769
ac_lib_var=`echo ossaudio'_'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
Sam Hocevar's avatar
 
Sam Hocevar committed
7770
else
7771
  ac_save_LIBS="$LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
7772
LIBS="-lossaudio  $LIBS"
7773
cat > conftest.$ac_ext <<EOF
7774
#line 7775 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
7775 7776
#include "confdefs.h"

7777 7778 7779 7780
int main() {
main()
; return 0; }
EOF
7781
if { (eval echo configure:7782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7782 7783 7784 7785 7786 7787 7788 7789 7790 7791
  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"
Sam Hocevar's avatar
 
Sam Hocevar committed
7792

7793 7794 7795
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
7796
  dsp_LDFLAGS="${dsp_LDFLAGS} -lossaudio"
7797 7798
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
7799 7800
fi

7801 7802 7803
  
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
7804 7805 7806 7807 7808 7809 7810 7811
fi
done

fi

# Check whether --enable-esd or --disable-esd was given.
if test "${enable_esd+set}" = set; then
  enableval="$enable_esd"
7812
  if test "x${enable_esd}" = "xyes"
Sam Hocevar's avatar
 
Sam Hocevar committed
7813 7814 7815
   then
     # Extract the first word of "esd-config", so it can be a program name with args.
set dummy esd-config; ac_word=$2
7816
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7817
echo "configure:7818: checking for $ac_word" >&5
7818 7819
if eval "test \"`echo '$''{'ac_cv_path_ESD_CONFIG'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
7820
else
7821 7822
  case "$ESD_CONFIG" in
  /*)
Sam Hocevar's avatar
 
Sam Hocevar committed
7823 7824
  ac_cv_path_ESD_CONFIG="$ESD_CONFIG" # Let the user override the test with a path.
  ;;
7825 7826 7827
  ?:/*)			 
  ac_cv_path_ESD_CONFIG="$ESD_CONFIG" # Let the user override the test with a dos path.
  ;;
Sam Hocevar's avatar
 
Sam Hocevar committed
7828
  *)
7829 7830 7831 7832 7833 7834 7835 7836 7837 7838
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH"
  for ac_dir in $ac_dummy; do 
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_ESD_CONFIG="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
Sam Hocevar's avatar
 
Sam Hocevar committed
7839 7840 7841 7842
  test -z "$ac_cv_path_ESD_CONFIG" && ac_cv_path_ESD_CONFIG="no"
  ;;
esac
fi
7843
ESD_CONFIG="$ac_cv_path_ESD_CONFIG"
Sam Hocevar's avatar
 
Sam Hocevar committed
7844
if test -n "$ESD_CONFIG"; then
7845
  echo "$ac_t""$ESD_CONFIG" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
7846
else
7847
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
7848 7849
fi

7850
     if test "x${ESD_CONFIG}" != "xno"
7851
     then
Sam Hocevar's avatar
 
Sam Hocevar committed
7852
       PLUGINS="${PLUGINS} esd"
Sam Hocevar's avatar
 
Sam Hocevar committed
7853 7854
       esd_CFLAGS="${esd_CFLAGS} `${ESD_CONFIG} --cflags`"
       esd_LDFLAGS="${esd_LDFLAGS} `${ESD_CONFIG} --libs`"
7855
     fi
Sam Hocevar's avatar
 
Sam Hocevar committed
7856
   fi
7857 7858
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
7859

Sam Hocevar's avatar
 
Sam Hocevar committed
7860 7861 7862
# Check whether --enable-arts or --disable-arts was given.
if test "${enable_arts+set}" = set; then
  enableval="$enable_arts"
7863
  if test "x${enable_arts}" = "xyes"
Sam Hocevar's avatar
 
Sam Hocevar committed
7864 7865 7866
   then
     # Extract the first word of "artsc-config", so it can be a program name with args.
set dummy artsc-config; ac_word=$2
7867
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7868
echo "configure:7869: checking for $ac_word" >&5
7869 7870
if eval "test \"`echo '$''{'ac_cv_path_ARTS_CONFIG'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
7871
else
7872 7873
  case "$ARTS_CONFIG" in
  /*)
Sam Hocevar's avatar
 
Sam Hocevar committed
7874
  ac_cv_path_ARTS_CONFIG="$ARTS_CONFIG" # Let the user override the test with a path.
7875
  ;;
7876 7877 7878
  ?:/*)			 
  ac_cv_path_ARTS_CONFIG="$ARTS_CONFIG" # Let the user override the test with a dos path.
  ;;
7879
  *)
7880 7881 7882 7883 7884 7885 7886 7887 7888 7889
  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_ARTS_CONFIG="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
Sam Hocevar's avatar
 
Sam Hocevar committed
7890
  test -z "$ac_cv_path_ARTS_CONFIG" && ac_cv_path_ARTS_CONFIG="no"
7891 7892 7893
  ;;
esac
fi
7894
ARTS_CONFIG="$ac_cv_path_ARTS_CONFIG"
Sam Hocevar's avatar
 
Sam Hocevar committed
7895
if test -n "$ARTS_CONFIG"; then
7896
  echo "$ac_t""$ARTS_CONFIG" 1>&6
7897
else
7898
  echo "$ac_t""no" 1>&6
7899 7900
fi

7901
     if test "x${ARTS_CONFIG}" != "xno"
Sam Hocevar's avatar
 
Sam Hocevar committed
7902 7903
     then
       PLUGINS="${PLUGINS} arts"
Sam Hocevar's avatar
 
Sam Hocevar committed
7904 7905
       arts_CFLAGS="${arts_CFLAGS} `${ARTS_CONFIG} --cflags`"
       arts_LDFLAGS="${arts_LDFLAGS} `${ARTS_CONFIG} --libs `"
Sam Hocevar's avatar
 
Sam Hocevar committed
7906 7907
     fi
   fi
7908 7909
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
7910 7911 7912 7913

# Check whether --enable-alsa or --disable-alsa was given.
if test "${enable_alsa+set}" = set; then
  enableval="$enable_alsa"
7914
  if test "x${enable_alsa}" = "xyes"
Sam Hocevar's avatar
 
Sam Hocevar committed
7915
   then
7916 7917
     ac_safe=`echo "alsa/asoundlib.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for alsa/asoundlib.h""... $ac_c" 1>&6
7918
echo "configure:7919: checking for alsa/asoundlib.h" >&5
7919 7920 7921 7922
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
7923
#line 7924 "configure"
7924
#include "confdefs.h"
Sam Hocevar's avatar
 
Sam Hocevar committed
7925
#include <alsa/asoundlib.h>
7926 7927
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7928
{ (eval echo configure:7929: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7929 7930 7931 7932 7933 7934 7935
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
7936
  cat conftest.$ac_ext >&5
7937 7938
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
7939
fi
7940
rm -f conftest*
7941
fi
7942 7943 7944
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
7945
echo "configure:7946: checking for main in -lasound" >&5
7946 7947 7948
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
Sam Hocevar's avatar
 
Sam Hocevar committed
7949
else
7950
  ac_save_LIBS="$LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
7951
LIBS="-lasound  $LIBS"
7952
cat > conftest.$ac_ext <<EOF
7953
#line 7954 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
7954 7955
#include "confdefs.h"

7956 7957 7958 7959
int main() {
main()
; return 0; }
EOF
7960
if { (eval echo configure:7961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7961 7962 7963 7964 7965 7966 7967 7968 7969 7970
  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"
Sam Hocevar's avatar
 
Sam Hocevar committed
7971

7972 7973 7974
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
7975 7976
  have_alsa="true"
else
7977 7978
  echo "$ac_t""no" 1>&6
have_alsa="false"
Sam Hocevar's avatar
 
Sam Hocevar committed
7979 7980
fi

7981
else
7982 7983
  echo "$ac_t""no" 1>&6
have_alsa="false"
7984 7985
fi

7986
     if test "x${have_alsa}" = "xtrue"
Sam Hocevar's avatar
 
Sam Hocevar committed
7987 7988
     then
       PLUGINS="${PLUGINS} alsa"
Sam Hocevar's avatar
 
Sam Hocevar committed
7989
       alsa_LDFLAGS="${alsa_LDFLAGS} -lasound -lm -ldl"
Sam Hocevar's avatar
 
Sam Hocevar committed
7990 7991
     fi
   fi
7992 7993
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
7994 7995 7996 7997

# Check whether --enable-waveout or --disable-waveout was given.
if test "${enable_waveout+set}" = set; then
  enableval="$enable_waveout"
7998 7999
  :
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
8000

8001
if test "x${enable_waveout}" != "xno" -a "x${SYS}" = "xmingw32"
Sam Hocevar's avatar
 
Sam Hocevar committed
8002 8003
  then
    PLUGINS="${PLUGINS} waveout"
Sam Hocevar's avatar
 
Sam Hocevar committed
8004
    waveout_LDFLAGS="-lwinmm"
Sam Hocevar's avatar
 
Sam Hocevar committed
8005 8006 8007 8008 8009 8010
fi


# Check whether --with- or --without- was given.
if test "${with_+set}" = set; then
  withval="$with_"
8011 8012
  :
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
8013

Sam Hocevar's avatar
 
Sam Hocevar committed
8014

Sam Hocevar's avatar
 
Sam Hocevar committed
8015 8016 8017
# Check whether --enable-gtk or --disable-gtk was given.
if test "${enable_gtk+set}" = set; then
  enableval="$enable_gtk"
8018 8019
  :
fi
8020

8021
if test "x${enable_gtk}" != "xno"
Sam Hocevar's avatar
 
Sam Hocevar committed
8022
then
8023
  GTK_PATH="${PATH}"
8024
  # Check whether --with-gtk-config-path or --without-gtk-config-path was given.
8025 8026
if test "${with_gtk_config_path+set}" = set; then
  withval="$with_gtk_config_path"
8027
   if test "x${with_gtk_config_path}" != "xno"
8028
      then
8029
        GTK_PATH="${with_gtk_config_path}:${PATH}"
8030 8031 8032
      fi 
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
8033
  # look for gtk-config
Sam Hocevar's avatar
 
Sam Hocevar committed
8034 8035
  # Extract the first word of "gtk12-config", so it can be a program name with args.
set dummy gtk12-config; ac_word=$2
8036
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8037
echo "configure:8038: checking for $ac_word" >&5
8038 8039
if eval "test \"`echo '$''{'ac_cv_path_GTK12_CONFIG'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
8040
else
8041 8042
  case "$GTK12_CONFIG" in
  /*)
Sam Hocevar's avatar
 
Sam Hocevar committed
8043 8044
  ac_cv_path_GTK12_CONFIG="$GTK12_CONFIG" # Let the user override the test with a path.
  ;;
8045 8046 8047
  ?:/*)			 
  ac_cv_path_GTK12_CONFIG="$GTK12_CONFIG" # Let the user override the test with a dos path.
  ;;
Sam Hocevar's avatar
 
Sam Hocevar committed
8048
  *)
8049
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
8050
  ac_dummy="${GTK_PATH}"
8051 8052 8053 8054 8055 8056 8057 8058
  for ac_dir in $ac_dummy; do 
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_GTK12_CONFIG="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
Sam Hocevar's avatar
 
Sam Hocevar committed
8059 8060 8061 8062
  test -z "$ac_cv_path_GTK12_CONFIG" && ac_cv_path_GTK12_CONFIG="no"
  ;;
esac
fi
8063
GTK12_CONFIG="$ac_cv_path_GTK12_CONFIG"
Sam Hocevar's avatar
 
Sam Hocevar committed
8064
if test -n "$GTK12_CONFIG"; then
8065
  echo "$ac_t""$GTK12_CONFIG" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
8066
else
8067
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
8068 8069 8070
fi

  GTK_CONFIG=${GTK12_CONFIG}
8071
  if test "x${GTK_CONFIG}" = "xno"
Sam Hocevar's avatar
 
Sam Hocevar committed
8072 8073 8074
  then
    # Extract the first word of "gtk-config", so it can be a program name with args.
set dummy gtk-config; ac_word=$2
8075
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8076
echo "configure:8077: checking for $ac_word" >&5
8077 8078
if eval "test \"`echo '$''{'ac_cv_path_GTK_CONFIG'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
8079
else
8080 8081
  case "$GTK_CONFIG" in
  /*)
Sam Hocevar's avatar
 
Sam Hocevar committed
8082 8083
  ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a path.
  ;;
8084 8085 8086
  ?:/*)			 
  ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a dos path.
  ;;
Sam Hocevar's avatar
 
Sam Hocevar committed
8087
  *)
8088
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
8089
  ac_dummy="${GTK_PATH}"
8090 8091 8092 8093 8094 8095 8096 8097
  for ac_dir in $ac_dummy; do 
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_GTK_CONFIG="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
Sam Hocevar's avatar
 
Sam Hocevar committed
8098 8099 8100 8101
  test -z "$ac_cv_path_GTK_CONFIG" && ac_cv_path_GTK_CONFIG="no"
  ;;
esac
fi
8102
GTK_CONFIG="$ac_cv_path_GTK_CONFIG"
Sam Hocevar's avatar
 
Sam Hocevar committed
8103
if test -n "$GTK_CONFIG"; then
8104
  echo "$ac_t""$GTK_CONFIG" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
8105
else
8106
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
8107 8108
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
8109
  fi
8110
  if test "x${GTK_CONFIG}" != "xno"
Sam Hocevar's avatar
 
Sam Hocevar committed
8111
  then
8112
    if expr 1.2.0 \> `${GTK_CONFIG} --version` >/dev/null
Sam Hocevar's avatar
 
Sam Hocevar committed
8113
    then
8114
      { echo "configure: error: Your development package for Gtk+ is too old, you need at least version 1.2.0. Please upgrade and try again. Alternatively you can also configure with --disable-gtk." 1>&2; exit 1; }
Sam Hocevar's avatar
 
Sam Hocevar committed
8115
    fi
Sam Hocevar's avatar
 
Sam Hocevar committed
8116 8117
    gtk_CFLAGS="${gtk_CFLAGS} `${GTK_CONFIG} --cflags gtk`"
    gtk_LDFLAGS="${gtk_LDFLAGS} `${GTK_CONFIG} --libs gtk | sed 's,-rdynamic,,'`"
Sam Hocevar's avatar
 
Sam Hocevar committed
8118
    # now look for the gtk.h header
8119
    CPPFLAGS="${save_CPPFLAGS} ${gtk_CFLAGS}"
Sam Hocevar's avatar
 
Sam Hocevar committed
8120
    ac_cv_gtk_headers=yes
8121
    for ac_hdr in gtk/gtk.h glib.h gdk/gdk.h
Sam Hocevar's avatar
 
Sam Hocevar committed
8122
do
8123 8124
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8125
echo "configure:8126: checking for $ac_hdr" >&5
8126 8127
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
8128
else
8129
  cat > conftest.$ac_ext <<EOF
8130
#line 8131 "configure"
8131 8132 8133 8134
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8135
{ (eval echo configure:8136: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8136 8137 8138 8139 8140 8141 8142
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
8143
  cat conftest.$ac_ext >&5
8144 8145
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
Sam Hocevar's avatar
 
Sam Hocevar committed
8146
fi
8147
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
8148
fi
8149 8150 8151 8152 8153 8154 8155
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
8156
else
8157 8158
  echo "$ac_t""no" 1>&6
ac_cv_gtk_headers=no
Sam Hocevar's avatar
 
Sam Hocevar committed
8159
      echo "Cannot find gtk development headers."
8160
    
Sam Hocevar's avatar
 
Sam Hocevar committed
8161 8162 8163
fi
done

8164
    if test "x${ac_cv_gtk_headers}" = "xyes"
Sam Hocevar's avatar
 
Sam Hocevar committed
8165 8166 8167 8168
    then
      PLUGINS="${PLUGINS} gtk"
      ALIASES="${ALIASES} gvlc"
    fi
8169
    CPPFLAGS="${save_CPPFLAGS}"
8170
  fi
8171
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
8172

Sam Hocevar's avatar
 
Sam Hocevar committed
8173 8174 8175
# Check whether --enable-gnome or --disable-gnome was given.
if test "${enable_gnome+set}" = set; then
  enableval="$enable_gnome"
8176
  if test "x${enable_gnome}" = "xyes"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
8177 8178 8179
    # look for gnome-config
    # Extract the first word of "gnome-config", so it can be a program name with args.
set dummy gnome-config; ac_word=$2
8180
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8181
echo "configure:8182: checking for $ac_word" >&5
8182 8183
if eval "test \"`echo '$''{'ac_cv_path_GNOME_CONFIG'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
8184
else
8185 8186
  case "$GNOME_CONFIG" in
  /*)
Sam Hocevar's avatar
 
Sam Hocevar committed
8187 8188
  ac_cv_path_GNOME_CONFIG="$GNOME_CONFIG" # Let the user override the test with a path.
  ;;
8189 8190 8191
  ?:/*)			 
  ac_cv_path_GNOME_CONFIG="$GNOME_CONFIG" # Let the user override the test with a dos path.
  ;;
Sam Hocevar's avatar
 
Sam Hocevar committed
8192
  *)
8193 8194 8195 8196 8197 8198 8199 8200 8201 8202
  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_GNOME_CONFIG="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
Sam Hocevar's avatar
 
Sam Hocevar committed
8203 8204 8205 8206
  test -z "$ac_cv_path_GNOME_CONFIG" && ac_cv_path_GNOME_CONFIG="no"
  ;;
esac
fi
8207
GNOME_CONFIG="$ac_cv_path_GNOME_CONFIG"
Sam Hocevar's avatar
 
Sam Hocevar committed
8208
if test -n "$GNOME_CONFIG"; then
8209
  echo "$ac_t""$GNOME_CONFIG" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
8210
else
8211
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
8212
fi
Henri Fallon's avatar
 
Henri Fallon committed
8213

Sam Hocevar's avatar
 
Sam Hocevar committed
8214 8215
    if test -x ${GNOME_CONFIG}
    then
Sam Hocevar's avatar
 
Sam Hocevar committed
8216 8217
       gnome_CFLAGS="${gnome_CFLAGS} `${GNOME_CONFIG} --cflags gtk gnomeui`"
       gnome_LDFLAGS="${gnome_LDFLAGS} `${GNOME_CONFIG} --libs gnomeui | sed 's,-rdynamic,,'`"
Sam Hocevar's avatar
 
Sam Hocevar committed
8218 8219
    fi
    # now look for the gnome.h header
8220
    CPPFLAGS="${save_CPPFLAGS} ${gnome_CFLAGS}"
8221
    for ac_hdr in gnome.h
8222
do
8223 8224
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8225
echo "configure:8226: checking for $ac_hdr" >&5
8226 8227
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
8228
else
8229
  cat > conftest.$ac_ext <<EOF
8230
#line 8231 "configure"
8231 8232 8233 8234
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8235
{ (eval echo configure:8236: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8236 8237 8238 8239 8240 8241 8242
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
8243
  cat conftest.$ac_ext >&5
8244 8245
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
8246
fi
8247
rm -f conftest*
8248
fi
8249 8250 8251 8252 8253 8254 8255
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
8256 8257
      PLUGINS="${PLUGINS} gnome"
      ALIASES="${ALIASES} gnome-vlc"
8258
     
Sam Hocevar's avatar
 
Sam Hocevar committed
8259
else
8260 8261 8262 8263
  echo "$ac_t""no" 1>&6
{ echo "configure: error: Can't find gnome headers. Please install the gnome
developement tools or remove the --enable-gnome option" 1>&2; exit 1; }
     
8264 8265 8266
fi
done

8267
    CPPFLAGS="${save_CPPFLAGS}"
Sam Hocevar's avatar
 
Sam Hocevar committed
8268
  fi
8269 8270
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
8271 8272 8273 8274

# Check whether --enable-qt or --disable-qt was given.
if test "${enable_qt+set}" = set; then
  enableval="$enable_qt"
8275
  if test "x${enable_qt}" = "xyes"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
8276 8277
     PLUGINS="${PLUGINS} qt"
     ALIASES="${ALIASES} qvlc"
Sam Hocevar's avatar
 
Sam Hocevar committed
8278 8279
     qt_LDFLAGS="${qt_LDFLAGS} -lqt -L${QTDIR}/lib"
     qt_CFLAGS="${qt_CFLAGS} -I/usr/include/qt -I${QTDIR}/include"
Sam Hocevar's avatar
 
Sam Hocevar committed
8280 8281 8282 8283 8284 8285 8286
     if test -x ${QTDIR}/bin/moc
     then
       MOC=${QTDIR}/bin/moc
     else
       MOC=moc
     fi
   fi
8287 8288
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
8289 8290 8291 8292

# Check whether --enable-kde or --disable-kde was given.
if test "${enable_kde+set}" = set; then
  enableval="$enable_kde"
8293
  if test "x${enable_kde}" = "xyes"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
8294 8295
     PLUGINS="${PLUGINS} kde"
     ALIASES="${ALIASES} kvlc"
Sam Hocevar's avatar
 
Sam Hocevar committed
8296 8297 8298
     kde_LDFLAGS="${kde_LDFLAGS} -L${KDEDIR}/lib -lkfile"
     kde_CFLAGS="${kde_CFLAGS} -I/usr/include/kde -I/usr/include/qt"
     kde_CFLAGS="${kde_CFLAGS} -I${KDEDIR}/include -I${QTDIR}/include"
Sam Hocevar's avatar
 
Sam Hocevar committed
8299 8300 8301 8302 8303 8304 8305
     if test -x ${QTDIR}/bin/moc
     then
       MOC=${QTDIR}/bin/moc
     else
       MOC=moc
     fi
   fi
8306 8307
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
8308 8309 8310 8311

# Check whether --enable-macosx or --disable-macosx was given.
if test "${enable_macosx+set}" = set; then
  enableval="$enable_macosx"
8312
  if test "x${enable_macosx}" = "xyes"
Sam Hocevar's avatar
 
Sam Hocevar committed
8313 8314
   then
     BUILTINS="${BUILTINS} macosx"
Jon Lech Johansen's avatar
Jon Lech Johansen committed
8315
     macosx_LDFLAGS="${macosx_LDFLAGS} -framework CoreAudio -framework AudioToolbox -framework IOKit -framework Cocoa -framework Carbon -framework AGL -framework QuickTime -lobjc -ObjC"
Sam Hocevar's avatar
 
Sam Hocevar committed
8316 8317
   fi
else
8318
  for ac_hdr in Cocoa/Cocoa.h
Sam Hocevar's avatar
 
Sam Hocevar committed
8319
do
8320 8321
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8322
echo "configure:8323: checking for $ac_hdr" >&5
8323 8324
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
8325
else
8326
  cat > conftest.$ac_ext <<EOF
8327
#line 8328 "configure"
8328 8329 8330 8331
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8332
{ (eval echo configure:8333: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8333 8334 8335 8336 8337 8338 8339
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
8340
  cat conftest.$ac_ext >&5
8341 8342
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
Sam Hocevar's avatar
 
Sam Hocevar committed
8343
fi
8344
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
8345
fi
8346 8347 8348 8349 8350 8351
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
8352
 BUILTINS="${BUILTINS} macosx"
Jon Lech Johansen's avatar
Jon Lech Johansen committed
8353
     macosx_LDFLAGS="${macosx_LDFLAGS} -framework CoreAudio -framework AudioToolbox -framework IOKit -framework Cocoa -framework Carbon -framework AGL -framework QuickTime -lobjc -ObjC"
8354 8355 8356
   
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
8357
fi
8358 8359
done

8360 8361
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
8362 8363 8364 8365

# Check whether --enable-qnx or --disable-qnx was given.
if test "${enable_qnx+set}" = set; then
  enableval="$enable_qnx"
8366 8367
  :
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
8368

8369
    if test "x${enable_qnx}" != "xno"
Sam Hocevar's avatar
 
Sam Hocevar committed
8370
    then
8371
      for ac_hdr in Ph.h
Sam Hocevar's avatar
 
Sam Hocevar committed
8372
do
8373 8374
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8375
echo "configure:8376: checking for $ac_hdr" >&5
8376 8377
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
8378
else
8379
  cat > conftest.$ac_ext <<EOF
8380
#line 8381 "configure"
8381 8382 8383 8384
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8385
{ (eval echo configure:8386: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8386 8387 8388 8389 8390 8391 8392
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
8393
  cat conftest.$ac_ext >&5
8394 8395
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
Sam Hocevar's avatar
 
Sam Hocevar committed
8396
fi
8397
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
8398
fi
8399 8400 8401 8402 8403 8404 8405
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
8406
        PLUGINS="${PLUGINS} qnx"
Sam Hocevar's avatar
 
Sam Hocevar committed
8407
        qnx_LDFLAGS="${qnx_LDFLAGS} -lasound -lph"
8408 8409 8410
      
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
8411
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
8412
done
Sam Hocevar's avatar
 
Sam Hocevar committed
8413

Sam Hocevar's avatar
 
Sam Hocevar committed
8414 8415
    fi

Sam Hocevar's avatar
 
Sam Hocevar committed
8416 8417 8418
# Check whether --enable-intfwin or --disable-intfwin was given.
if test "${enable_intfwin+set}" = set; then
  enableval="$enable_intfwin"
8419
   if test "x${enable_intfwin}" != "xno"
Sam Hocevar's avatar
 
Sam Hocevar committed
8420
  then
8421
    # Check whether --with-bcbuilder or --without-bcbuilder was given.
Sam Hocevar's avatar
 
Sam Hocevar committed
8422 8423
if test "${with_bcbuilder+set}" = set; then
  withval="$with_bcbuilder"
8424 8425
  :
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
8426

8427
    if test "x${with_bcbuilder}" != "x"
Sam Hocevar's avatar
 
Sam Hocevar committed
8428
    then
8429
      BCBUILDER="${with_bcbuilder}"
Sam Hocevar's avatar
 
Sam Hocevar committed
8430 8431
    fi
    PLUGINS="${PLUGINS} intfwin"
8432 8433 8434
  fi 
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
8435 8436 8437 8438

# Check whether --enable-ncurses or --disable-ncurses was given.
if test "${enable_ncurses+set}" = set; then
  enableval="$enable_ncurses"
8439
  if test "x${enable_ncurses}" = "xyes"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
8440
     PLUGINS="${PLUGINS} ncurses"
Sam Hocevar's avatar
 
Sam Hocevar committed
8441
     ncurses_LDFLAGS="${ncurses_LDFLAGS} -lncurses"
Sam Hocevar's avatar
 
Sam Hocevar committed
8442
   fi
8443 8444
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
8445

8446 8447 8448
# Check whether --enable-xosd or --disable-xosd was given.
if test "${enable_xosd+set}" = set; then
  enableval="$enable_xosd"
8449 8450 8451
  :
fi

8452
if test "x${enable_xosd}" = "xyes"
8453 8454 8455
then
  ac_safe=`echo "xosd.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for xosd.h""... $ac_c" 1>&6
8456
echo "configure:8457: checking for xosd.h" >&5
8457 8458 8459 8460
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
8461
#line 8462 "configure"
8462 8463 8464 8465
#include "confdefs.h"
#include <xosd.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8466
{ (eval echo configure:8467: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8467 8468 8469 8470 8471 8472 8473 8474 8475 8476 8477 8478 8479 8480
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
8481 8482
  echo "$ac_t""yes" 1>&6
  have_xosd="true"
8483 8484 8485 8486 8487
else
  echo "$ac_t""no" 1>&6
have_xosd="false"
fi

8488
  if test "x${have_xosd}" = "xtrue"
8489 8490 8491 8492 8493 8494
  then
    PLUGINS="${PLUGINS} xosd"
    xosd_LDFLAGS="${xosd_LDFLAGS} -lxosd"
  fi
fi

8495 8496 8497
# Check whether --enable-lirc or --disable-lirc was given.
if test "${enable_lirc+set}" = set; then
  enableval="$enable_lirc"
8498 8499
  :
fi
8500

8501
if test "x${enable_lirc}" = "xyes"
8502
then
8503 8504
  ac_safe=`echo "lirc/lirc_client.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for lirc/lirc_client.h""... $ac_c" 1>&6
8505
echo "configure:8506: checking for lirc/lirc_client.h" >&5
8506 8507 8508 8509
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
8510
#line 8511 "configure"
8511 8512
#include "confdefs.h"
#include <lirc/lirc_client.h>
8513 8514
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8515
{ (eval echo configure:8516: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8516 8517 8518 8519 8520 8521 8522
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
8523
  cat conftest.$ac_ext >&5
8524 8525
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
8526
fi
8527
rm -f conftest*
8528
fi
8529 8530 8531
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  echo $ac_n "checking for lirc_init in -llirc_client""... $ac_c" 1>&6
8532
echo "configure:8533: checking for lirc_init in -llirc_client" >&5
8533 8534 8535
ac_lib_var=`echo lirc_client'_'lirc_init | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
8536
else
8537
  ac_save_LIBS="$LIBS"
8538
LIBS="-llirc_client  $LIBS"
8539
cat > conftest.$ac_ext <<EOF
8540
#line 8541 "configure"
8541 8542 8543
#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
8544 8545 8546 8547 8548 8549 8550
    builtin and then its argument prototype would still apply.  */
char lirc_init();

int main() {
lirc_init()
; return 0; }
EOF
8551
if { (eval echo configure:8552: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8552 8553
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
8554
else
8555 8556 8557 8558
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
8559
fi
8560 8561
rm -f conftest*
LIBS="$ac_save_LIBS"
8562

8563 8564 8565 8566
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  have_lirc="true"
8567
else
8568 8569
  echo "$ac_t""no" 1>&6
have_lirc="false"
8570 8571
fi

8572 8573 8574 8575
else
  echo "$ac_t""no" 1>&6
have_lirc="false"
fi
8576

8577
  if test "x${have_lirc}" = "xtrue"
8578 8579
  then
    PLUGINS="${PLUGINS} lirc"
Sam Hocevar's avatar
 
Sam Hocevar committed
8580
    lirc_LDFLAGS="${lirc_LDFLAGS} -llirc_client"
8581 8582 8583
  fi
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
8584 8585 8586
# Check whether --with- or --without- was given.
if test "${with_+set}" = set; then
  withval="$with_"
8587 8588
  :
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
8589 8590 8591 8592 8593


# Check whether --with-words or --without-words was given.
if test "${with_words+set}" = set; then
  withval="$with_words"
8594 8595
  :
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
8596

8597
  case "x${with_words}" in
8598
    xbig)
Sam Hocevar's avatar
 
Sam Hocevar committed
8599 8600 8601 8602 8603 8604
      ac_cv_c_bigendian=yes
      ;;
    xlittle)
      ac_cv_c_bigendian=no
      ;;
    *)
8605
                  echo $ac_n "checking whether the byte order is big-endian""... $ac_c" 1>&6
8606
echo "configure:8607: checking whether the byte order is big-endian" >&5
8607 8608
if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
8609
else
8610
  ac_cv_c_bigendian="unknown"
Sam Hocevar's avatar
 
Sam Hocevar committed
8611 8612 8613 8614 8615 8616 8617 8618 8619
        cat >conftest.c <<EOF
        short am[] = { 0x4249, 0x4765, 0x6e44, 0x6961, 0x6e53, 0x7953, 0 };
        short ai[] = { 0x694c, 0x5454, 0x656c, 0x6e45, 0x6944, 0x6e61, 0 };
        void _a(void) { char*s = (char*)am; s = (char *)ai; }
        short ei[] = { 0x89D3, 0xe3e3, 0x8593, 0x95c5, 0x89c4, 0x9581, 0 };
        short em[] = { 0xc2c9, 0xc785, 0x95c4, 0x8981, 0x95e2, 0xa8e2, 0 };
        void _e(void) { char*s = (char*)em; s = (char*)ei; }
        int main(void) { _a(); _e(); return 0; }
EOF
8620
        
Sam Hocevar's avatar
 
Sam Hocevar committed
8621
        if test -f conftest.c
8622
        then 
Sam Hocevar's avatar
 
Sam Hocevar committed
8623
          if ${CC-cc} -c conftest.c -o conftest.o >config.log 2>&1 \
Sam Hocevar's avatar
 
Sam Hocevar committed
8624 8625 8626 8627
              && test -f conftest.o
          then
            if test "`strings conftest.o | grep BIGenDianSyS`"
            then
8628
              ac_cv_c_bigendian="yes"
Sam Hocevar's avatar
 
Sam Hocevar committed
8629 8630 8631
            fi
            if test "`strings conftest.o | grep LiTTleEnDian`"
            then
8632
              ac_cv_c_bigendian="no"
Sam Hocevar's avatar
 
Sam Hocevar committed
8633 8634 8635
            fi
          fi
        fi
8636
      
8637
fi
8638 8639

echo "$ac_t""$ac_cv_c_bigendian" 1>&6
8640
      if test "x${ac_cv_c_bigendian}" = "xunknown"
Sam Hocevar's avatar
 
Sam Hocevar committed
8641
      then
8642
        { echo "configure: error: Could not guess endianness, please use --with-words" 1>&2; exit 1; }
Sam Hocevar's avatar
 
Sam Hocevar committed
8643 8644 8645
      fi
      ;;
  esac
8646
if test "${ac_cv_c_bigendian}" = "yes"
Sam Hocevar's avatar
 
Sam Hocevar committed
8647
then
8648
  cat >> confdefs.h <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
8649
#define WORDS_BIGENDIAN 1
8650
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
8651 8652 8653

fi

Sam Hocevar's avatar
Sam Hocevar committed
8654 8655
PROFILING=0

Sam Hocevar's avatar
 
Sam Hocevar committed
8656 8657 8658 8659
GPROF=0
# Check whether --enable-gprof or --disable-gprof was given.
if test "${enable_gprof+set}" = set; then
  enableval="$enable_gprof"
8660
   if test "x${enable_gprof}" = "xyes"
Sam Hocevar's avatar
Sam Hocevar committed
8661 8662 8663 8664 8665
  then
    GPROF=1
    PROFILING="gprof"
  fi

8666 8667
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
8668 8669 8670 8671 8672

CPROF=0
# Check whether --enable-cprof or --disable-cprof was given.
if test "${enable_cprof+set}" = set; then
  enableval="$enable_cprof"
8673
   if test "x${enable_cprof}" = "xyes"
Sam Hocevar's avatar
 
Sam Hocevar committed
8674
  then
8675
    save_LDFLAGS="${save_LDFLAGS} -lcprof"; LDFLAGS="${save_LDFLAGS}"
Sam Hocevar's avatar
 
Sam Hocevar committed
8676
    CPROF=1
Sam Hocevar's avatar
Sam Hocevar committed
8677
    PROFILING="cprof"
Sam Hocevar's avatar
 
Sam Hocevar committed
8678 8679
  fi

8680 8681
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
8682 8683 8684 8685

# Check whether --enable-pth or --disable-pth was given.
if test "${enable_pth+set}" = set; then
  enableval="$enable_pth"
8686
   if test "x${enable_pth}" = "xyes"; then
8687
    echo $ac_n "checking for pth_init in -lpth""... $ac_c" 1>&6
8688
echo "configure:8689: checking for pth_init in -lpth" >&5
8689 8690 8691
ac_lib_var=`echo pth'_'pth_init | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
8692
else
8693
  ac_save_LIBS="$LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
8694
LIBS="-lpth  $LIBS"
8695
cat > conftest.$ac_ext <<EOF
8696
#line 8697 "configure"
Henri Fallon's avatar
 
Henri Fallon committed
8697
#include "confdefs.h"
Sam Hocevar's avatar
 
Sam Hocevar committed
8698 8699
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
8700 8701 8702 8703 8704 8705 8706
    builtin and then its argument prototype would still apply.  */
char pth_init();

int main() {
pth_init()
; return 0; }
EOF
8707
if { (eval echo configure:8708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8708 8709 8710 8711 8712 8713 8714 8715 8716 8717 8718 8719 8720 8721 8722 8723 8724 8725 8726
  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
    ac_tr_lib=HAVE_LIB`echo pth | sed -e 's/[^a-zA-Z0-9_]/_/g' \
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
8727 8728 8729

  LIBS="-lpth $LIBS"

8730 8731
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
8732 8733
fi

8734
    cat > conftest.$ac_ext <<EOF
8735
#line 8736 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
8736 8737
#include "confdefs.h"
#include <pth.h>
8738
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
8739 8740
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "pth_init" >/dev/null 2>&1; then
8741 8742 8743
  rm -rf conftest*
  
      cat >> confdefs.h <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
8744
#define PTH_INIT_IN_PTH_H 1
8745
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
8746 8747 8748 8749 8750 8751 8752

    THREAD_LIB="-lpth"
    fi
fi
rm -f conftest*


8753 8754
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
8755 8756 8757 8758

# Check whether --enable-st or --disable-st was given.
if test "${enable_st+set}" = set; then
  enableval="$enable_st"
8759
   if test "x${enable_st}" = "xyes"; then
8760
    echo $ac_n "checking for st_init in -lst""... $ac_c" 1>&6
8761
echo "configure:8762: checking for st_init in -lst" >&5
8762 8763 8764
ac_lib_var=`echo st'_'st_init | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Henri Fallon's avatar
 
Henri Fallon committed
8765
else
8766
  ac_save_LIBS="$LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
8767
LIBS="-lst  $LIBS"
8768
cat > conftest.$ac_ext <<EOF
8769
#line 8770 "configure"
Henri Fallon's avatar
 
Henri Fallon committed
8770
#include "confdefs.h"
Sam Hocevar's avatar
 
Sam Hocevar committed
8771 8772
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
8773 8774 8775 8776 8777 8778 8779
    builtin and then its argument prototype would still apply.  */
char st_init();

int main() {
st_init()
; return 0; }
EOF
8780
if { (eval echo configure:8781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8781 8782 8783 8784 8785 8786 8787 8788 8789 8790 8791 8792 8793 8794 8795 8796 8797 8798 8799
  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
    ac_tr_lib=HAVE_LIB`echo st | sed -e 's/[^a-zA-Z0-9_]/_/g' \
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
8800 8801

  LIBS="-lst $LIBS"
Henri Fallon's avatar
 
Henri Fallon committed
8802

8803 8804
else
  echo "$ac_t""no" 1>&6
Henri Fallon's avatar
 
Henri Fallon committed
8805
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
8806

8807
    cat > conftest.$ac_ext <<EOF
8808
#line 8809 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
8809 8810
#include "confdefs.h"
#include <st.h>
8811
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
8812 8813
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "st_init" >/dev/null 2>&1; then
8814 8815 8816
  rm -rf conftest*
  
      cat >> confdefs.h <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
8817
#define ST_INIT_IN_ST_H 1
8818
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
8819 8820 8821

    THREAD_LIB="-lst"
    fi
Sam Hocevar's avatar
 
Sam Hocevar committed
8822
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
8823
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
8824

Sam Hocevar's avatar
 
Sam Hocevar committed
8825

8826 8827
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
8828

Sam Hocevar's avatar
Sam Hocevar committed
8829 8830
vlc_LDFLAGS="${vlc_LDFLAGS} ${THREAD_LIB}"
plugins_LDFLAGS="${plugins_LDFLAGS} ${THREAD_LIB}"
Sam Hocevar's avatar
 
Sam Hocevar committed
8831

8832 8833 8834 8835 8836 8837 8838
MOZILLA=0
# Check whether --enable-mozilla or --disable-mozilla was given.
if test "${enable_mozilla+set}" = set; then
  enableval="$enable_mozilla"
  :
fi

8839
if test "x${enable_mozilla}" = "xyes"
8840 8841 8842 8843
then
  # Extract the first word of "mozilla-config", so it can be a program name with args.
set dummy mozilla-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8844
echo "configure:8845: checking for $ac_word" >&5
8845 8846 8847 8848 8849 8850 8851 8852 8853 8854 8855 8856 8857 8858 8859 8860 8861 8862 8863 8864 8865 8866 8867 8868 8869 8870 8871 8872 8873 8874 8875 8876
if eval "test \"`echo '$''{'ac_cv_path_MOZILLA_CONFIG'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$MOZILLA_CONFIG" in
  /*)
  ac_cv_path_MOZILLA_CONFIG="$MOZILLA_CONFIG" # Let the user override the test with a path.
  ;;
  ?:/*)			 
  ac_cv_path_MOZILLA_CONFIG="$MOZILLA_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_MOZILLA_CONFIG="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  test -z "$ac_cv_path_MOZILLA_CONFIG" && ac_cv_path_MOZILLA_CONFIG="no"
  ;;
esac
fi
MOZILLA_CONFIG="$ac_cv_path_MOZILLA_CONFIG"
if test -n "$MOZILLA_CONFIG"; then
  echo "$ac_t""$MOZILLA_CONFIG" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

8877
  if test "x${MOZILLA_CONFIG}" != "xno"
8878 8879 8880 8881 8882 8883 8884
  then
    MOZILLA=1
    mozilla_CFLAGS="${mozilla_CFLAGS} `${MOZILLA_CONFIG} --cflags plugin java --defines | xargs`"
    mozilla_LDFLAGS="${mozilla_LDFLAGS} `${MOZILLA_CONFIG} --libs `"
  fi
fi

8885 8886 8887
# Check whether --enable-plugins or --disable-plugins was given.
if test "${enable_plugins+set}" = set; then
  enableval="$enable_plugins"
8888
  if test "x${enable_plugins}" = "xno"
8889 8890 8891 8892
   then
     BUILTINS="${BUILTINS} ${PLUGINS}"
     PLUGINS=
   fi
8893 8894
fi

8895

8896
if test "x${ac_cv_header_dlfcn_h}" = "xno" -a "x${ac_cv_header_image_h}" = "xno" -a "x${SYS}" != "xmingw32"
8897 8898 8899 8900 8901 8902 8903
then
  echo "*** Your system doesn't have plug-in support. All plug-ins will be compiled"
  echo "as built-in"
  BUILTINS="${BUILTINS} ${PLUGINS}"
  PLUGINS=
fi

8904
cat >> confdefs.h <<EOF
8905
#define VERSION_MESSAGE "vlc ${VERSION} ${CODENAME} Copyright 1996-2002 VideoLAN"
8906
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
8907

8908
cat >> confdefs.h <<EOF
8909
#define COPYRIGHT_MESSAGE "VideoLAN Client - version ${VERSION} ${CODENAME} - (c) 1996-2002 VideoLAN"
8910
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
8911

Sam Hocevar's avatar
Sam Hocevar committed
8912
cat >> confdefs.h <<EOF
8913
#define CONFIGURE_LINE "${CONFIGURE_LINE}"
Sam Hocevar's avatar
Sam Hocevar committed
8914 8915
EOF

Sam Hocevar's avatar
 
Sam Hocevar committed
8916

Sam Hocevar's avatar
 
Sam Hocevar committed
8917
VLC_SYMBOL="`echo ${VERSION} | tr .- __`"
8918
cat >> confdefs.h <<EOF
8919
#define MODULE_SUFFIX "__MODULE_${VLC_SYMBOL}"
8920
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
8921

8922
cat >> confdefs.h <<EOF
8923
#define MODULE_SYMBOL ${VLC_SYMBOL}
8924
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
8925 8926 8927 8928 8929 8930 8931


DATA_PATH="${ac_tool_prefix}/share/videolan"

PLUGIN_PATH="${ac_tool_prefix}/share/videolan"


Sam Hocevar's avatar
Sam Hocevar committed
8932 8933 8934 8935
CPPFLAGS="${save_CPPFLAGS}"
CFLAGS="${save_CFLAGS}"
LDFLAGS="${save_LDFLAGS}"

8936 8937 8938 8939
libvlc_LDFLAGS="${vlc_LDFLAGS} ${builtins_LDFLAGS}"
for i in ${BUILTINS} ; do libvlc_LDFLAGS="${libvlc_LDFLAGS} `eval echo '$'{${i}_LDFLAGS}`" ; done


Sam Hocevar's avatar
Sam Hocevar committed
8940

8941

8942 8943 8944 8945 8946





Henri Fallon's avatar
 
Henri Fallon committed
8947 8948 8949



Christophe Massiot's avatar
Christophe Massiot committed
8950 8951 8952



Sam Hocevar's avatar
 
Sam Hocevar committed
8953 8954 8955 8956 8957 8958 8959 8960 8961 8962 8963 8964 8965 8966














Sam Hocevar's avatar
 
Sam Hocevar committed
8967

Sam Hocevar's avatar
 
Sam Hocevar committed
8968

Sam Hocevar's avatar
 
Sam Hocevar committed
8969 8970 8971 8972




Sam Hocevar's avatar
 
Sam Hocevar committed
8973

Sam Hocevar's avatar
 
Sam Hocevar committed
8974 8975


8976

Sam Hocevar's avatar
 
Sam Hocevar committed
8977

Sam Hocevar's avatar
 
Sam Hocevar committed
8978

Sam Hocevar's avatar
 
Sam Hocevar committed
8979

Sam Hocevar's avatar
 
Sam Hocevar committed
8980

Sam Hocevar's avatar
 
Sam Hocevar committed
8981

Sam Hocevar's avatar
 
Sam Hocevar committed
8982 8983 8984



Sam Hocevar's avatar
 
Sam Hocevar committed
8985

Sam Hocevar's avatar
 
Sam Hocevar committed
8986

Sam Hocevar's avatar
 
Sam Hocevar committed
8987

Sam Hocevar's avatar
 
Sam Hocevar committed
8988

Sam Hocevar's avatar
 
Sam Hocevar committed
8989

Sam Hocevar's avatar
 
Sam Hocevar committed
8990 8991


8992

Sam Hocevar's avatar
 
Sam Hocevar committed
8993

Sam Hocevar's avatar
 
Sam Hocevar committed
8994 8995 8996



8997 8998


Sam Hocevar's avatar
 
Sam Hocevar committed
8999 9000 9001



Stéphane Borel's avatar
Stéphane Borel committed
9002 9003 9004



9005

9006

9007

Sam Hocevar's avatar
 
Sam Hocevar committed
9008 9009 9010 9011 9012 9013 9014 9015 9016









9017

Sam Hocevar's avatar
 
Sam Hocevar committed
9018 9019


Sam Hocevar's avatar
 
Sam Hocevar committed
9020

Sam Hocevar's avatar
 
Sam Hocevar committed
9021

9022 9023


Sam Hocevar's avatar
 
Sam Hocevar committed
9024 9025


9026 9027


9028 9029


Sam Hocevar's avatar
 
Sam Hocevar committed
9030

Gildas Bazin's avatar
 
Gildas Bazin committed
9031

Gildas Bazin's avatar
 
Gildas Bazin committed
9032

9033 9034 9035



9036

9037

9038

9039

Sam Hocevar's avatar
 
Sam Hocevar committed
9040

9041 9042
trap '' 1 2 15
cat > confcache <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
9043 9044
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
9045 9046
# 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.
Sam Hocevar's avatar
 
Sam Hocevar committed
9047
#
9048 9049 9050 9051 9052 9053 9054 9055
# 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.
Sam Hocevar's avatar
 
Sam Hocevar committed
9056
#
9057
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
9058 9059 9060 9061 9062
# 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.
9063 9064 9065 9066 9067 9068 9069 9070 9071 9072 9073 9074 9075 9076 9077 9078 9079
(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
Sam Hocevar's avatar
 
Sam Hocevar committed
9080
  if test -w $cache_file; then
9081 9082
    echo "updating cache $cache_file"
    cat confcache > $cache_file
Sam Hocevar's avatar
 
Sam Hocevar committed
9083 9084 9085
  else
    echo "not updating unwritable cache $cache_file"
  fi
9086
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
9087
rm -f confcache
9088

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

Sam Hocevar's avatar
 
Sam Hocevar committed
9091 9092 9093
test "x$prefix" = xNONE && prefix=$ac_default_prefix
# Let make expand exec_prefix.
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9094

9095 9096 9097
# 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.
Sam Hocevar's avatar
 
Sam Hocevar committed
9098
if test "x$srcdir" = x.; then
9099
  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
Sam Hocevar's avatar
 
Sam Hocevar committed
9100 9101
fi

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

9104
DEFS=-DHAVE_CONFIG_H
9105

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

9109 9110 9111 9112 9113 9114 9115 9116
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`:
9117
#
9118
# $0 $ac_configure_args
9119
#
9120 9121
# Compiler output produced by configure, useful for debugging
# configure, is in ./config.log if it exists.
9122

9123 9124
ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
for ac_option
9125
do
9126 9127 9128 9129 9130 9131 9132 9133 9134 9135
  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 ;;
9136 9137 9138
  esac
done

9139 9140
ac_given_srcdir=$srcdir
ac_given_INSTALL="$INSTALL"
9141

9142
trap 'rm -fr `echo "Makefile.config Makefile.opts po/Makefile.in vlc-config include/defs.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
9143 9144
EOF
cat >> $CONFIG_STATUS <<EOF
9145

9146 9147 9148 9149 9150 9151 9152 9153 9154 9155 9156 9157 9158 9159 9160 9161 9162 9163 9164 9165 9166 9167 9168 9169 9170 9171 9172 9173 9174 9175 9176 9177 9178 9179 9180 9181 9182 9183 9184 9185 9186 9187 9188 9189 9190 9191 9192 9193 9194 9195 9196 9197 9198 9199 9200 9201 9202 9203 9204 9205 9206 9207 9208 9209 9210 9211 9212 9213 9214 9215 9216 9217 9218 9219 9220 9221 9222 9223 9224 9225 9226 9227 9228
# 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%@target@%$target%g
s%@target_alias@%$target_alias%g
s%@target_cpu@%$target_cpu%g
s%@target_vendor@%$target_vendor%g
s%@target_os@%$target_os%g
s%@build@%$build%g
s%@build_alias@%$build_alias%g
s%@build_cpu@%$build_cpu%g
s%@build_vendor@%$build_vendor%g
s%@build_os@%$build_os%g
s%@SET_MAKE@%$SET_MAKE%g
s%@CC@%$CC%g
s%@CPP@%$CPP%g
s%@RANLIB@%$RANLIB%g
s%@STRIP@%$STRIP%g
s%@GMAKE@%$GMAKE%g
s%@ALLOCA@%$ALLOCA%g
s%@GLIBC21@%$GLIBC21%g
s%@LIBICONV@%$LIBICONV%g
s%@USE_NLS@%$USE_NLS%g
s%@MSGFMT@%$MSGFMT%g
s%@GMSGFMT@%$GMSGFMT%g
s%@XGETTEXT@%$XGETTEXT%g
s%@INTLBISON@%$INTLBISON%g
s%@BUILD_INCLUDED_LIBINTL@%$BUILD_INCLUDED_LIBINTL%g
s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
s%@CATALOGS@%$CATALOGS%g
s%@CATOBJEXT@%$CATOBJEXT%g
s%@GMOFILES@%$GMOFILES%g
s%@INTLLIBS@%$INTLLIBS%g
s%@INTLOBJS@%$INTLOBJS%g
s%@POFILES@%$POFILES%g
s%@POSUB@%$POSUB%g
s%@DATADIRNAME@%$DATADIRNAME%g
s%@INSTOBJEXT@%$INSTOBJEXT%g
s%@GENCAT@%$GENCAT%g
s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
s%@INTL_LIBTOOL_SUFFIX_PREFIX@%$INTL_LIBTOOL_SUFFIX_PREFIX%g
s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
s%@INSTALL_DATA@%$INSTALL_DATA%g
s%@WINDRES@%$WINDRES%g
s%@SDL12_CONFIG@%$SDL12_CONFIG%g
s%@SDL11_CONFIG@%$SDL11_CONFIG%g
s%@SDL_CONFIG@%$SDL_CONFIG%g
s%@ESD_CONFIG@%$ESD_CONFIG%g
s%@ARTS_CONFIG@%$ARTS_CONFIG%g
s%@GTK12_CONFIG@%$GTK12_CONFIG%g
s%@GTK_CONFIG@%$GTK_CONFIG%g
s%@GNOME_CONFIG@%$GNOME_CONFIG%g
9229
s%@MOZILLA_CONFIG@%$MOZILLA_CONFIG%g
9230 9231
s%@DATA_PATH@%$DATA_PATH%g
s%@PLUGIN_PATH@%$PLUGIN_PATH%g
9232
s%@libvlc_LDFLAGS@%$libvlc_LDFLAGS%g
9233 9234 9235 9236 9237 9238 9239 9240 9241 9242 9243 9244 9245 9246 9247 9248 9249
s%@SYS@%$SYS%g
s%@ARCH@%$ARCH%g
s%@PLUGINS@%$PLUGINS%g
s%@BUILTINS@%$BUILTINS%g
s%@ALIASES@%$ALIASES%g
s%@DEBUG@%$DEBUG%g
s%@ASM@%$ASM%g
s%@CPROF@%$CPROF%g
s%@GPROF@%$GPROF%g
s%@OPTIMS@%$OPTIMS%g
s%@TUNING@%$TUNING%g
s%@RELEASE@%$RELEASE%g
s%@MOC@%$MOC%g
s%@BCBUILDER@%$BCBUILDER%g
s%@PACKAGE@%$PACKAGE%g
s%@VERSION@%$VERSION%g
s%@NEED_GETOPT@%$NEED_GETOPT%g
9250
s%@MOZILLA@%$MOZILLA%g
9251 9252 9253 9254 9255
s%@CFLAGS_OPTIM@%$CFLAGS_OPTIM%g
s%@CFLAGS_OPTIM_NODEBUG@%$CFLAGS_OPTIM_NODEBUG%g
s%@vlc_CFLAGS@%$vlc_CFLAGS%g
s%@plugins_CFLAGS@%$plugins_CFLAGS%g
s%@builtins_CFLAGS@%$builtins_CFLAGS%g
9256
s%@mozilla_CFLAGS@%$mozilla_CFLAGS%g
9257 9258
s%@a52_CFLAGS@%$a52_CFLAGS%g
s%@arts_CFLAGS@%$arts_CFLAGS%g
Sam Hocevar's avatar
Sam Hocevar committed
9259
s%@chroma_i420_yuy2_mmx_CFLAGS@%$chroma_i420_yuy2_mmx_CFLAGS%g
9260 9261 9262 9263 9264 9265 9266 9267 9268 9269 9270 9271 9272 9273 9274 9275 9276 9277 9278 9279 9280 9281
s%@dvd_CFLAGS@%$dvd_CFLAGS%g
s%@dvdread_CFLAGS@%$dvdread_CFLAGS%g
s%@mpeg_ts_dvbpsi_CFLAGS@%$mpeg_ts_dvbpsi_CFLAGS%g
s%@directx_CFLAGS@%$directx_CFLAGS%g
s%@esd_CFLAGS@%$esd_CFLAGS%g
s%@ffmpeg_CFLAGS@%$ffmpeg_CFLAGS%g
s%@glide_CFLAGS@%$glide_CFLAGS%g
s%@gnome_CFLAGS@%$gnome_CFLAGS%g
s%@gtk_CFLAGS@%$gtk_CFLAGS%g
s%@kde_CFLAGS@%$kde_CFLAGS%g
s%@idctaltivec_CFLAGS@%$idctaltivec_CFLAGS%g
s%@macosx_CFLAGS@%$macosx_CFLAGS%g
s%@mad_CFLAGS@%$mad_CFLAGS%g
s%@memcpyaltivec_CFLAGS@%$memcpyaltivec_CFLAGS%g
s%@motionaltivec_CFLAGS@%$motionaltivec_CFLAGS%g
s%@qt_CFLAGS@%$qt_CFLAGS%g
s%@sdl_CFLAGS@%$sdl_CFLAGS%g
s%@x11_CFLAGS@%$x11_CFLAGS%g
s%@xvideo_CFLAGS@%$xvideo_CFLAGS%g
s%@vlc_LDFLAGS@%$vlc_LDFLAGS%g
s%@plugins_LDFLAGS@%$plugins_LDFLAGS%g
s%@builtins_LDFLAGS@%$builtins_LDFLAGS%g
9282
s%@mozilla_LDFLAGS@%$mozilla_LDFLAGS%g
9283 9284 9285 9286 9287 9288 9289 9290 9291 9292 9293 9294 9295 9296
s%@a52_LDFLAGS@%$a52_LDFLAGS%g
s%@aa_LDFLAGS@%$aa_LDFLAGS%g
s%@alsa_LDFLAGS@%$alsa_LDFLAGS%g
s%@arts_LDFLAGS@%$arts_LDFLAGS%g
s%@beos_LDFLAGS@%$beos_LDFLAGS%g
s%@chroma_i420_rgb_LDFLAGS@%$chroma_i420_rgb_LDFLAGS%g
s%@directx_LDFLAGS@%$directx_LDFLAGS%g
s%@dsp_LDFLAGS@%$dsp_LDFLAGS%g
s%@dvd_LDFLAGS@%$dvd_LDFLAGS%g
s%@dvdread_LDFLAGS@%$dvdread_LDFLAGS%g
s%@mpeg_ts_dvbpsi_LDFLAGS@%$mpeg_ts_dvbpsi_LDFLAGS%g
s%@esd_LDFLAGS@%$esd_LDFLAGS%g
s%@filter_distort_LDFLAGS@%$filter_distort_LDFLAGS%g
s%@ffmpeg_LDFLAGS@%$ffmpeg_LDFLAGS%g
9297
s%@mp4_LDFLAGS@%$mp4_LDFLAGS%g
9298 9299 9300 9301
s%@ggi_LDFLAGS@%$ggi_LDFLAGS%g
s%@glide_LDFLAGS@%$glide_LDFLAGS%g
s%@gnome_LDFLAGS@%$gnome_LDFLAGS%g
s%@gtk_LDFLAGS@%$gtk_LDFLAGS%g
9302
s%@http_LDFLAGS@%$http_LDFLAGS%g
9303 9304 9305 9306 9307
s%@idctaltivec_LDFLAGS@%$idctaltivec_LDFLAGS%g
s%@imdct_LDFLAGS@%$imdct_LDFLAGS%g
s%@imdct3dn_LDFLAGS@%$imdct3dn_LDFLAGS%g
s%@imdctsse_LDFLAGS@%$imdctsse_LDFLAGS%g
s%@ipv4_LDFLAGS@%$ipv4_LDFLAGS%g
Gildas Bazin's avatar
 
Gildas Bazin committed
9308
s%@ipv6_LDFLAGS@%$ipv6_LDFLAGS%g
9309 9310 9311 9312 9313 9314 9315 9316 9317 9318 9319 9320 9321 9322 9323 9324
s%@kde_LDFLAGS@%$kde_LDFLAGS%g
s%@lirc_LDFLAGS@%$lirc_LDFLAGS%g
s%@macosx_LDFLAGS@%$macosx_LDFLAGS%g
s%@mad_LDFLAGS@%$mad_LDFLAGS%g
s%@memcpyaltivec_LDFLAGS@%$memcpyaltivec_LDFLAGS%g
s%@motionaltivec_LDFLAGS@%$motionaltivec_LDFLAGS%g
s%@ncurses_LDFLAGS@%$ncurses_LDFLAGS%g
s%@qnx_LDFLAGS@%$qnx_LDFLAGS%g
s%@qt_LDFLAGS@%$qt_LDFLAGS%g
s%@rc_LDFLAGS@%$rc_LDFLAGS%g
s%@sdl_LDFLAGS@%$sdl_LDFLAGS%g
s%@vcd_LDFLAGS@%$vcd_LDFLAGS%g
s%@vorbis_LDFLAGS@%$vorbis_LDFLAGS%g
s%@waveout_LDFLAGS@%$waveout_LDFLAGS%g
s%@x11_LDFLAGS@%$x11_LDFLAGS%g
s%@xvideo_LDFLAGS@%$xvideo_LDFLAGS%g
9325
s%@xosd_LDFLAGS@%$xosd_LDFLAGS%g
9326 9327

CEOF
9328
EOF
9329

9330 9331 9332 9333 9334 9335 9336 9337 9338 9339 9340 9341 9342 9343 9344 9345 9346 9347 9348 9349 9350 9351
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"
9352
    else
9353
      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
9354
    fi
9355 9356 9357
    ac_file=`expr $ac_file + 1`
    ac_beg=$ac_end
    ac_end=`expr $ac_end + $ac_max_sed_cmds`
9358
  fi
9359 9360 9361 9362 9363
done
if test -z "$ac_sed_cmds"; then
  ac_sed_cmds=cat
fi
EOF
9364

9365
cat >> $CONFIG_STATUS <<EOF
9366

9367
CONFIG_FILES=\${CONFIG_FILES-"Makefile.config Makefile.opts po/Makefile.in vlc-config"}
9368 9369 9370 9371 9372 9373 9374 9375
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" ;;
9376 9377
  esac

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

9380 9381 9382 9383 9384 9385 9386 9387 9388 9389 9390
  # 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
9391

9392 9393 9394 9395 9396
  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" ;;
9397
  *) # Relative path.
9398 9399
    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
    top_srcdir="$ac_dots$ac_given_srcdir" ;;
Sam Hocevar's avatar
 
Sam Hocevar committed
9400
  esac
9401

9402 9403 9404 9405
  case "$ac_given_INSTALL" in
  [/$]*) INSTALL="$ac_given_INSTALL" ;;
  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
  esac
9406

9407 9408 9409 9410 9411 9412 9413 9414
  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
9415

9416 9417 9418 9419 9420 9421 9422 9423 9424
  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*
9425 9426 9427 9428 9429

# 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.
9430 9431 9432 9433 9434 9435 9436
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'
9437
ac_uC=' '
9438 9439 9440 9441 9442 9443 9444 9445 9446 9447 9448 9449 9450 9451 9452
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
9453
  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9454 9455 9456 9457
  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" ;;
9458 9459
  esac

9460 9461 9462 9463 9464 9465 9466 9467 9468 9469 9470 9471 9472 9473 9474 9475 9476 9477 9478 9479 9480 9481
  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
9482 9483 9484 9485

# 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.
9486 9487 9488 9489 9490 9491
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.
9492 9493

rm -f conftest.tail
9494
while :
9495
do
9496 9497 9498 9499 9500 9501
  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
9502
  echo 'CEOF
9503 9504 9505 9506 9507 9508 9509
  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
9510
done
9511 9512 9513 9514 9515 9516 9517 9518 9519 9520
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
9521
  else
9522 9523 9524 9525 9526
    # 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"
9527
    fi
9528 9529
    rm -f $ac_file
    mv conftest.h $ac_file
9530
  fi
9531
fi; done
Sam Hocevar's avatar
 
Sam Hocevar committed
9532

9533 9534 9535 9536 9537 9538 9539
EOF
cat >> $CONFIG_STATUS <<EOF


EOF
cat >> $CONFIG_STATUS <<\EOF
for ac_file in $CONFIG_FILES; do
Sam Hocevar's avatar
 
Sam Hocevar committed
9540 9541 9542 9543 9544 9545 9546 9547 9548 9549 9550 9551 9552 9553 9554 9555 9556 9557 9558 9559 9560 9561 9562 9563 9564 9565 9566
        # Support "outfile[:infile[:infile...]]"
        case "$ac_file" in
          *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
        esac
        # PO directories have a Makefile.in generated from Makefile.in.in.
        case "$ac_file" in */Makefile.in)
          # Adjust a relative srcdir.
          ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
          ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
          ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
          # In autoconf-2.13 it is called $ac_given_srcdir.
          # In autoconf-2.50 it is called $srcdir.
          test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
          case "$ac_given_srcdir" in
            .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
            /*) top_srcdir="$ac_given_srcdir" ;;
            *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
          esac
          if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
            rm -f "$ac_dir/POTFILES"
            test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
            sed -e "/^#/d" -e "/^[ 	]*\$/d" -e "s,.*,     $top_srcdir/& \\\\," -e "\$s/\(.*\) \\\\/\1/" < "$ac_given_srcdir/$ac_dir/POTFILES.in" > "$ac_dir/POTFILES"
            test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
            sed -e "/POTFILES =/r $ac_dir/POTFILES" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
          fi
          ;;
        esac
9567
      done
9568

9569 9570
exit 0
EOF
9571
chmod +x $CONFIG_STATUS
9572 9573
rm -fr confdefs* $ac_clean_files
test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
Sam Hocevar's avatar
 
Sam Hocevar committed
9574

9575
chmod a+x vlc-config
9576

9577
echo "
Sam Hocevar's avatar
 
Sam Hocevar committed
9578
vlc configuration
Sam Hocevar's avatar
 
Sam Hocevar committed
9579
--------------------
Sam Hocevar's avatar
 
Sam Hocevar committed
9580
vlc version           : ${VERSION}
Sam Hocevar's avatar
 
Sam Hocevar committed
9581 9582
system                : ${SYS}
architecture          : ${ARCH}
9583
optimizations         : ${OPTIMS}
Sam Hocevar's avatar
 
Sam Hocevar committed
9584
tuning                : ${TUNING}
9585
debug mode            : ${DEBUG}
Sam Hocevar's avatar
 
Sam Hocevar committed
9586
release               : ${RELEASE}
Sam Hocevar's avatar
Sam Hocevar committed
9587
profiling             : ${PROFILING}
Sam Hocevar's avatar
 
Sam Hocevar committed
9588
need builtin getopt   : ${NEED_GETOPT}
Sam Hocevar's avatar
 
Sam Hocevar committed
9589
built-in modules      :${BUILTINS}
9590
plug-in modules       :${PLUGINS}
9591
mozilla plugin        : ${MOZILLA}
Sam Hocevar's avatar
 
Sam Hocevar committed
9592
vlc aliases           :${ALIASES}
Sam Hocevar's avatar
 
Sam Hocevar committed
9593

Sam Hocevar's avatar
 
Sam Hocevar committed
9594 9595
You may now tune Makefile.opts at your convenience, for instance to choose
which modules get compiled as plugins.
Sam Hocevar's avatar
 
Sam Hocevar committed
9596

9597
To build vlc and its plugins, type \`${VLC_MAKE}'.
Sam Hocevar's avatar
 
Sam Hocevar committed
9598
"
9599