summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Suhr Christensen <jsc@umbraculum.org>2015-02-12 21:35:16 +0100
committerJonas Suhr Christensen <jsc@umbraculum.org>2015-02-12 21:35:16 +0100
commitb41f42da60cdd5b4b6b376a49f18e8ebfc9bda0f (patch)
tree38a4e7921f8178d84b31b57fe2a585257a9864ad
parent447d87649811caa7ddd55940300fbe25b0336cfc (diff)
Make sure that we don't link with resampler libraries that we are not using.
-rw-r--r--configure.ac12
1 files changed, 8 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index 066046d..1e8b1ea 100644
--- a/configure.ac
+++ b/configure.ac
@@ -371,6 +371,8 @@ AS_IF([test x$enable_resampler != xno],
CFLAGS="$tmp_CFLAGS"
LDFLAGS="$tmp_LDFLAGS"
LIBS="$tmp_LIBS"
+ AC_SUBST(ZITA_CPPFLAGS)
+ AC_SUBST(ZITA_LIBS)
AC_LANG_POP([C++])]
)]
)
@@ -389,8 +391,8 @@ AS_IF([test x$enable_resampler == xauto],
AS_IF([test x$enable_resampler == xzita],
[AS_IF([test x$has_zita == xyes],
[AC_DEFINE(USE_ZITA, [], [zita-resampler is present])
- AC_SUBST(ZITA_CPPFLAGS)
- AC_SUBST(ZITA_LIBS)
+ SAMPLERATE_CFLAGS=""
+ SAMPLERATE_LIBS=""
],
[AC_MSG_ERROR([*** zita-resampler library or headers not found. Set ZITA_LDFLAGS or ZITA_CPPFLAGS to add searchpath.])]
)]
@@ -398,8 +400,10 @@ AS_IF([test x$enable_resampler == xzita],
AS_IF([test x$enable_resampler == xsrc],
[AS_IF([test x$has_src == xyes],
- [AC_DEFINE(USE_SRC, [], [libsamplerate is present])],
-
+ [AC_DEFINE(USE_SRC, [], [libsamplerate is present])
+ ZITA_CPPFLAGS=""
+ ZITA_LIBS=""
+ ],
[AC_MSG_ERROR([*** Missing libsamplerate.])]
)]
)