mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2026-02-05 04:06:34 -05:00
avoid libdl detecion on *BSD
NetBSD and OpenBSD has no libdl FreeBSD and DragonFlyBSD has libdl but dummy These OSes are no need to use -ldl to use dlopen()
This commit is contained in:
parent
2e82060ebc
commit
e855b2cb31
1 changed files with 12 additions and 4 deletions
16
configure.ac
16
configure.ac
|
|
@ -255,11 +255,19 @@ AC_ARG_WITH(libdl,
|
|||
[ have_libdl="$withval" ], [ have_libdl="yes" ])
|
||||
HAVE_LIBDL=
|
||||
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"
|
||||
case $host_os in
|
||||
netbsd* | freebsd* | dragonfly* | openbsd*)
|
||||
HAVE_LIBDL=yes
|
||||
AC_DEFINE([HAVE_LIBDL], 1, [Have libdl])
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
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
|
||||
;;
|
||||
esac
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue