diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2016-02-26 01:34:08 +0100 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2016-02-26 01:34:08 +0100 |
commit | 84254c10d2898fbe7f45934bcaad94a217cc22ab (patch) | |
tree | 4a2d468800a3318e38c95983d5c390c8e1f4b9cc /configure.ac | |
parent | 7af7b3dd5f1a4bdef4748079dfee86c81d00bee9 (diff) | |
download | ODR-AudioEnc-84254c10d2898fbe7f45934bcaad94a217cc22ab.tar.gz ODR-AudioEnc-84254c10d2898fbe7f45934bcaad94a217cc22ab.tar.bz2 ODR-AudioEnc-84254c10d2898fbe7f45934bcaad94a217cc22ab.zip |
Make ALSA input conditional
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac index 16f570d..3796ab0 100644 --- a/configure.ac +++ b/configure.ac @@ -27,21 +27,30 @@ AC_SEARCH_LIBS([init_rs_char], [fec], [], [ AC_CHECK_LIB([rt], [clock_gettime], [], [AC_MSG_ERROR([library rt is missing])]) -AM_PATH_ALSA(1.0.25) +# Check for options +AC_ARG_ENABLE([alsa], + AS_HELP_STRING([--enable-alsa], [Enable ALSA input])) -# Check for JACK AC_ARG_ENABLE([jack], AS_HELP_STRING([--enable-jack], [Enable JACK input])) AC_ARG_ENABLE([vlc], AS_HELP_STRING([--enable-vlc], [Enable libvlc input])) + +AS_IF([test "x$enable_alsa" = "xyes"], + [AM_PATH_ALSA(1.0.25)]) +AS_IF([test "x$enable_alsa" = "xyes"], + AC_DEFINE(HAVE_ALSA, [1], [Define if ALSA input is enabled])) + + AS_IF([test "x$enable_jack" = "xyes"], AC_CHECK_LIB(jack, jack_client_open, [], [AC_MSG_ERROR([JACK is required])])) AS_IF([test "x$enable_jack" = "xyes"], AC_DEFINE(HAVE_JACK, [1], [Define if JACK input is enabled])) + AS_IF([test "x$enable_vlc" = "xyes"], [ PKG_CHECK_MODULES([LIBVLC], [libvlc]) AC_SUBST([LIBVLC_CFLAGS]) @@ -51,8 +60,9 @@ AS_IF([test "x$enable_vlc" = "xyes"], AC_DEFINE(HAVE_VLC, [1], [Define if VLC input is enabled])) -# Link against jack +# Link against jack and alsa conditionally AM_CONDITIONAL([HAVE_JACK], [ test "x$enable_jack" = "xyes" ]) +AM_CONDITIONAL([HAVE_ALSA], [ test "x$enable_alsa" = "xyes" ]) # fdk-aac-dabplus-zmq needs ZeroMQ AC_CHECK_LIB(zmq, zmq_init, , AC_MSG_ERROR(ZeroMQ libzmq is required)) @@ -94,7 +104,7 @@ echo echo "Features enabled:" enabled="" disabled="" -for feature in jack vlc +for feature in jack vlc alsa do eval var=\$enable_$feature AS_IF([test "x$var" = "xyes"], |