configure 253 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 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
# 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
  --disable-altivec       disable altivec optimizations (default enabled on PPC)"
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"
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)"
67 68
ac_help="$ac_help
    --with-ffmpeg=PATH    path to ffmpeg installation"
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154
ac_help="$ac_help
    --with-ffmpeg-tree=PATH ffmpeg tree for static linking"
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
    --with-directx=PATH   Win32 DirectX headers and libraries"
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
  --enable-lirc           lirc support (default disabled)"
ac_help="$ac_help
Misc options:"
ac_help="$ac_help
  --with-words=endianness set endianness (big or little)"
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)"
ac_help="$ac_help
  --disable-plugins       make all plug-ins built-in (default plug-ins enabled)"
155 156 157 158

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

190 191 192 193 194 195 196
# 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

197 198 199
ac_prev=
for ac_option
do
200

201 202 203 204 205 206 207
  # If the previous option needs an argument, assign it.
  if test -n "$ac_prev"; then
    eval "$ac_prev=\$ac_option"
    ac_prev=
    continue
  fi

208 209 210 211
  case "$ac_option" in
  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  *) ac_optarg= ;;
  esac
212 213 214

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

215
  case "$ac_option" in
216 217 218 219

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

  -build | --build | --buil | --bui | --bu)
223
    ac_prev=build ;;
224
  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
225
    build="$ac_optarg" ;;
226 227 228 229 230 231

  -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=*)
232
    cache_file="$ac_optarg" ;;
233 234 235 236 237

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

  -disable-* | --disable-*)
241
    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
242
    # Reject names that are not valid shell variable names.
243 244 245 246 247
    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" ;;
248 249

  -enable-* | --enable-*)
250
    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
251
    # Reject names that are not valid shell variable names.
252 253 254 255 256 257
    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
      *=*) ;;
258 259
      *) ac_optarg=yes ;;
    esac
260
    eval "enable_${ac_feature}='$ac_optarg'" ;;
261 262 263 264 265 266 267 268

  -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=*)
269
    exec_prefix="$ac_optarg" ;;
270 271 272 273 274

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

275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328
  -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 ;;
329 330

  -host | --host | --hos | --ho)
331
    ac_prev=host ;;
332
  -host=* | --host=* | --hos=* | --ho=*)
333
    host="$ac_optarg" ;;
334 335 336 337 338 339

  -includedir | --includedir | --includedi | --included | --include \
  | --includ | --inclu | --incl | --inc)
    ac_prev=includedir ;;
  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
  | --includ=* | --inclu=* | --incl=* | --inc=*)
340
    includedir="$ac_optarg" ;;
341 342 343 344

  -infodir | --infodir | --infodi | --infod | --info | --inf)
    ac_prev=infodir ;;
  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
345
    infodir="$ac_optarg" ;;
346 347 348 349

  -libdir | --libdir | --libdi | --libd)
    ac_prev=libdir ;;
  -libdir=* | --libdir=* | --libdi=* | --libd=*)
350
    libdir="$ac_optarg" ;;
351 352 353 354 355 356

  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
  | --libexe | --libex | --libe)
    ac_prev=libexecdir ;;
  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
  | --libexe=* | --libex=* | --libe=*)
357
    libexecdir="$ac_optarg" ;;
358 359 360 361 362 363 364 365

  -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=*)
366
    localstatedir="$ac_optarg" ;;
367 368 369 370

  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
    ac_prev=mandir ;;
  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
371
    mandir="$ac_optarg" ;;
372 373 374 375 376 377

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

  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
378
  | --no-cr | --no-c)
379 380 381 382 383 384 385 386 387 388 389 390 391
    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=*)
392
    oldincludedir="$ac_optarg" ;;
393 394 395 396

  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
    ac_prev=prefix ;;
  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
397
    prefix="$ac_optarg" ;;
398 399 400 401 402 403

  -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=*)
404
    program_prefix="$ac_optarg" ;;
405 406 407 408 409 410

  -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=*)
411
    program_suffix="$ac_optarg" ;;
412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427

  -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=*)
428
    program_transform_name="$ac_optarg" ;;
429 430 431 432 433 434 435 436 437

  -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=*)
438
    sbindir="$ac_optarg" ;;
439 440 441 442 443 444 445 446 447 448

  -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=*)
449
    sharedstatedir="$ac_optarg" ;;
450 451 452 453

  -site | --site | --sit)
    ac_prev=site ;;
  -site=* | --site=* | --sit=*)
454
    site="$ac_optarg" ;;
455 456 457 458

  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
    ac_prev=srcdir ;;
  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
459
    srcdir="$ac_optarg" ;;
460 461 462 463 464 465

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

  -target | --target | --targe | --targ | --tar | --ta | --t)
469
    ac_prev=target ;;
470
  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
471
    target="$ac_optarg" ;;
472 473 474 475

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

476 477 478
  -version | --version | --versio | --versi | --vers)
    echo "configure generated by autoconf version 2.13"
    exit 0 ;;
479 480

  -with-* | --with-*)
481
    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
482
    # Reject names that are not valid shell variable names.
483 484 485
    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
486
    ac_package=`echo $ac_package| sed 's/-/_/g'`
487 488
    case "$ac_option" in
      *=*) ;;
489 490
      *) ac_optarg=yes ;;
    esac
491
    eval "with_${ac_package}='$ac_optarg'" ;;
492 493

  -without-* | --without-*)
494
    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
495
    # Reject names that are not valid shell variable names.
496 497 498 499 500
    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" ;;
501 502 503 504 505 506 507 508 509 510

  --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=*)
511
    x_includes="$ac_optarg" ;;
512 513 514 515 516 517

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

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

  *)
524 525 526 527 528 529 530
    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"
531 532 533 534 535 536
    ;;

  esac
done

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

540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560
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
561

562 563 564 565
# 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
566
do
567 568 569 570 571 572 573 574
  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" ;;
575 576 577
  esac
done

578 579 580 581 582 583 584 585 586
# 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
587

588 589 590 591
# 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
592

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

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

# 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
630
    echo "loading site script $ac_site_file"
631 632 633 634 635
    . "$ac_site_file"
  fi
done

if test -r "$cache_file"; then
636 637
  echo "loading cache $cache_file"
  . $cache_file
638
else
639 640
  echo "creating cache $cache_file"
  > $cache_file
641 642 643
fi

ac_ext=c
644
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
645
ac_cpp='$CPP $CPPFLAGS'
646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662
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
663 664 665



666 667 668 669 670 671 672 673 674 675 676 677 678
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
679
  { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
680
fi
681 682 683
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
684

685

686 687 688 689 690 691 692 693 694 695 696 697
# 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.
698 699 700

# The aliases save the names the user supplied, while $host etc.
# will get canonicalized.
701 702 703 704 705 706 707 708 709 710 711 712
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
713
echo "configure:714: checking host system type" >&5
714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733

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
734
echo "configure:735: checking target system type" >&5
735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751

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
752
echo "configure:753: checking build system type" >&5
753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769

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" &&
770 771 772 773
  test "$program_prefix$program_suffix$program_transform_name" = \
    NONENONEs,x,x, &&
  program_prefix=${target_alias}-

774

Sam Hocevar's avatar
 
Sam Hocevar committed
775
PACKAGE="vlc"
776
VERSION="0.4.0"
Sam Hocevar's avatar
 
Sam Hocevar committed
777
CODENAME=Ourumov
Sam Hocevar's avatar
 
Sam Hocevar committed
778

Sam Hocevar's avatar
 
Sam Hocevar committed
779
save_CFLAGS="${CFLAGS}"
Sam Hocevar's avatar
 
Sam Hocevar committed
780
save_CPPFLAGS="${CPPFLAGS}"
Sam Hocevar's avatar
 
Sam Hocevar committed
781
save_LDFLAGS="${LDFLAGS}"
Sam Hocevar's avatar
 
Sam Hocevar committed
782

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

810 811 812
# 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
813
echo "configure:814: checking for $ac_word" >&5
814 815
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
816 817 818 819
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
820 821 822 823 824 825 826 827 828 829
  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"
830 831
fi
fi
832
CC="$ac_cv_prog_CC"
833
if test -n "$CC"; then
834
  echo "$ac_t""$CC" 1>&6
835
else
836
  echo "$ac_t""no" 1>&6
837 838 839 840 841
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
842
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
843
echo "configure:844: checking for $ac_word" >&5
844 845
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
846 847 848 849
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
850
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
851
  ac_prog_rejected=no
852 853 854 855 856 857 858 859 860 861 862 863 864
  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"
865 866 867 868
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
869
  if test $# -gt 0; then
870 871 872 873
    # 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
874
    set dummy "$ac_dir/$ac_word" "$@"
875 876 877 878 879 880
    shift
    ac_cv_prog_CC="$@"
  fi
fi
fi
fi
881
CC="$ac_cv_prog_CC"
882
if test -n "$CC"; then
883
  echo "$ac_t""$CC" 1>&6
884
else
885
  echo "$ac_t""no" 1>&6
886 887
fi

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

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

928 929 930 931 932 933
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
934

935
cat > conftest.$ac_ext << EOF
936

937
#line 938 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
938 939
#include "confdefs.h"

940 941
main(){return(0);}
EOF
942
if { (eval echo configure:943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
943 944 945 946
  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
947
  else
948
    ac_cv_prog_cc_cross=yes
Sam Hocevar's avatar
 
Sam Hocevar committed
949
  fi
Sam Hocevar's avatar
 
Sam Hocevar committed
950
else
951 952 953
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  ac_cv_prog_cc_works=no
954
fi
955 956 957 958 959 960 961
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
962

963 964 965 966 967
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
968
echo "configure:969: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
969 970
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
Sam Hocevar's avatar
 
Sam Hocevar committed
971

972
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
973
echo "configure:974: checking whether we are using GNU C" >&5
974 975
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
976
else
977 978 979
  cat > conftest.c <<EOF
#ifdef __GNUC__
  yes;
Sam Hocevar's avatar
 
Sam Hocevar committed
980
#endif
981
EOF
982
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:983: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
983
  ac_cv_prog_gcc=yes
Sam Hocevar's avatar
 
Sam Hocevar committed
984
else
985
  ac_cv_prog_gcc=no
Sam Hocevar's avatar
 
Sam Hocevar committed
986
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
987 988
fi

989
echo "$ac_t""$ac_cv_prog_gcc" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
990

991 992 993 994 995
if test $ac_cv_prog_gcc = yes; then
  GCC=yes
else
  GCC=
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
996

997 998 999 1000
ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1001
echo "configure:1002: checking whether ${CC-cc} accepts -g" >&5
1002 1003 1004 1005 1006
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
1007 1008
  ac_cv_prog_cc_g=yes
else
1009
  ac_cv_prog_cc_g=no
Sam Hocevar's avatar
 
Sam Hocevar committed
1010
fi
1011 1012
rm -f conftest*

Sam Hocevar's avatar
 
Sam Hocevar committed
1013
fi
1014 1015

echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1016
if test "$ac_test_CFLAGS" = set; then
1017
  CFLAGS="$ac_save_CFLAGS"
1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030
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
1031

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

1112

1113 1114 1115 1116 1117
if test $host != $build; then
  ac_tool_prefix=${host_alias}-
else
  ac_tool_prefix=
fi
1118

1119
# 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
1120
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
1121
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1122
echo "configure:1123: checking for $ac_word" >&5
1123 1124
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
1125 1126 1127 1128
else
  if test -n "$RANLIB"; then
  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
else
1129 1130 1131 1132 1133 1134 1135 1136 1137 1138
  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
1139 1140
fi
fi
1141
RANLIB="$ac_cv_prog_RANLIB"
Gildas Bazin's avatar
 
Gildas Bazin committed
1142
if test -n "$RANLIB"; then
1143
  echo "$ac_t""$RANLIB" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
1144
else
1145
  echo "$ac_t""no" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
1146 1147
fi

1148

Gildas Bazin's avatar
 
Gildas Bazin committed
1149
if test -z "$ac_cv_prog_RANLIB"; then
1150
if test -n "$ac_tool_prefix"; then
Gildas Bazin's avatar
 
Gildas Bazin committed
1151 1152
  # Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
1153
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1154
echo "configure:1155: checking for $ac_word" >&5
1155 1156
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
1157
else
1158 1159
  if test -n "$RANLIB"; then
  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
Gildas Bazin's avatar
 
Gildas Bazin committed
1160
else
1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171
  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
1172 1173
fi
fi
1174 1175 1176
RANLIB="$ac_cv_prog_RANLIB"
if test -n "$RANLIB"; then
  echo "$ac_t""$RANLIB" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
1177
else
1178
  echo "$ac_t""no" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
1179 1180 1181
fi

else
1182 1183
  RANLIB=":"
fi
Gildas Bazin's avatar
 
Gildas Bazin committed
1184 1185
fi

1186
# 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
1187
set dummy ${ac_tool_prefix}strip; ac_word=$2
1188
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1189
echo "configure:1190: checking for $ac_word" >&5
1190 1191
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
1192 1193 1194 1195
else
  if test -n "$STRIP"; then
  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
else
1196 1197 1198 1199 1200 1201 1202 1203 1204 1205
  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
1206 1207
fi
fi
1208
STRIP="$ac_cv_prog_STRIP"
Sam Hocevar's avatar
 
Sam Hocevar committed
1209
if test -n "$STRIP"; then
1210
  echo "$ac_t""$STRIP" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1211
else
1212
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1213 1214
fi

1215

Sam Hocevar's avatar
 
Sam Hocevar committed
1216
if test -z "$ac_cv_prog_STRIP"; then
1217
if test -n "$ac_tool_prefix"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
1218 1219
  # Extract the first word of "strip", so it can be a program name with args.
set dummy strip; ac_word=$2
1220
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1221
echo "configure:1222: checking for $ac_word" >&5
1222 1223
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
1224
else
1225 1226
  if test -n "$STRIP"; then
  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
Sam Hocevar's avatar
 
Sam Hocevar committed
1227
else
1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238
  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
1239 1240
fi
fi
1241 1242 1243
STRIP="$ac_cv_prog_STRIP"
if test -n "$STRIP"; then
  echo "$ac_t""$STRIP" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1244
else
1245
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1246 1247 1248
fi

else
1249 1250
  STRIP=":"
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
1251 1252
fi

Gildas Bazin's avatar
 
Gildas Bazin committed
1253

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

if test "x$GMAKE" = "xno"; then
1291
  echo $ac_n "checking whether GNU make is installed""... $ac_c" 1>&6
1292
echo "configure:1293: checking whether GNU make is installed" >&5
1293 1294
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
1295 1296 1297 1298 1299 1300 1301 1302 1303
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
1304 1305

echo "$ac_t""$ac_cv_gmake" 1>&6
Christophe Massiot's avatar
Christophe Massiot committed
1306 1307 1308 1309 1310
  VLC_MAKE="make"
else
  VLC_MAKE="gmake"
fi

1311
ALL_LINGUAS="de en_GB fr ja no ru nl"
Sam Hocevar's avatar
Sam Hocevar committed
1312

1313
cat >> confdefs.h <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1314
#define VLC_PACKAGE "$PACKAGE"
1315
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1316

1317
cat >> confdefs.h <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1318
#define VLC_VERSION "$VERSION"
1319
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1320

1321 1322 1323
# 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
1324
echo "configure:1325: checking for $ac_word" >&5
1325 1326
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
1327 1328 1329 1330
else
  if test -n "$RANLIB"; then
  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
else
1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341
  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
1342 1343
fi
fi
1344
RANLIB="$ac_cv_prog_RANLIB"
Sam Hocevar's avatar
 
Sam Hocevar committed
1345
if test -n "$RANLIB"; then
1346
  echo "$ac_t""$RANLIB" 1>&6
1347
else
1348
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1349
fi
1350 1351


1352
        echo $ac_n "checking for strerror in -lcposix""... $ac_c" 1>&6
1353
echo "configure:1354: checking for strerror in -lcposix" >&5
1354 1355 1356
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
1357
else
1358
  ac_save_LIBS="$LIBS"
1359
LIBS="-lcposix  $LIBS"
1360
cat > conftest.$ac_ext <<EOF
1361
#line 1362 "configure"
1362 1363 1364
#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
1365 1366
    builtin and then its argument prototype would still apply.  */
char strerror();
Sam Hocevar's avatar
 
Sam Hocevar committed
1367

1368 1369 1370 1371
int main() {
strerror()
; return 0; }
EOF
1372
if { (eval echo configure:1373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1373 1374 1375 1376 1377 1378 1379 1380 1381 1382
  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
1383

1384 1385 1386 1387 1388 1389 1390
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
1391

1392
  
1393

1394
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1395
echo "configure:1396: checking for ANSI C header files" >&5
1396 1397
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
1398
else
1399
  cat > conftest.$ac_ext <<EOF
1400
#line 1401 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
1401 1402 1403 1404 1405
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <float.h>
1406 1407
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1408
{ (eval echo configure:1409: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1409 1410 1411
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
1412 1413
  ac_cv_header_stdc=yes
else
1414 1415
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
1416
  cat conftest.$ac_ext >&5
1417
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
1418 1419
  ac_cv_header_stdc=no
fi
1420
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
1421 1422 1423

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

Sam Hocevar's avatar
 
Sam Hocevar committed
1487 1488
fi
fi
1489

1490 1491 1492
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
1493
#define STDC_HEADERS 1
1494
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1495 1496 1497

fi

1498
echo $ac_n "checking for working const""... $ac_c" 1>&6
1499
echo "configure:1500: checking for working const" >&5
1500 1501 1502 1503
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
1504
#line 1505 "configure"
1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530
#include "confdefs.h"

int main() {

/* Ultrix mips cc rejects this.  */
typedef int charset[2]; const charset x;
/* 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
1531
}
1532 1533 1534 1535
{ /* 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
1536
}
1537 1538 1539 1540
{ /* 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
1541
}
1542 1543 1544 1545 1546 1547 1548
{ /* 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;
1549
}
1550 1551 1552

; return 0; }
EOF
1553
if { (eval echo configure:1554: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1554
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
1555 1556
  ac_cv_c_const=yes
else
1557 1558 1559 1560
  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
1561
fi
1562
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
1563
fi
1564

1565 1566 1567 1568 1569
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
1570 1571 1572

fi

1573
echo $ac_n "checking for inline""... $ac_c" 1>&6
1574
echo "configure:1575: checking for inline" >&5
1575 1576
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
1577 1578 1579
else
  ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
1580
  cat > conftest.$ac_ext <<EOF
1581
#line 1582 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
1582 1583
#include "confdefs.h"

1584 1585 1586 1587
int main() {
} $ac_kw foo() {
; return 0; }
EOF
1588
if { (eval echo configure:1589: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1589
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
1590 1591
  ac_cv_c_inline=$ac_kw; break
else
1592 1593
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
1594
fi
1595
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
1596 1597 1598
done

fi
1599 1600 1601

echo "$ac_t""$ac_cv_c_inline" 1>&6
case "$ac_cv_c_inline" in
Sam Hocevar's avatar
 
Sam Hocevar committed
1602
  inline | yes) ;;
1603 1604 1605
  no) cat >> confdefs.h <<\EOF
#define inline 
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1606
 ;;
1607
  *)  cat >> confdefs.h <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1608
#define inline $ac_cv_c_inline
1609
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1610 1611 1612
 ;;
esac

1613
echo $ac_n "checking for off_t""... $ac_c" 1>&6
1614
echo "configure:1615: checking for off_t" >&5
1615 1616
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
1617
else
1618
  cat > conftest.$ac_ext <<EOF
1619
#line 1620 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
1620
#include "confdefs.h"
1621 1622 1623 1624
#include <sys/types.h>
#if STDC_HEADERS
#include <stdlib.h>
#include <stddef.h>
Sam Hocevar's avatar
 
Sam Hocevar committed
1625
#endif
1626 1627 1628 1629
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
1630 1631
  ac_cv_type_off_t=yes
else
1632 1633
  rm -rf conftest*
  ac_cv_type_off_t=no
Sam Hocevar's avatar
 
Sam Hocevar committed
1634
fi
1635
rm -f conftest*
1636

1637 1638 1639 1640
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
1641
#define off_t long
1642
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1643 1644 1645

fi

1646
echo $ac_n "checking for size_t""... $ac_c" 1>&6
1647
echo "configure:1648: checking for size_t" >&5
1648 1649
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
1650
else
1651
  cat > conftest.$ac_ext <<EOF
1652
#line 1653 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
1653
#include "confdefs.h"
1654 1655 1656 1657
#include <sys/types.h>
#if STDC_HEADERS
#include <stdlib.h>
#include <stddef.h>
Sam Hocevar's avatar
 
Sam Hocevar committed
1658
#endif
1659 1660 1661 1662
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
1663 1664
  ac_cv_type_size_t=yes
else
1665 1666
  rm -rf conftest*
  ac_cv_type_size_t=no
Sam Hocevar's avatar
 
Sam Hocevar committed
1667
fi
1668
rm -f conftest*
1669

1670 1671 1672 1673
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
1674
#define size_t unsigned
1675
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1676 1677 1678 1679 1680

fi

# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments.  Useless!
1681
echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
1682
echo "configure:1683: checking for working alloca.h" >&5
1683 1684
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
1685
else
1686
  cat > conftest.$ac_ext <<EOF
1687
#line 1688 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
1688 1689
#include "confdefs.h"
#include <alloca.h>
1690 1691 1692 1693
int main() {
char *p = alloca(2 * sizeof(int));
; return 0; }
EOF
1694
if { (eval echo configure:1695: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708
  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
1709
#define HAVE_ALLOCA_H 1
1710
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1711 1712 1713

fi

1714
echo $ac_n "checking for alloca""... $ac_c" 1>&6
1715
echo "configure:1716: checking for alloca" >&5
1716 1717
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
1718
else
1719
  cat > conftest.$ac_ext <<EOF
1720
#line 1721 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
1721
#include "confdefs.h"
1722

Sam Hocevar's avatar
 
Sam Hocevar committed
1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743
#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

1744 1745 1746 1747
int main() {
char *p = (char *) alloca(1);
; return 0; }
EOF
1748
if { (eval echo configure:1749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1749
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
1750 1751
  ac_cv_func_alloca_works=yes
else
1752 1753 1754 1755
  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
1756
fi
1757
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
1758 1759
fi

1760
echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1761
if test $ac_cv_func_alloca_works = yes; then
1762
  cat >> confdefs.h <<\EOF
1763
#define HAVE_ALLOCA 1
1764
EOF
1765

1766
fi
1767

1768 1769 1770 1771 1772 1773 1774
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
1775
#define C_ALLOCA 1
1776
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1777 1778


1779
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
1780
echo "configure:1781: checking whether alloca needs Cray hooks" >&5
1781 1782
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
1783
else
1784
  cat > conftest.$ac_ext <<EOF
1785
#line 1786 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
1786 1787 1788 1789 1790 1791 1792
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
#else
wenotbecray
#endif

1793
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1794 1795
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "webecray" >/dev/null 2>&1; then
1796
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
1797 1798
  ac_cv_os_cray=yes
else
1799
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
1800 1801 1802 1803 1804
  ac_cv_os_cray=no
fi
rm -f conftest*

fi
1805 1806

echo "$ac_t""$ac_cv_os_cray" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1807
if test $ac_cv_os_cray = yes; then
1808 1809
for ac_func in _getb67 GETB67 getb67; do
  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1810
echo "configure:1811: checking for $ac_func" >&5
1811 1812
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
1813
else
1814
  cat > conftest.$ac_ext <<EOF
1815
#line 1816 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
1816 1817
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
1818
    which can conflict with char $ac_func(); below.  */
Sam Hocevar's avatar
 
Sam Hocevar committed
1819 1820 1821
#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
1822 1823 1824 1825
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
1826 1827 1828 1829 1830 1831 1832

/* 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
1833
$ac_func();
Sam Hocevar's avatar
 
Sam Hocevar committed
1834 1835
#endif

1836 1837
; return 0; }
EOF
1838
if { (eval echo configure:1839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852
  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
1853
#define CRAY_STACKSEG_END $ac_func
1854
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1855

1856 1857 1858
  break
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
1859 1860
fi

1861
done
Sam Hocevar's avatar
 
Sam Hocevar committed
1862 1863
fi

1864
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
1865
echo "configure:1866: checking stack direction for C alloca" >&5
1866 1867
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
1868 1869 1870 1871
else
  if test "$cross_compiling" = yes; then
  ac_cv_c_stack_direction=0
else
1872
  cat > conftest.$ac_ext <<EOF
1873
#line 1874 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888
#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 ()
{
1889
  exit (find_stack_direction() < 0);
Sam Hocevar's avatar
 
Sam Hocevar committed
1890
}
1891
EOF
1892
if { (eval echo configure:1893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1893
then
Sam Hocevar's avatar
 
Sam Hocevar committed
1894 1895
  ac_cv_c_stack_direction=1
else
1896 1897 1898 1899
  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
1900
fi
1901
rm -fr conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
1902
fi
1903

Sam Hocevar's avatar
 
Sam Hocevar committed
1904 1905
fi

1906 1907
echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
cat >> confdefs.h <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1908
#define STACK_DIRECTION $ac_cv_c_stack_direction
1909
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
1910 1911 1912

fi

1913
for ac_hdr in unistd.h
Sam Hocevar's avatar
 
Sam Hocevar committed
1914
do
1915 1916
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1917
echo "configure:1918: checking for $ac_hdr" >&5
1918 1919
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
1920
else
1921
  cat > conftest.$ac_ext <<EOF
1922
#line 1923 "configure"
1923 1924 1925 1926
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1927
{ (eval echo configure:1928: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1928 1929 1930 1931 1932 1933 1934
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
1935
  cat conftest.$ac_ext >&5
1936 1937
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
Sam Hocevar's avatar
 
Sam Hocevar committed
1938
fi
1939
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
1940
fi
1941 1942 1943 1944 1945 1946 1947 1948 1949
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
1950 1951 1952 1953 1954
fi
done

for ac_func in getpagesize
do
1955
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1956
echo "configure:1957: checking for $ac_func" >&5
1957 1958
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
1959
else
1960
  cat > conftest.$ac_ext <<EOF
1961
#line 1962 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
1962 1963
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
1964
    which can conflict with char $ac_func(); below.  */
Sam Hocevar's avatar
 
Sam Hocevar committed
1965 1966 1967
#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
1968 1969 1970 1971
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
1972 1973 1974 1975 1976 1977 1978

/* 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
1979
$ac_func();
Sam Hocevar's avatar
 
Sam Hocevar committed
1980 1981
#endif

1982 1983
; return 0; }
EOF
1984
if { (eval echo configure:1985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1985 1986 1987 1988 1989 1990 1991 1992 1993 1994
  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
1995

1996 1997 1998 1999 2000 2001 2002 2003 2004
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
2005 2006 2007
fi
done

2008
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
2009
echo "configure:2010: checking for working mmap" >&5
2010 2011
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
2012 2013 2014 2015
else
  if test "$cross_compiling" = yes; then
  ac_cv_func_mmap_fixed_mapped=no
else
2016
  cat > conftest.$ac_ext <<EOF
2017
#line 2018 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031
#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
2032
   VM page cache was not coherent with the filesystem buffer cache
Sam Hocevar's avatar
 
Sam Hocevar committed
2033 2034
   like early versions of FreeBSD and possibly contemporary NetBSD.)
   For shared mappings, we should conversely verify that changes get
2035
   propogated back to all the places they're supposed to be.
Sam Hocevar's avatar
 
Sam Hocevar committed
2036 2037 2038 2039 2040

   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)  */
2041
#include <sys/types.h>
Sam Hocevar's avatar
 
Sam Hocevar committed
2042 2043 2044
#include <fcntl.h>
#include <sys/mman.h>

2045
/* This mess was copied from the GNU getpagesize.h.  */
2046 2047 2048 2049 2050
#ifndef HAVE_GETPAGESIZE
# ifdef HAVE_UNISTD_H
#  include <unistd.h>
# endif

Sam Hocevar's avatar
 
Sam Hocevar committed
2051
/* Assume that all systems that can run configure have sys/param.h.  */
2052
# ifndef HAVE_SYS_PARAM_H
Sam Hocevar's avatar
 
Sam Hocevar committed
2053 2054 2055 2056 2057 2058
#  define HAVE_SYS_PARAM_H 1
# endif

# ifdef _SC_PAGESIZE
#  define getpagesize() sysconf(_SC_PAGESIZE)
# else /* no _SC_PAGESIZE */
2059
#  ifdef HAVE_SYS_PARAM_H
Sam Hocevar's avatar
 
Sam Hocevar committed
2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085
#   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 */

2086 2087 2088 2089 2090 2091
#ifdef __cplusplus
extern "C" { void *malloc(unsigned); }
#else
char *malloc();
#endif

Sam Hocevar's avatar
 
Sam Hocevar committed
2092
int
2093
main()
Sam Hocevar's avatar
 
Sam Hocevar committed
2094
{
2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153
	char *data, *data2, *data3;
	int i, pagesize;
	int fd;

	pagesize = getpagesize();

	/*
	 * First, make a file with some known garbage in it.
	 */
	data = malloc(pagesize);
	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);
	data2 = malloc(2 * pagesize);
	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;
	data3 = malloc(pagesize);
	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
2154
}
2155 2156

EOF
2157
if { (eval echo configure:2158: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2158
then
Sam Hocevar's avatar
 
Sam Hocevar committed
2159 2160
  ac_cv_func_mmap_fixed_mapped=yes
else
2161 2162 2163 2164
  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
2165
fi
2166
rm -fr conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
2167
fi
2168

Sam Hocevar's avatar
 
Sam Hocevar committed
2169
fi
2170

2171 2172 2173
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
2174
#define HAVE_MMAP 1
2175
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2176 2177 2178 2179

fi


2180
    echo $ac_n "checking whether we are using the GNU C Library 2.1 or newer""... $ac_c" 1>&6
2181
echo "configure:2182: checking whether we are using the GNU C Library 2.1 or newer" >&5
2182 2183
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
2184
else
2185
  cat > conftest.$ac_ext <<EOF
2186
#line 2187 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
2187 2188 2189 2190 2191 2192 2193 2194
#include "confdefs.h"

#include <features.h>
#ifdef __GNU_LIBRARY__
 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
  Lucky GNU user
 #endif
#endif
2195 2196
	
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2197 2198
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "Lucky GNU user" >/dev/null 2>&1; then
2199
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
2200 2201
  ac_cv_gnu_library_2_1=yes
else
2202
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
2203 2204 2205 2206
  ac_cv_gnu_library_2_1=no
fi
rm -f conftest*

2207 2208
      
    
Sam Hocevar's avatar
 
Sam Hocevar committed
2209 2210
fi

2211 2212
echo "$ac_t""$ac_cv_gnu_library_2_1" 1>&6
    
Sam Hocevar's avatar
 
Sam Hocevar committed
2213
    GLIBC21="$ac_cv_gnu_library_2_1"
2214
  
Sam Hocevar's avatar
 
Sam Hocevar committed
2215

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

2258
   for ac_func in feof_unlocked fgets_unlocked getcwd getegid geteuid \
Sam Hocevar's avatar
 
Sam Hocevar committed
2259 2260 2261
getgid getuid mempcpy munmap putenv setenv setlocale stpcpy strchr strcasecmp \
strdup strtoul tsearch __argz_count __argz_stringify __argz_next
do
2262
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2263
echo "configure:2264: checking for $ac_func" >&5
2264 2265
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
2266
else
2267
  cat > conftest.$ac_ext <<EOF
2268
#line 2269 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
2269 2270
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
2271
    which can conflict with char $ac_func(); below.  */
Sam Hocevar's avatar
 
Sam Hocevar committed
2272 2273 2274
#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
2275 2276 2277 2278
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
2279 2280 2281 2282 2283 2284 2285

/* 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
2286
$ac_func();
Sam Hocevar's avatar
 
Sam Hocevar committed
2287 2288
#endif

2289 2290
; return 0; }
EOF
2291
if { (eval echo configure:2292: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2292 2293 2294 2295 2296 2297 2298 2299 2300 2301
  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
2302

2303 2304 2305 2306 2307 2308 2309 2310 2311
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
2312 2313 2314 2315
fi
done


2316 2317 2318
   
    
  # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
Sam Hocevar's avatar
 
Sam Hocevar committed
2319 2320
if test "${with_libiconv_prefix+set}" = set; then
  withval="$with_libiconv_prefix"
2321
  
Sam Hocevar's avatar
 
Sam Hocevar committed
2322 2323 2324 2325
    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
2326 2327
   
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
2328 2329


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

2385 2386 2387
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
2388
#define HAVE_ICONV 1
2389
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2390

2391
    echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
2392
echo "configure:2393: checking for iconv declaration" >&5
2393 2394
    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
2395
else
2396 2397
  
      cat > conftest.$ac_ext <<EOF
2398
#line 2399 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412
#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

2413
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
2414

2415 2416
; return 0; }
EOF
2417
if { (eval echo configure:2418: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2418
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
2419 2420
  am_cv_proto_iconv_arg1=""
else
2421 2422 2423 2424
  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
2425
fi
2426
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
2427 2428 2429 2430
      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/( /(/'`
2431 2432 2433
    echo "$ac_t""${ac_t:-
         }$am_cv_proto_iconv" 1>&6
    cat >> confdefs.h <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2434
#define ICONV_CONST $am_cv_proto_iconv_arg1
2435
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2436 2437 2438 2439 2440 2441

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

2444 2445
   
  echo $ac_n "checking for nl_langinfo and CODESET""... $ac_c" 1>&6
2446
echo "configure:2447: checking for nl_langinfo and CODESET" >&5
2447 2448
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
2449
else
2450
  cat > conftest.$ac_ext <<EOF
2451
#line 2452 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
2452 2453
#include "confdefs.h"
#include <langinfo.h>
2454
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
2455
char* cs = nl_langinfo(CODESET);
2456 2457
; return 0; }
EOF
2458
if { (eval echo configure:2459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2459
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
2460 2461
  am_cv_langinfo_codeset=yes
else
2462 2463 2464 2465
  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
2466
fi
2467 2468
rm -f conftest*
    
2469 2470
fi

2471 2472 2473
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
2474
#define HAVE_LANGINFO_CODESET 1
2475
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2476 2477 2478 2479

  fi

   if test $ac_cv_header_locale_h = yes; then
2480
    echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
2481
echo "configure:2482: checking for LC_MESSAGES" >&5
2482 2483
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
2484
else
2485
  cat > conftest.$ac_ext <<EOF
2486
#line 2487 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
2487 2488
#include "confdefs.h"
#include <locale.h>
2489
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
2490
return LC_MESSAGES
2491 2492
; return 0; }
EOF
2493
if { (eval echo configure:2494: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2494
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
2495 2496
  am_cv_val_LC_MESSAGES=yes
else
2497 2498 2499 2500
  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
2501
fi
2502
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
2503
fi
2504

2505 2506 2507
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
2508
#define HAVE_LC_MESSAGES 1
2509
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2510 2511 2512

    fi
  fi
2513
   echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
2514
echo "configure:2515: checking whether NLS is requested" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
2515 2516 2517 2518 2519 2520
        # 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
2521
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
2522

2523 2524
    echo "$ac_t""$USE_NLS" 1>&6
    
Sam Hocevar's avatar
 
Sam Hocevar committed
2525 2526 2527 2528 2529 2530

    BUILD_INCLUDED_LIBINTL=no
    USE_INCLUDED_LIBINTL=no
    INTLLIBS=

        if test "$USE_NLS" = "yes"; then
2531
      cat >> confdefs.h <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2532
#define ENABLE_NLS 1
2533
EOF
2534

2535
      echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
2536
echo "configure:2537: checking whether included gettext is requested" >&5
2537
      # Check whether --with-included-gettext or --without-included-gettext was given.
Sam Hocevar's avatar
 
Sam Hocevar committed
2538 2539 2540 2541 2542
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
2543 2544 2545
fi

      echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2546 2547 2548 2549 2550

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

2551 2552
                
        
Sam Hocevar's avatar
 
Sam Hocevar committed
2553

2554 2555
	ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
2556
echo "configure:2557: checking for libintl.h" >&5
2557 2558
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
2559
else
2560
  cat > conftest.$ac_ext <<EOF
2561
#line 2562 "configure"
2562 2563
#include "confdefs.h"
#include <libintl.h>
2564 2565
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2566
{ (eval echo configure:2567: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2567 2568 2569 2570 2571 2572 2573
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
2574
  cat conftest.$ac_ext >&5
2575 2576
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
Sam Hocevar's avatar
 
Sam Hocevar committed
2577
fi
2578
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
2579
fi
2580 2581 2582
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
2583
echo "configure:2584: checking for GNU gettext in libc" >&5
2584 2585
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
2586
else
2587
  cat > conftest.$ac_ext <<EOF
2588
#line 2589 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
2589 2590 2591
#include "confdefs.h"
#include <libintl.h>
extern int _nl_msg_cat_cntr;
2592
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
2593 2594
bindtextdomain ("", "");
return (int) gettext ("") + _nl_msg_cat_cntr
2595 2596
; return 0; }
EOF
2597
if { (eval echo configure:2598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2598
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
2599 2600
  gt_cv_func_gnugettext1_libc=yes
else
2601 2602 2603 2604
  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
2605
fi
2606
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
2607
fi
2608 2609

echo "$ac_t""$gt_cv_func_gnugettext1_libc" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2610 2611

	   if test "$gt_cv_func_gnugettext1_libc" != "yes"; then
2612
	     echo $ac_n "checking for GNU gettext in libintl""... $ac_c" 1>&6
2613
echo "configure:2614: checking for GNU gettext in libintl" >&5
2614 2615
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
2616 2617 2618
else
  gt_save_LIBS="$LIBS"
		LIBS="$LIBS -lintl $LIBICONV"
2619
		cat > conftest.$ac_ext <<EOF
2620
#line 2621 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
2621 2622 2623
#include "confdefs.h"
#include <libintl.h>
extern int _nl_msg_cat_cntr;
2624
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
2625 2626
bindtextdomain ("", "");
return (int) gettext ("") + _nl_msg_cat_cntr
2627 2628
; return 0; }
EOF
2629
if { (eval echo configure:2630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2630
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
2631 2632
  gt_cv_func_gnugettext1_libintl=yes
else
2633 2634 2635 2636
  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
2637
fi
2638
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
2639 2640
		LIBS="$gt_save_LIBS"
fi
2641 2642

echo "$ac_t""$gt_cv_func_gnugettext1_libintl" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2643 2644 2645 2646 2647
	   fi

	   	   	   	   	   if test "$gt_cv_func_gnugettext1_libc" = "yes" \
	      || { test "$gt_cv_func_gnugettext1_libintl" = "yes" \
		   && test "$PACKAGE" != gettext; }; then
2648
	     cat >> confdefs.h <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2649
#define HAVE_GETTEXT 1
2650
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
2651 2652 2653 2654 2655 2656 2657 2658


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

	     gt_save_LIBS="$LIBS"
	     LIBS="$LIBS $INTLLIBS"
2659
	     for ac_func in dcgettext
Sam Hocevar's avatar
 
Sam Hocevar committed
2660
do
2661
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2662
echo "configure:2663: checking for $ac_func" >&5
2663 2664
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
2665
else
2666
  cat > conftest.$ac_ext <<EOF
2667
#line 2668 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
2668 2669
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
2670
    which can conflict with char $ac_func(); below.  */
Sam Hocevar's avatar
 
Sam Hocevar committed
2671 2672 2673
#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
2674 2675 2676 2677 2678
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {

Sam Hocevar's avatar
 
Sam Hocevar committed
2679 2680 2681 2682 2683 2684
/* 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
2685
$ac_func();
Sam Hocevar's avatar
 
Sam Hocevar committed
2686 2687
#endif

2688 2689
; return 0; }
EOF
2690
if { (eval echo configure:2691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2691 2692 2693 2694 2695 2696 2697 2698 2699 2700
  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
2701

2702 2703 2704 2705 2706 2707 2708 2709 2710
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
2711 2712 2713 2714 2715 2716 2717
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
2718
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2719
echo "configure:2720: checking for $ac_word" >&5
2720 2721
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
2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744
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
2745
  echo "$ac_t""$MSGFMT" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2746
else
2747
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2748 2749 2750 2751
fi

	     # Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
2752
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2753
echo "configure:2754: checking for $ac_word" >&5
2754 2755
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
2756
else
2757 2758
  case "$GMSGFMT" in
  /*)
Sam Hocevar's avatar
 
Sam Hocevar committed
2759 2760
  ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
  ;;
2761 2762 2763
  ?:/*)			 
  ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
  ;;
2764
  *)
2765 2766 2767 2768 2769 2770 2771 2772 2773 2774
  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
2775 2776 2777 2778
  test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
  ;;
esac
fi
2779
GMSGFMT="$ac_cv_path_GMSGFMT"
Sam Hocevar's avatar
 
Sam Hocevar committed
2780
if test -n "$GMSGFMT"; then
2781
  echo "$ac_t""$GMSGFMT" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2782
else
2783
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2784 2785 2786 2787 2788
fi


	     	     # Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
2789
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2790
echo "configure:2791: checking for $ac_word" >&5
2791 2792
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
2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815
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
2816
  echo "$ac_t""$XGETTEXT" 1>&6
2817
else
2818
  echo "$ac_t""no" 1>&6
2819 2820
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
2821 2822 2823

	     CATOBJEXT=.gmo
	   fi
2824 2825 2826
	
else
  echo "$ac_t""no" 1>&6
2827 2828
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
2829 2830 2831 2832 2833 2834 2835 2836 2837 2838

        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
2839
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2840
echo "configure:2841: checking for $ac_word" >&5
2841 2842
if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
2843
else
Sam Hocevar's avatar
 
Sam Hocevar committed
2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865
  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
2866
  echo "$ac_t""$MSGFMT" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2867
else
2868
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2869 2870 2871 2872
fi

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

        # Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
2909
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2910
echo "configure:2911: checking for $ac_word" >&5
2911 2912
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
2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935
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
2936
  echo "$ac_t""$XGETTEXT" 1>&6
2937
else
2938
  echo "$ac_t""no" 1>&6
2939 2940
fi

2941
        
Sam Hocevar's avatar
 
Sam Hocevar committed
2942 2943 2944 2945 2946 2947
	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
2948

Sam Hocevar's avatar
 
Sam Hocevar committed
2949 2950 2951 2952
                  if test "$GMSGFMT" != ":"; then
			if $GMSGFMT --statistics /dev/null >/dev/null 2>&1; then
	  : ;
	else
2953
	  echo "$ac_t""found msgfmt program is not GNU msgfmt; ignore it" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2954 2955 2956 2957 2958 2959 2960 2961
	  GMSGFMT=":"
	fi
      fi

                  if test "$XGETTEXT" != ":"; then
			if $XGETTEXT --omit-header /dev/null >/dev/null 2>&1; then
	  : ;
	else
2962
	  echo "$ac_t""found xgettext program is not GNU xgettext; ignore it" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
2963 2964 2965 2966 2967 2968
	  XGETTEXT=":"
	fi
      fi

            POSUB=po
    fi
2969
    
Sam Hocevar's avatar
 
Sam Hocevar committed
2970 2971 2972 2973 2974 2975 2976 2977


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

                                            for ac_prog in bison
do
2978
# Extract the first word of "$ac_prog", so it can be a program name with args.
Sam Hocevar's avatar
 
Sam Hocevar committed
2979
set dummy $ac_prog; ac_word=$2
2980
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2981
echo "configure:2982: checking for $ac_word" >&5
2982 2983
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
2984
else
Sam Hocevar's avatar
 
Sam Hocevar committed
2985 2986
  if test -n "$INTLBISON"; then
  ac_cv_prog_INTLBISON="$INTLBISON" # Let the user override the test.
Sam Hocevar's avatar
 
Sam Hocevar committed
2987
else
2988 2989 2990 2991 2992 2993 2994 2995 2996 2997
  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
2998 2999
fi
fi
3000
INTLBISON="$ac_cv_prog_INTLBISON"
Sam Hocevar's avatar
 
Sam Hocevar committed
3001
if test -n "$INTLBISON"; then
3002
  echo "$ac_t""$INTLBISON" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3003
else
3004
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3005 3006
fi

3007
test -n "$INTLBISON" && break
Sam Hocevar's avatar
 
Sam Hocevar committed
3008 3009 3010 3011 3012
done

    if test -z "$INTLBISON"; then
      ac_verc_fail=yes
    else
3013
            echo $ac_n "checking version of bison""... $ac_c" 1>&6
3014
echo "configure:3015: checking version of bison" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
3015 3016 3017 3018 3019 3020 3021
      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
3022
      echo "$ac_t""$ac_prog_version" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3023 3024 3025 3026 3027 3028 3029 3030 3031 3032
    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

3033 3034 3035 3036 3037 3038 3039 3040 3041
        
    
    
    
    
    
    
    
    
Sam Hocevar's avatar
 
Sam Hocevar committed
3042 3043 3044 3045 3046

        nls_cv_header_intl=
    nls_cv_header_libgt=

        DATADIRNAME=share
3047
    
Sam Hocevar's avatar
 
Sam Hocevar committed
3048 3049

        INSTOBJEXT=.mo
3050
    
Sam Hocevar's avatar
 
Sam Hocevar committed
3051 3052

        GENCAT=gencat
3053 3054
    
  
Sam Hocevar's avatar
 
Sam Hocevar committed
3055 3056 3057 3058 3059

   if test "x$CATOBJEXT" != "x"; then
     if test "x$ALL_LINGUAS" = "x"; then
       LINGUAS=
     else
3060
       echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
3061
echo "configure:3062: checking for catalogs to be installed" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079
       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
3080
       echo "$ac_t""$LINGUAS" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094
     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
3095
   
3096

Sam Hocevar's avatar
 
Sam Hocevar committed
3097
      INTL_LIBTOOL_SUFFIX_PREFIX=
3098 3099
   
  
3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111

# 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.
3112
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
3113
echo "configure:3114: checking for a BSD compatible install" >&5
3114
if test -z "$INSTALL"; then
3115 3116
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
3117
else
3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137
    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
3138
      done
3139 3140 3141 3142
      ;;
    esac
  done
  IFS="$ac_save_IFS"
3143 3144 3145

fi
  if test "${ac_cv_path_install+set}" = set; then
3146
    INSTALL="$ac_cv_path_install"
3147 3148 3149 3150 3151
  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.
3152
    INSTALL="$ac_install_sh"
3153 3154
  fi
fi
3155
echo "$ac_t""$INSTALL" 1>&6
3156 3157 3158 3159 3160

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

3161
test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3162 3163 3164

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

Sam Hocevar's avatar
 
Sam Hocevar committed
3165

Gildas Bazin's avatar
 
Gildas Bazin committed
3166 3167 3168 3169 3170 3171 3172 3173 3174
case x"${target_os}" in
  x)
    SYS=unknown
    ;;
  xlinux*)
    SYS=linux
    ;;
  xbsdi*)
    SYS=bsdi
Sam Hocevar's avatar
 
Sam Hocevar committed
3175 3176 3177 3178 3179 3180 3181
    save_CFLAGS="${save_CFLAGS} -pthread"
    dvd_LDFLAGS="${dvd_LDFLAGS} -ldvd"
    vcd_LDFLAGS="${vcd_LDFLAGS} -ldvd"
    ;;
  x*bsd*)
    SYS="${target_os}"
    save_CFLAGS="${save_CFLAGS} -pthread"
Gildas Bazin's avatar
 
Gildas Bazin committed
3182 3183 3184
    ;;
  xdarwin*)
    SYS=darwin
Sam Hocevar's avatar
 
Sam Hocevar committed
3185
    save_CFLAGS="${save_CFLAGS} -no-cpp-precomp"
Gildas Bazin's avatar
 
Gildas Bazin committed
3186 3187 3188
    ;;
  x*mingw32*)
    SYS=mingw32
3189
    # 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
3190
set dummy ${ac_tool_prefix}windres; ac_word=$2
3191
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3192
echo "configure:3193: checking for $ac_word" >&5
3193 3194
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
3195 3196 3197 3198
else
  if test -n "$WINDRES"; then
  ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
else
3199 3200 3201 3202 3203 3204 3205 3206 3207 3208
  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
3209 3210
fi
fi
3211
WINDRES="$ac_cv_prog_WINDRES"
Gildas Bazin's avatar
 
Gildas Bazin committed
3212
if test -n "$WINDRES"; then
3213
  echo "$ac_t""$WINDRES" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
3214
else
3215
  echo "$ac_t""no" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
3216 3217
fi

3218

Gildas Bazin's avatar
 
Gildas Bazin committed
3219
if test -z "$ac_cv_prog_WINDRES"; then
3220
if test -n "$ac_tool_prefix"; then
Gildas Bazin's avatar
 
Gildas Bazin committed
3221 3222
  # Extract the first word of "windres", so it can be a program name with args.
set dummy windres; ac_word=$2
3223
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3224
echo "configure:3225: checking for $ac_word" >&5
3225 3226
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
3227
else
3228 3229
  if test -n "$WINDRES"; then
  ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
Gildas Bazin's avatar
 
Gildas Bazin committed
3230
else
3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241
  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
3242 3243
fi
fi
3244 3245 3246
WINDRES="$ac_cv_prog_WINDRES"
if test -n "$WINDRES"; then
  echo "$ac_t""$WINDRES" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
3247
else
3248
  echo "$ac_t""no" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
3249 3250 3251
fi

else
3252 3253
  WINDRES=":"
fi
Gildas Bazin's avatar
 
Gildas Bazin committed
3254 3255
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
3256
    save_CFLAGS="${save_CFLAGS} -fnative-struct -D_OFF_T_ -D_off_t=long"
Sam Hocevar's avatar
 
Sam Hocevar committed
3257
    vlc_LDFLAGS="${vlc_LDFLAGS} -mwindows -Xlinker --force-exe-suffix"
Sam Hocevar's avatar
 
Sam Hocevar committed
3258 3259
    vlc_LDFLAGS="${vlc_LDFLAGS} -lws2_32 -lnetapi32"
    ipv4_LDFLAGS="${ipv4_LDFLAGS} -lws2_32"
Gildas Bazin's avatar
 
Gildas Bazin committed
3260
    ipv6_LDFLAGS="${ipv6_LDFLAGS} -lws2_32"
Sam Hocevar's avatar
 
Sam Hocevar committed
3261
    rc_LDFLAGS="${rc_LDFLAGS} -lws2_32"
Gildas Bazin's avatar
 
Gildas Bazin committed
3262 3263 3264
    ;;
  x*nto*)
    SYS=nto
Sam Hocevar's avatar
 
Sam Hocevar committed
3265 3266
    x11_LDFLAGS="${x11_LDFLAGS} -lsocket"
    xvideo_LDFLAGS="${xvideo_LDFLAGS} -lsocket"
Gildas Bazin's avatar
 
Gildas Bazin committed
3267 3268 3269
    ;;
  xbeos)
    SYS=beos
Sam Hocevar's avatar
 
Sam Hocevar committed
3270
    save_CFLAGS="${save_CFLAGS} -Wno-multichar -Wno-ctor-dtor-privacy -Woverloaded-virtual"
Sam Hocevar's avatar
 
Sam Hocevar committed
3271 3272 3273 3274
    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
3275 3276
    ;;
  x*)
Sam Hocevar's avatar
 
Sam Hocevar committed
3277
    SYS="${target_os}"
Gildas Bazin's avatar
 
Gildas Bazin committed
3278 3279 3280
    ;;
esac

Sam Hocevar's avatar
 
Sam Hocevar committed
3281 3282 3283 3284 3285 3286 3287
if test x"${SYS}" = xmingw32
then
  plugins_CFLAGS="${plugins_CFLAGS} -fnative-struct"
else
  plugins_CFLAGS="${plugins_CFLAGS} -fPIC"
fi

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

3290
for ac_func in gettimeofday select strerror strtod strtol isatty vasprintf swab sigrelse getpwuid memalign posix_memalign gethostbyname2
3291
do
3292
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
3293
echo "configure:3294: checking for $ac_func" >&5
3294 3295
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
3296
else
3297
  cat > conftest.$ac_ext <<EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
3298
#line 3299 "configure"
3299 3300
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
3301
    which can conflict with char $ac_func(); below.  */
3302 3303 3304
#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
3305 3306 3307 3308
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {
3309 3310 3311 3312 3313 3314 3315

/* 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
3316
$ac_func();
3317 3318
#endif

3319 3320
; return 0; }
EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
3321
if { (eval echo configure:3322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3322 3323 3324 3325 3326 3327 3328 3329 3330 3331
  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
3332

3333 3334 3335 3336 3337 3338 3339 3340 3341
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
3342 3343 3344
fi
done

Sam Hocevar's avatar
 
Sam Hocevar committed
3345

3346
echo $ac_n "checking for connect""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
3347
echo "configure:3348: checking for connect" >&5
3348 3349
if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
3350
else
3351
  cat > conftest.$ac_ext <<EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
3352
#line 3353 "configure"
3353 3354
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
3355
    which can conflict with char connect(); below.  */
3356 3357 3358
#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
3359 3360 3361 3362
    builtin and then its argument prototype would still apply.  */
char connect();

int main() {
3363 3364 3365 3366 3367 3368 3369

/* 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
3370
connect();
3371 3372
#endif

3373 3374
; return 0; }
EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
3375
if { (eval echo configure:3376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388
  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
3389 3390
  :
else
3391
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3392

3393
  echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
3394
echo "configure:3395: checking for connect in -lsocket" >&5
3395 3396 3397
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
3398
else
3399
  ac_save_LIBS="$LIBS"
3400
LIBS="-lsocket  $LIBS"
3401
cat > conftest.$ac_ext <<EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
3402
#line 3403 "configure"
3403 3404 3405
#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
3406 3407 3408 3409 3410 3411 3412
    builtin and then its argument prototype would still apply.  */
char connect();

int main() {
connect()
; return 0; }
EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
3413
if { (eval echo configure:3414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427
  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
3428 3429
  ipv4_LDFLAGS="${ipv4_LDFLAGS} -lsocket"
    vlc_LDFLAGS="${vlc_LDFLAGS} -lsocket"
Sam Hocevar's avatar
 
Sam Hocevar committed
3430

3431 3432
else
  echo "$ac_t""no" 1>&6
3433 3434 3435 3436
fi

fi

3437
echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
3438
echo "configure:3439: checking for gethostbyname" >&5
3439 3440
if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
3441
else
3442
  cat > conftest.$ac_ext <<EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
3443
#line 3444 "configure"
3444 3445
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
3446
    which can conflict with char gethostbyname(); below.  */
3447 3448 3449
#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
3450 3451 3452 3453
    builtin and then its argument prototype would still apply.  */
char gethostbyname();

int main() {
3454 3455 3456 3457 3458 3459 3460

/* 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
3461
gethostbyname();
3462 3463
#endif

3464 3465
; return 0; }
EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
3466
if { (eval echo configure:3467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479
  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
3480 3481
  :
else
3482
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3483

3484
  echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
3485
echo "configure:3486: checking for gethostbyname in -lnsl" >&5
3486 3487 3488
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
3489
else
3490
  ac_save_LIBS="$LIBS"
3491
LIBS="-lnsl  $LIBS"
3492
cat > conftest.$ac_ext <<EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
3493
#line 3494 "configure"
3494 3495 3496
#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
3497 3498 3499 3500 3501 3502 3503
    builtin and then its argument prototype would still apply.  */
char gethostbyname();

int main() {
gethostbyname()
; return 0; }
EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
3504
if { (eval echo configure:3505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518
  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
3519
  ipv4_LDFLAGS="${ipv4_LDFLAGS} -lnsl"
3520 3521
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3522 3523 3524 3525 3526
fi


fi

3527
echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
3528
echo "configure:3529: checking for gethostbyname" >&5
3529 3530
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
3531
else
3532
  cat > conftest.$ac_ext <<EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
3533
#line 3534 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
3534 3535
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
3536
    which can conflict with char gethostbyname(); below.  */
Sam Hocevar's avatar
 
Sam Hocevar committed
3537 3538 3539
#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
3540 3541 3542 3543
    builtin and then its argument prototype would still apply.  */
char gethostbyname();

int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
3544 3545 3546 3547 3548 3549 3550

/* 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
3551
gethostbyname();
Sam Hocevar's avatar
 
Sam Hocevar committed
3552 3553
#endif

3554 3555
; return 0; }
EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
3556
if { (eval echo configure:3557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569
  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
3570 3571
  :
else
3572
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3573

3574
  echo $ac_n "checking for gethostbyname in -lbind""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
3575
echo "configure:3576: checking for gethostbyname in -lbind" >&5
3576 3577 3578
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
3579
else
3580
  ac_save_LIBS="$LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
3581
LIBS="-lbind  $LIBS"
3582
cat > conftest.$ac_ext <<EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
3583
#line 3584 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
3584 3585 3586
#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
3587 3588 3589 3590 3591 3592 3593
    builtin and then its argument prototype would still apply.  */
char gethostbyname();

int main() {
gethostbyname()
; return 0; }
EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
3594
if { (eval echo configure:3595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608
  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
3609
  ipv4_LDFLAGS="${ipv4_LDFLAGS} -lbind"
3610 3611
else
  echo "$ac_t""no" 1>&6
3612 3613
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
3614

3615 3616
fi

3617 3618
for ac_func in nanosleep
do
3619
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
3620
echo "configure:3621: checking for $ac_func" >&5
3621 3622
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
3623
else
3624
  cat > conftest.$ac_ext <<EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
3625
#line 3626 "configure"
3626 3627
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
3628
    which can conflict with char $ac_func(); below.  */
3629 3630 3631
#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
3632 3633 3634 3635
    builtin and then its argument prototype would still apply.  */
char $ac_func();

int main() {
3636 3637 3638 3639

/* 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.  */
3640
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3641 3642
choke me
#else
3643
$ac_func();
3644 3645
#endif

3646 3647
; return 0; }
EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
3648
if { (eval echo configure:3649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
fi

if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  echo "$ac_t""yes" 1>&6
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  cat >> confdefs.h <<EOF
#define $ac_tr_func 1
EOF
 
else
  echo "$ac_t""no" 1>&6
echo $ac_n "checking for nanosleep in -lrt""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
3670
echo "configure:3671: checking for nanosleep in -lrt" >&5
3671 3672 3673 3674 3675
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"
3676
LIBS="-lrt  $LIBS"
3677
cat > conftest.$ac_ext <<EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
3678
#line 3679 "configure"
3679
#include "confdefs.h"
3680 3681
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
3682 3683 3684 3685 3686 3687 3688
    builtin and then its argument prototype would still apply.  */
char nanosleep();

int main() {
nanosleep()
; return 0; }
EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
3689
if { (eval echo configure:3690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703
  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
3704
  vlc_LDFLAGS="${vlc_LDFLAGS} -lrt"
3705
else
3706 3707
  echo "$ac_t""no" 1>&6
echo $ac_n "checking for nanosleep in -lposix4""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
3708
echo "configure:3709: checking for nanosleep in -lposix4" >&5
3709 3710 3711
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
3712
else
3713
  ac_save_LIBS="$LIBS"
3714
LIBS="-lposix4  $LIBS"
3715
cat > conftest.$ac_ext <<EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
3716
#line 3717 "configure"
3717 3718 3719
#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
3720 3721 3722 3723 3724 3725 3726
    builtin and then its argument prototype would still apply.  */
char nanosleep();

int main() {
nanosleep()
; return 0; }
EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
3727
if { (eval echo configure:3728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3728 3729 3730 3731 3732 3733 3734
  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"
3735
fi
3736 3737
rm -f conftest*
LIBS="$ac_save_LIBS"
3738

3739 3740 3741 3742 3743 3744 3745
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  vlc_LDFLAGS="${vlc_LDFLAGS} -lposix4"
else
  echo "$ac_t""no" 1>&6
fi
3746

3747
  
3748 3749
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
3750

3751
fi
3752
done
3753

3754
echo $ac_n "checking for inet_aton""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
3755
echo "configure:3756: checking for inet_aton" >&5
3756 3757
if eval "test \"`echo '$''{'ac_cv_func_inet_aton'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
3758
else
3759
  cat > conftest.$ac_ext <<EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
3760
#line 3761 "configure"
3761 3762
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
3763
    which can conflict with char inet_aton(); below.  */
3764 3765 3766
#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
3767 3768 3769 3770
    builtin and then its argument prototype would still apply.  */
char inet_aton();

int main() {
3771 3772 3773 3774 3775 3776 3777

/* 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
3778
inet_aton();
3779 3780
#endif

3781 3782
; return 0; }
EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
3783
if { (eval echo configure:3784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796
  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
3797 3798
  :
else
3799
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
3800

3801
  echo $ac_n "checking for inet_aton in -lresolv""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
3802
echo "configure:3803: checking for inet_aton in -lresolv" >&5
3803 3804 3805
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
3806
else
3807
  ac_save_LIBS="$LIBS"
3808
LIBS="-lresolv  $LIBS"
3809
cat > conftest.$ac_ext <<EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
3810
#line 3811 "configure"
3811 3812 3813
#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
3814 3815 3816 3817 3818 3819 3820
    builtin and then its argument prototype would still apply.  */
char inet_aton();

int main() {
inet_aton()
; return 0; }
EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
3821
if { (eval echo configure:3822: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3822 3823 3824 3825 3826 3827 3828 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"
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
3836
  ipv4_LDFLAGS="${ipv4_LDFLAGS} -lresolv"
3837 3838
else
  echo "$ac_t""no" 1>&6
3839 3840 3841 3842 3843
fi


fi

3844
echo $ac_n "checking for textdomain""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
3845
echo "configure:3846: checking for textdomain" >&5
3846 3847
if eval "test \"`echo '$''{'ac_cv_func_textdomain'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
3848
else
3849
  cat > conftest.$ac_ext <<EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
3850
#line 3851 "configure"
3851 3852
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
3853
    which can conflict with char textdomain(); below.  */
3854 3855 3856
#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
3857 3858 3859 3860
    builtin and then its argument prototype would still apply.  */
char textdomain();

int main() {
3861 3862 3863 3864 3865 3866 3867

/* 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
3868
textdomain();
3869 3870
#endif

3871 3872
; return 0; }
EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
3873
if { (eval echo configure:3874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886
  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
3887 3888
  :
else
3889
  echo "$ac_t""no" 1>&6
3890

3891
  echo $ac_n "checking for textdomain in -lintl""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
3892
echo "configure:3893: checking for textdomain in -lintl" >&5
3893 3894 3895
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
3896
else
3897
  ac_save_LIBS="$LIBS"
3898
LIBS="-lintl  $LIBS"
3899
cat > conftest.$ac_ext <<EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
3900
#line 3901 "configure"
3901 3902 3903
#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
3904 3905 3906 3907 3908 3909 3910
    builtin and then its argument prototype would still apply.  */
char textdomain();

int main() {
textdomain()
; return 0; }
EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
3911
if { (eval echo configure:3912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925
  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
3926
  save_LDFLAGS="${save_LDFLAGS} -lintl"
3927 3928
else
  echo "$ac_t""no" 1>&6
3929 3930
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
3931

3932 3933
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
3934

Sam Hocevar's avatar
 
Sam Hocevar committed
3935
NEED_GETOPT=0
3936
echo $ac_n "checking for getopt_long""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
3937
echo "configure:3938: checking for getopt_long" >&5
3938 3939
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
3940
else
3941
  cat > conftest.$ac_ext <<EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
3942
#line 3943 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
3943 3944
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
3945
    which can conflict with char getopt_long(); below.  */
Sam Hocevar's avatar
 
Sam Hocevar committed
3946 3947 3948
#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
3949 3950 3951 3952
    builtin and then its argument prototype would still apply.  */
char getopt_long();

int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
3953 3954 3955 3956 3957 3958 3959

/* 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
3960
getopt_long();
Sam Hocevar's avatar
 
Sam Hocevar committed
3961 3962
#endif

3963 3964
; return 0; }
EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
3965
if { (eval echo configure:3966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979
  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
3980
#define HAVE_GETOPT_LONG 1
3981
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
3982 3983

else
3984 3985 3986
  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
Gildas Bazin's avatar
 
Gildas Bazin committed
3987
echo "configure:3988: checking for getopt_long in -lgnugetopt" >&5
3988 3989 3990
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
3991
else
3992
  ac_save_LIBS="$LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
3993
LIBS="-lgnugetopt  $LIBS"
3994
cat > conftest.$ac_ext <<EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
3995
#line 3996 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
3996 3997 3998
#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
3999 4000 4001 4002 4003 4004 4005
    builtin and then its argument prototype would still apply.  */
char getopt_long();

int main() {
getopt_long()
; return 0; }
EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
4006
if { (eval echo configure:4007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021
  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
4022
#define HAVE_GETOPT_LONG 1
4023
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4024
 vlc_LDFLAGS="${vlc_LDFLAGS} -lgnugetopt"
Sam Hocevar's avatar
 
Sam Hocevar committed
4025
else
4026 4027
  echo "$ac_t""no" 1>&6
NEED_GETOPT=1
Sam Hocevar's avatar
 
Sam Hocevar committed
4028
fi
4029 4030 4031

fi

Sam Hocevar's avatar
 
Sam Hocevar committed
4032

4033
echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
4034
echo "configure:4035: checking return type of signal handlers" >&5
4035 4036
if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
4037
else
4038
  cat > conftest.$ac_ext <<EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
4039
#line 4040 "configure"
4040 4041 4042 4043
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
#ifdef signal
4044
#undef signal
4045 4046 4047 4048 4049 4050 4051
#endif
#ifdef __cplusplus
extern "C" void (*signal (int, void (*)(int)))(int);
#else
void (*signal ()) ();
#endif

4052
int main() {
4053
int i;
4054 4055
; return 0; }
EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
4056
if { (eval echo configure:4057: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4057
  rm -rf conftest*
4058 4059
  ac_cv_type_signal=void
else
4060 4061 4062 4063
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_type_signal=int
4064
fi
4065
rm -f conftest*
4066 4067
fi

4068 4069
echo "$ac_t""$ac_cv_type_signal" 1>&6
cat >> confdefs.h <<EOF
4070
#define RETSIGTYPE $ac_cv_type_signal
4071
EOF
4072

Sam Hocevar's avatar
 
Sam Hocevar committed
4073

4074
echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
4075
echo "configure:4076: checking for dlopen in -ldl" >&5
4076 4077 4078
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
4079
else
4080
  ac_save_LIBS="$LIBS"
4081
LIBS="-ldl  $LIBS"
4082
cat > conftest.$ac_ext <<EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
4083
#line 4084 "configure"
4084 4085 4086
#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
4087 4088 4089 4090 4091 4092 4093
    builtin and then its argument prototype would still apply.  */
char dlopen();

int main() {
dlopen()
; return 0; }
EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
4094
if { (eval echo configure:4095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108
  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
4109
  vlc_LDFLAGS="${vlc_LDFLAGS} -ldl"
4110 4111
else
  echo "$ac_t""no" 1>&6
4112 4113
fi

4114
echo $ac_n "checking for cos in -lm""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
4115
echo "configure:4116: checking for cos in -lm" >&5
4116 4117 4118
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
4119
else
4120
  ac_save_LIBS="$LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
4121
LIBS="-lm  $LIBS"
4122
cat > conftest.$ac_ext <<EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
4123
#line 4124 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
4124 4125 4126
#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
4127 4128 4129 4130 4131 4132 4133
    builtin and then its argument prototype would still apply.  */
char cos();

int main() {
cos()
; return 0; }
EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
4134
if { (eval echo configure:4135: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148
  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
4149 4150
  imdct_LDFLAGS="${imdct_LDFLAGS} -lm"
  filter_distort_LDFLAGS="${filter_distort_LDFLAGS} -lm"
4151 4152
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4153 4154
fi

4155
echo $ac_n "checking for pow in -lm""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
4156
echo "configure:4157: checking for pow in -lm" >&5
4157 4158 4159
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
4160
else
4161
  ac_save_LIBS="$LIBS"
4162
LIBS="-lm  $LIBS"
4163
cat > conftest.$ac_ext <<EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
4164
#line 4165 "configure"
4165 4166 4167
#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
4168 4169 4170 4171 4172 4173 4174
    builtin and then its argument prototype would still apply.  */
char pow();

int main() {
pow()
; return 0; }
EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
4175
if { (eval echo configure:4176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189
  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
4190 4191 4192 4193
  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
4194

4195 4196
else
  echo "$ac_t""no" 1>&6
4197 4198
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
4199

Sam Hocevar's avatar
 
Sam Hocevar committed
4200 4201
THREAD_LIB=error
if test "x${THREAD_LIB}" = xerror; then
4202
  echo $ac_n "checking for pthread_attr_init in -lpthread""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
4203
echo "configure:4204: checking for pthread_attr_init in -lpthread" >&5
4204 4205 4206
ac_lib_var=`echo pthread'_'pthread_attr_init | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4207
else
4208
  ac_save_LIBS="$LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
4209
LIBS="-lpthread  $LIBS"
4210
cat > conftest.$ac_ext <<EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
4211
#line 4212 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
4212 4213 4214
#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
4215 4216 4217 4218 4219 4220 4221
    builtin and then its argument prototype would still apply.  */
char pthread_attr_init();

int main() {
pthread_attr_init()
; return 0; }
EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
4222
if { (eval echo configure:4223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236
  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
4237
  THREAD_LIB="-lpthread"
4238 4239
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4240
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4241

Sam Hocevar's avatar
 
Sam Hocevar committed
4242 4243
fi
if test "x${THREAD_LIB}" = xerror; then
4244
  echo $ac_n "checking for pthread_attr_init in -lpthreads""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
4245
echo "configure:4246: checking for pthread_attr_init in -lpthreads" >&5
4246 4247 4248
ac_lib_var=`echo pthreads'_'pthread_attr_init | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
4249
else
4250
  ac_save_LIBS="$LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
4251
LIBS="-lpthreads  $LIBS"
4252
cat > conftest.$ac_ext <<EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
4253
#line 4254 "configure"
4254 4255 4256
#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
4257 4258 4259 4260 4261 4262 4263
    builtin and then its argument prototype would still apply.  */
char pthread_attr_init();

int main() {
pthread_attr_init()
; return 0; }
EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
4264
if { (eval echo configure:4265: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278
  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
4279
  THREAD_LIB="-lpthreads"
4280 4281
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4282 4283
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
4284 4285
fi
if test "x${THREAD_LIB}" = xerror; then
4286
  echo $ac_n "checking for pthread_attr_init in -lc_r""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
4287
echo "configure:4288: checking for pthread_attr_init in -lc_r" >&5
4288 4289 4290
ac_lib_var=`echo c_r'_'pthread_attr_init | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4291
else
4292
  ac_save_LIBS="$LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
4293
LIBS="-lc_r  $LIBS"
4294
cat > conftest.$ac_ext <<EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
4295
#line 4296 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
4296
#include "confdefs.h"
Sam Hocevar's avatar
 
Sam Hocevar committed
4297 4298
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
4299 4300 4301 4302 4303 4304 4305
    builtin and then its argument prototype would still apply.  */
char pthread_attr_init();

int main() {
pthread_attr_init()
; return 0; }
EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
4306
if { (eval echo configure:4307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320
  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
4321
  THREAD_LIB="-lc_r"
4322 4323
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4324
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4325

Sam Hocevar's avatar
 
Sam Hocevar committed
4326 4327
fi
if test "x${THREAD_LIB}" = xerror; then
4328
  echo $ac_n "checking for pthread_attr_init""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
4329
echo "configure:4330: checking for pthread_attr_init" >&5
4330 4331
if eval "test \"`echo '$''{'ac_cv_func_pthread_attr_init'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
4332
else
4333
  cat > conftest.$ac_ext <<EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
4334
#line 4335 "configure"
4335
#include "confdefs.h"
Sam Hocevar's avatar
 
Sam Hocevar committed
4336
/* System header to define __stub macros and hopefully few prototypes,
4337
    which can conflict with char pthread_attr_init(); below.  */
Sam Hocevar's avatar
 
Sam Hocevar committed
4338
#include <assert.h>
4339 4340
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
4341 4342 4343 4344
    builtin and then its argument prototype would still apply.  */
char pthread_attr_init();

int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
4345 4346 4347 4348 4349 4350 4351

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

4355 4356
; return 0; }
EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
4357
if { (eval echo configure:4358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374
  rm -rf conftest*
  eval "ac_cv_func_pthread_attr_init=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_pthread_attr_init=no"
fi
rm -f conftest*
fi

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

Sam Hocevar's avatar
 
Sam Hocevar committed
4376
  THREAD_LIB=""
Sam Hocevar's avatar
 
Sam Hocevar committed
4377
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4378

4379
echo $ac_n "checking for cthread_fork in -lthreads""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
4380
echo "configure:4381: checking for cthread_fork in -lthreads" >&5
4381 4382 4383
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
4384
else
4385
  ac_save_LIBS="$LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
4386
LIBS="-lthreads  $LIBS"
4387
cat > conftest.$ac_ext <<EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
4388
#line 4389 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
4389 4390 4391
#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
4392 4393 4394 4395 4396 4397 4398
    builtin and then its argument prototype would still apply.  */
char cthread_fork();

int main() {
cthread_fork()
; return 0; }
EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
4399
if { (eval echo configure:4400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413
  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
4414
  THREAD_LIB="-lthreads"
4415 4416
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4417
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4418 4419


4420
cat > conftest.$ac_ext <<EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
4421
#line 4422 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
4422 4423
#include "confdefs.h"
#include <pthread.h>
4424
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4425 4426
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "pthread_cond_t" >/dev/null 2>&1; then
4427 4428 4429
  rm -rf conftest*
  
  cat >> confdefs.h <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4430
#define PTHREAD_COND_T_IN_PTHREAD_H 1
4431
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4432 4433 4434 4435

fi
rm -f conftest*

4436
cat > conftest.$ac_ext <<EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
4437
#line 4438 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
4438 4439
#include "confdefs.h"
#include <strings.h>
4440
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4441 4442
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "strncasecmp" >/dev/null 2>&1; then
4443 4444 4445
  rm -rf conftest*
  
  cat >> confdefs.h <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4446
#define STRNCASECMP_IN_STRINGS_H 1
4447
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4448 4449 4450

fi
rm -f conftest*
4451

Sam Hocevar's avatar
 
Sam Hocevar committed
4452

4453
for ac_hdr in getopt.h strings.h
Christophe Massiot's avatar
Christophe Massiot committed
4454
do
4455 4456
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
4457
echo "configure:4458: checking for $ac_hdr" >&5
4458 4459
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
4460
else
4461
  cat > conftest.$ac_ext <<EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
4462
#line 4463 "configure"
4463 4464 4465 4466
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Gildas Bazin's avatar
 
Gildas Bazin committed
4467
{ (eval echo configure:4468: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4468 4469 4470 4471 4472 4473 4474
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
4475
  cat conftest.$ac_ext >&5
4476 4477
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
Christophe Massiot's avatar
Christophe Massiot committed
4478
fi
4479
rm -f conftest*
Christophe Massiot's avatar
Christophe Massiot committed
4480
fi
4481 4482 4483 4484 4485 4486 4487 4488 4489
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
4490 4491 4492
fi
done

4493
for ac_hdr in sys/sockio.h fcntl.h sys/types.h sys/time.h sys/times.h
4494
do
4495 4496
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
4497
echo "configure:4498: checking for $ac_hdr" >&5
4498 4499
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
4500
else
4501
  cat > conftest.$ac_ext <<EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
4502
#line 4503 "configure"
4503 4504 4505 4506
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Gildas Bazin's avatar
 
Gildas Bazin committed
4507
{ (eval echo configure:4508: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4508 4509 4510 4511 4512 4513 4514
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
4515
  cat conftest.$ac_ext >&5
4516 4517
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
4518
fi
4519
rm -f conftest*
4520
fi
4521 4522 4523 4524 4525 4526 4527 4528 4529
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
4530 4531 4532
fi
done

4533
for ac_hdr in dlfcn.h image.h
4534
do
4535 4536
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
4537
echo "configure:4538: checking for $ac_hdr" >&5
4538 4539
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
4540
else
4541
  cat > conftest.$ac_ext <<EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
4542
#line 4543 "configure"
4543 4544 4545 4546
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Gildas Bazin's avatar
 
Gildas Bazin committed
4547
{ (eval echo configure:4548: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4548 4549 4550 4551 4552 4553 4554
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
4555
  cat conftest.$ac_ext >&5
4556 4557
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
4558
fi
4559
rm -f conftest*
4560
fi
4561 4562 4563 4564 4565 4566 4567 4568 4569
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
4570 4571 4572
fi
done

4573
for ac_hdr in arpa/inet.h net/if.h netinet/in.h sys/socket.h
4574
do
4575 4576
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
4577
echo "configure:4578: checking for $ac_hdr" >&5
4578 4579
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
4580
else
4581
  cat > conftest.$ac_ext <<EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
4582
#line 4583 "configure"
4583 4584 4585 4586
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Gildas Bazin's avatar
 
Gildas Bazin committed
4587
{ (eval echo configure:4588: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4588 4589 4590 4591 4592 4593 4594
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
4595
  cat conftest.$ac_ext >&5
4596 4597
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
4598
fi
4599
rm -f conftest*
4600
fi
4601 4602 4603 4604 4605 4606 4607 4608 4609
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
4610 4611 4612
fi
done

4613
for ac_hdr in machine/param.h sys/shm.h
4614
do
4615 4616
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
4617
echo "configure:4618: checking for $ac_hdr" >&5
4618 4619
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
4620
else
4621
  cat > conftest.$ac_ext <<EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
4622
#line 4623 "configure"
4623 4624 4625 4626
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Gildas Bazin's avatar
 
Gildas Bazin committed
4627
{ (eval echo configure:4628: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4628 4629 4630 4631 4632 4633 4634
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
4635
  cat conftest.$ac_ext >&5
4636 4637
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
4638
fi
4639
rm -f conftest*
4640
fi
4641 4642 4643 4644 4645 4646 4647 4648 4649
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
4650 4651 4652
fi
done

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

Sam Hocevar's avatar
 
Sam Hocevar committed
4693

4694
echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
4695
echo "configure:4696: checking whether time.h and sys/time.h may both be included" >&5
4696 4697
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
4698
else
4699
  cat > conftest.$ac_ext <<EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
4700
#line 4701 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
4701 4702 4703 4704
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
#include <time.h>
4705 4706 4707 4708
int main() {
struct tm *tp;
; return 0; }
EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
4709
if { (eval echo configure:4710: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4710
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
4711 4712
  ac_cv_header_time=yes
else
4713 4714 4715 4716
  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
4717
fi
4718
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
4719
fi
4720

4721 4722 4723
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
4724
#define TIME_WITH_SYS_TIME 1
4725
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4726 4727 4728 4729

fi


4730
cat > conftest.$ac_ext <<EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
4731
#line 4732 "configure"
Christophe Massiot's avatar
Christophe Massiot committed
4732
#include "confdefs.h"
4733 4734 4735 4736 4737 4738 4739
#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
4740
#define HAVE_DECL_NANOSLEEP 1
4741
EOF
4742 4743 4744


fi
4745
rm -f conftest*
4746 4747


4748
cat > conftest.$ac_ext <<EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
4749
#line 4750 "configure"
4750
#include "confdefs.h"
4751 4752 4753 4754 4755 4756 4757
#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
4758
#define HAVE_STRUCT_TIMESPEC 1
4759
EOF
4760 4761 4762


fi
4763
rm -f conftest*
4764 4765


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

Sam Hocevar's avatar
 
Sam Hocevar committed
4806

Sam Hocevar's avatar
 
Sam Hocevar committed
4807 4808 4809 4810 4811 4812 4813 4814
if test x$SYS != xmingw32
then
  if test x$x_includes = xNONE; then
    x_includes=/usr/X11R6/include
  fi
  if test x$x_libraries = xNONE; then
    x_libraries=/usr/X11R6/lib
  fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4815
  CPPFLAGS="$save_CPPFLAGS -I$x_includes"
4816
  for ac_hdr in X11/extensions/dpms.h
Sam Hocevar's avatar
 
Sam Hocevar committed
4817
do
4818 4819
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
4820
echo "configure:4821: checking for $ac_hdr" >&5
4821 4822
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
4823
else
4824
  cat > conftest.$ac_ext <<EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
4825
#line 4826 "configure"
4826 4827 4828 4829
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Gildas Bazin's avatar
 
Gildas Bazin committed
4830
{ (eval echo configure:4831: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4831 4832 4833 4834 4835 4836 4837
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
4838
  cat conftest.$ac_ext >&5
4839 4840
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
Sam Hocevar's avatar
 
Sam Hocevar committed
4841
fi
4842
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
4843
fi
4844 4845 4846 4847 4848 4849 4850 4851
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
Gildas Bazin's avatar
 
Gildas Bazin committed
4852
#line 4853 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
4853 4854
#include "confdefs.h"
#include <X11/extensions/dpms.h>
4855
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4856 4857
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "DPMSInfo" >/dev/null 2>&1; then
4858 4859 4860
  rm -rf conftest*
  
      cat >> confdefs.h <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4861
#define DPMSINFO_IN_DPMS_H 1
4862
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
4863

4864
    
Sam Hocevar's avatar
 
Sam Hocevar committed
4865 4866 4867
fi
rm -f conftest*

4868 4869 4870
  
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4871 4872 4873
fi
done

Sam Hocevar's avatar
 
Sam Hocevar committed
4874
  CPPFLAGS="$save_CPPFLAGS"
Sam Hocevar's avatar
 
Sam Hocevar committed
4875 4876
fi

4877
echo $ac_n "checking for ntohl in sys/param.h""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
4878
echo "configure:4879: checking for ntohl in sys/param.h" >&5
4879 4880
if eval "test \"`echo '$''{'ac_cv_c_ntohl_sys_param_h'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
4881 4882
else
  CFLAGS="${save_CFLAGS} -Wall -Werror"
4883
     cat > conftest.$ac_ext <<EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
4884
#line 4885 "configure"
Christophe Massiot's avatar
Christophe Massiot committed
4885 4886
#include "confdefs.h"
#include <sys/param.h>
4887
int main() {
4888
void foo() { int meuh; ntohl(meuh); }
4889 4890
; return 0; }
EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
4891
if { (eval echo configure:4892: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4892
  rm -rf conftest*
4893
  ac_cv_c_ntohl_sys_param_h=yes
Christophe Massiot's avatar
Christophe Massiot committed
4894
else
4895 4896 4897 4898
  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
4899
fi
4900
rm -f conftest*
4901
fi
4902

4903 4904 4905
echo "$ac_t""$ac_cv_c_ntohl_sys_param_h" 1>&6
if test x"$ac_cv_c_ntohl_sys_param_h" != x"no"; then
    cat >> confdefs.h <<\EOF
4906
#define NTOHL_IN_SYS_PARAM_H 1
4907
EOF
4908 4909

fi
Sam Hocevar's avatar
 
Sam Hocevar committed
4910

4911
echo $ac_n "checking if \$CC accepts -finline-limit""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
4912
echo "configure:4913: checking if \$CC accepts -finline-limit" >&5
4913 4914
if eval "test \"`echo '$''{'ac_cv_c_inline_limit'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
4915 4916
else
  CFLAGS="${save_CFLAGS} -finline-limit-30000"
4917
     cat > conftest.$ac_ext <<EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
4918
#line 4919 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
4919 4920
#include "confdefs.h"

4921
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
4922

4923 4924
; return 0; }
EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
4925
if { (eval echo configure:4926: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4926
  rm -rf conftest*
4927
  ac_cv_c_inline_limit=yes
Sam Hocevar's avatar
 
Sam Hocevar committed
4928
else
4929 4930 4931 4932
  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
4933
fi
4934
rm -f conftest*
4935
fi
4936 4937

echo "$ac_t""$ac_cv_c_inline_limit" 1>&6
4938 4939 4940 4941
if test x"$ac_cv_c_inline_limit" != x"no"; then
    save_CFLAGS="${save_CFLAGS} -finline-limit-30000"
fi

4942
echo $ac_n "checking if \$CC accepts -Wall -Winline""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
4943
echo "configure:4944: checking if \$CC accepts -Wall -Winline" >&5
4944 4945
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
4946 4947
else
  CFLAGS="${save_CFLAGS} -Wall -Winline"
4948
     cat > conftest.$ac_ext <<EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
4949
#line 4950 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
4950 4951
#include "confdefs.h"

4952
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
4953

4954 4955
; return 0; }
EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
4956
if { (eval echo configure:4957: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4957
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
4958 4959
  ac_cv_c_Wall_Winline=yes
else
4960 4961 4962 4963
  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
4964
fi
4965
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
4966
fi
4967 4968

echo "$ac_t""$ac_cv_c_Wall_Winline" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4969 4970 4971
if test x"$ac_cv_c_Wall_Winline" != x"no"; then
    save_CFLAGS="${save_CFLAGS} -Wall -Winline"
else
4972
    echo $ac_n "checking if \$CC accepts -wall -winline""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
4973
echo "configure:4974: checking if \$CC accepts -wall -winline" >&5
4974 4975
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
4976 4977
else
  CFLAGS="${save_CFLAGS} -wall -winline"
4978
         cat > conftest.$ac_ext <<EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
4979
#line 4980 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
4980 4981
#include "confdefs.h"

4982
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
4983

4984 4985
; return 0; }
EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
4986
if { (eval echo configure:4987: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4987
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
4988 4989
  ac_cv_c_wall_winline=yes
else
4990 4991 4992 4993
  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
4994
fi
4995
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
4996
fi
4997 4998

echo "$ac_t""$ac_cv_c_wall_winline" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
4999 5000 5001 5002 5003
    if test x"$ac_cv_c_wall_winline" != x"no"; then
        save_CFLAGS="${save_CFLAGS} -wall -winline"
    fi
fi

5004
echo $ac_n "checking if \$CC accepts -pipe""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
5005
echo "configure:5006: checking if \$CC accepts -pipe" >&5
5006 5007
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
5008 5009
else
  CFLAGS="${save_CFLAGS} -pipe"
5010
     cat > conftest.$ac_ext <<EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
5011
#line 5012 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
5012 5013
#include "confdefs.h"

5014
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
5015

5016 5017
; return 0; }
EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
5018
if { (eval echo configure:5019: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5019
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
5020 5021
  ac_cv_c_pipe=yes
else
5022 5023 5024 5025
  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
5026
fi
5027
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
5028
fi
5029 5030

echo "$ac_t""$ac_cv_c_pipe" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
5031 5032 5033 5034
if test x"$ac_cv_c_pipe" != x"no"; then
    save_CFLAGS="${save_CFLAGS} -pipe"
fi

5035
echo $ac_n "checking if \$CC accepts -O3""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
5036
echo "configure:5037: checking if \$CC accepts -O3" >&5
5037 5038
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
5039 5040
else
  CFLAGS="${save_CFLAGS} -O3"
5041
     cat > conftest.$ac_ext <<EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
5042
#line 5043 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
5043 5044
#include "confdefs.h"

5045
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
5046

5047 5048
; return 0; }
EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
5049
if { (eval echo configure:5050: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5050
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
5051 5052
  ac_cv_c_o3=yes
else
5053 5054 5055 5056
  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
5057
fi
5058
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
5059
fi
5060 5061

echo "$ac_t""$ac_cv_c_o3" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
5062 5063 5064
if test x"$ac_cv_c_o3" != x"no"; then
    CFLAGS_OPTIM="${CFLAGS_OPTIM} -O3"
else
5065
    echo $ac_n "checking if \$CC accepts -O2""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
5066
echo "configure:5067: checking if \$CC accepts -O2" >&5
5067 5068
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
5069 5070
else
  CFLAGS="${save_CFLAGS} -O2"
5071
         cat > conftest.$ac_ext <<EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
5072
#line 5073 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
5073 5074
#include "confdefs.h"

5075
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
5076

5077 5078
; return 0; }
EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
5079
if { (eval echo configure:5080: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5080
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
5081 5082
  ac_cv_c_o2=yes
else
5083 5084 5085 5086
  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
5087
fi
5088
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
5089
fi
5090 5091

echo "$ac_t""$ac_cv_c_o2" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
5092 5093 5094
    if test x"$ac_cv_c_o2" != x"no"; then
        CFLAGS_OPTIM="${CFLAGS_OPTIM} -O2"
    else
5095
        echo $ac_n "checking if \$CC accepts -O""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
5096
echo "configure:5097: checking if \$CC accepts -O" >&5
5097 5098
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
5099 5100
else
  CFLAGS="${save_CFLAGS} -O"
5101
             cat > conftest.$ac_ext <<EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
5102
#line 5103 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
5103 5104
#include "confdefs.h"

5105
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
5106

5107 5108
; return 0; }
EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
5109
if { (eval echo configure:5110: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5110
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
5111 5112
  ac_cv_c_o=yes
else
5113 5114 5115 5116
  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
5117
fi
5118
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
5119
fi
5120 5121

echo "$ac_t""$ac_cv_c_o" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
5122 5123 5124 5125 5126 5127
        if test x"$ac_cv_c_o" != x"no"; then
            CFLAGS_OPTIM="${CFLAGS_OPTIM} -O"
        fi
    fi
fi

5128
echo $ac_n "checking if \$CC accepts -ffast-math""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
5129
echo "configure:5130: checking if \$CC accepts -ffast-math" >&5
5130 5131
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
5132 5133
else
  CFLAGS="${save_CFLAGS} -ffast-math"
5134
     cat > conftest.$ac_ext <<EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
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
Gildas Bazin's avatar
 
Gildas Bazin committed
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_fast_math=yes
else
5146 5147 5148 5149
  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
5150
fi
5151
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
5152
fi
5153 5154

echo "$ac_t""$ac_cv_c_fast_math" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
5155 5156 5157 5158
if test x"$ac_cv_c_fast_math" != x"no"; then
    CFLAGS_OPTIM="${CFLAGS_OPTIM} -ffast-math"
fi

5159
echo $ac_n "checking if \$CC accepts -funroll-loops""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
5160
echo "configure:5161: checking if \$CC accepts -funroll-loops" >&5
5161 5162
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
5163 5164
else
  CFLAGS="${save_CFLAGS} -funroll-loops"
5165
     cat > conftest.$ac_ext <<EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
5166
#line 5167 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
5167 5168
#include "confdefs.h"

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

5171 5172
; return 0; }
EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
5173
if { (eval echo configure:5174: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5174
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
5175 5176
  ac_cv_c_unroll_loops=yes
else
5177 5178 5179 5180
  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
5181
fi
5182
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
5183
fi
5184 5185

echo "$ac_t""$ac_cv_c_unroll_loops" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
5186 5187 5188 5189
if test x"$ac_cv_c_unroll_loops" != x"no"; then
    CFLAGS_OPTIM="${CFLAGS_OPTIM} -funroll-loops"
fi

5190
echo $ac_n "checking if \$CC accepts -fomit-frame-pointer""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
5191
echo "configure:5192: checking if \$CC accepts -fomit-frame-pointer" >&5
5192 5193
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
5194 5195
else
  CFLAGS="${save_CFLAGS} -fomit-frame-pointer"
5196
     cat > conftest.$ac_ext <<EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
5197
#line 5198 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
5198 5199
#include "confdefs.h"

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

5202 5203
; return 0; }
EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
5204
if { (eval echo configure:5205: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5205
  rm -rf conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
5206 5207
  ac_cv_c_omit_frame_pointer=yes
else
5208 5209 5210 5211
  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
5212
fi
5213
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
5214
fi
5215 5216

echo "$ac_t""$ac_cv_c_omit_frame_pointer" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
5217 5218 5219 5220
if test x"$ac_cv_c_omit_frame_pointer" != x"no"; then
    CFLAGS_OPTIM_NODEBUG="${CFLAGS_OPTIM_NODEBUG} -fomit-frame-pointer"
fi

5221
echo $ac_n "checking if \$CC accepts -bundle -undefined error -lcc_dynamic""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
5222
echo "configure:5223: checking if \$CC accepts -bundle -undefined error -lcc_dynamic" >&5
5223 5224
if eval "test \"`echo '$''{'ac_cv_ld_darwin'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
5225
else
Christophe Massiot's avatar
Christophe Massiot committed
5226
  CFLAGS="${save_CFLAGS} -bundle -undefined error -lcc_dynamic"
5227
     cat > conftest.$ac_ext <<EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
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
Gildas Bazin's avatar
 
Gildas Bazin committed
5235
if { (eval echo configure:5236: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5236
  rm -rf conftest*
5237
  ac_cv_ld_darwin=yes
Sam Hocevar's avatar
 
Sam Hocevar committed
5238
else
5239 5240 5241 5242
  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
5243
fi
5244
rm -f conftest*
5245
fi
5246 5247

echo "$ac_t""$ac_cv_ld_darwin" 1>&6
5248
if test x"$ac_cv_ld_darwin" != x"no"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
5249
    plugins_LDFLAGS="${plugins_LDFLAGS} -bundle -undefined error -lcc_dynamic"
5250
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
5251

5252
echo $ac_n "checking if \$CC accepts -shared""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
5253
echo "configure:5254: checking if \$CC accepts -shared" >&5
5254 5255
if eval "test \"`echo '$''{'ac_cv_ld_plugins'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
5256 5257
else
  CFLAGS="${save_CFLAGS} -shared"
5258
     cat > conftest.$ac_ext <<EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
5259
#line 5260 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
5260 5261
#include "confdefs.h"

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

5264 5265
; return 0; }
EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
5266
if { (eval echo configure:5267: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5267
  rm -rf conftest*
5268
  ac_cv_ld_plugins=yes
Sam Hocevar's avatar
 
Sam Hocevar committed
5269
else
5270 5271 5272 5273
  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
5274
fi
5275
rm -f conftest*
5276
fi
5277 5278

echo "$ac_t""$ac_cv_ld_plugins" 1>&6
5279
if test x"$ac_cv_ld_plugins" != x"no"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
5280
    plugins_LDFLAGS="${plugins_LDFLAGS} -shared"
5281
fi
5282 5283
        
echo $ac_n "checking for variadic cpp macros""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
5284
echo "configure:5285: checking for variadic cpp macros" >&5
5285 5286
if eval "test \"`echo '$''{'ac_cv_cpp_variadic_macros'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
5287 5288
else
  CFLAGS="${save_CFLAGS}"
5289
     cat > conftest.$ac_ext <<EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
5290
#line 5291 "configure"
5291 5292 5293
#include "confdefs.h"
#include <stdio.h>
          #define a(b,c...) printf(b,##c)
5294
int main() {
5295
a("foo");a("%s","bar");a("%s%s","baz","quux");
5296 5297
; return 0; }
EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
5298
if { (eval echo configure:5299: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5299
  rm -rf conftest*
5300 5301
  ac_cv_cpp_variadic_macros=yes
else
5302 5303 5304 5305
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_cpp_variadic_macros=no
5306
fi
5307
rm -f conftest*
5308
fi
5309

5310 5311 5312
echo "$ac_t""$ac_cv_cpp_variadic_macros" 1>&6
if test x"$ac_cv_cpp_variadic_macros" != x"no"; then
    cat >> confdefs.h <<\EOF
5313
#define HAVE_VARIADIC_MACROS 1
5314
EOF
5315 5316 5317

fi

5318
echo $ac_n "checking __attribute__ ((aligned ())) support""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
5319
echo "configure:5320: checking __attribute__ ((aligned ())) support" >&5
5320 5321
if eval "test \"`echo '$''{'ac_cv_c_attribute_aligned'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
5322 5323
else
  ac_cv_c_attribute_aligned=0
Sam Hocevar's avatar
 
Sam Hocevar committed
5324
        CFLAGS="${save_CFLAGS} -Werror"
5325
    for ac_cv_c_attr_align_try in 2 4 8 16 32 64; do
5326
        cat > conftest.$ac_ext <<EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
5327
#line 5328 "configure"
5328 5329
#include "confdefs.h"

5330
int main() {
5331
static char c __attribute__ ((aligned($ac_cv_c_attr_align_try))) = 0; return c;
5332 5333
; return 0; }
EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
5334
if { (eval echo configure:5335: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5335
  rm -rf conftest*
5336 5337
  ac_cv_c_attribute_aligned=$ac_cv_c_attr_align_try
else
5338 5339
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
5340
fi
5341
rm -f conftest*
5342 5343
    done
fi
5344

5345 5346 5347
echo "$ac_t""$ac_cv_c_attribute_aligned" 1>&6
if test x"$ac_cv_c_attribute_aligned" != x"0"; then
    cat >> confdefs.h <<EOF
5348
#define ATTRIBUTE_ALIGNED_MAX $ac_cv_c_attribute_aligned
5349
EOF
5350 5351 5352

fi

Sam Hocevar's avatar
 
Sam Hocevar committed
5353
CFLAGS="${save_CFLAGS}"
Sam Hocevar's avatar
 
Sam Hocevar committed
5354
CPPFLAGS="${save_CPPFLAGS}"
Sam Hocevar's avatar
 
Sam Hocevar committed
5355
LDFLAGS="${save_LDFLAGS}"
Christophe Massiot's avatar
Christophe Massiot committed
5356

5357
echo $ac_n "checking for boolean_t in sys/types.h""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
5358
echo "configure:5359: checking for boolean_t in sys/types.h" >&5
5359 5360
if eval "test \"`echo '$''{'ac_cv_c_boolean_t_sys_types_h'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
5361
else
5362
  cat > conftest.$ac_ext <<EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
5363
#line 5364 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
5364 5365
#include "confdefs.h"
#include <sys/types.h>
5366
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
5367
boolean_t foo;
5368 5369
; return 0; }
EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
5370
if { (eval echo configure:5371: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5371
  rm -rf conftest*
5372
  ac_cv_c_boolean_t_sys_types_h=yes
Sam Hocevar's avatar
 
Sam Hocevar committed
5373
else
5374 5375 5376 5377
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_c_boolean_t_sys_types_h=no
Sam Hocevar's avatar
 
Sam Hocevar committed
5378
fi
5379
rm -f conftest*
5380
fi
5381

5382 5383 5384
echo "$ac_t""$ac_cv_c_boolean_t_sys_types_h" 1>&6
if test x"$ac_cv_c_boolean_t_sys_types_h" != x"no"; then
    cat >> confdefs.h <<\EOF
5385
#define BOOLEAN_T_IN_SYS_TYPES_H 1
5386
EOF
5387 5388 5389

fi

5390
echo $ac_n "checking for boolean_t in pthread.h""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
5391
echo "configure:5392: checking for boolean_t in pthread.h" >&5
5392 5393
if eval "test \"`echo '$''{'ac_cv_c_boolean_t_pthread_h'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
5394
else
5395
  cat > conftest.$ac_ext <<EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
5396
#line 5397 "configure"
5397 5398
#include "confdefs.h"
#include <pthread.h>
5399
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
5400
boolean_t foo;
5401 5402
; return 0; }
EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
5403
if { (eval echo configure:5404: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5404
  rm -rf conftest*
5405
  ac_cv_c_boolean_t_pthread_h=yes
5406
else
5407 5408 5409 5410
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_c_boolean_t_pthread_h=no
5411
fi
5412
rm -f conftest*
5413
fi
5414

5415 5416 5417
echo "$ac_t""$ac_cv_c_boolean_t_pthread_h" 1>&6
if test x"$ac_cv_c_boolean_t_pthread_h" != x"no"; then
    cat >> confdefs.h <<\EOF
5418
#define BOOLEAN_T_IN_PTHREAD_H 1
5419
EOF
5420 5421 5422

fi

5423
echo $ac_n "checking for boolean_t in cthreads.h""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
5424
echo "configure:5425: checking for boolean_t in cthreads.h" >&5
5425 5426
if eval "test \"`echo '$''{'ac_cv_c_boolean_t_cthreads_h'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
5427
else
5428
  cat > conftest.$ac_ext <<EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
5429
#line 5430 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
5430 5431
#include "confdefs.h"
#include <cthreads.h>
5432
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
5433
boolean_t foo;
5434 5435
; return 0; }
EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
5436
if { (eval echo configure:5437: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5437
  rm -rf conftest*
5438
  ac_cv_c_boolean_t_cthreads_h=yes
Sam Hocevar's avatar
 
Sam Hocevar committed
5439
else
5440 5441 5442 5443
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_c_boolean_t_cthreads_h=no
Sam Hocevar's avatar
 
Sam Hocevar committed
5444
fi
5445
rm -f conftest*
5446
fi
5447

5448 5449 5450
echo "$ac_t""$ac_cv_c_boolean_t_cthreads_h" 1>&6
if test x"$ac_cv_c_boolean_t_cthreads_h" != x"no"; then
    cat >> confdefs.h <<\EOF
5451
#define BOOLEAN_T_IN_CTHREADS_H 1
5452
EOF
5453 5454

fi
Sam Hocevar's avatar
 
Sam Hocevar committed
5455

Sam Hocevar's avatar
 
Sam Hocevar committed
5456 5457 5458 5459 5460
case x"${target_cpu}" in
  x)
    ARCH=unknown
    ;;
  *)
Sam Hocevar's avatar
 
Sam Hocevar committed
5461
    ARCH="${target_cpu}"
Sam Hocevar's avatar
 
Sam Hocevar committed
5462 5463
    ;;
esac
Sam Hocevar's avatar
 
Sam Hocevar committed
5464

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

Sam Hocevar's avatar
 
Sam Hocevar committed
5468
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
5469 5470
MMXEXT_MODULES="memcpymmxext idctmmxext motionmmxext"
THREEDNOW_MODULES="memcpy3dn imdct3dn downmix3dn"
Gildas Bazin's avatar
 
Gildas Bazin committed
5471
SSE_MODULES="imdctsse downmixsse"
5472
ALTIVEC_MODULES="idctaltivec motionaltivec memcpyaltivec"
Sam Hocevar's avatar
 
Sam Hocevar committed
5473

5474
echo $ac_n "checking if \$CC groks MMX inline assembly""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
5475
echo "configure:5476: checking if \$CC groks MMX inline assembly" >&5
5476 5477
if eval "test \"`echo '$''{'ac_cv_mmx_inline'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
5478
else
5479
  cat > conftest.$ac_ext <<EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
5480
#line 5481 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
5481 5482
#include "confdefs.h"

5483
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
5484
void *p;asm volatile("packuswb %%mm1,%%mm2"::"r"(p));
5485 5486
; return 0; }
EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
5487
if { (eval echo configure:5488: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5488
  rm -rf conftest*
5489
  ac_cv_mmx_inline=yes
Sam Hocevar's avatar
 
Sam Hocevar committed
5490
else
5491 5492 5493 5494
  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
5495
fi
5496
rm -f conftest*
5497
fi
5498 5499

echo "$ac_t""$ac_cv_mmx_inline" 1>&6
5500 5501 5502
if test x"$ac_cv_mmx_inline" != x"no"; then
  ACCEL_MODULES="${ACCEL_MODULES} ${MMX_MODULES}"
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
5503

5504
echo $ac_n "checking if \$CC groks MMX EXT inline assembly""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
5505
echo "configure:5506: checking if \$CC groks MMX EXT inline assembly" >&5
5506 5507
if eval "test \"`echo '$''{'ac_cv_mmxext_inline'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
5508
else
5509
  cat > conftest.$ac_ext <<EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
5510
#line 5511 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
5511 5512
#include "confdefs.h"

5513
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
5514
void *p;asm volatile("maskmovq %%mm1,%%mm2"::"r"(p));
5515 5516
; return 0; }
EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
5517
if { (eval echo configure:5518: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5518
  rm -rf conftest*
5519
  ac_cv_mmxext_inline=yes
Sam Hocevar's avatar
 
Sam Hocevar committed
5520
else
5521 5522 5523 5524
  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
5525
fi
5526
rm -f conftest*
5527
fi
5528 5529

echo "$ac_t""$ac_cv_mmxext_inline" 1>&6
5530 5531 5532
if test x"$ac_cv_mmxext_inline" != x"no"; then
  ACCEL_MODULES="${ACCEL_MODULES} ${MMXEXT_MODULES}"
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
5533

5534
echo $ac_n "checking if \$CC groks 3D Now! inline assembly""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
5535
echo "configure:5536: checking if \$CC groks 3D Now! inline assembly" >&5
5536 5537
if eval "test \"`echo '$''{'ac_cv_3dnow_inline'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
5538
else
5539
  cat > conftest.$ac_ext <<EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
5540
#line 5541 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
5541 5542
#include "confdefs.h"

5543
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
5544
void *p;asm volatile("pfadd %%mm1,%%mm2"::"r"(p));
5545 5546
; return 0; }
EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
5547
if { (eval echo configure:5548: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5548
  rm -rf conftest*
5549
  ac_cv_3dnow_inline=yes
Sam Hocevar's avatar
 
Sam Hocevar committed
5550
else
5551 5552 5553 5554
  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
5555
fi
5556
rm -f conftest*
5557
fi
5558

5559 5560 5561
echo "$ac_t""$ac_cv_3dnow_inline" 1>&6
if test x"$ac_cv_3dnow_inline" != x"no"; then
  cat >> confdefs.h <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5562
#define CAN_COMPILE_3DNOW 1
5563
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5564

5565 5566
  ACCEL_MODULES="${ACCEL_MODULES} ${THREEDNOW_MODULES}"
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
5567

5568
echo $ac_n "checking if \$CC groks SSE inline assembly""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
5569
echo "configure:5570: checking if \$CC groks SSE inline assembly" >&5
5570 5571
if eval "test \"`echo '$''{'ac_cv_sse_inline'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
5572
else
5573
  cat > conftest.$ac_ext <<EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
5574
#line 5575 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
5575 5576
#include "confdefs.h"

5577
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
5578
void *p;asm volatile("xorps %%xmm1,%%xmm2"::"r"(p));
5579 5580
; return 0; }
EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
5581
if { (eval echo configure:5582: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5582
  rm -rf conftest*
5583
  ac_cv_sse_inline=yes
Sam Hocevar's avatar
 
Sam Hocevar committed
5584
else
5585 5586 5587 5588
  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
5589
fi
5590
rm -f conftest*
5591
fi
5592

5593 5594 5595
echo "$ac_t""$ac_cv_sse_inline" 1>&6
if test x"$ac_cv_sse_inline" != x"no" -a x$SYS != xmingw32; then
  cat >> confdefs.h <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5596
#define CAN_COMPILE_SSE 1
5597
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5598

5599 5600 5601
  ACCEL_MODULES="${ACCEL_MODULES} ${SSE_MODULES}"
fi

Gildas Bazin's avatar
 
Gildas Bazin committed
5602 5603 5604
# don't try to grok altivec with native mingw32 it doesn't work right now
# we should be able to remove this test with future versions of mingw32
if test x$SYS != xmingw32; then
5605
echo $ac_n "checking if \$CC groks Altivec inline assembly""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
5606
echo "configure:5607: checking if \$CC groks Altivec inline assembly" >&5
5607 5608
if eval "test \"`echo '$''{'ac_cv_altivec_inline'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
5609
else
5610
  cat > conftest.$ac_ext <<EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
5611
#line 5612 "configure"
5612 5613
#include "confdefs.h"

5614
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
5615
asm volatile("vperm 0,1,2,3");
5616 5617
; return 0; }
EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
5618
if { (eval echo configure:5619: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5619
  rm -rf conftest*
5620
  ac_cv_altivec_inline=yes
5621
else
5622 5623 5624 5625
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  save_CFLAGS=$CFLAGS
5626
          CFLAGS="$CFLAGS -Wa,-m7400"
5627
          cat > conftest.$ac_ext <<EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
5628
#line 5629 "configure"
5629 5630
#include "confdefs.h"

5631
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
5632
asm volatile("vperm 0,1,2,3");
5633 5634
; return 0; }
EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
5635
if { (eval echo configure:5636: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5636
  rm -rf conftest*
5637
  ac_cv_altivec_inline="-Wa,-m7400"
5638
else
5639 5640 5641 5642
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_altivec_inline=no
5643
fi
5644
rm -f conftest*
5645
          CFLAGS=$save_CFLAGS
5646
         
5647
fi
5648
rm -f conftest*
5649
fi
5650

5651 5652 5653
echo "$ac_t""$ac_cv_altivec_inline" 1>&6
if test x"$ac_cv_altivec_inline" != x"no"; then
  cat >> confdefs.h <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5654
#define CAN_COMPILE_ALTIVEC 1
5655
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5656

5657
  if test x"$ac_cv_altivec_inline" != x"yes"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
5658 5659 5660 5661
    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"
5662
  fi
5663 5664
  ACCEL_MODULES="${ACCEL_MODULES} ${ALTIVEC_MODULES}"
fi
5665

5666
echo $ac_n "checking if \$CC groks Altivec C extensions""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
5667
echo "configure:5668: checking if \$CC groks Altivec C extensions" >&5
5668 5669
if eval "test \"`echo '$''{'ac_cv_c_altivec'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
5670
else
5671 5672 5673
  save_CFLAGS=$CFLAGS
     CFLAGS="$CFLAGS -faltivec"
     # Darwin test
5674
     cat > conftest.$ac_ext <<EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
5675
#line 5676 "configure"
5676
#include "confdefs.h"
5677

5678
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
5679
vec_mtvscr((vector unsigned int)(0));
5680 5681
; return 0; }
EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
5682
if { (eval echo configure:5683: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5683
  rm -rf conftest*
5684 5685
  ac_cv_c_altivec=-faltivec
else
5686 5687 5688 5689
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  
5690
        # Linux/PPC test
Sam Hocevar's avatar
 
Sam Hocevar committed
5691
        CFLAGS="$save_CFLAGS $idctaltivec_CFLAGS -fvec"
5692
        cat > conftest.$ac_ext <<EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
5693
#line 5694 "configure"
5694
#include "confdefs.h"
5695

5696
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
5697
vec_mtvscr((vector unsigned int)(0));
5698 5699
; return 0; }
EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
5700
if { (eval echo configure:5701: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5701
  rm -rf conftest*
5702
  ac_cv_c_altivec="-fvec"
5703
else
5704 5705 5706 5707
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_c_altivec=no
5708
fi
5709 5710
rm -f conftest*
        
5711
fi
5712
rm -f conftest*
5713
     CFLAGS=$save_CFLAGS
5714
    
5715 5716
fi

5717 5718 5719
echo "$ac_t""$ac_cv_c_altivec" 1>&6
if test x"$ac_cv_c_altivec" != x"no"; then
  cat >> confdefs.h <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
5720
#define CAN_COMPILE_C_ALTIVEC 1
5721
EOF
5722

Sam Hocevar's avatar
 
Sam Hocevar committed
5723 5724 5725 5726
  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"
5727
  ACCEL_MODULES="${ACCEL_MODULES} ${ALTIVEC_MODULES}"
5728 5729
fi

5730
echo $ac_n "checking if linker needs -framework vecLib""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
5731
echo "configure:5732: checking if linker needs -framework vecLib" >&5
5732 5733
if eval "test \"`echo '$''{'ac_cv_ld_altivec'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
5734 5735 5736
else
  save_LDFLAGS=$LDFLAGS
     LDFLAGS="$LDFLAGS -framework vecLib"
5737
     cat > conftest.$ac_ext <<EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
5738
#line 5739 "configure"
5739 5740
#include "confdefs.h"

5741
int main() {
5742

5743 5744
; return 0; }
EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
5745
if { (eval echo configure:5746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5746
  rm -rf conftest*
5747 5748
  ac_cv_ld_altivec=yes
else
5749 5750 5751 5752
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_ld_altivec=no
5753
fi
5754
rm -f conftest*
5755
     LDFLAGS=$save_LDFLAGS
5756
    
5757
fi
5758 5759

echo "$ac_t""$ac_cv_ld_altivec" 1>&6
5760
if test x"$ac_cv_ld_altivec" != x"no"; then
Sam Hocevar's avatar
 
Sam Hocevar committed
5761 5762 5763 5764
  idctaltivec_LDFLAGS="${idctaltivec_LDFLAGS} -framework vecLib"
  motionaltivec_LDFLAGS="${motionaltivec_LDFLAGS} -framework vecLib"
  memcpyaltivec_LDFLAGS="${memcpyaltivec_LDFLAGS} -framework vecLib"
  vlc_LDFLAGS="${vlc_LDFLAGS} -framework vecLib"
5765
fi
Gildas Bazin's avatar
 
Gildas Bazin committed
5766
fi # end if mingw32
Sam Hocevar's avatar
 
Sam Hocevar committed
5767

5768

Sam Hocevar's avatar
 
Sam Hocevar committed
5769 5770 5771
# Check whether --with- or --without- was given.
if test "${with_+set}" = set; then
  withval="$with_"
5772 5773
  :
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
5774

Sam Hocevar's avatar
 
Sam Hocevar committed
5775 5776 5777
# Check whether --with- or --without- was given.
if test "${with_+set}" = set; then
  withval="$with_"
5778 5779
  :
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
5780

Sam Hocevar's avatar
 
Sam Hocevar committed
5781 5782 5783 5784

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

5788 5789
if test "x$with_tuning" != "x"; then
    TUNING="$with_tuning"
Sam Hocevar's avatar
 
Sam Hocevar committed
5790
else
Sam Hocevar's avatar
 
Sam Hocevar committed
5791 5792 5793 5794 5795 5796 5797 5798 5799 5800 5801 5802 5803 5804 5805
    if test x${target_cpu} = xi686 -o x${target_cpu} = xi586 -o x${target_cpu} = xi486 -o x${target_cpu} = xi386; then TUNING="pentiumpro"
    else
        if test x${target_cpu} = xpowerpc; then TUNING="750"; fi
    fi
fi

if test x${target_cpu} = xi686 -o x${target_cpu} = xi586 -o x${target_cpu} = xx86 -o x${target_cpu} = xi386
then
    ARCH="${ARCH} mmx"
    BUILTINS="${BUILTINS} ${ACCEL_MODULES}"
fi

# Check whether --enable-optimizations or --disable-optimizations was given.
if test "${enable_optimizations+set}" = set; then
  enableval="$enable_optimizations"
5806
   if test x$enable_optimizations = xno; then OPTIMS=0; fi 
Sam Hocevar's avatar
 
Sam Hocevar committed
5807
else
5808 5809 5810
   OPTIMS=1 
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
5811 5812 5813 5814

# Check whether --enable-altivec or --disable-altivec was given.
if test "${enable_altivec+set}" = set; then
  enableval="$enable_altivec"
5815
   if test x$enable_altivec = xyes; then ARCH="${ARCH} altivec";
5816
    BUILTINS="${BUILTINS} ${ACCEL_MODULES}"; fi 
Sam Hocevar's avatar
 
Sam Hocevar committed
5817 5818
else
   if test x${target_cpu} = xpowerpc; then ARCH="${ARCH} altivec";
5819 5820 5821
    BUILTINS="${BUILTINS} ${ACCEL_MODULES}"; fi 
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
5822 5823 5824 5825 5826

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

Sam Hocevar's avatar
 
Sam Hocevar committed
5830

Sam Hocevar's avatar
 
Sam Hocevar committed
5831
RELEASE=0
Sam Hocevar's avatar
 
Sam Hocevar committed
5832 5833 5834
# Check whether --enable-release or --disable-release was given.
if test "${enable_release+set}" = set; then
  enableval="$enable_release"
5835
   if test x$enable_release = xyes; then RELEASE=1; fi 
Sam Hocevar's avatar
 
Sam Hocevar committed
5836
else
5837 5838
   VERSION="${VERSION}_`date +%Y-%m-%d`" 
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
5839 5840 5841 5842 5843 5844



# Check whether --with- or --without- was given.
if test "${with_+set}" = set; then
  withval="$with_"
5845 5846
  :
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
5847 5848 5849 5850 5851


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

5855
if test "x$enable_dvd" != "xno"
Sam Hocevar's avatar
 
Sam Hocevar committed
5856
then
5857
  # Check whether --with-dvdcss or --without-dvdcss was given.
Sam Hocevar's avatar
 
Sam Hocevar committed
5858 5859
if test "${with_dvdcss+set}" = set; then
  withval="$with_dvdcss"
5860 5861
  :
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
5862

5863
  # Check whether --with-dvdcss-tree or --without-dvdcss-tree was given.
Sam Hocevar's avatar
 
Sam Hocevar committed
5864 5865
if test "${with_dvdcss_tree+set}" = set; then
  withval="$with_dvdcss_tree"
5866 5867
  :
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
5868

Sam Hocevar's avatar
 
Sam Hocevar committed
5869
  case "x$with_dvdcss" in
Sam Hocevar's avatar
 
Sam Hocevar committed
5870
  x|xyes)
Sam Hocevar's avatar
 
Sam Hocevar committed
5871 5872
    if test "x$with_dvdcss_tree" = x
    then
5873
      for ac_hdr in dvdcss/dvdcss.h
5874
do
5875 5876
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
5877
echo "configure:5878: checking for $ac_hdr" >&5
5878 5879
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
5880
else
5881
  cat > conftest.$ac_ext <<EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
5882
#line 5883 "configure"
5883 5884 5885 5886
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Gildas Bazin's avatar
 
Gildas Bazin committed
5887
{ (eval echo configure:5888: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5888 5889 5890 5891 5892 5893 5894
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
5895
  cat conftest.$ac_ext >&5
5896 5897
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
5898
fi
5899
rm -f conftest*
5900
fi
5901 5902 5903 5904 5905 5906
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
5907
  PLUGINS="${PLUGINS} dvd"
5908
          dvd_LDFLAGS="${dvd_LDFLAGS} -ldvdcss" 
Sam Hocevar's avatar
 
Sam Hocevar committed
5909
else
5910 5911 5912
  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
5913 5914 5915
fi
done

Sam Hocevar's avatar
 
Sam Hocevar committed
5916
    else
5917
      echo $ac_n "checking for libdvdcss.a in ${with_dvdcss_tree}""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
5918
echo "configure:5919: checking for libdvdcss.a in ${with_dvdcss_tree}" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
5919 5920 5921
      real_dvdcss_tree="`cd ${with_dvdcss_tree} 2>/dev/null && pwd`"
      if test "x$real_dvdcss_tree" = x
      then
5922 5923
                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
5924 5925 5926
      fi
      if test -f "${real_dvdcss_tree}/src/.libs/libdvdcss.a"
      then
5927
                echo "$ac_t""${real_dvdcss_tree}/src/.libs/libdvdcss.a" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
5928
        BUILTINS="${BUILTINS} dvd"
Sam Hocevar's avatar
 
Sam Hocevar committed
5929 5930
        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
5931
      else
5932 5933
                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
5934 5935
      fi
    fi
Sam Hocevar's avatar
 
Sam Hocevar committed
5936 5937
  ;;
  xno)
Sam Hocevar's avatar
 
Sam Hocevar committed
5938
        PLUGINS="${PLUGINS} dvd"
Sam Hocevar's avatar
 
Sam Hocevar committed
5939 5940
    dvd_CFLAGS="${dvd_CFLAGS} -DGOD_DAMN_DMCA"
    dvd_LDFLAGS="${dvd_LDFLAGS} -ldl"
Sam Hocevar's avatar
 
Sam Hocevar committed
5941 5942
  ;;
  *)
5943
    echo $ac_n "checking for dvdcss headers in ${with_dvdcss}""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
5944
echo "configure:5945: checking for dvdcss headers in ${with_dvdcss}" >&5
Sam Hocevar's avatar
 
Sam Hocevar committed
5945
    if test -f ${with_dvdcss}/include/dvdcss/dvdcss.h
Sam Hocevar's avatar
 
Sam Hocevar committed
5946
    then
5947
            echo "$ac_t""yes" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
5948
      PLUGINS="${PLUGINS} dvd"
Sam Hocevar's avatar
 
Sam Hocevar committed
5949 5950
      dvd_LDFLAGS="${dvd_LDFLAGS} -L${with_dvdcss}/lib -ldvdcss"
      dvd_CFLAGS="${dvd_CFLAGS} -I${with_dvdcss}/include"
Sam Hocevar's avatar
 
Sam Hocevar committed
5951
    else
5952 5953
            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
5954 5955 5956 5957 5958 5959 5960 5961
    fi
  ;;
  esac
fi

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

Sam Hocevar's avatar
 
Sam Hocevar committed
5965
if test "x$enable_dvdread" != "xno"
Sam Hocevar's avatar
 
Sam Hocevar committed
5966
then
5967
  # Check whether --with-dvdread or --without-dvdread was given.
Sam Hocevar's avatar
 
Sam Hocevar committed
5968 5969
if test "${with_dvdread+set}" = set; then
  withval="$with_dvdread"
5970 5971
  :
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
5972

5973
  if test "x$with_dvdread" = x
Sam Hocevar's avatar
 
Sam Hocevar committed
5974 5975 5976 5977
  then
    test_LDFLAGS=""
    test_CFLAGS=""
  else
5978 5979
    test_LDFLAGS="-L${with_dvdread}/lib"
    test_CFLAGS="-I${with_dvdread}/include"
Sam Hocevar's avatar
 
Sam Hocevar committed
5980 5981
  fi
  CPPFLAGS="$save_CPPFLAGS $test_CFLAGS"
5982
  for ac_hdr in dvdread/dvd_reader.h
5983
do
5984 5985
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
5986
echo "configure:5987: checking for $ac_hdr" >&5
5987 5988
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
5989
else
5990
  cat > conftest.$ac_ext <<EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
5991
#line 5992 "configure"
5992 5993 5994 5995
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Gildas Bazin's avatar
 
Gildas Bazin committed
5996
{ (eval echo configure:5997: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5997 5998 5999 6000 6001 6002 6003
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
6004
  cat conftest.$ac_ext >&5
6005 6006
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
6007
fi
6008
rm -f conftest*
6009
fi
6010 6011 6012 6013 6014 6015 6016 6017
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
Gildas Bazin's avatar
 
Gildas Bazin committed
6018
#line 6019 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
6019 6020
#include "confdefs.h"
#include <dvdread/dvd_reader.h>
6021
int main() {
Sam Hocevar's avatar
 
Sam Hocevar committed
6022
void foo() { int i=DVD_VIDEO_LB_LEN; }
6023 6024
; return 0; }
EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
6025
if { (eval echo configure:6026: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6026 6027
  rm -rf conftest*
  
Sam Hocevar's avatar
 
Sam Hocevar committed
6028 6029 6030
          PLUGINS="${PLUGINS} dvdread"
          dvdread_LDFLAGS="${dvdread_LDFLAGS} ${test_LDFLAGS} -ldvdread"
          dvdread_CFLAGS="${dvdread_CFLAGS} ${test_CFLAGS}"
6031
        
Sam Hocevar's avatar
 
Sam Hocevar committed
6032
else
6033 6034 6035 6036
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  
Sam Hocevar's avatar
 
Sam Hocevar committed
6037
          if test "x$enable_dvdread" != x
Sam Hocevar's avatar
 
Sam Hocevar committed
6038
          then
6039
            { 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
6040
          fi
6041
        
Sam Hocevar's avatar
 
Sam Hocevar committed
6042
fi
6043 6044
rm -f conftest*
  
Sam Hocevar's avatar
 
Sam Hocevar committed
6045
else
6046 6047
  echo "$ac_t""no" 1>&6
if test "x$enable_dvdread" != x
Sam Hocevar's avatar
 
Sam Hocevar committed
6048
    then
6049
      if test "x$with_dvdread" != x
Sam Hocevar's avatar
 
Sam Hocevar committed
6050
      then
6051
        { echo "configure: error: Cannot find dvdread/dvd_reader.h in ${with_dvdread}/include" 1>&2; exit 1; }
Sam Hocevar's avatar
 
Sam Hocevar committed
6052
      else
6053
        { echo "configure: error: Cannot find dvdread/dvd_reader.h" 1>&2; exit 1; }
Sam Hocevar's avatar
 
Sam Hocevar committed
6054 6055
      fi
    fi
6056
  
6057 6058 6059
fi
done

Sam Hocevar's avatar
 
Sam Hocevar committed
6060
  CPPFLAGS="$save_CPPFLAGS"
Sam Hocevar's avatar
 
Sam Hocevar committed
6061 6062
fi

6063 6064 6065
# Check whether --enable-dvbpsi or --disable-dvbpsi was given.
if test "${enable_dvbpsi+set}" = set; then
  enableval="$enable_dvbpsi"
6066 6067
  :
fi
6068

6069
if test "x$enable_dvbpsi" != "xno"
6070
then
6071
  # Check whether --with-dvbpsi or --without-dvbpsi was given.
6072 6073
if test "${with_dvbpsi+set}" = set; then
  withval="$with_dvbpsi"
6074 6075
  :
fi
6076

6077
  if test "x$with_dvbpsi" = x
6078 6079 6080 6081
  then
    test_LDFLAGS=""
    test_CFLAGS=""
  else
6082 6083
    test_LDFLAGS="-L${with_dvbpsi}/lib"
    test_CFLAGS="-I${with_dvbpsi}/include"
6084 6085
  fi
  CPPFLAGS="$save_CPPFLAGS $test_CFLAGS"
6086 6087
  ac_safe=`echo "dvbpsi/dr.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for dvbpsi/dr.h""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
6088
echo "configure:6089: checking for dvbpsi/dr.h" >&5
6089 6090 6091 6092
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
Gildas Bazin's avatar
 
Gildas Bazin committed
6093
#line 6094 "configure"
6094
#include "confdefs.h"
6095
#include <dvbpsi/dr.h>
6096 6097
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Gildas Bazin's avatar
 
Gildas Bazin committed
6098
{ (eval echo configure:6099: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6099 6100 6101 6102 6103 6104 6105
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
6106
  cat conftest.$ac_ext >&5
6107 6108
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
6109
fi
6110
rm -f conftest*
6111
fi
6112 6113 6114
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  
6115 6116 6117
    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}"
6118
    
6119
else
6120
  echo "$ac_t""no" 1>&6
6121 6122 6123

    if test "x$enable_dvbpsi" != x
    then
6124
      { 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; }
6125
    fi
6126
  
6127 6128 6129 6130
fi

  CPPFLAGS="$save_CPPFLAGS"
fi
6131
 
Sam Hocevar's avatar
 
Sam Hocevar committed
6132 6133 6134
# Check whether --enable-vcd or --disable-vcd was given.
if test "${enable_vcd+set}" = set; then
  enableval="$enable_vcd"
6135 6136
  :
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
6137

Sam Hocevar's avatar
 
Sam Hocevar committed
6138

Sam Hocevar's avatar
 
Sam Hocevar committed
6139 6140
if test x$enable_vcd != xno
then
6141
  cat > conftest.$ac_ext <<EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
6142
#line 6143 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
6143 6144
#include "confdefs.h"
#include <linux/cdrom.h>
6145
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
6146
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Sam Hocevar's avatar
 
Sam Hocevar committed
6147
  egrep "cdrom_msf0" >/dev/null 2>&1; then
6148 6149
  rm -rf conftest*
  
Sam Hocevar's avatar
 
Sam Hocevar committed
6150
    PLUGINS="${PLUGINS} vcd"
6151
  
Sam Hocevar's avatar
 
Sam Hocevar committed
6152 6153 6154
fi
rm -f conftest*

6155 6156
  
  cat > conftest.$ac_ext <<EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
6157
#line 6158 "configure"
6158 6159
#include "confdefs.h"
#include <sys/cdio.h>
6160
EOF
6161 6162
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "ioc_toc_header " >/dev/null 2>&1; then
6163 6164
  rm -rf conftest*
  
6165
    PLUGINS="${PLUGINS} vcd"
6166
    cat >> confdefs.h <<\EOF
6167
#define HAVE_IOC_TOC_HEADER_IN_SYS_CDIO_H 1
6168
EOF
6169

6170
  
6171 6172 6173
fi
rm -f conftest*

6174
  
Sam Hocevar's avatar
 
Sam Hocevar committed
6175 6176 6177 6178
  if test "x${SYS}" = "xbsdi"
  then
    PLUGINS="${PLUGINS} vcd"
  fi
6179

Sam Hocevar's avatar
 
Sam Hocevar committed
6180 6181
  if test "x${SYS}" = "xdarwin"
  then
6182
    # No need to add vcd to PLUGINS, Darwin is already based on FreeBSD
6183
    vcd_LDFLAGS="${vcd_LDFLAGS} -framework IOKit -framework CoreFoundation" 
Sam Hocevar's avatar
 
Sam Hocevar committed
6184
  fi
6185 6186
fi

Johan Bilien's avatar
Johan Bilien committed
6187 6188 6189 6190 6191
# Check whether --enable-satellite or --disable-satellite was given.
if test "${enable_satellite+set}" = set; then
  enableval="$enable_satellite"
   if test x$enable_satellite = xyes
    then
6192
      PLUGINS="${PLUGINS} satellite"
Johan Bilien's avatar
Johan Bilien committed
6193
    fi
6194 6195
fi

Johan Bilien's avatar
Johan Bilien committed
6196

Gildas Bazin's avatar
 
Gildas Bazin committed
6197
if test x$SYS != xnto && test "x$SYS" != "xmingw32"
6198
then
6199
  echo $ac_n "checking for inet_pton""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
6200
echo "configure:6201: checking for inet_pton" >&5
6201 6202
if eval "test \"`echo '$''{'ac_cv_func_inet_pton'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
6203
else
6204
  cat > conftest.$ac_ext <<EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
6205
#line 6206 "configure"
6206
#include "confdefs.h"
6207
/* System header to define __stub macros and hopefully few prototypes,
6208
    which can conflict with char inet_pton(); below.  */
6209 6210 6211
#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
6212 6213 6214 6215
    builtin and then its argument prototype would still apply.  */
char inet_pton();

int main() {
6216 6217 6218 6219 6220 6221 6222

/* 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
6223
inet_pton();
6224 6225
#endif

6226 6227
; return 0; }
EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
6228
if { (eval echo configure:6229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6229 6230 6231 6232 6233 6234 6235 6236 6237 6238 6239 6240 6241
  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
6242
  PLUGINS="${PLUGINS} ipv6"
6243 6244
else
  echo "$ac_t""no" 1>&6
6245
fi
6246

Gildas Bazin's avatar
 
Gildas Bazin committed
6247 6248 6249 6250 6251 6252 6253 6254 6255 6256 6257 6258 6259 6260 6261 6262 6263 6264 6265 6266 6267
fi
if test "x$SYS" = "xmingw32"
then
  echo $ac_n "checking for getaddrinfo in ws2tcpip.h""... $ac_c" 1>&6
echo "configure:6252: checking for getaddrinfo in ws2tcpip.h" >&5
  cat > conftest.$ac_ext <<EOF
#line 6254 "configure"
#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*

6268
fi
6269

6270 6271 6272
# Check whether --enable-avi or --disable-avi was given.
if test "${enable_avi+set}" = set; then
  enableval="$enable_avi"
6273 6274
  :
fi
6275 6276 6277 6278 6279 6280

if test x$enable_avi != xno
then
  PLUGINS="${PLUGINS} avi"
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
6281 6282 6283 6284

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

Sam Hocevar's avatar
 
Sam Hocevar committed
6288

Sam Hocevar's avatar
 
Sam Hocevar committed
6289 6290 6291
# Check whether --enable-mad or --disable-mad was given.
if test "${enable_mad+set}" = set; then
  enableval="$enable_mad"
6292 6293
  :
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
6294

Sam Hocevar's avatar
 
Sam Hocevar committed
6295
if test x$enable_mad = xyes
Sam Hocevar's avatar
 
Sam Hocevar committed
6296
then
6297
  # Check whether --with-mad or --without-mad was given.
Sam Hocevar's avatar
 
Sam Hocevar committed
6298 6299
if test "${with_mad+set}" = set; then
  withval="$with_mad"
6300 6301
  :
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
6302

Gildas Bazin's avatar
 
Gildas Bazin committed
6303 6304 6305 6306 6307 6308
  if test "x$with_mad" != "xno" -a "x$with_mad" != "x"
  then
    mad_CFLAGS="${mad_CFLAGS} -I$with_mad/include"
    mad_LDFLAGS="${mad_LDFLAGS} -L$with_mad/lib"
  fi

6309
  # Check whether --with-mad-tree or --without-mad-tree was given.
Gildas Bazin's avatar
 
Gildas Bazin committed
6310 6311
if test "${with_mad_tree+set}" = set; then
  withval="$with_mad_tree"
6312 6313
  :
fi
Gildas Bazin's avatar
 
Gildas Bazin committed
6314 6315 6316 6317 6318 6319

  if test "x$with_mad_tree" != "xno" -a "x$with_mad_tree" != "x"
  then
    real_mad_tree="`cd ${with_mad_tree} 2>/dev/null && pwd`"
    if test "x$real_mad_tree" = x
    then
6320 6321
            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
6322
    fi
6323
        echo $ac_n "checking for mad.h in ${real_mad_tree}/libmad""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
6324
echo "configure:6325: checking for mad.h in ${real_mad_tree}/libmad" >&5
Gildas Bazin's avatar
 
Gildas Bazin committed
6325 6326
    if test -f ${real_mad_tree}/libmad/mad.h
    then
6327
      echo "$ac_t""yes" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
6328 6329 6330 6331
      mad_CFLAGS="${mad_CFLAGS} -I${real_mad_tree}/libmad"
      mad_LDFLAGS="${mad_LDFLAGS} -L${real_mad_tree}/libmad/.libs"
      save_LDFLAGS=$LDFLAGS
      LDFLAGS=$mad_LDFLAGS
6332
      echo $ac_n "checking for mad_bit_init in -lmad""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
6333
echo "configure:6334: checking for mad_bit_init in -lmad" >&5
6334 6335 6336
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
6337
else
6338
  ac_save_LIBS="$LIBS"
Gildas Bazin's avatar
 
Gildas Bazin committed
6339
LIBS="-lmad  $LIBS"
6340
cat > conftest.$ac_ext <<EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
6341
#line 6342 "configure"
Gildas Bazin's avatar
 
Gildas Bazin committed
6342 6343 6344
#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
6345 6346 6347 6348 6349 6350 6351
    builtin and then its argument prototype would still apply.  */
char mad_bit_init();

int main() {
mad_bit_init()
; return 0; }
EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
6352
if { (eval echo configure:6353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6353 6354 6355 6356 6357 6358 6359 6360 6361 6362
  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
6363

6364 6365 6366 6367
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
6368 6369
        BUILTINS="${BUILTINS} mad"
        mad_LDFLAGS="${mad_LDFLAGS} -lmad"
6370
        
Gildas Bazin's avatar
 
Gildas Bazin committed
6371
else
6372 6373 6374
  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
6375 6376 6377 6378
fi

      LDFLAGS=$save_LDFLAGS
    else
6379 6380
      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
6381 6382 6383 6384 6385 6386
    fi
  else
    save_CFLAGS=$CFLAGS
    save_LDFLAGS=$LDFLAGS
    CFLAGS="$CFLAGS $mad_CFLAGS"
    LDFLAGS="$LDFLAGS $mad_LDFLAGS"
6387
    for ac_hdr in mad.h
6388
do
6389 6390
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
6391
echo "configure:6392: checking for $ac_hdr" >&5
6392 6393
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
6394
else
6395
  cat > conftest.$ac_ext <<EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
6396
#line 6397 "configure"
6397 6398 6399 6400
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Gildas Bazin's avatar
 
Gildas Bazin committed
6401
{ (eval echo configure:6402: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6402 6403 6404 6405 6406 6407 6408
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
6409
  cat conftest.$ac_ext >&5
6410 6411
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
6412
fi
6413
rm -f conftest*
6414
fi
6415 6416 6417 6418 6419 6420 6421
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
 
6422
else
6423 6424
  echo "$ac_t""no" 1>&6
{ echo "configure: error: Cannot find development headers for libmad..." 1>&2; exit 1; } 
6425 6426 6427
fi
done

6428
    echo $ac_n "checking for mad_bit_init in -lmad""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
6429
echo "configure:6430: checking for mad_bit_init in -lmad" >&5
6430 6431 6432
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
6433
else
6434
  ac_save_LIBS="$LIBS"
6435
LIBS="-lmad  $LIBS"
6436
cat > conftest.$ac_ext <<EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
6437
#line 6438 "configure"
6438 6439 6440
#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
6441 6442 6443 6444 6445 6446 6447
    builtin and then its argument prototype would still apply.  */
char mad_bit_init();

int main() {
mad_bit_init()
; return 0; }
EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
6448
if { (eval echo configure:6449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6449 6450 6451 6452 6453 6454 6455 6456 6457 6458 6459 6460 6461 6462
  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
6463 6464 6465
  
      PLUGINS="${PLUGINS} mad"
      mad_LDFLAGS="${mad_LDFLAGS} -lmad" 
6466
else
6467 6468
  echo "$ac_t""no" 1>&6
 { echo "configure: error: Cannot find libmad library..." 1>&2; exit 1; } 
6469 6470
fi

Gildas Bazin's avatar
 
Gildas Bazin committed
6471 6472 6473
    CFLAGS=$save_CFLAGS
    LDFLAGS=$save_LDFLAGS
  fi
6474 6475
fi

6476 6477 6478
# Check whether --enable-ffmpeg or --disable-ffmpeg was given.
if test "${enable_ffmpeg+set}" = set; then
  enableval="$enable_ffmpeg"
6479 6480
  :
fi
6481

6482
if test "x$enable_ffmpeg" = "xyes"
6483
then
6484 6485 6486 6487 6488 6489 6490 6491 6492 6493 6494 6495
  # Check whether --with-ffmpeg or --without-ffmpeg was given.
if test "${with_ffmpeg+set}" = set; then
  withval="$with_ffmpeg"
  :
fi

  if test "x$with_ffmpeg" != "xno" -a "x$with_ffmpeg" != "x"
  then
    ffmpeg_CFLAGS="${ffmpeg_CFLAGS} -I$with_ffmpeg/include/libffmpeg"
    ffmpeg_LDFLAGS="${ffmpeg_LDFLAGS} -L$with_ffmpeg/lib"
  fi

6496
  # Check whether --with-ffmpeg-tree or --without-ffmpeg-tree was given.
6497 6498
if test "${with_ffmpeg_tree+set}" = set; then
  withval="$with_ffmpeg_tree"
6499 6500
  :
fi
6501

6502
  if test "x$with_ffmpeg_tree" != "x"
6503
  then
6504
    echo $ac_n "checking for libavcodec.a in ${with_ffmpeg_tree}""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
6505
echo "configure:6506: checking for libavcodec.a in ${with_ffmpeg_tree}" >&5
6506 6507 6508
    real_ffmpeg_tree="`cd ${with_ffmpeg_tree} 2>/dev/null && pwd`"
    if test "x$real_ffmpeg_tree" = x
    then
6509 6510
            echo "$ac_t""no" 1>&6
      { echo "configure: error: cannot cd to ${with_ffmpeg_tree}" 1>&2; exit 1; }
6511 6512 6513
    fi
    if test -f "${real_ffmpeg_tree}/libavcodec/libavcodec.a"
    then
6514
            echo "$ac_t""${real_ffmpeg_tree}/libavcodec/libavcodec.a" 1>&6
6515
      BUILTINS="${BUILTINS} ffmpeg"
6516
      ffmpeg_LDFLAGS="${ffmpeg_LDFLAGS} ${real_ffmpeg_tree}/libavcodec/libavcodec.a -lm"
6517 6518
      ffmpeg_CFLAGS="${ffmpeg_CFLAGS} -I${real_ffmpeg_tree}/libavcodec"
    else
6519 6520
            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; }
6521
    fi
6522 6523 6524 6525
  else
    save_CFLAGS=$CFLAGS
    save_LDFLAGS=$LDFLAGS
    CFLAGS="$CFLAGS $ffmpeg_CFLAGS"
6526
    LDFLAGS="$LDFLAGS $ffmpeg_LDFLAGS -lm"
6527
    echo $ac_n "checking for avcodec_init in -lavcodec""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
6528
echo "configure:6529: checking for avcodec_init in -lavcodec" >&5
6529 6530 6531 6532 6533 6534 6535
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
Gildas Bazin's avatar
 
Gildas Bazin committed
6536
#line 6537 "configure"
6537 6538 6539 6540 6541 6542 6543 6544 6545 6546
#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
Gildas Bazin's avatar
 
Gildas Bazin committed
6547
if { (eval echo configure:6548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6548 6549 6550 6551 6552 6553 6554 6555 6556 6557 6558 6559 6560 6561
  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
6562 6563
  
      BUILTINS="${BUILTINS} ffmpeg"
6564
      ffmpeg_LDFLAGS="${ffmpeg_LDFLAGS} -lavcodec -lm" 
6565 6566 6567 6568 6569 6570 6571
else
  echo "$ac_t""no" 1>&6
 { echo "configure: error: Cannot find libavcodec library..." 1>&2; exit 1; } 
fi

    CFLAGS=$save_CFLAGS
    LDFLAGS=$save_LDFLAGS
6572 6573 6574 6575
  fi
fi


Sam Hocevar's avatar
 
Sam Hocevar committed
6576 6577
if test x$SYS = xbeos
then
Sam Hocevar's avatar
 
Sam Hocevar committed
6578
    PLUGINS="${PLUGINS} beos"
Sam Hocevar's avatar
 
Sam Hocevar committed
6579
fi
6580

Sam Hocevar's avatar
 
Sam Hocevar committed
6581 6582 6583
# Check whether --enable-a52 or --disable-a52 was given.
if test "${enable_a52+set}" = set; then
  enableval="$enable_a52"
6584 6585
  :
fi
6586

Gildas Bazin's avatar
 
Gildas Bazin committed
6587 6588
if test "x$enable_a52" != "xno"
then
6589
  # Check whether --with-a52-tree or --without-a52-tree was given.
Gildas Bazin's avatar
 
Gildas Bazin committed
6590 6591
if test "${with_a52_tree+set}" = set; then
  withval="$with_a52_tree"
6592 6593
  :
fi
Gildas Bazin's avatar
 
Gildas Bazin committed
6594 6595

  if test "x$with_a52_tree" != "xno" -a "x$with_a52_tree" != "x"
Sam Hocevar's avatar
 
Sam Hocevar committed
6596
  then
Gildas Bazin's avatar
 
Gildas Bazin committed
6597 6598 6599
    real_a52_tree="`cd ${with_a52_tree} 2>/dev/null && pwd`"
    if test "x$real_a52_tree" = x
    then
6600 6601
            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
6602
    fi
6603
        echo $ac_n "checking for a52.h in ${real_a52_tree}/include""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
6604
echo "configure:6605: checking for a52.h in ${real_a52_tree}/include" >&5
Gildas Bazin's avatar
 
Gildas Bazin committed
6605 6606
    if test -f ${real_a52_tree}/include/a52.h
    then
6607
      echo "$ac_t""yes" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
6608 6609 6610 6611
      a52_CFLAGS="${a52_CFLAGS} -I${real_a52_tree}"
      a52_LDFLAGS="${a52_LDFLAGS} -L${real_a52_tree}/liba52/.libs"
      save_LDFLAGS=$LDFLAGS
      LDFLAGS="$a52_LDFLAGS $LDFLAGS"
6612
      echo $ac_n "checking for a52_free in -la52""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
6613
echo "configure:6614: checking for a52_free in -la52" >&5
6614 6615 6616
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
6617
else
6618
  ac_save_LIBS="$LIBS"
Gildas Bazin's avatar
 
Gildas Bazin committed
6619
LIBS="-la52 -lm $LIBS"
6620
cat > conftest.$ac_ext <<EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
6621
#line 6622 "configure"
Gildas Bazin's avatar
 
Gildas Bazin committed
6622 6623 6624
#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
6625 6626 6627 6628 6629 6630 6631
    builtin and then its argument prototype would still apply.  */
char a52_free();

int main() {
a52_free()
; return 0; }
EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
6632
if { (eval echo configure:6633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6633 6634 6635 6636 6637 6638 6639 6640 6641 6642
  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
6643

6644 6645 6646 6647
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
6648 6649 6650
        BUILTINS="${BUILTINS} a52"
        a52_LDFLAGS="${a52_LDFLAGS} -la52 -lm"
        a52_CFLAGS="${a52_CFLAGS} -DUSE_A52DEC_TREE"
6651
        
Gildas Bazin's avatar
 
Gildas Bazin committed
6652
else
6653
  echo "$ac_t""no" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
6654 6655 6656

        if test -f ${real_a52_tree}/liba52/.libs/liba52.a
        then
6657
          { echo "configure: error: make sure you have at least a52dec-0.7.3" 1>&2; exit 1; }
Gildas Bazin's avatar
 
Gildas Bazin committed
6658
        else
6659
          { echo "configure: error: the specified tree hasn't been compiled" 1>&2; exit 1; }
Gildas Bazin's avatar
 
Gildas Bazin committed
6660
        fi
6661
      
Gildas Bazin's avatar
 
Gildas Bazin committed
6662 6663 6664 6665
fi

      LDFLAGS=$save_LDFLAGS
    else
6666 6667
      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
6668
    fi
6669
  else     for ac_hdr in a52dec/a52.h
6670
do
6671 6672
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
6673
echo "configure:6674: checking for $ac_hdr" >&5
6674 6675
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
6676
else
6677
  cat > conftest.$ac_ext <<EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
6678
#line 6679 "configure"
6679 6680 6681 6682
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Gildas Bazin's avatar
 
Gildas Bazin committed
6683
{ (eval echo configure:6684: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6684 6685 6686 6687 6688 6689 6690
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
6691
  cat conftest.$ac_ext >&5
6692 6693
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
Sam Hocevar's avatar
 
Sam Hocevar committed
6694
fi
6695
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
6696
fi
6697 6698 6699 6700 6701 6702 6703 6704
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
Gildas Bazin's avatar
 
Gildas Bazin committed
6705
echo "configure:6706: checking for a52_free in -la52" >&5
6706 6707 6708 6709 6710
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
6711
LIBS="-la52 -lm $LIBS"
6712
cat > conftest.$ac_ext <<EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
6713
#line 6714 "configure"
Gildas Bazin's avatar
 
Gildas Bazin committed
6714 6715 6716
#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
6717 6718 6719 6720 6721 6722 6723
    builtin and then its argument prototype would still apply.  */
char a52_free();

int main() {
a52_free()
; return 0; }
EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
6724
if { (eval echo configure:6725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
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"
Gildas Bazin's avatar
 
Gildas Bazin committed
6735

6736 6737 6738 6739
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
6740 6741 6742
        BUILTINS="${BUILTINS} a52"
        a52_LDFLAGS="${a52_LDFLAGS} -la52 -lm"
        a52_CFLAGS="${a52_CFLAGS}"
6743 6744 6745
      
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
6746 6747
fi

6748 6749 6750
    
else
  echo "$ac_t""no" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
6751
fi
6752
done
Gildas Bazin's avatar
 
Gildas Bazin committed
6753 6754

  fi
Sam Hocevar's avatar
 
Sam Hocevar committed
6755
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
6756

Sam Hocevar's avatar
 
Sam Hocevar committed
6757 6758 6759
# Check whether --enable-vorbis or --disable-vorbis was given.
if test "${enable_vorbis+set}" = set; then
  enableval="$enable_vorbis"
6760 6761
  :
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
6762

6763
if test "x$enable_vorbis" != "xno"
Sam Hocevar's avatar
 
Sam Hocevar committed
6764
then
6765
  for ac_hdr in ogg/ogg.h
Sam Hocevar's avatar
 
Sam Hocevar committed
6766
do
6767 6768
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
6769
echo "configure:6770: checking for $ac_hdr" >&5
6770 6771
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
6772
else
6773
  cat > conftest.$ac_ext <<EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
6774
#line 6775 "configure"
6775 6776 6777 6778
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Gildas Bazin's avatar
 
Gildas Bazin committed
6779
{ (eval echo configure:6780: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6780 6781 6782 6783 6784 6785 6786
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
6787
  cat conftest.$ac_ext >&5
6788 6789
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
Sam Hocevar's avatar
 
Sam Hocevar committed
6790
fi
6791
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
6792
fi
6793 6794 6795 6796 6797 6798 6799
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
 
6800
        #PLUGINS="${PLUGINS} vorbis"
Sam Hocevar's avatar
 
Sam Hocevar committed
6801
    vorbis_LDFLAGS="${vorbis_LDFLAGS} -lvorbis"
6802 6803 6804
   
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
6805 6806 6807 6808 6809
fi
done

fi

Sam Hocevar's avatar
 
Sam Hocevar committed
6810

Sam Hocevar's avatar
 
Sam Hocevar committed
6811 6812 6813
# Check whether --with- or --without- was given.
if test "${with_+set}" = set; then
  withval="$with_"
6814 6815
  :
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
6816

Sam Hocevar's avatar
 
Sam Hocevar committed
6817

Sam Hocevar's avatar
 
Sam Hocevar committed
6818 6819 6820
# Check whether --enable-x11 or --disable-x11 was given.
if test "${enable_x11+set}" = set; then
  enableval="$enable_x11"
6821 6822
  :
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
6823

Sam Hocevar's avatar
 
Sam Hocevar committed
6824 6825 6826 6827 6828 6829 6830 6831
if test x$enable_x11 != xno &&
  (test x$SYS != xmingw32 || test x$enable_x11 = xyes); then
  if test x$x_includes = xNONE; then
    x_includes=/usr/X11R6/include
  fi
  if test x$x_libraries = xNONE; then
    x_libraries=/usr/X11R6/lib
  fi
Sam Hocevar's avatar
 
Sam Hocevar committed
6832
  CPPFLAGS="$save_CPPFLAGS -I$x_includes"
6833
  for ac_hdr in X11/Xlib.h
6834
do
6835 6836
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
6837
echo "configure:6838: checking for $ac_hdr" >&5
6838 6839
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
6840
else
6841
  cat > conftest.$ac_ext <<EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
6842
#line 6843 "configure"
6843 6844 6845 6846
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Gildas Bazin's avatar
 
Gildas Bazin committed
6847
{ (eval echo configure:6848: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6848 6849 6850 6851 6852 6853 6854
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
6855
  cat conftest.$ac_ext >&5
6856 6857
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
6858
fi
6859
rm -f conftest*
6860
fi
6861 6862 6863 6864 6865 6866 6867
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
6868
    PLUGINS="${PLUGINS} x11"
Sam Hocevar's avatar
 
Sam Hocevar committed
6869 6870
    x11_LDFLAGS="${x11_LDFLAGS} -L$x_libraries -lX11 -lXext"
    x11_CFLAGS="${x11_CFLAGS} -I$x_includes"
6871 6872 6873
  
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
6874
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
6875
done
Sam Hocevar's avatar
 
Sam Hocevar committed
6876

Sam Hocevar's avatar
 
Sam Hocevar committed
6877
  CPPFLAGS="$save_CPPFLAGS"
Sam Hocevar's avatar
 
Sam Hocevar committed
6878 6879
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
6880 6881 6882
# Check whether --enable-xvideo or --disable-xvideo was given.
if test "${enable_xvideo+set}" = set; then
  enableval="$enable_xvideo"
6883 6884
  :
fi
6885

Sam Hocevar's avatar
 
Sam Hocevar committed
6886 6887 6888 6889 6890 6891 6892 6893
if test x$enable_xvideo != xno &&
  (test x$SYS != xmingw32 || test x$enable_xvideo = xyes); then
  if test x$x_includes = xNONE; then
    x_includes=/usr/X11R6/include
  fi
  if test x$x_libraries = xNONE; then
    x_libraries=/usr/X11R6/lib
  fi
Sam Hocevar's avatar
 
Sam Hocevar committed
6894 6895
  save_CPPFLAGS=$CPPFLAGS
  CPPFLAGS="$save_CPPFLAGS -I$x_includes"
6896
  for ac_hdr in X11/extensions/Xv.h
6897
do
6898 6899
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
6900
echo "configure:6901: checking for $ac_hdr" >&5
6901 6902
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
6903
else
6904
  cat > conftest.$ac_ext <<EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
6905
#line 6906 "configure"
6906 6907 6908 6909
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Gildas Bazin's avatar
 
Gildas Bazin committed
6910
{ (eval echo configure:6911: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6911 6912 6913 6914 6915 6916 6917
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
6918
  cat conftest.$ac_ext >&5
6919 6920
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
6921
fi
6922
rm -f conftest*
6923
fi
6924 6925 6926 6927 6928 6929 6930
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
6931
    save_CFLAGS=$CFLAGS
Sam Hocevar's avatar
 
Sam Hocevar committed
6932
    CFLAGS="$CFLAGS -L$x_libraries -lX11 -lXext"
6933
    echo $ac_n "checking for XvSetPortAttribute in -lXv_pic""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
6934
echo "configure:6935: checking for XvSetPortAttribute in -lXv_pic" >&5
6935 6936 6937
ac_lib_var=`echo Xv_pic'_'XvSetPortAttribute | 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
6938
else
6939
  ac_save_LIBS="$LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
6940
LIBS="-lXv_pic  $LIBS"
6941
cat > conftest.$ac_ext <<EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
6942
#line 6943 "configure"
Gildas Bazin's avatar
 
Gildas Bazin committed
6943
#include "confdefs.h"
Sam Hocevar's avatar
 
Sam Hocevar committed
6944 6945
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
6946 6947 6948 6949 6950 6951 6952
    builtin and then its argument prototype would still apply.  */
char XvSetPortAttribute();

int main() {
XvSetPortAttribute()
; return 0; }
EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
6953
if { (eval echo configure:6954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6954 6955 6956 6957 6958 6959 6960 6961 6962 6963 6964 6965 6966 6967
  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
6968 6969
  # We have Xv_pic, that's good, we can build an xvideo.so plugin !
      PLUGINS="${PLUGINS} xvideo"
Sam Hocevar's avatar
 
Sam Hocevar committed
6970 6971
      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
6972
else
6973 6974
  echo "$ac_t""no" 1>&6
# We don't have Xv_pic, let's make xvideo.a as builtin
Sam Hocevar's avatar
 
Sam Hocevar committed
6975
      BUILTINS="${BUILTINS} xvideo"
Sam Hocevar's avatar
 
Sam Hocevar committed
6976 6977
      xvideo_LDFLAGS="${xvideo_LDFLAGS} -L$x_libraries -lX11 -lXext -lXv"
      xvideo_CFLAGS="${xvideo_CFLAGS} -I$x_includes"
Sam Hocevar's avatar
 
Sam Hocevar committed
6978 6979
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
6980
    CFLAGS="$save_CFLAGS"
6981
  
Sam Hocevar's avatar
 
Sam Hocevar committed
6982
  CPPFLAGS="$save_CPPFLAGS"
6983 6984
else
  echo "$ac_t""no" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
6985 6986 6987 6988 6989
fi
done

fi

Sam Hocevar's avatar
 
Sam Hocevar committed
6990 6991 6992
# Check whether --enable-sdl or --disable-sdl was given.
if test "${enable_sdl+set}" = set; then
  enableval="$enable_sdl"
6993 6994
  :
fi
6995

6996
if test "x$enable_sdl" != "xno"
6997
then
6998
  SDL_PATH=$PATH
6999
  # Check whether --with-sdl-config-path or --without-sdl-config-path was given.
7000 7001
if test "${with_sdl_config_path+set}" = set; then
  withval="$with_sdl_config_path"
Gildas Bazin's avatar
 
Gildas Bazin committed
7002
   if test "x$with_sdl_config_path" != "xno"
7003
      then
Gildas Bazin's avatar
 
Gildas Bazin committed
7004
        SDL_PATH="$with_sdl_config_path:$PATH"
7005 7006 7007
      fi 
fi

7008 7009
  # Extract the first word of "sdl12-config", so it can be a program name with args.
set dummy sdl12-config; ac_word=$2
7010
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
7011
echo "configure:7012: checking for $ac_word" >&5
7012 7013
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
7014
else
7015 7016
  case "$SDL12_CONFIG" in
  /*)
7017
  ac_cv_path_SDL12_CONFIG="$SDL12_CONFIG" # Let the user override the test with a path.
7018
  ;;
7019 7020 7021
  ?:/*)			 
  ac_cv_path_SDL12_CONFIG="$SDL12_CONFIG" # Let the user override the test with a dos path.
  ;;
7022
  *)
7023 7024 7025 7026 7027 7028 7029 7030 7031 7032
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$SDL_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_SDL12_CONFIG="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
7033
  test -z "$ac_cv_path_SDL12_CONFIG" && ac_cv_path_SDL12_CONFIG="no"
7034 7035 7036
  ;;
esac
fi
7037
SDL12_CONFIG="$ac_cv_path_SDL12_CONFIG"
7038
if test -n "$SDL12_CONFIG"; then
7039
  echo "$ac_t""$SDL12_CONFIG" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
7040
else
7041
  echo "$ac_t""no" 1>&6
7042
fi
7043

7044 7045
  SDL_CONFIG=${SDL12_CONFIG}
  SDL_HEADER="SDL12/SDL.h"
Sam Hocevar's avatar
 
Sam Hocevar committed
7046 7047
  if test x${SDL_CONFIG} = xno
  then
7048 7049
    # Extract the first word of "sdl11-config", so it can be a program name with args.
set dummy sdl11-config; ac_word=$2
7050
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
7051
echo "configure:7052: checking for $ac_word" >&5
7052 7053
if eval "test \"`echo '$''{'ac_cv_path_SDL11_CONFIG'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
7054
else
7055 7056
  case "$SDL11_CONFIG" in
  /*)
Sam Hocevar's avatar
 
Sam Hocevar committed
7057
  ac_cv_path_SDL11_CONFIG="$SDL11_CONFIG" # Let the user override the test with a path.
7058
  ;;
7059 7060 7061
  ?:/*)			 
  ac_cv_path_SDL11_CONFIG="$SDL11_CONFIG" # Let the user override the test with a dos path.
  ;;
7062
  *)
7063 7064 7065 7066 7067 7068 7069 7070 7071 7072
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$SDL_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_SDL11_CONFIG="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
Sam Hocevar's avatar
 
Sam Hocevar committed
7073
  test -z "$ac_cv_path_SDL11_CONFIG" && ac_cv_path_SDL11_CONFIG="no"
7074 7075
  ;;
esac
7076
fi
7077
SDL11_CONFIG="$ac_cv_path_SDL11_CONFIG"
Sam Hocevar's avatar
 
Sam Hocevar committed
7078
if test -n "$SDL11_CONFIG"; then
7079
  echo "$ac_t""$SDL11_CONFIG" 1>&6
7080
else
7081
  echo "$ac_t""no" 1>&6
7082 7083
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
7084
    SDL_CONFIG=${SDL11_CONFIG}
7085 7086
    SDL_HEADER="SDL11/SDL.h"
  fi
Sam Hocevar's avatar
 
Sam Hocevar committed
7087 7088
  if test x${SDL_CONFIG} = xno
  then
7089 7090
    # Extract the first word of "sdl-config", so it can be a program name with args.
set dummy sdl-config; ac_word=$2
7091
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
7092
echo "configure:7093: checking for $ac_word" >&5
7093 7094
if eval "test \"`echo '$''{'ac_cv_path_SDL_CONFIG'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
7095
else
7096 7097
  case "$SDL_CONFIG" in
  /*)
7098
  ac_cv_path_SDL_CONFIG="$SDL_CONFIG" # Let the user override the test with a path.
7099
  ;;
7100 7101 7102
  ?:/*)			 
  ac_cv_path_SDL_CONFIG="$SDL_CONFIG" # Let the user override the test with a dos path.
  ;;
7103
  *)
7104 7105 7106 7107 7108 7109 7110 7111 7112 7113
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$SDL_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_SDL_CONFIG="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
7114
  test -z "$ac_cv_path_SDL_CONFIG" && ac_cv_path_SDL_CONFIG="no"
7115 7116 7117
  ;;
esac
fi
7118
SDL_CONFIG="$ac_cv_path_SDL_CONFIG"
7119
if test -n "$SDL_CONFIG"; then
7120
  echo "$ac_t""$SDL_CONFIG" 1>&6
7121
else
7122
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
7123 7124
fi

7125
    SDL_HEADER="SDL/SDL.h"
7126
  fi
Sam Hocevar's avatar
 
Sam Hocevar committed
7127 7128
  if test x${SDL_CONFIG} != xno
  then
7129
    PLUGINS="${PLUGINS} sdl"
Sam Hocevar's avatar
 
Sam Hocevar committed
7130 7131 7132
    sdl_CFLAGS="${sdl_CFLAGS} `${SDL_CONFIG} --cflags`"
    sdl_LDFLAGS="${sdl_LDFLAGS} `${SDL_CONFIG} --libs | sed 's,-rdynamic,,'`"
    CPPFLAGS="$save_CPPFLAGS $sdl_CFLAGS"
7133
    for ac_hdr in ${SDL_HEADER}
7134
do
7135 7136
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
7137
echo "configure:7138: checking for $ac_hdr" >&5
7138 7139
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
7140
else
7141
  cat > conftest.$ac_ext <<EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
7142
#line 7143 "configure"
7143 7144 7145 7146
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Gildas Bazin's avatar
 
Gildas Bazin committed
7147
{ (eval echo configure:7148: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7148 7149 7150 7151 7152 7153 7154
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
7155
  cat conftest.$ac_ext >&5
7156 7157
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
7158
fi
7159
rm -f conftest*
7160
fi
7161 7162 7163 7164 7165 7166 7167
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
7168
#define SDL_INCLUDE_FILE <${SDL_HEADER}>
7169
EOF
7170

Sam Hocevar's avatar
 
Sam Hocevar committed
7171
else
7172 7173 7174 7175 7176
  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; }
      
7177 7178 7179
fi
done

Sam Hocevar's avatar
 
Sam Hocevar committed
7180
    CPPFLAGS="$save_CPPFLAGS"
Sam Hocevar's avatar
 
Sam Hocevar committed
7181
    if expr 1.1.5 \> `$SDL_CONFIG --version` >/dev/null
Sam Hocevar's avatar
 
Sam Hocevar committed
7182
    then
7183
      { echo "configure: error: The development package for SDL is not installed.
7184
Please install it and try again. Alternatively you can also configure with
7185
--disable-sdl." 1>&2; exit 1; }
Sam Hocevar's avatar
 
Sam Hocevar committed
7186
    fi
7187
  elif test "x$enable_sdl" =  "xyes"
Sam Hocevar's avatar
 
Sam Hocevar committed
7188
  then
7189
    { echo "configure: error: I couldn't find the SDL package. You can download libSDL
7190
from http://www.libsdl.org/, or configure with --disable-sdl. Have a nice day.
7191
    " 1>&2; exit 1; }
7192 7193
  fi
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
7194

7195 7196 7197
# Check whether --enable-directx or --disable-directx was given.
if test "${enable_directx+set}" = set; then
  enableval="$enable_directx"
7198 7199
  :
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
7200

7201
if test "x$enable_directx" != "xno"
7202
then
Sam Hocevar's avatar
 
Sam Hocevar committed
7203
  if test x$SYS = xmingw32
7204
  then
7205
    # Check whether --with-directx or --without-directx was given.
Xavier Marchesini's avatar
 
Xavier Marchesini committed
7206 7207
if test "${with_directx+set}" = set; then
  withval="$with_directx"
7208 7209
  :
fi
Gildas Bazin's avatar
 
Gildas Bazin committed
7210

Sam Hocevar's avatar
 
Sam Hocevar committed
7211
    if test "x$with_directx" = "x"
7212
    then
7213
      for ac_hdr in ddraw.h
Sam Hocevar's avatar
 
Sam Hocevar committed
7214
do
7215 7216
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
7217
echo "configure:7218: checking for $ac_hdr" >&5
7218 7219
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
7220
else
7221
  cat > conftest.$ac_ext <<EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
7222
#line 7223 "configure"
7223 7224 7225 7226
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Gildas Bazin's avatar
 
Gildas Bazin committed
7227
{ (eval echo configure:7228: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7228 7229 7230 7231 7232 7233 7234
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
7235
  cat conftest.$ac_ext >&5
7236 7237
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
Sam Hocevar's avatar
 
Sam Hocevar committed
7238
fi
7239
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
7240
fi
7241 7242 7243 7244 7245 7246
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
7247
  PLUGINS="${PLUGINS} directx"
7248 7249 7250
        directx_LDFLAGS="${directx_LDFLAGS} -lgdi32" 
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
7251 7252 7253
fi
done

7254
    else
7255
      echo $ac_n "checking for directX headers in ${with_directx}""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
7256
echo "configure:7257: checking for directX headers in ${with_directx}" >&5
7257
      if test -f ${with_directx}/ddraw.h
7258 7259
      then
        PLUGINS="${PLUGINS} directx"
7260 7261
        directx_LDFLAGS="${directx_LDFLAGS} -L${with_directx}/lib -lgdi32"
        directx_CFLAGS="${directx_CFLAGS} -I${with_directx}"
7262
        echo "$ac_t""yes" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
7263
      else
7264 7265
        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
7266
      fi
7267 7268
    fi
  fi
7269 7270
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
7271 7272 7273
# Check whether --enable-fb or --disable-fb was given.
if test "${enable_fb+set}" = set; then
  enableval="$enable_fb"
7274 7275
  :
fi
Gildas Bazin's avatar
 
Gildas Bazin committed
7276

Sam Hocevar's avatar
 
Sam Hocevar committed
7277 7278
    if test x$enable_fb != xno
    then
7279
      for ac_hdr in linux/fb.h
Sam Hocevar's avatar
 
Sam Hocevar committed
7280
do
7281 7282
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
7283
echo "configure:7284: checking for $ac_hdr" >&5
7284 7285
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
7286
else
7287
  cat > conftest.$ac_ext <<EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
7288
#line 7289 "configure"
7289 7290 7291 7292
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Gildas Bazin's avatar
 
Gildas Bazin committed
7293
{ (eval echo configure:7294: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7294 7295 7296 7297 7298 7299 7300
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
7301
  cat conftest.$ac_ext >&5
7302 7303
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
Sam Hocevar's avatar
 
Sam Hocevar committed
7304
fi
7305
rm -f conftest*
Gildas Bazin's avatar
 
Gildas Bazin committed
7306
fi
7307 7308 7309 7310 7311 7312 7313
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
7314
        PLUGINS="${PLUGINS} fb"
7315 7316 7317
      
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
7318 7319
fi
done
Gildas Bazin's avatar
 
Gildas Bazin committed
7320

Sam Hocevar's avatar
 
Sam Hocevar committed
7321 7322 7323 7324 7325 7326
    fi

# Check whether --enable-mga or --disable-mga was given.
if test "${enable_mga+set}" = set; then
  enableval="$enable_mga"
   if test x$enable_mga = xyes
Sam Hocevar's avatar
 
Sam Hocevar committed
7327
    then
Sam Hocevar's avatar
 
Sam Hocevar committed
7328
      PLUGINS="${PLUGINS} mga xmga"
7329 7330 7331
    fi 
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
7332

Sam Hocevar's avatar
 
Sam Hocevar committed
7333 7334 7335
# Check whether --enable-ggi or --disable-ggi was given.
if test "${enable_ggi+set}" = set; then
  enableval="$enable_ggi"
7336 7337
  :
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
7338

Sam Hocevar's avatar
 
Sam Hocevar committed
7339
if test x$enable_ggi = xyes
Sam Hocevar's avatar
 
Sam Hocevar committed
7340 7341
then
  PLUGINS="${PLUGINS} ggi"
Sam Hocevar's avatar
 
Sam Hocevar committed
7342
  ggi_LDFLAGS="${ggi_LDFLAGS} -lggi"
7343
  # Check whether --with-ggi or --without-ggi was given.
Sam Hocevar's avatar
 
Sam Hocevar committed
7344 7345
if test "${with_ggi+set}" = set; then
  withval="$with_ggi"
7346
   if test "x$with_ggi" != "xno" -a "x$with_ggi" != "x"
Sam Hocevar's avatar
 
Sam Hocevar committed
7347
      then
7348 7349
        CFLAGS_GGI="${CFLAGS_GGI} -I$with_ggi/include"
        ggi_LDFLAGS="${ggi_LDFLAGS} -L$with_ggi/lib"
7350 7351 7352
      fi 
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
7353 7354 7355 7356 7357
fi

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

Sam Hocevar's avatar
 
Sam Hocevar committed
7361
if test x$enable_glide = xyes
Sam Hocevar's avatar
 
Sam Hocevar committed
7362 7363
then
  PLUGINS="${PLUGINS} glide"
Sam Hocevar's avatar
 
Sam Hocevar committed
7364 7365
  glide_LDFLAGS="${glide_LDFLAGS} -lglide2x -lm"
  glide_CFLAGS="${glide_CFLAGS} -I/usr/include/glide"
7366
  # Check whether --with-glide or --without-glide was given.
Christophe Massiot's avatar
Christophe Massiot committed
7367 7368
if test "${with_glide+set}" = set; then
  withval="$with_glide"
7369
   if test "x$with_glide" != "xno" -a "x$with_glide" != "x"
Sam Hocevar's avatar
 
Sam Hocevar committed
7370
      then
7371 7372
        glide_CFLAGS="${glide_CFLAGS} -I$with_glide/include"
        glide_LDFLAGS="${glide_LDFLAGS} -L$with_glide/lib"
7373 7374 7375
      fi 
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
7376
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
7377

Sam Hocevar's avatar
 
Sam Hocevar committed
7378 7379 7380
# Check whether --enable-aa or --disable-aa was given.
if test "${enable_aa+set}" = set; then
  enableval="$enable_aa"
7381 7382
  :
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
7383 7384 7385

if test x$enable_aa = xyes
then
7386 7387
  ac_safe=`echo "aalib.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for aalib.h""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
7388
echo "configure:7389: checking for aalib.h" >&5
7389 7390 7391 7392
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
Gildas Bazin's avatar
 
Gildas Bazin committed
7393
#line 7394 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
7394 7395
#include "confdefs.h"
#include <aalib.h>
7396 7397
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Gildas Bazin's avatar
 
Gildas Bazin committed
7398
{ (eval echo configure:7399: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7399 7400 7401 7402 7403 7404 7405
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
7406
  cat conftest.$ac_ext >&5
7407 7408
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
Sam Hocevar's avatar
 
Sam Hocevar committed
7409
fi
7410
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
7411
fi
7412 7413
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
7414 7415
  have_aa="true"
else
7416 7417
  echo "$ac_t""no" 1>&6
have_aa="false"
Sam Hocevar's avatar
 
Sam Hocevar committed
7418 7419 7420 7421 7422
fi

  if test x$have_aa = xtrue
  then
    PLUGINS="${PLUGINS} aa"
Sam Hocevar's avatar
 
Sam Hocevar committed
7423
    aa_LDFLAGS="${aa_LDFLAGS} -laa"
Sam Hocevar's avatar
 
Sam Hocevar committed
7424 7425 7426
  fi
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
7427 7428 7429 7430

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

Sam Hocevar's avatar
 
Sam Hocevar committed
7434

Sam Hocevar's avatar
 
Sam Hocevar committed
7435 7436 7437
# Check whether --enable-dsp or --disable-dsp was given.
if test "${enable_dsp+set}" = set; then
  enableval="$enable_dsp"
7438 7439
  :
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
7440

Sam Hocevar's avatar
 
Sam Hocevar committed
7441

Sam Hocevar's avatar
 
Sam Hocevar committed
7442 7443 7444
if test x$enable_dsp != xno &&
  (test x$SYS != xmingw32 || test x$enable_dsp = xyes)
then
7445
  for ac_hdr in soundcard.h sys/soundcard.h machine/soundcard.h
Sam Hocevar's avatar
 
Sam Hocevar committed
7446
do
7447 7448
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
7449
echo "configure:7450: checking for $ac_hdr" >&5
7450 7451
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
7452
else
7453
  cat > conftest.$ac_ext <<EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
7454
#line 7455 "configure"
7455 7456 7457 7458
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Gildas Bazin's avatar
 
Gildas Bazin committed
7459
{ (eval echo configure:7460: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7460 7461 7462 7463 7464 7465 7466
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
7467
  cat conftest.$ac_ext >&5
7468 7469
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
Sam Hocevar's avatar
 
Sam Hocevar committed
7470
fi
7471
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
7472
fi
7473 7474 7475 7476 7477 7478 7479
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
7480
    PLUGINS="${PLUGINS} dsp"
7481
    echo $ac_n "checking for main in -lossaudio""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
7482
echo "configure:7483: checking for main in -lossaudio" >&5
7483 7484 7485
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
7486
else
7487
  ac_save_LIBS="$LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
7488
LIBS="-lossaudio  $LIBS"
7489
cat > conftest.$ac_ext <<EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
7490
#line 7491 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
7491 7492
#include "confdefs.h"

7493 7494 7495 7496
int main() {
main()
; return 0; }
EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
7497
if { (eval echo configure:7498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7498 7499 7500 7501 7502 7503 7504 7505 7506 7507
  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
7508

7509 7510 7511
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
7512
  dsp_LDFLAGS="${dsp_LDFLAGS} -lossaudio"
7513 7514
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
7515 7516
fi

7517 7518 7519
  
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
7520 7521 7522 7523 7524 7525 7526 7527 7528 7529 7530 7531
fi
done

fi

# Check whether --enable-esd or --disable-esd was given.
if test "${enable_esd+set}" = set; then
  enableval="$enable_esd"
  if test x$enable_esd = xyes
   then
     # Extract the first word of "esd-config", so it can be a program name with args.
set dummy esd-config; ac_word=$2
7532
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
7533
echo "configure:7534: checking for $ac_word" >&5
7534 7535
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
7536
else
7537 7538
  case "$ESD_CONFIG" in
  /*)
Sam Hocevar's avatar
 
Sam Hocevar committed
7539 7540
  ac_cv_path_ESD_CONFIG="$ESD_CONFIG" # Let the user override the test with a path.
  ;;
7541 7542 7543
  ?:/*)			 
  ac_cv_path_ESD_CONFIG="$ESD_CONFIG" # Let the user override the test with a dos path.
  ;;
Sam Hocevar's avatar
 
Sam Hocevar committed
7544
  *)
7545 7546 7547 7548 7549 7550 7551 7552 7553 7554
  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
7555 7556 7557 7558
  test -z "$ac_cv_path_ESD_CONFIG" && ac_cv_path_ESD_CONFIG="no"
  ;;
esac
fi
7559
ESD_CONFIG="$ac_cv_path_ESD_CONFIG"
Sam Hocevar's avatar
 
Sam Hocevar committed
7560
if test -n "$ESD_CONFIG"; then
7561
  echo "$ac_t""$ESD_CONFIG" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
7562
else
7563
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
7564 7565 7566
fi

     if test x${ESD_CONFIG} != xno
7567
     then
Sam Hocevar's avatar
 
Sam Hocevar committed
7568
       PLUGINS="${PLUGINS} esd"
Sam Hocevar's avatar
 
Sam Hocevar committed
7569 7570
       esd_CFLAGS="${esd_CFLAGS} `${ESD_CONFIG} --cflags`"
       esd_LDFLAGS="${esd_LDFLAGS} `${ESD_CONFIG} --libs`"
7571
     fi
Sam Hocevar's avatar
 
Sam Hocevar committed
7572
   fi
7573 7574
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
7575

Sam Hocevar's avatar
 
Sam Hocevar committed
7576 7577 7578 7579 7580 7581 7582
# Check whether --enable-arts or --disable-arts was given.
if test "${enable_arts+set}" = set; then
  enableval="$enable_arts"
  if test x$enable_arts = xyes
   then
     # Extract the first word of "artsc-config", so it can be a program name with args.
set dummy artsc-config; ac_word=$2
7583
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
7584
echo "configure:7585: checking for $ac_word" >&5
7585 7586
if eval "test \"`echo '$''{'ac_cv_path_ARTS_CONFIG'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
7587
else
7588 7589
  case "$ARTS_CONFIG" in
  /*)
Sam Hocevar's avatar
 
Sam Hocevar committed
7590
  ac_cv_path_ARTS_CONFIG="$ARTS_CONFIG" # Let the user override the test with a path.
7591
  ;;
7592 7593 7594
  ?:/*)			 
  ac_cv_path_ARTS_CONFIG="$ARTS_CONFIG" # Let the user override the test with a dos path.
  ;;
7595
  *)
7596 7597 7598 7599 7600 7601 7602 7603 7604 7605
  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
7606
  test -z "$ac_cv_path_ARTS_CONFIG" && ac_cv_path_ARTS_CONFIG="no"
7607 7608 7609
  ;;
esac
fi
7610
ARTS_CONFIG="$ac_cv_path_ARTS_CONFIG"
Sam Hocevar's avatar
 
Sam Hocevar committed
7611
if test -n "$ARTS_CONFIG"; then
7612
  echo "$ac_t""$ARTS_CONFIG" 1>&6
7613
else
7614
  echo "$ac_t""no" 1>&6
7615 7616
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
7617 7618 7619
     if test x${ARTS_CONFIG} != xno
     then
       PLUGINS="${PLUGINS} arts"
Sam Hocevar's avatar
 
Sam Hocevar committed
7620 7621
       arts_CFLAGS="${arts_CFLAGS} `${ARTS_CONFIG} --cflags`"
       arts_LDFLAGS="${arts_LDFLAGS} `${ARTS_CONFIG} --libs `"
Sam Hocevar's avatar
 
Sam Hocevar committed
7622 7623
     fi
   fi
7624 7625
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
7626 7627 7628 7629 7630 7631

# Check whether --enable-alsa or --disable-alsa was given.
if test "${enable_alsa+set}" = set; then
  enableval="$enable_alsa"
  if test x$enable_alsa = xyes
   then
7632 7633
     ac_safe=`echo "alsa/asoundlib.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for alsa/asoundlib.h""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
7634
echo "configure:7635: checking for alsa/asoundlib.h" >&5
7635 7636 7637 7638
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
Gildas Bazin's avatar
 
Gildas Bazin committed
7639
#line 7640 "configure"
7640
#include "confdefs.h"
Sam Hocevar's avatar
 
Sam Hocevar committed
7641
#include <alsa/asoundlib.h>
7642 7643
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Gildas Bazin's avatar
 
Gildas Bazin committed
7644
{ (eval echo configure:7645: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7645 7646 7647 7648 7649 7650 7651
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
7652
  cat conftest.$ac_ext >&5
7653 7654
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
7655
fi
7656
rm -f conftest*
7657
fi
7658 7659 7660
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
Gildas Bazin's avatar
 
Gildas Bazin committed
7661
echo "configure:7662: checking for main in -lasound" >&5
7662 7663 7664
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
7665
else
7666
  ac_save_LIBS="$LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
7667
LIBS="-lasound  $LIBS"
7668
cat > conftest.$ac_ext <<EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
7669
#line 7670 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
7670 7671
#include "confdefs.h"

7672 7673 7674 7675
int main() {
main()
; return 0; }
EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
7676
if { (eval echo configure:7677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7677 7678 7679 7680 7681 7682 7683 7684 7685 7686
  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
7687

7688 7689 7690
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
7691 7692
  have_alsa="true"
else
7693 7694
  echo "$ac_t""no" 1>&6
have_alsa="false"
Sam Hocevar's avatar
 
Sam Hocevar committed
7695 7696
fi

7697
else
7698 7699
  echo "$ac_t""no" 1>&6
have_alsa="false"
7700 7701
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
7702 7703 7704
     if test x$have_alsa = xtrue
     then
       PLUGINS="${PLUGINS} alsa"
Sam Hocevar's avatar
 
Sam Hocevar committed
7705
       alsa_LDFLAGS="${alsa_LDFLAGS} -lasound -lm -ldl"
Sam Hocevar's avatar
 
Sam Hocevar committed
7706 7707
     fi
   fi
7708 7709
fi

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

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

7717
if test "x$enable_waveout" != "xno" -a x$SYS = xmingw32
Sam Hocevar's avatar
 
Sam Hocevar committed
7718 7719
  then
    PLUGINS="${PLUGINS} waveout"
Sam Hocevar's avatar
 
Sam Hocevar committed
7720
    waveout_LDFLAGS="-lwinmm"
Sam Hocevar's avatar
 
Sam Hocevar committed
7721 7722 7723 7724 7725 7726
fi


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

Sam Hocevar's avatar
 
Sam Hocevar committed
7730

Sam Hocevar's avatar
 
Sam Hocevar committed
7731 7732 7733
# Check whether --enable-gtk or --disable-gtk was given.
if test "${enable_gtk+set}" = set; then
  enableval="$enable_gtk"
7734 7735
  :
fi
7736

Sam Hocevar's avatar
 
Sam Hocevar committed
7737 7738
if test x$enable_gtk != xno
then
7739
  GTK_PATH=$PATH
7740
  # Check whether --with-gtk-config-path or --without-gtk-config-path was given.
7741 7742
if test "${with_gtk_config_path+set}" = set; then
  withval="$with_gtk_config_path"
Gildas Bazin's avatar
 
Gildas Bazin committed
7743
   if test "x$with_gtk_config_path" != "xno"
7744
      then
Gildas Bazin's avatar
 
Gildas Bazin committed
7745
        GTK_PATH="$with_gtk_config_path:$PATH"
7746 7747 7748
      fi 
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
7749
  # look for gtk-config
Sam Hocevar's avatar
 
Sam Hocevar committed
7750 7751
  # Extract the first word of "gtk12-config", so it can be a program name with args.
set dummy gtk12-config; ac_word=$2
7752
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
7753
echo "configure:7754: checking for $ac_word" >&5
7754 7755
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
7756
else
7757 7758
  case "$GTK12_CONFIG" in
  /*)
Sam Hocevar's avatar
 
Sam Hocevar committed
7759 7760
  ac_cv_path_GTK12_CONFIG="$GTK12_CONFIG" # Let the user override the test with a path.
  ;;
7761 7762 7763
  ?:/*)			 
  ac_cv_path_GTK12_CONFIG="$GTK12_CONFIG" # Let the user override the test with a dos path.
  ;;
Sam Hocevar's avatar
 
Sam Hocevar committed
7764
  *)
7765 7766 7767 7768 7769 7770 7771 7772 7773 7774
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$GTK_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_GTK12_CONFIG="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
Sam Hocevar's avatar
 
Sam Hocevar committed
7775 7776 7777 7778
  test -z "$ac_cv_path_GTK12_CONFIG" && ac_cv_path_GTK12_CONFIG="no"
  ;;
esac
fi
7779
GTK12_CONFIG="$ac_cv_path_GTK12_CONFIG"
Sam Hocevar's avatar
 
Sam Hocevar committed
7780
if test -n "$GTK12_CONFIG"; then
7781
  echo "$ac_t""$GTK12_CONFIG" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
7782
else
7783
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
7784 7785 7786 7787 7788 7789 7790
fi

  GTK_CONFIG=${GTK12_CONFIG}
  if test x${GTK_CONFIG} = xno
  then
    # Extract the first word of "gtk-config", so it can be a program name with args.
set dummy gtk-config; ac_word=$2
7791
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
7792
echo "configure:7793: checking for $ac_word" >&5
7793 7794
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
7795
else
7796 7797
  case "$GTK_CONFIG" in
  /*)
Sam Hocevar's avatar
 
Sam Hocevar committed
7798 7799
  ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a path.
  ;;
7800 7801 7802
  ?:/*)			 
  ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a dos path.
  ;;
Sam Hocevar's avatar
 
Sam Hocevar committed
7803
  *)
7804 7805 7806 7807 7808 7809 7810 7811 7812 7813
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$GTK_PATH"
  for ac_dir in $ac_dummy; do 
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_GTK_CONFIG="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
Sam Hocevar's avatar
 
Sam Hocevar committed
7814 7815 7816 7817
  test -z "$ac_cv_path_GTK_CONFIG" && ac_cv_path_GTK_CONFIG="no"
  ;;
esac
fi
7818
GTK_CONFIG="$ac_cv_path_GTK_CONFIG"
Sam Hocevar's avatar
 
Sam Hocevar committed
7819
if test -n "$GTK_CONFIG"; then
7820
  echo "$ac_t""$GTK_CONFIG" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
7821
else
7822
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
7823 7824
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
7825 7826
  fi
  if test x${GTK_CONFIG} != xno
Sam Hocevar's avatar
 
Sam Hocevar committed
7827
  then
Sam Hocevar's avatar
 
Sam Hocevar committed
7828 7829
    if expr 1.2.0 \> `$GTK_CONFIG --version` >/dev/null
    then
7830
      { 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
7831
    fi
Sam Hocevar's avatar
 
Sam Hocevar committed
7832 7833
    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
7834
    # now look for the gtk.h header
Sam Hocevar's avatar
 
Sam Hocevar committed
7835
    CPPFLAGS="$save_CPPFLAGS $gtk_CFLAGS"
Sam Hocevar's avatar
 
Sam Hocevar committed
7836
    ac_cv_gtk_headers=yes
7837
    for ac_hdr in gtk/gtk.h glib.h gdk/gdk.h
Sam Hocevar's avatar
 
Sam Hocevar committed
7838
do
7839 7840
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
7841
echo "configure:7842: checking for $ac_hdr" >&5
7842 7843
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
7844
else
7845
  cat > conftest.$ac_ext <<EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
7846
#line 7847 "configure"
7847 7848 7849 7850
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Gildas Bazin's avatar
 
Gildas Bazin committed
7851
{ (eval echo configure:7852: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7852 7853 7854 7855 7856 7857 7858
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
7859
  cat conftest.$ac_ext >&5
7860 7861
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
Sam Hocevar's avatar
 
Sam Hocevar committed
7862
fi
7863
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
7864
fi
7865 7866 7867 7868 7869 7870 7871
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
7872
else
7873 7874
  echo "$ac_t""no" 1>&6
ac_cv_gtk_headers=no
Sam Hocevar's avatar
 
Sam Hocevar committed
7875
      echo "Cannot find gtk development headers."
7876
    
Sam Hocevar's avatar
 
Sam Hocevar committed
7877 7878 7879
fi
done

Sam Hocevar's avatar
 
Sam Hocevar committed
7880 7881 7882 7883 7884
    if test "x$ac_cv_gtk_headers" = xyes
    then
      PLUGINS="${PLUGINS} gtk"
      ALIASES="${ALIASES} gvlc"
    fi
Sam Hocevar's avatar
 
Sam Hocevar committed
7885
    CPPFLAGS="$save_CPPFLAGS"
7886
  fi
7887
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
7888

Sam Hocevar's avatar
 
Sam Hocevar committed
7889 7890 7891 7892 7893 7894 7895
# Check whether --enable-gnome or --disable-gnome was given.
if test "${enable_gnome+set}" = set; then
  enableval="$enable_gnome"
  if test x$enable_gnome = xyes; then
    # 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
7896
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
7897
echo "configure:7898: checking for $ac_word" >&5
7898 7899
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
7900
else
7901 7902
  case "$GNOME_CONFIG" in
  /*)
Sam Hocevar's avatar
 
Sam Hocevar committed
7903 7904
  ac_cv_path_GNOME_CONFIG="$GNOME_CONFIG" # Let the user override the test with a path.
  ;;
7905 7906 7907
  ?:/*)			 
  ac_cv_path_GNOME_CONFIG="$GNOME_CONFIG" # Let the user override the test with a dos path.
  ;;
Sam Hocevar's avatar
 
Sam Hocevar committed
7908
  *)
7909 7910 7911 7912 7913 7914 7915 7916 7917 7918
  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
7919 7920 7921 7922
  test -z "$ac_cv_path_GNOME_CONFIG" && ac_cv_path_GNOME_CONFIG="no"
  ;;
esac
fi
7923
GNOME_CONFIG="$ac_cv_path_GNOME_CONFIG"
Sam Hocevar's avatar
 
Sam Hocevar committed
7924
if test -n "$GNOME_CONFIG"; then
7925
  echo "$ac_t""$GNOME_CONFIG" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
7926
else
7927
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
7928
fi
Henri Fallon's avatar
 
Henri Fallon committed
7929

Sam Hocevar's avatar
 
Sam Hocevar committed
7930 7931
    if test -x ${GNOME_CONFIG}
    then
Sam Hocevar's avatar
 
Sam Hocevar committed
7932 7933
       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
7934 7935
    fi
    # now look for the gnome.h header
Sam Hocevar's avatar
 
Sam Hocevar committed
7936
    CPPFLAGS="$save_CPPFLAGS $gnome_CFLAGS"
7937
    for ac_hdr in gnome.h
7938
do
7939 7940
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
7941
echo "configure:7942: checking for $ac_hdr" >&5
7942 7943
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
7944
else
7945
  cat > conftest.$ac_ext <<EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
7946
#line 7947 "configure"
7947 7948 7949 7950
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Gildas Bazin's avatar
 
Gildas Bazin committed
7951
{ (eval echo configure:7952: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7952 7953 7954 7955 7956 7957 7958
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
7959
  cat conftest.$ac_ext >&5
7960 7961
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
7962
fi
7963
rm -f conftest*
7964
fi
7965 7966 7967 7968 7969 7970 7971
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
7972 7973
      PLUGINS="${PLUGINS} gnome"
      ALIASES="${ALIASES} gnome-vlc"
7974
     
Sam Hocevar's avatar
 
Sam Hocevar committed
7975
else
7976 7977 7978 7979
  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; }
     
7980 7981 7982
fi
done

Sam Hocevar's avatar
 
Sam Hocevar committed
7983
    CPPFLAGS="$save_CPPFLAGS"
Sam Hocevar's avatar
 
Sam Hocevar committed
7984
  fi
7985 7986
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
7987 7988 7989 7990 7991 7992 7993

# Check whether --enable-qt or --disable-qt was given.
if test "${enable_qt+set}" = set; then
  enableval="$enable_qt"
  if test x$enable_qt = xyes; then
     PLUGINS="${PLUGINS} qt"
     ALIASES="${ALIASES} qvlc"
Sam Hocevar's avatar
 
Sam Hocevar committed
7994 7995
     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
7996 7997 7998 7999 8000 8001 8002
     if test -x ${QTDIR}/bin/moc
     then
       MOC=${QTDIR}/bin/moc
     else
       MOC=moc
     fi
   fi
8003 8004
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
8005 8006 8007 8008 8009 8010 8011

# Check whether --enable-kde or --disable-kde was given.
if test "${enable_kde+set}" = set; then
  enableval="$enable_kde"
  if test x$enable_kde = xyes; then
     PLUGINS="${PLUGINS} kde"
     ALIASES="${ALIASES} kvlc"
Sam Hocevar's avatar
 
Sam Hocevar committed
8012 8013 8014
     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
8015 8016 8017 8018 8019 8020 8021
     if test -x ${QTDIR}/bin/moc
     then
       MOC=${QTDIR}/bin/moc
     else
       MOC=moc
     fi
   fi
8022 8023
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
8024 8025 8026 8027 8028 8029 8030

# Check whether --enable-macosx or --disable-macosx was given.
if test "${enable_macosx+set}" = set; then
  enableval="$enable_macosx"
  if test x$enable_macosx = xyes
   then
     BUILTINS="${BUILTINS} macosx"
8031
     macosx_LDFLAGS="${macosx_LDFLAGS} -framework CoreAudio -framework AudioToolbox -framework IOKit -framework Cocoa -framework AGL -framework QuickTime -lobjc -ObjC"
Sam Hocevar's avatar
 
Sam Hocevar committed
8032 8033
   fi
else
8034
  for ac_hdr in Cocoa/Cocoa.h
Sam Hocevar's avatar
 
Sam Hocevar committed
8035
do
8036 8037
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
8038
echo "configure:8039: checking for $ac_hdr" >&5
8039 8040
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
8041
else
8042
  cat > conftest.$ac_ext <<EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
8043
#line 8044 "configure"
8044 8045 8046 8047
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Gildas Bazin's avatar
 
Gildas Bazin committed
8048
{ (eval echo configure:8049: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8049 8050 8051 8052 8053 8054 8055
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
8056
  cat conftest.$ac_ext >&5
8057 8058
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
Sam Hocevar's avatar
 
Sam Hocevar committed
8059
fi
8060
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
8061
fi
8062 8063 8064 8065 8066 8067
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
8068
 BUILTINS="${BUILTINS} macosx"
8069
     macosx_LDFLAGS="${macosx_LDFLAGS} -framework CoreAudio -framework AudioToolbox -framework IOKit -framework Cocoa -framework AGL -framework QuickTime -lobjc -ObjC"
8070 8071 8072
   
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
8073
fi
8074 8075
done

8076 8077
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
8078 8079 8080 8081

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

    if test x$enable_qnx != xno
    then
8087
      for ac_hdr in Ph.h
Sam Hocevar's avatar
 
Sam Hocevar committed
8088
do
8089 8090
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
8091
echo "configure:8092: checking for $ac_hdr" >&5
8092 8093
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
8094
else
8095
  cat > conftest.$ac_ext <<EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
8096
#line 8097 "configure"
8097 8098 8099 8100
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Gildas Bazin's avatar
 
Gildas Bazin committed
8101
{ (eval echo configure:8102: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8102 8103 8104 8105 8106 8107 8108
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
8109
  cat conftest.$ac_ext >&5
8110 8111
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
Sam Hocevar's avatar
 
Sam Hocevar committed
8112
fi
8113
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
8114
fi
8115 8116 8117 8118 8119 8120 8121
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
8122
        PLUGINS="${PLUGINS} qnx"
Sam Hocevar's avatar
 
Sam Hocevar committed
8123
        qnx_LDFLAGS="${qnx_LDFLAGS} -lasound -lph"
8124 8125 8126
      
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
8127
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
8128
done
Sam Hocevar's avatar
 
Sam Hocevar committed
8129

Sam Hocevar's avatar
 
Sam Hocevar committed
8130 8131
    fi

Sam Hocevar's avatar
 
Sam Hocevar committed
8132 8133 8134
# Check whether --enable-intfwin or --disable-intfwin was given.
if test "${enable_intfwin+set}" = set; then
  enableval="$enable_intfwin"
8135
   if test "x$enable_intfwin" != "xno"
Sam Hocevar's avatar
 
Sam Hocevar committed
8136
  then
8137
    # Check whether --with-bcbuilder or --without-bcbuilder was given.
Sam Hocevar's avatar
 
Sam Hocevar committed
8138 8139
if test "${with_bcbuilder+set}" = set; then
  withval="$with_bcbuilder"
8140 8141
  :
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
8142 8143

    if test "x$with_bcbuilder" != "x"
Sam Hocevar's avatar
 
Sam Hocevar committed
8144
    then
Sam Hocevar's avatar
 
Sam Hocevar committed
8145 8146 8147
      BCBUILDER="$with_bcbuilder"
    fi
    PLUGINS="${PLUGINS} intfwin"
8148 8149 8150
  fi 
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
8151 8152 8153 8154 8155 8156

# Check whether --enable-ncurses or --disable-ncurses was given.
if test "${enable_ncurses+set}" = set; then
  enableval="$enable_ncurses"
  if test x$enable_ncurses = xyes; then
     PLUGINS="${PLUGINS} ncurses"
Sam Hocevar's avatar
 
Sam Hocevar committed
8157
     ncurses_LDFLAGS="${ncurses_LDFLAGS} -lncurses"
Sam Hocevar's avatar
 
Sam Hocevar committed
8158
   fi
8159 8160
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
8161

8162 8163 8164
# Check whether --enable-lirc or --disable-lirc was given.
if test "${enable_lirc+set}" = set; then
  enableval="$enable_lirc"
8165 8166
  :
fi
8167 8168 8169

if test x$enable_lirc = xyes
then
8170 8171
  ac_safe=`echo "lirc/lirc_client.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for lirc/lirc_client.h""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
8172
echo "configure:8173: checking for lirc/lirc_client.h" >&5
8173 8174 8175 8176
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
Gildas Bazin's avatar
 
Gildas Bazin committed
8177
#line 8178 "configure"
8178 8179
#include "confdefs.h"
#include <lirc/lirc_client.h>
8180 8181
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Gildas Bazin's avatar
 
Gildas Bazin committed
8182
{ (eval echo configure:8183: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8183 8184 8185 8186 8187 8188 8189
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
8190
  cat conftest.$ac_ext >&5
8191 8192
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
8193
fi
8194
rm -f conftest*
8195
fi
8196 8197 8198
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
Gildas Bazin's avatar
 
Gildas Bazin committed
8199
echo "configure:8200: checking for lirc_init in -llirc_client" >&5
8200 8201 8202
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
8203
else
8204
  ac_save_LIBS="$LIBS"
8205
LIBS="-llirc_client  $LIBS"
8206
cat > conftest.$ac_ext <<EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
8207
#line 8208 "configure"
8208 8209 8210
#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
8211 8212 8213 8214 8215 8216 8217
    builtin and then its argument prototype would still apply.  */
char lirc_init();

int main() {
lirc_init()
; return 0; }
EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
8218
if { (eval echo configure:8219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8219 8220
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
8221
else
8222 8223 8224 8225
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
8226
fi
8227 8228
rm -f conftest*
LIBS="$ac_save_LIBS"
8229

8230 8231 8232 8233
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  have_lirc="true"
8234
else
8235 8236
  echo "$ac_t""no" 1>&6
have_lirc="false"
8237 8238
fi

8239 8240 8241 8242
else
  echo "$ac_t""no" 1>&6
have_lirc="false"
fi
8243

8244 8245 8246
  if test x$have_lirc = xtrue
  then
    PLUGINS="${PLUGINS} lirc"
Sam Hocevar's avatar
 
Sam Hocevar committed
8247
    lirc_LDFLAGS="${lirc_LDFLAGS} -llirc_client"
8248 8249 8250
  fi
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
8251 8252 8253
# Check whether --with- or --without- was given.
if test "${with_+set}" = set; then
  withval="$with_"
8254 8255
  :
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
8256 8257 8258 8259 8260


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

8264
  case "x$with_words" in
Sam Hocevar's avatar
 
Sam Hocevar committed
8265 8266 8267 8268 8269 8270 8271
    xbig)
      ac_cv_c_bigendian=yes
      ;;
    xlittle)
      ac_cv_c_bigendian=no
      ;;
    *)
8272
                  echo $ac_n "checking whether the byte order is big-endian""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
8273
echo "configure:8274: checking whether the byte order is big-endian" >&5
8274 8275
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
8276
else
Sam Hocevar's avatar
 
Sam Hocevar committed
8277 8278 8279 8280 8281 8282 8283 8284 8285 8286
  ac_cv_c_bigendian=unknown
        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
8287
        
Sam Hocevar's avatar
 
Sam Hocevar committed
8288
        if test -f conftest.c
8289
        then 
Sam Hocevar's avatar
 
Sam Hocevar committed
8290
          if ${CC-cc} -c conftest.c -o conftest.o >config.log 2>&1 \
Sam Hocevar's avatar
 
Sam Hocevar committed
8291 8292 8293 8294 8295 8296 8297 8298 8299 8300 8301 8302
              && test -f conftest.o
          then
            if test "`strings conftest.o | grep BIGenDianSyS`"
            then
              ac_cv_c_bigendian=yes
            fi
            if test "`strings conftest.o | grep LiTTleEnDian`"
            then
              ac_cv_c_bigendian=no
            fi
          fi
        fi
8303
      
8304
fi
8305 8306

echo "$ac_t""$ac_cv_c_bigendian" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
8307 8308
      if test x$ac_cv_c_bigendian = xunknown
      then
8309
        { echo "configure: error: Could not guess endianness, please use --with-words" 1>&2; exit 1; }
Sam Hocevar's avatar
 
Sam Hocevar committed
8310 8311 8312 8313 8314
      fi
      ;;
  esac
if test $ac_cv_c_bigendian = yes
then
8315
  cat >> confdefs.h <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
8316
#define WORDS_BIGENDIAN 1
8317
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
8318 8319 8320 8321 8322 8323 8324

fi

GPROF=0
# Check whether --enable-gprof or --disable-gprof was given.
if test "${enable_gprof+set}" = set; then
  enableval="$enable_gprof"
8325 8326 8327
   if test "x$enable_gprof" = "xyes"; then GPROF=1; fi 
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
8328 8329 8330 8331 8332

CPROF=0
# Check whether --enable-cprof or --disable-cprof was given.
if test "${enable_cprof+set}" = set; then
  enableval="$enable_cprof"
8333
   if test "x$enable_cprof" = "xyes";
Sam Hocevar's avatar
 
Sam Hocevar committed
8334
  then
Sam Hocevar's avatar
 
Sam Hocevar committed
8335
    LDFLAGS="${LDFLAGS} -lcprof"
Sam Hocevar's avatar
 
Sam Hocevar committed
8336 8337 8338
    CPROF=1
  fi

8339 8340
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
8341 8342 8343 8344

# Check whether --enable-pth or --disable-pth was given.
if test "${enable_pth+set}" = set; then
  enableval="$enable_pth"
8345
   if test "x$enable_pth" = "xyes"; then
8346
    echo $ac_n "checking for pth_init in -lpth""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
8347
echo "configure:8348: checking for pth_init in -lpth" >&5
8348 8349 8350
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
8351
else
8352
  ac_save_LIBS="$LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
8353
LIBS="-lpth  $LIBS"
8354
cat > conftest.$ac_ext <<EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
8355
#line 8356 "configure"
Henri Fallon's avatar
 
Henri Fallon committed
8356
#include "confdefs.h"
Sam Hocevar's avatar
 
Sam Hocevar committed
8357 8358
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
8359 8360 8361 8362 8363 8364 8365
    builtin and then its argument prototype would still apply.  */
char pth_init();

int main() {
pth_init()
; return 0; }
EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
8366
if { (eval echo configure:8367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8367 8368 8369 8370 8371 8372 8373 8374 8375 8376 8377 8378 8379 8380 8381 8382 8383 8384 8385
  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
8386 8387 8388

  LIBS="-lpth $LIBS"

8389 8390
else
  echo "$ac_t""no" 1>&6
Sam Hocevar's avatar
 
Sam Hocevar committed
8391 8392
fi

8393
    cat > conftest.$ac_ext <<EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
8394
#line 8395 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
8395 8396
#include "confdefs.h"
#include <pth.h>
8397
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
8398 8399
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "pth_init" >/dev/null 2>&1; then
8400 8401 8402
  rm -rf conftest*
  
      cat >> confdefs.h <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
8403
#define PTH_INIT_IN_PTH_H 1
8404
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
8405 8406 8407 8408 8409 8410 8411

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


8412 8413
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
8414 8415 8416 8417

# Check whether --enable-st or --disable-st was given.
if test "${enable_st+set}" = set; then
  enableval="$enable_st"
8418
   if test "x$enable_st" = "xyes"; then
8419
    echo $ac_n "checking for st_init in -lst""... $ac_c" 1>&6
Gildas Bazin's avatar
 
Gildas Bazin committed
8420
echo "configure:8421: checking for st_init in -lst" >&5
8421 8422 8423
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
8424
else
8425
  ac_save_LIBS="$LIBS"
Sam Hocevar's avatar
 
Sam Hocevar committed
8426
LIBS="-lst  $LIBS"
8427
cat > conftest.$ac_ext <<EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
8428
#line 8429 "configure"
Henri Fallon's avatar
 
Henri Fallon committed
8429
#include "confdefs.h"
Sam Hocevar's avatar
 
Sam Hocevar committed
8430 8431
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
8432 8433 8434 8435 8436 8437 8438
    builtin and then its argument prototype would still apply.  */
char st_init();

int main() {
st_init()
; return 0; }
EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
8439
if { (eval echo configure:8440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8440 8441 8442 8443 8444 8445 8446 8447 8448 8449 8450 8451 8452 8453 8454 8455 8456 8457 8458
  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
8459 8460

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

8462 8463
else
  echo "$ac_t""no" 1>&6
Henri Fallon's avatar
 
Henri Fallon committed
8464
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
8465

8466
    cat > conftest.$ac_ext <<EOF
Gildas Bazin's avatar
 
Gildas Bazin committed
8467
#line 8468 "configure"
Sam Hocevar's avatar
 
Sam Hocevar committed
8468 8469
#include "confdefs.h"
#include <st.h>
8470
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
8471 8472
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "st_init" >/dev/null 2>&1; then
8473 8474 8475
  rm -rf conftest*
  
      cat >> confdefs.h <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
8476
#define ST_INIT_IN_ST_H 1
8477
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
8478 8479 8480

    THREAD_LIB="-lst"
    fi
Sam Hocevar's avatar
 
Sam Hocevar committed
8481
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
8482
rm -f conftest*
Sam Hocevar's avatar
 
Sam Hocevar committed
8483

Sam Hocevar's avatar
 
Sam Hocevar committed
8484

8485 8486
fi

Sam Hocevar's avatar
 
Sam Hocevar committed
8487

Sam Hocevar's avatar
 
Sam Hocevar committed
8488
LDFLAGS="${LDFLAGS} ${THREAD_LIB}"
Sam Hocevar's avatar
 
Sam Hocevar committed
8489

8490 8491 8492 8493 8494 8495 8496 8497
# Check whether --enable-plugins or --disable-plugins was given.
if test "${enable_plugins+set}" = set; then
  enableval="$enable_plugins"
  if test x$enable_plugins = xno
   then
     BUILTINS="${BUILTINS} ${PLUGINS}"
     PLUGINS=
   fi
8498 8499
fi

8500

Xavier Marchesini's avatar
 
Xavier Marchesini committed
8501
if test x$ac_cv_header_dlfcn_h = xno -a x$ac_cv_header_image_h = xno -a x$SYS != xmingw32
8502 8503 8504 8505 8506 8507 8508
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

8509
cat >> confdefs.h <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
8510
#define VERSION_MESSAGE "vlc $VERSION $CODENAME Copyright 1996-2002 VideoLAN"
8511
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
8512

8513
cat >> confdefs.h <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
8514
#define COPYRIGHT_MESSAGE "VideoLAN Client - version $VERSION $CODENAME - (c) 1996-2002 VideoLAN"
8515
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
8516 8517


Sam Hocevar's avatar
 
Sam Hocevar committed
8518
VLC_SYMBOL="`echo ${VERSION} | tr .- __`"
8519
cat >> confdefs.h <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
8520
#define MODULE_SUFFIX "__MODULE_$VLC_SYMBOL"
8521
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
8522

8523
cat >> confdefs.h <<EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
8524
#define MODULE_SYMBOL $VLC_SYMBOL
8525
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
8526 8527 8528 8529 8530 8531 8532


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

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


8533

8534 8535 8536 8537 8538





Henri Fallon's avatar
 
Henri Fallon committed
8539 8540 8541



Christophe Massiot's avatar
Christophe Massiot committed
8542 8543 8544



Sam Hocevar's avatar
 
Sam Hocevar committed
8545 8546 8547 8548 8549 8550 8551 8552 8553 8554 8555 8556 8557 8558














Sam Hocevar's avatar
 
Sam Hocevar committed
8559

Sam Hocevar's avatar
 
Sam Hocevar committed
8560

Sam Hocevar's avatar
 
Sam Hocevar committed
8561 8562 8563 8564




Sam Hocevar's avatar
 
Sam Hocevar committed
8565

Sam Hocevar's avatar
 
Sam Hocevar committed
8566 8567


8568

Sam Hocevar's avatar
 
Sam Hocevar committed
8569

Sam Hocevar's avatar
 
Sam Hocevar committed
8570

Sam Hocevar's avatar
 
Sam Hocevar committed
8571

Sam Hocevar's avatar
 
Sam Hocevar committed
8572

Sam Hocevar's avatar
 
Sam Hocevar committed
8573

Sam Hocevar's avatar
 
Sam Hocevar committed
8574 8575 8576



Sam Hocevar's avatar
 
Sam Hocevar committed
8577

Sam Hocevar's avatar
 
Sam Hocevar committed
8578

Sam Hocevar's avatar
 
Sam Hocevar committed
8579

Sam Hocevar's avatar
 
Sam Hocevar committed
8580

Sam Hocevar's avatar
 
Sam Hocevar committed
8581

Sam Hocevar's avatar
 
Sam Hocevar committed
8582 8583


8584

Sam Hocevar's avatar
 
Sam Hocevar committed
8585

Sam Hocevar's avatar
 
Sam Hocevar committed
8586 8587 8588



8589 8590


Sam Hocevar's avatar
 
Sam Hocevar committed
8591 8592 8593



Stéphane Borel's avatar
Stéphane Borel committed
8594 8595 8596



8597

8598

8599

Sam Hocevar's avatar
 
Sam Hocevar committed
8600 8601 8602 8603 8604 8605 8606 8607 8608









8609

Sam Hocevar's avatar
 
Sam Hocevar committed
8610 8611


Sam Hocevar's avatar
 
Sam Hocevar committed
8612

Sam Hocevar's avatar
 
Sam Hocevar committed
8613

8614 8615


Sam Hocevar's avatar
 
Sam Hocevar committed
8616 8617


8618 8619


8620 8621


Sam Hocevar's avatar
 
Sam Hocevar committed
8622

Gildas Bazin's avatar
 
Gildas Bazin committed
8623

Gildas Bazin's avatar
 
Gildas Bazin committed
8624

8625

Sam Hocevar's avatar
 
Sam Hocevar committed
8626

8627 8628
trap '' 1 2 15
cat > confcache <<\EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
8629 8630
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
8631 8632
# 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
8633
#
8634 8635 8636 8637 8638 8639 8640 8641
# 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
8642
#
8643
EOF
Sam Hocevar's avatar
 
Sam Hocevar committed
8644 8645 8646 8647 8648
# 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.
8649 8650 8651 8652 8653 8654 8655 8656 8657 8658 8659 8660 8661 8662 8663 8664 8665
(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
8666
  if test -w $cache_file; then
8667 8668
    echo "updating cache $cache_file"
    cat confcache > $cache_file
Sam Hocevar's avatar
 
Sam Hocevar committed
8669 8670 8671
  else
    echo "not updating unwritable cache $cache_file"
  fi
8672
fi
Sam Hocevar's avatar
 
Sam Hocevar committed
8673
rm -f confcache
8674

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

Sam Hocevar's avatar
 
Sam Hocevar committed
8677 8678 8679
test "x$prefix" = xNONE && prefix=$ac_default_prefix
# Let make expand exec_prefix.
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
8680

8681 8682 8683
# 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
8684
if test "x$srcdir" = x.; then
8685
  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
Sam Hocevar's avatar
 
Sam Hocevar committed
8686 8687
fi

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

8690
DEFS=-DHAVE_CONFIG_H
8691

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

8695 8696 8697 8698 8699 8700 8701 8702
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`:
8703
#
8704
# $0 $ac_configure_args
8705
#
8706 8707
# Compiler output produced by configure, useful for debugging
# configure, is in ./config.log if it exists.
8708

8709 8710
ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
for ac_option
8711
do
8712 8713 8714 8715 8716 8717 8718 8719 8720 8721
  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 ;;
8722 8723 8724
  esac
done

8725 8726
ac_given_srcdir=$srcdir
ac_given_INSTALL="$INSTALL"
8727

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

8732 8733 8734 8735 8736 8737 8738 8739 8740 8741 8742 8743 8744 8745 8746 8747 8748 8749 8750 8751 8752 8753 8754 8755 8756 8757 8758 8759 8760 8761 8762 8763 8764 8765 8766 8767 8768 8769 8770 8771 8772 8773 8774 8775 8776 8777 8778 8779 8780 8781 8782 8783 8784 8785 8786 8787 8788 8789 8790 8791 8792 8793 8794 8795 8796 8797 8798 8799 8800 8801 8802 8803 8804 8805 8806 8807 8808 8809 8810 8811 8812 8813 8814 8815 8816 8817 8818 8819 8820 8821 8822 8823 8824 8825 8826 8827 8828 8829 8830 8831 8832 8833 8834 8835 8836 8837 8838 8839 8840 8841 8842 8843 8844 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 8877 8878 8879 8880 8881 8882 8883 8884 8885
# 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
s%@DATA_PATH@%$DATA_PATH%g
s%@PLUGIN_PATH@%$PLUGIN_PATH%g
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
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
s%@a52_CFLAGS@%$a52_CFLAGS%g
s%@arts_CFLAGS@%$arts_CFLAGS%g
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
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
s%@ggi_LDFLAGS@%$ggi_LDFLAGS%g
s%@glide_LDFLAGS@%$glide_LDFLAGS%g
s%@gnome_LDFLAGS@%$gnome_LDFLAGS%g
s%@gtk_LDFLAGS@%$gtk_LDFLAGS%g
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
8886
s%@ipv6_LDFLAGS@%$ipv6_LDFLAGS%g
8887 8888 8889 8890 8891 8892 8893 8894 8895 8896 8897 8898 8899 8900 8901 8902
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
8903 8904

CEOF
8905
EOF
8906

8907 8908 8909 8910 8911 8912 8913 8914 8915 8916 8917 8918 8919 8920 8921 8922 8923 8924 8925 8926 8927 8928
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"
8929
    else
8930
      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
8931
    fi
8932 8933 8934
    ac_file=`expr $ac_file + 1`
    ac_beg=$ac_end
    ac_end=`expr $ac_end + $ac_max_sed_cmds`
8935
  fi
8936 8937 8938 8939 8940
done
if test -z "$ac_sed_cmds"; then
  ac_sed_cmds=cat
fi
EOF
8941

8942
cat >> $CONFIG_STATUS <<EOF
8943

8944
CONFIG_FILES=\${CONFIG_FILES-"Makefile.config Makefile.opts po/Makefile.in"}
8945 8946 8947 8948 8949 8950 8951 8952
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" ;;
8953 8954
  esac

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

8957 8958 8959 8960 8961 8962 8963 8964 8965 8966 8967
  # 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
8968

8969 8970 8971 8972 8973
  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" ;;
8974
  *) # Relative path.
8975 8976
    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
    top_srcdir="$ac_dots$ac_given_srcdir" ;;
Sam Hocevar's avatar
 
Sam Hocevar committed
8977
  esac
8978

8979 8980 8981 8982
  case "$ac_given_INSTALL" in
  [/$]*) INSTALL="$ac_given_INSTALL" ;;
  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
  esac
8983

8984 8985 8986 8987 8988 8989 8990 8991
  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
8992

8993 8994 8995 8996 8997 8998 8999 9000 9001
  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*
9002 9003 9004 9005 9006

# 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.
9007 9008 9009 9010 9011 9012 9013
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'
9014
ac_uC=' '
9015 9016 9017 9018 9019 9020 9021 9022 9023 9024 9025 9026 9027 9028 9029
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
9030
  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9031 9032 9033 9034
  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" ;;
9035 9036
  esac

9037 9038 9039 9040 9041 9042 9043 9044 9045 9046 9047 9048 9049 9050 9051 9052 9053 9054 9055 9056 9057 9058
  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
9059 9060 9061 9062

# 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.
9063 9064 9065 9066 9067 9068
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.
9069 9070

rm -f conftest.tail
9071
while :
9072
do
9073 9074 9075 9076 9077 9078
  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
9079
  echo 'CEOF
9080 9081 9082 9083 9084 9085 9086
  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
9087
done
9088 9089 9090 9091 9092 9093 9094 9095 9096 9097
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
9098
  else
9099 9100 9101 9102 9103
    # 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"
9104
    fi
9105 9106
    rm -f $ac_file
    mv conftest.h $ac_file
9107
  fi
9108
fi; done
Sam Hocevar's avatar
 
Sam Hocevar committed
9109

9110 9111 9112 9113 9114 9115 9116
EOF
cat >> $CONFIG_STATUS <<EOF


EOF
cat >> $CONFIG_STATUS <<\EOF
for ac_file in $CONFIG_FILES; do
Sam Hocevar's avatar
 
Sam Hocevar committed
9117 9118 9119 9120 9121 9122 9123 9124 9125 9126 9127 9128 9129 9130 9131 9132 9133 9134 9135 9136 9137 9138 9139 9140 9141 9142 9143
        # 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
9144
      done
9145

9146 9147
exit 0
EOF
9148
chmod +x $CONFIG_STATUS
9149 9150
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
9151

9152

9153
echo "
Sam Hocevar's avatar
 
Sam Hocevar committed
9154
vlc configuration
Sam Hocevar's avatar
 
Sam Hocevar committed
9155
--------------------
Sam Hocevar's avatar
 
Sam Hocevar committed
9156
vlc version           : ${VERSION}
Sam Hocevar's avatar
 
Sam Hocevar committed
9157 9158
system                : ${SYS}
architecture          : ${ARCH}
9159
optimizations         : ${OPTIMS}
Sam Hocevar's avatar
 
Sam Hocevar committed
9160
tuning                : ${TUNING}
9161
debug mode            : ${DEBUG}
Sam Hocevar's avatar
 
Sam Hocevar committed
9162
release               : ${RELEASE}
Sam Hocevar's avatar
 
Sam Hocevar committed
9163
cprof/gprof support   : ${CPROF}/${GPROF}
Sam Hocevar's avatar
 
Sam Hocevar committed
9164
need builtin getopt   : ${NEED_GETOPT}
Sam Hocevar's avatar
 
Sam Hocevar committed
9165
built-in modules      :${BUILTINS}
9166
plug-in modules       :${PLUGINS}
Sam Hocevar's avatar
 
Sam Hocevar committed
9167
vlc aliases           :${ALIASES}
Sam Hocevar's avatar
 
Sam Hocevar committed
9168

Sam Hocevar's avatar
 
Sam Hocevar committed
9169 9170
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
9171 9172

To build vlc and its plugins, type \`$VLC_MAKE'.
Sam Hocevar's avatar
 
Sam Hocevar committed
9173
"
9174