summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am2
-rw-r--r--configure.ac5
2 files changed, 5 insertions, 2 deletions
diff --git a/Makefile.am b/Makefile.am
index bd39e68d..a8c917c1 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -42,7 +42,7 @@ deadbeef_SOURCES =\
sdkdir = $(pkgincludedir)
sdk_HEADERS = deadbeef.h
-deadbeef_LDADD = $(LDADD) $(DEPS_LIBS) $(ICONV_LIB) -lm -ldl -lpthread
+deadbeef_LDADD = $(LDADD) $(DEPS_LIBS) $(ICONV_LIB) $(DL_LIBS) -lm -lpthread
AM_CFLAGS = $(DEPS_CFLAGS) -std=c99
AM_CPPFLAGS = $(DEPS_CFLAGS)
diff --git a/configure.ac b/configure.ac
index 575d795c..ede78b60 100644
--- a/configure.ac
+++ b/configure.ac
@@ -110,6 +110,9 @@ if test "x$enable_staticlink" != "xno" ; then
STATICLINK=yes
fi
+dnl check for libdl
+AC_CHECK_LIB([dl], [main], [HAVE_DL=yes;DL_LIBS="-ldl";AC_SUBST(DL_LIBS)])
+
if test "x$enable_portable" != "xno" && test "x$enable_staticlink" != "xno" ; then
AC_DEFINE_UNQUOTED([PORTABLE], [1], [Define if building portable version])
PORTABLE=yes
@@ -450,7 +453,7 @@ fi
if test "x$enable_src" != "xno" ; then
if test "x$enable_staticlink" != "xno" ; then
- LIBSAMPLERATE_DEPS_LIBS="../../$LIB/libsamplerate.a -lpthread -ldl"
+ LIBSAMPLERATE_DEPS_LIBS="../../$LIB/libsamplerate.a -lpthread ${DL_LIBS}"
AC_SUBST(LIBSAMPLERATE_DEPS_LIBS)
HAVE_DSP_SRC=yes
else