shithub: opusfile

Download patch

ref: 365ac4c26a29931da2a18059bf21d6c8339c9918
parent: be4a77d2a6042180a9dcd3872e5ab5d98587c68a
author: Ulrich Klauer <[email protected]>
date: Sat Mar 9 23:02:49 EST 2013

Handle AC_SEARCH_LIBS special result value.

AC_SEARCH_LIBS will give a result of "none required" if the relevant
 function is available without any special libraries.
This is the case for lrintf on MinGW.
Make sure this special value isn't put verbatim into the pkg-config
 files, as it would cause the linker to search for files named
 "none" and "required", and fail.

Signed-off-by: Timothy B. Terriberry <[email protected]>

--- a/configure.ac
+++ b/configure.ac
@@ -107,7 +107,11 @@
    ])
   ]
 )
-AC_SUBST(ac_cv_search_lrintf)
+lrintf_lib="$ac_cv_search_lrintf"
+AS_IF([test "x$ac_cv_search_lrintf" = "xnone required"],
+  [lrintf_lib=""]
+)
+AC_SUBST(lrintf_lib)
 
 CC_ATTRIBUTE_VISIBILITY([default], [
   CC_FLAG_VISIBILITY([CFLAGS="${CFLAGS} -fvisibility=hidden"])
--- a/opusfile-uninstalled.pc.in
+++ b/opusfile-uninstalled.pc.in
@@ -10,5 +10,5 @@
 Version: @VERSION@
 Requires: ogg >= 1.3 opus >= 1.0.1 @openssl@
 Conflicts:
-Libs: ${libdir}/libopusfile.la @ac_cv_search_lrintf@
+Libs: ${libdir}/libopusfile.la @lrintf_lib@
 Cflags: -I${includedir}
--- a/opusfile.pc.in
+++ b/opusfile.pc.in
@@ -11,5 +11,5 @@
 Requires: ogg >= 1.3 opus >= 1.0.1 @openssl@
 Conflicts:
 Libs: -L${libdir} -lopusfile
-Libs.private: @ac_cv_search_lrintf@
+Libs.private: @lrintf_lib@
 Cflags: -I${includedir}/opus