rewrite with AC_SEARCH_LIBS

This commit is contained in:
SASANO Takayoshi 2023-01-04 11:44:21 +09:00
parent e855b2cb31
commit ca60f90480

View file

@ -255,19 +255,10 @@ AC_ARG_WITH(libdl,
[ have_libdl="$withval" ], [ have_libdl="yes" ])
HAVE_LIBDL=
if test "$have_libdl" = "yes"; then
case $host_os in
netbsd* | freebsd* | dragonfly* | openbsd*)
HAVE_LIBDL=yes
AC_SEARCH_LIBS([dlsym], [dl], [HAVE_LIBDL="yes"])
if test "$HAVE_LIBDL" = "yes" ; then
AC_DEFINE([HAVE_LIBDL], 1, [Have libdl])
;;
*)
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
fi
else
AC_MSG_RESULT(no)
fi