View | Details | Raw Unified | Return to bug 176055
Collapse All | Expand All

(-)configure (-154 / +1 lines)
Lines 8283-8441 Link Here
8283
  LIBSOUND=
8283
  LIBSOUND=
8284
fi
8284
fi
8285
8285
8286
8287
8288
  ALSA_REQUIRED=1.0.0
8289
  ALSA_MODULES="alsa >= $ALSA_REQUIRED"
8290
8291
  succeeded=no
8292
8293
  # Extract the first word of "pkg-config", so it can be a program name with args.
8294
set dummy pkg-config; ac_word=$2
8295
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8296
$as_echo_n "checking for $ac_word... " >&6; }
8297
if ${ac_cv_path_PKG_CONFIG+:} false; then :
8298
  $as_echo_n "(cached) " >&6
8299
else
8300
  case $PKG_CONFIG in
8301
  [\\/]* | ?:[\\/]*)
8302
  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8303
  ;;
8304
  *)
8305
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8306
for as_dir in $PATH
8307
do
8308
  IFS=$as_save_IFS
8309
  test -z "$as_dir" && as_dir=.
8310
    for ac_exec_ext in '' $ac_executable_extensions; do
8311
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8312
    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8313
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8314
    break 2
8315
  fi
8316
done
8317
  done
8318
IFS=$as_save_IFS
8319
8320
  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
8321
  ;;
8322
esac
8323
fi
8324
PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8325
if test -n "$PKG_CONFIG"; then
8326
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8327
$as_echo "$PKG_CONFIG" >&6; }
8328
else
8329
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8330
$as_echo "no" >&6; }
8331
fi
8332
8333
8334
8335
  if test "$PKG_CONFIG" = "no" ; then
8336
     HAVE_ALSA=no
8337
  else
8338
     PKG_CONFIG_MIN_VERSION=0.9.0
8339
     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
8340
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ALSA_MODULES" >&5
8341
$as_echo_n "checking for $ALSA_MODULES... " >&6; }
8342
8343
        if $PKG_CONFIG --exists "$ALSA_MODULES" 2>&5; then
8344
            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8345
$as_echo "yes" >&6; }
8346
            succeeded=yes
8347
8348
            { $as_echo "$as_me:${as_lineno-$LINENO}: checking ALSA_CFLAGS" >&5
8349
$as_echo_n "checking ALSA_CFLAGS... " >&6; }
8350
            ALSA_CFLAGS=`$PKG_CONFIG --cflags "$ALSA_MODULES"|sed -e 's,///*,/,g'`
8351
            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ALSA_CFLAGS" >&5
8352
$as_echo "$ALSA_CFLAGS" >&6; }
8353
8354
            { $as_echo "$as_me:${as_lineno-$LINENO}: checking ALSA_LIBS" >&5
8355
$as_echo_n "checking ALSA_LIBS... " >&6; }
8356
            ALSA_LIBS=`$PKG_CONFIG --libs "$ALSA_MODULES"|sed -e 's,///*,/,g'`
8357
            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ALSA_LIBS" >&5
8358
$as_echo "$ALSA_LIBS" >&6; }
8359
        else
8360
            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8361
$as_echo "no" >&6; }
8362
            ALSA_CFLAGS=""
8363
            ALSA_LIBS=""
8364
            ## If we have a custom action on failure, don't print errors, but
8365
            ## do set a variable so people can do so.
8366
            ALSA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$ALSA_MODULES"`
8367
8368
        fi
8369
8370
8371
8372
     else
8373
        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
8374
        echo "*** See http://www.freedesktop.org/software/pkgconfig"
8375
     fi
8376
  fi
8377
8378
  if test $succeeded = yes; then
8379
     HAVE_ALSA=yes
8380
  else
8381
     HAVE_ALSA=no
8382
  fi
8383
8384
  if test $HAVE_ALSA = yes; then
8385
    SAVE_CFLAGS="$CFLAGS"
8386
    SAVE_LIBS="$LIBS"
8387
    CFLAGS="$ALSA_CFLAGS $CFLAGS"
8388
    LIBS="$ALSA_LIBS $LIBS"
8389
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8390
/* end confdefs.h.  */
8391
#include <asoundlib.h>
8392
int
8393
main ()
8394
{
8395
snd_lib_error_set_handler (0);
8396
  ;
8397
  return 0;
8398
}
8399
_ACEOF
8400
if ac_fn_c_try_compile "$LINENO"; then :
8401
  emacs_alsa_normal=yes
8402
else
8403
  emacs_alsa_normal=no
8404
fi
8405
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8406
    if test "$emacs_alsa_normal" != yes; then
8407
      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8408
/* end confdefs.h.  */
8409
#include <alsa/asoundlib.h>
8410
int
8411
main ()
8412
{
8413
snd_lib_error_set_handler (0);
8414
  ;
8415
  return 0;
8416
}
8417
_ACEOF
8418
if ac_fn_c_try_compile "$LINENO"; then :
8419
  emacs_alsa_subdir=yes
8420
else
8421
  emacs_alsa_subdir=no
8422
fi
8423
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8424
      if test "$emacs_alsa_subdir" != yes; then
8425
        as_fn_error $? "pkg-config found alsa, but it does not compile.  See config.log for error messages." "$LINENO" 5
8426
      fi
8427
      ALSA_CFLAGS="$ALSA_CFLAGS -DALSA_SUBDIR_INCLUDE"
8428
    fi
8429
8430
    CFLAGS="$SAVE_CFLAGS"
8431
    LIBS="$SAVE_LIBS"
8432
    LIBSOUND="$LIBSOUND $ALSA_LIBS"
8433
    CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS"
8434
8435
$as_echo "#define HAVE_ALSA 1" >>confdefs.h
8436
8437
  fi
8438
8439
        if test x$have_sound_header = xyes || test $HAVE_ALSA = yes; then
8286
        if test x$have_sound_header = xyes || test $HAVE_ALSA = yes; then
8440
     case "$opsys" in
8287
     case "$opsys" in
8441
              gnu-linux|freebsd|netbsd)
8288
              gnu-linux|freebsd|netbsd)
Lines 8453-8459 Link Here
8453
  linux/version.h sys/systeminfo.h \
8300
  linux/version.h sys/systeminfo.h \
8454
  stdio_ext.h fcntl.h coff.h pty.h sys/mman.h \
8301
  stdio_ext.h fcntl.h coff.h pty.h sys/mman.h \
8455
  sys/vlimit.h sys/resource.h locale.h sys/_mbstate_t.h \
8302
  sys/vlimit.h sys/resource.h locale.h sys/_mbstate_t.h \
8456
  sys/utsname.h pwd.h utmp.h dirent.h util.h
8303
  sys/utsname.h pwd.h utmp.h dirent.h util.h libutil.h
8457
do :
8304
do :
8458
  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8305
  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8459
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
8306
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"

Return to bug 176055