]> git.alsa-project.org Git - alsa-lib.git/commitdiff
configure: avoid libdl detecion on *BSD
authorSASANO Takayoshi <uaa@uaa.org.uk>
Tue, 3 Jan 2023 02:13:19 +0000 (11:13 +0900)
committerJaroslav Kysela <perex@perex.cz>
Sun, 29 Jan 2023 18:00:59 +0000 (19:00 +0100)
NetBSD and OpenBSD has no libdl
FreeBSD and DragonFlyBSD has libdl but dummy

These OSes are no need to use -ldl to use dlopen()

Fixes: https://github.com/alsa-project/alsa-lib/pull/290
Signed-off-by: SASANO Takayoshi <uaa@uaa.org.uk>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
configure.ac

index 3989a743475984cfd06162315e4e6d663f785e96..ff82c6e8f21e729a954650d0b5ce6542aebe3af8 100644 (file)
@@ -255,9 +255,8 @@ 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"])
+  AC_SEARCH_LIBS([dlsym], [dl], [HAVE_LIBDL="yes"])
   if test "$HAVE_LIBDL" = "yes" ; then
-    ALSA_DEPLIBS="$ALSA_DEPLIBS -ldl"
     AC_DEFINE([HAVE_LIBDL], 1, [Have libdl])
   fi
 else