comparison configure.in @ 1467:b69f2b0309a0

Removed accidentally copied/pasted script for ALSA detection It's only a warning if dynamic loading code isn't possible.
author Sam Lantinga <slouken@libsdl.org>
date Mon, 06 Mar 2006 00:50:03 +0000
parents 1e8582152d44
children fecfef92fc94
comparison
equal deleted inserted replaced
1466:3c45c578d480 1467:b69f2b0309a0
322 AC_DEFINE(SDL_AUDIO_DRIVER_ALSA) 322 AC_DEFINE(SDL_AUDIO_DRIVER_ALSA)
323 SOURCES="$SOURCES $srcdir/src/audio/alsa/*.c" 323 SOURCES="$SOURCES $srcdir/src/audio/alsa/*.c"
324 BUILD_CFLAGS="$BUILD_CFLAGS $ALSA_CFLAGS" 324 BUILD_CFLAGS="$BUILD_CFLAGS $ALSA_CFLAGS"
325 if test x$have_loadso != xyes && \ 325 if test x$have_loadso != xyes && \
326 test x$enable_alsa_shared = xyes; then 326 test x$enable_alsa_shared = xyes; then
327 AC_MSG_ERROR([You must have SDL_LoadObject() support]) 327 AC_MSG_WARN([You must have SDL_LoadObject() support for dynamic ALSA loading])
328 fi 328 fi
329 if test x$have_loadso = xyes && \ 329 if test x$have_loadso = xyes && \
330 test x$enable_alsa_shared = xyes && test x$alsa_lib != x; then 330 test x$enable_alsa_shared = xyes && test x$alsa_lib != x; then
331 AC_DEFINE_UNQUOTED(SDL_AUDIO_DRIVER_ALSA_DYNAMIC, "$alsa_lib") 331 AC_DEFINE_UNQUOTED(SDL_AUDIO_DRIVER_ALSA_DYNAMIC, "$alsa_lib")
332 else 332 else
333 BUILD_LDFLAGS="$BUILD_LDFLAGS $ALSA_LIBS" 333 BUILD_LDFLAGS="$BUILD_LDFLAGS $ALSA_LIBS"
334 fi 334 fi
335 have_audio=yes 335 have_audio=yes
336 fi 336 fi
337 fi 337 fi
338 if test x$have_alsa = xyes; then
339 AC_ARG_ENABLE(alsa-shared,
340 [ --enable-alsa-shared dynamically load ALSA audio support [default=yes]],
341 , enable_alsa_shared=yes)
342 if test "x`echo $ALSA_LIBS | grep -- -L`" = "x"; then
343 if test "x`ls /lib/libasound.so.* 2> /dev/null`" != "x"; then
344 ALSA_LIBS="-L/lib $ALSA_LIBS"
345 elif test "x`ls /usr/lib/libasound.so.* 2> /dev/null`" != "x"; then
346 ALSA_LIBS="-L/usr/lib $ALSA_LIBS"
347 elif test "x`ls /usr/local/lib/libasound.so.* 2> /dev/null`" != "x"; then
348 ALSA_LIBS="-L/usr/local/lib $ALSA_LIBS"
349 fi
350 fi
351 alsa_lib_spec=`echo $ALSA_LIBS | sed 's/.*-L\([[^ ]]*\).*/\1\/libasound.so.*/'`
352 alsa_lib=`ls $alsa_lib_spec | sed 's/.*\/\(.*\)/\1/; q'`
353 echo "-- $alsa_lib_spec -> $alsa_lib"
354
355 if test x$have_loadso != xyes && \
356 test x$enable_alsa_shared = xyes; then
357 AC_MSG_ERROR([You must have SDL_LoadObject() support])
358 fi
359 if test x$have_loadso = xyes && \
360 test x$enable_alsa_shared = xyes && test x$alsa_lib != x; then
361 CFLAGS="$CFLAGS -DALSA_SUPPORT -DALSA_DYNAMIC=\$(alsa_lib) $ALSA_CFLAGS"
362 AC_SUBST(alsa_lib)
363
364 use_dlvsym=no
365 AC_CHECK_LIB(dl, dlvsym, [use_dlvsym=yes])
366 if test x$use_dlvsym = xyes; then
367 CFLAGS="$CFLAGS -DUSE_DLVSYM"
368 fi
369 else
370 CFLAGS="$CFLAGS -DALSA_SUPPORT $ALSA_CFLAGS"
371 SYSTEM_LIBS="$SYSTEM_LIBS $ALSA_LIBS"
372 fi
373 fi
374 } 338 }
375 339
376 dnl Check whether we want to use IRIX 6.5+ native audio or not 340 dnl Check whether we want to use IRIX 6.5+ native audio or not
377 CheckDMEDIA() 341 CheckDMEDIA()
378 { 342 {
448 AC_HELP_STRING([--enable-esd-shared], [dynamically load ESD audio support [default=yes]]), 412 AC_HELP_STRING([--enable-esd-shared], [dynamically load ESD audio support [default=yes]]),
449 , enable_esd_shared=yes) 413 , enable_esd_shared=yes)
450 esd_lib_spec=`echo $ESD_LIBS | sed 's/.*-L\([[^ ]]*\).*/\1\/libesd.so.*/'` 414 esd_lib_spec=`echo $ESD_LIBS | sed 's/.*-L\([[^ ]]*\).*/\1\/libesd.so.*/'`
451 esd_lib=`ls $esd_lib_spec | sed 's/.*\/\(.*\)/\1/; q'` 415 esd_lib=`ls $esd_lib_spec | sed 's/.*\/\(.*\)/\1/; q'`
452 echo "-- $esd_lib_spec -> $esd_lib" 416 echo "-- $esd_lib_spec -> $esd_lib"
417
418 AC_DEFINE(SDL_AUDIO_DRIVER_ESD)
419 SOURCES="$SOURCES $srcdir/src/audio/esd/*.c"
420 BUILD_CFLAGS="$BUILD_CFLAGS $ESD_CFLAGS"
453 if test x$have_loadso != xyes && \ 421 if test x$have_loadso != xyes && \
454 test x$enable_esd_shared = xyes; then 422 test x$enable_esd_shared = xyes; then
455 AC_MSG_ERROR([You must have SDL_LoadObject() support]) 423 AC_MSG_WARN([You must have SDL_LoadObject() support for dynamic ESD loading])
456 fi 424 fi
457 if test x$have_loadso = xyes && \ 425 if test x$have_loadso = xyes && \
458 test x$enable_esd_shared = xyes && test x$esd_lib != x; then 426 test x$enable_esd_shared = xyes && test x$esd_lib != x; then
459 AC_DEFINE_UNQUOTED(SDL_AUDIO_DRIVER_ESD_DYNAMIC, "$esd_lib") 427 AC_DEFINE_UNQUOTED(SDL_AUDIO_DRIVER_ESD_DYNAMIC, "$esd_lib")
460 fi 428 else
461 AC_DEFINE(SDL_AUDIO_DRIVER_ESD) 429 BUILD_LDFLAGS="$BUILD_LDFLAGS $ESD_LIBS"
462 SOURCES="$SOURCES $srcdir/src/audio/esd/*.c" 430 fi
463 BUILD_CFLAGS="$BUILD_CFLAGS $ESD_CFLAGS"
464 BUILD_LDFLAGS="$BUILD_LDFLAGS $ESD_LIBS"
465 have_audio=yes 431 have_audio=yes
466 fi 432 fi
467 fi 433 fi
468 } 434 }
469 435
498 AC_HELP_STRING([--enable-arts-shared], [dynamically load aRts audio support [default=yes]]), 464 AC_HELP_STRING([--enable-arts-shared], [dynamically load aRts audio support [default=yes]]),
499 , enable_arts_shared=yes) 465 , enable_arts_shared=yes)
500 arts_lib_spec="$ARTS_PREFIX/lib/libartsc.so.*" 466 arts_lib_spec="$ARTS_PREFIX/lib/libartsc.so.*"
501 arts_lib=`ls $arts_lib_spec | sed 's/.*\/\(.*\)/\1/; q'` 467 arts_lib=`ls $arts_lib_spec | sed 's/.*\/\(.*\)/\1/; q'`
502 echo "-- $arts_lib_spec -> $arts_lib" 468 echo "-- $arts_lib_spec -> $arts_lib"
469
470 AC_DEFINE(SDL_AUDIO_DRIVER_ARTS)
471 SOURCES="$SOURCES $srcdir/src/audio/arts/*.c"
472 BUILD_CFLAGS="$BUILD_CFLAGS $ARTS_CFLAGS"
503 if test x$have_loadso != xyes && \ 473 if test x$have_loadso != xyes && \
504 test x$enable_arts_shared = xyes; then 474 test x$enable_arts_shared = xyes; then
505 AC_MSG_ERROR([You must have SDL_LoadObject() support]) 475 AC_MSG_WARN([You must have SDL_LoadObject() support for dynamic ARTS loading])
506 fi 476 fi
507 if test x$have_loadso = xyes && \ 477 if test x$have_loadso = xyes && \
508 test x$enable_arts_shared = xyes && test x$arts_lib != x; then 478 test x$enable_arts_shared = xyes && test x$arts_lib != x; then
509 AC_DEFINE_UNQUOTED(SDL_AUDIO_DRIVER_ARTS_DYNAMIC, "$arts_lib") 479 AC_DEFINE_UNQUOTED(SDL_AUDIO_DRIVER_ARTS_DYNAMIC, "$arts_lib")
480 else
481 BUILD_LDFLAGS="$BUILD_LDFLAGS $ARTS_LIBS"
510 fi 482 fi
511 AC_DEFINE(SDL_AUDIO_DRIVER_ARTS)
512 SOURCES="$SOURCES $srcdir/src/audio/arts/*.c"
513 BUILD_CFLAGS="$BUILD_CFLAGS $ARTS_CFLAGS"
514 BUILD_LDFLAGS="$BUILD_LDFLAGS $ARTS_LIBS"
515 have_audio=yes 483 have_audio=yes
516 fi 484 fi
517 fi 485 fi
518 fi 486 fi
519 } 487 }
795 if test x$ac_cv_func_shmat != xyes; then 763 if test x$ac_cv_func_shmat != xyes; then
796 X_CFLAGS="$X_CFLAGS -DNO_SHARED_MEMORY" 764 X_CFLAGS="$X_CFLAGS -DNO_SHARED_MEMORY"
797 fi 765 fi
798 if test x$have_loadso != xyes && \ 766 if test x$have_loadso != xyes && \
799 test x$enable_x11_shared = xyes; then 767 test x$enable_x11_shared = xyes; then
800 AC_MSG_ERROR([You must have SDL_LoadObject() support]) 768 AC_MSG_WARN([You must have SDL_LoadObject() support for dynamic X11 loading])
801 fi 769 fi
802 770
803 if test x$have_loadso = xyes && \ 771 if test x$have_loadso = xyes && \
804 test x$enable_x11_shared = xyes && test x$x11_lib != x && test x$x11ext_lib != x; then 772 test x$enable_x11_shared = xyes && test x$x11_lib != x && test x$x11ext_lib != x; then
805 echo "-- dynamic libX11 -> $x11_lib" 773 echo "-- dynamic libX11 -> $x11_lib"