Commit c06c5c0d authored by Sam Hocevar's avatar Sam Hocevar

* ./configure.ac.in: we only add -lm to the a52 linkage if it's needed

    (and available).
parent a40bde1f
......@@ -309,7 +309,8 @@ AC_TYPE_SIGNAL
AC_CHECK_LIB(dl,dlopen,LDFLAGS_vlc="${LDFLAGS_vlc} -ldl")
AC_CHECK_LIB(m,cos,
LDFLAGS_imdct="${LDFLAGS_imdct} -lm"
LDFLAGS_filter_distort="${LDFLAGS_filter_distort} -lm")
LDFLAGS_filter_distort="${LDFLAGS_filter_distort} -lm"
LDFLAGS_a52tofloat32="${LDFLAGS_a52tofloat32} -lm")
AC_CHECK_LIB(m,pow,
LDFLAGS_ffmpeg="${LDFLAGS_ffmpeg} -lm"
LDFLAGS_imdct="${LDFLAGS_imdct} -lm"
......@@ -1426,7 +1427,7 @@ then
LDFLAGS="${LDFLAGS_save} ${LDFLAGS_a52tofloat32}"
AC_CHECK_LIB(a52, a52_free, [
BUILTINS="${BUILTINS} a52tofloat32"
LDFLAGS_a52tofloat32="${LDFLAGS_a52tofloat32} -la52 -lm"
LDFLAGS_a52tofloat32="-la52 ${LDFLAGS_a52tofloat32}"
CPPFLAGS_a52tofloat32="${CPPFLAGS_a52tofloat32} -DUSE_A52DEC_TREE"
],[
if test -f ${real_a52_tree}/liba52/.libs/liba52.a
......@@ -1435,7 +1436,7 @@ then
else
AC_MSG_ERROR([the specified tree hasn't been compiled])
fi
],[-lm])
])
LDFLAGS="${LDFLAGS_save}"
else
AC_MSG_RESULT(no)
......@@ -1455,14 +1456,14 @@ then
AC_CHECK_HEADERS(a52dec/a52.h, [
AC_CHECK_LIB(a52, a52_free, [
PLUGINS="${PLUGINS} a52tofloat32"
LDFLAGS_a52tofloat32="${LDFLAGS_a52tofloat32} ${LDFLAGS_test} -la52 -lm"
LDFLAGS_a52tofloat32="${LDFLAGS_test} -la52 ${LDFLAGS_a52tofloat32}"
CPPFLAGS_a52tofloat32="${CPPFLAGS_a52tofloat32} ${CPPFLAGS_test}"
],[
if test "x${enable_dvbpsi}" != "x"
then
AC_MSG_ERROR([Could not find a52 on your system: you may get it from http://liba52.sf.net])
fi
],[-lm])
])
])
CPPFLAGS="${CPPFLAGS_save}"
LDFLAGS="${LDFLAGS_save}"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment