mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2026-02-23 01:40:06 -05:00
Allow build without libdl and libpthread
Allow building alsa-lib without libdl and libpthread. Added new options to configure, --with-libdl and --with-pthread.
This commit is contained in:
parent
9a75eec664
commit
70e4ec9d08
21 changed files with 118 additions and 25 deletions
53
configure.in
53
configure.in
|
|
@ -149,6 +149,44 @@ else
|
|||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
|
||||
ALSA_DEPLIBS=""
|
||||
if test "$softfloat" != "yes"; then
|
||||
ALSA_DEPLIBS="-lm"
|
||||
fi
|
||||
|
||||
dnl Check for libdl
|
||||
AC_MSG_CHECKING(for libdl)
|
||||
AC_ARG_WITH(libdl,
|
||||
[ --with-libdl Use libdl for plugins (default = yes)],
|
||||
[ have_libdl="$withval" ], [ have_libdl="yes" ])
|
||||
if test "$have_libdl" = "yes"; then
|
||||
AC_CHECK_LIB([dl], [dlsym], [HAVE_LIBDL="yes"])
|
||||
if test "$HAVE_LIBDL" = "yes" ; then
|
||||
ALSA_DEPLIBS="$ALSA_DEPLIBS -ldl"
|
||||
AC_DEFINE([HAVE_LIBDL], 1, [Have libdl])
|
||||
fi
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
AM_CONDITIONAL(BUILD_MODULES, test "$HAVE_LIBDL"="yes")
|
||||
|
||||
dnl Check for pthread
|
||||
AC_MSG_CHECKING(for pthread)
|
||||
AC_ARG_WITH(pthread,
|
||||
[ --with-pthread Use pthread (default = yes)],
|
||||
[ have_pthread="$withval" ], [ have_pthread="yes" ])
|
||||
if test "$have_pthread" = "yes"; then
|
||||
AC_CHECK_LIB([pthread], [pthread_join], [HAVE_LIBPTHREAD="yes"])
|
||||
if test "$HAVE_LIBPTHREAD" = "yes"; then
|
||||
ALSA_DEPLIBS="$ALSA_DEPLIBS -lpthread"
|
||||
AC_DEFINE([HAVE_LIBPTHREAD], 1, [Have libpthread])
|
||||
fi
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
|
||||
AC_SUBST(ALSA_DEPLIBS)
|
||||
|
||||
dnl Check for architecture
|
||||
AC_MSG_CHECKING(for architecture)
|
||||
case "$target" in
|
||||
|
|
@ -320,6 +358,21 @@ if test "$build_pcm_ioplug" = "yes"; then
|
|||
build_pcm_extplug="yes"
|
||||
fi
|
||||
|
||||
if test "$HAVE_LIBDL" != "yes"; then
|
||||
build_pcm_meter="no"
|
||||
build_pcm_ladspa="no"
|
||||
build_pcm_pcm_ioplug="no"
|
||||
build_pcm_pcm_extplug="no"
|
||||
fi
|
||||
|
||||
if test "$HAVE_LIBPTHREAD" != "yes"; then
|
||||
build_pcm_share="no"
|
||||
fi
|
||||
|
||||
if test "$softfloat" != "yes"; then
|
||||
build_pcm_lfloat="no"
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(BUILD_PCM_PLUGIN, test x$build_pcm_plugin = xyes)
|
||||
AM_CONDITIONAL(BUILD_PCM_PLUGIN_COPY, test x$build_pcm_copy = xyes)
|
||||
AM_CONDITIONAL(BUILD_PCM_PLUGIN_LINEAR, test x$build_pcm_linear = xyes)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue