configure.in
changeset 865 92615154bb68
parent 856 d3165b90ee42
child 868 e805075f6d94
     1.1 --- a/configure.in	Tue Mar 02 12:45:22 2004 +0000
     1.2 +++ b/configure.in	Tue Mar 02 12:49:16 2004 +0000
     1.3 @@ -295,8 +295,22 @@
     1.4          AC_CHECK_LIB(asound, snd_pcm_open, have_alsa=yes)
     1.5          ])
     1.6          if test x$have_alsa = xyes; then
     1.7 -            CFLAGS="$CFLAGS -DALSA_SUPPORT"
     1.8 -            SYSTEM_LIBS="$SYSTEM_LIBS -lasound"
     1.9 +            AC_ARG_ENABLE(alsa-shared,
    1.10 +[  --enable-alsa-shared     dynamically load ALSA audio support [default=yes]],
    1.11 +                          , enable_alsa_shared=yes)
    1.12 +            alsa_lib=`ls /usr/lib/libasound.so.* | head -1 | sed 's/.*\/\(.*\)/\1/'`
    1.13 +            if test x$use_dlopen != xyes && \
    1.14 +               test x$enable_alsa_shared = xyes; then
    1.15 +                AC_MSG_ERROR([You must have dlopen() support and use the --enable-dlopen option])
    1.16 +            fi
    1.17 +            if test x$use_dlopen = xyes && \
    1.18 +               test x$enable_alsa_shared = xyes && test x$alsa_lib != x; then
    1.19 +                CFLAGS="$CFLAGS -DALSA_SUPPORT -DALSA_DYNAMIC=\$(alsa_lib)"
    1.20 +                AC_SUBST(alsa_lib)
    1.21 +            else
    1.22 +                CFLAGS="$CFLAGS -DALSA_SUPPORT"
    1.23 +                SYSTEM_LIBS="$SYSTEM_LIBS -lasound"
    1.24 +            fi
    1.25              AUDIO_SUBDIRS="$AUDIO_SUBDIRS alsa"
    1.26              AUDIO_DRIVERS="$AUDIO_DRIVERS alsa/libaudio_alsa.la"
    1.27          else