Mercurial > sdl-ios-xcode
comparison configure.in @ 3825:76c5a414b996 SDL-ryan-multiple-audio-device
Dynamic loading for NAS audio driver.
author | Ryan C. Gordon <icculus@icculus.org> |
---|---|
date | Sat, 07 Oct 2006 07:25:30 +0000 |
parents | c562b1a12f82 |
children | 93326d2ceedb |
comparison
equal
deleted
inserted
replaced
3824:25052dd25810 | 3825:76c5a414b996 |
---|---|
509 { | 509 { |
510 AC_ARG_ENABLE(nas, | 510 AC_ARG_ENABLE(nas, |
511 AC_HELP_STRING([--enable-nas], [support the NAS audio API [[default=yes]]]), | 511 AC_HELP_STRING([--enable-nas], [support the NAS audio API [[default=yes]]]), |
512 , enable_nas=yes) | 512 , enable_nas=yes) |
513 if test x$enable_audio = xyes -a x$enable_nas = xyes; then | 513 if test x$enable_audio = xyes -a x$enable_nas = xyes; then |
514 AC_CHECK_HEADER(audio/audiolib.h, have_nas_hdr=yes) | |
515 AC_CHECK_LIB(audio, AuOpenServer, have_nas_lib=yes) | |
516 | |
514 AC_MSG_CHECKING(for NAS audio support) | 517 AC_MSG_CHECKING(for NAS audio support) |
515 have_nas=no | 518 have_nas=no |
516 AC_CHECK_HEADER(audio/audiolib.h, have_nas_hdr=yes) | |
517 AC_CHECK_LIB(audio, AuOpenServer, have_nas_lib=yes) | |
518 | 519 |
519 if test x$have_nas_hdr = xyes -a x$have_nas_lib = xyes; then | 520 if test x$have_nas_hdr = xyes -a x$have_nas_lib = xyes; then |
520 have_nas=yes | 521 have_nas=yes |
521 NAS_LIBS="-laudio" | 522 NAS_LIBS="-laudio" |
522 | 523 |
530 | 531 |
531 elif test -r /usr/freeware/include/nas/audiolib.h; then | 532 elif test -r /usr/freeware/include/nas/audiolib.h; then |
532 have_nas=yes | 533 have_nas=yes |
533 NAS_LIBS="-lnas -lXt" | 534 NAS_LIBS="-lnas -lXt" |
534 fi | 535 fi |
536 | |
535 AC_MSG_RESULT($have_nas) | 537 AC_MSG_RESULT($have_nas) |
538 | |
536 if test x$have_nas = xyes; then | 539 if test x$have_nas = xyes; then |
540 AC_ARG_ENABLE(nas-shared, | |
541 AC_HELP_STRING([--enable-nas-shared], [dynamically load NAS audio support [[default=yes]]]), | |
542 , enable_nas_shared=yes) | |
543 if test "x`echo $NAS_LIBS | grep -- -L`" = "x"; then | |
544 if test "x`ls /lib/libaudio.so.* 2> /dev/null`" != "x"; then | |
545 NAS_LIBS="-L/lib $NAS_LIBS" | |
546 elif test "x`ls /usr/lib/libaudio.so.* 2> /dev/null`" != "x"; then | |
547 NAS_LIBS="-L/usr/lib $NAS_LIBS" | |
548 elif test "x`ls /usr/local/lib/libaudio.so.* 2> /dev/null`" != "x"; then | |
549 NAS_LIBS="-L/usr/local/lib $NAS_LIBS" | |
550 fi | |
551 fi | |
552 nas_lib_spec=`echo $NAS_LIBS | sed 's/.*-L\([[^ ]]*\).*/\1\/libaudio.so.*/'` | |
553 nas_lib=`ls -- $nas_lib_spec | sed 's/.*\/\(.*\)/\1/; q'` | |
554 echo "-- $nas_lib_spec -> $nas_lib" | |
555 | |
556 if test x$have_loadso != xyes && \ | |
557 test x$enable_nas_shared = xyes; then | |
558 AC_MSG_WARN([You must have SDL_LoadObject() support for dynamic NAS loading]) | |
559 fi | |
560 if test x$have_loadso = xyes && \ | |
561 test x$enable_nas_shared = xyes && test x$alsa_lib != x; then | |
562 AC_DEFINE_UNQUOTED(SDL_AUDIO_DRIVER_NAS_DYNAMIC, "$nas_lib") | |
563 else | |
564 EXTRA_LDFLAGS="$EXTRA_LDFLAGS $NAS_LIBS" | |
565 fi | |
566 | |
537 AC_DEFINE(SDL_AUDIO_DRIVER_NAS) | 567 AC_DEFINE(SDL_AUDIO_DRIVER_NAS) |
538 SOURCES="$SOURCES $srcdir/src/audio/nas/*.c" | 568 SOURCES="$SOURCES $srcdir/src/audio/nas/*.c" |
539 EXTRA_CFLAGS="$EXTRA_CFLAGS $NAS_CFLAGS" | 569 EXTRA_CFLAGS="$EXTRA_CFLAGS $NAS_CFLAGS" |
540 EXTRA_LDFLAGS="$EXTRA_LDFLAGS $NAS_LIBS" | |
541 have_audio=yes | 570 have_audio=yes |
542 fi | 571 fi |
543 fi | 572 fi |
544 } | 573 } |
545 | 574 |