Ulrich Klauer
2013-Mar-10 03:02 UTC
[PATCH 1/2] 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. --- configure.ac | 6 +++++- opusfile-uninstalled.pc.in | 2 +- opusfile.pc.in | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 8b1a3b3..d82d53f 100644 --- a/configure.ac +++ b/configure.ac @@ -107,7 +107,11 @@ AS_IF([test "x$enable_fixed_point" = "xyes"], ]) ] ) -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"]) diff --git a/opusfile-uninstalled.pc.in b/opusfile-uninstalled.pc.in index b63a23c..7f555d6 100644 --- a/opusfile-uninstalled.pc.in +++ b/opusfile-uninstalled.pc.in @@ -10,5 +10,5 @@ Description: Opus playback library (not installed) Version: @VERSION@ Requires: ogg >= 1.3 opus >= 1.0.1 @openssl@ Conflicts: -Libs: ${libdir}/libopusfile.la @ac_cv_search_lrintf@ +Libs: ${libdir}/libopusfile.la at lrintf_lib@ Cflags: -I${includedir} diff --git a/opusfile.pc.in b/opusfile.pc.in index 0a77f0c..c96d6a8 100644 --- a/opusfile.pc.in +++ b/opusfile.pc.in @@ -11,5 +11,5 @@ Version: @VERSION@ 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 -- 1.7.10.4 --=_M14qLklCcOxRPnFcxwgxahA Content-Type: text/x-patch; charset=us-ascii; name=0002-Add-some-files-to-.gitignore.patch Content-Disposition: attachment; filename=0002-Add-some-files-to-.gitignore.patch; size=674
Maybe Matching Threads
- [PATCH 1/4] Handle AC_SEARCH_LIBS special result value
- [libopusfile PATCH] build: implement autotools build system for libopusfile. (v3)
- [libopusfile PATCH] build: implement autotools build system for libopusfile. (v2)
- [libopusfile PATCH] build: implement autotools build system for libopusfile. (v4)
- [PATCH] Fix configure check for EVP_CIPHER_CTX_set_iv