summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorbfriesen <bfriesen>2013-03-29 16:50:11 +0000
committerbfriesen <bfriesen>2013-03-29 16:50:11 +0000
commitd4f9252e14251b001d0f9416a85ea44739f0f0a4 (patch)
tree7b403b77113328a36f2bae2dfcc2f11b30d3f0cc /configure.ac
parent9dbd05b7577b88ceddedf6036c05a52b0f43fab7 (diff)
downloadlibtiff-d4f9252e14251b001d0f9416a85ea44739f0f0a4.tar.gz
* configure.ac: Applied patch by Brad Smith to improve pkg-config
static linking by adding -lm to Libs.private when needed.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac12
1 files changed, 8 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index e1b8d407..d4be12ac 100644
--- a/configure.ac
+++ b/configure.ac
@@ -154,18 +154,22 @@ LT_LANG([C++])
# Enable support for silent build rules
AM_SILENT_RULES
+tiff_libs_private=
+AC_SUBST(tiff_libs_private)
+
dnl We don't need to add math library to all targets
case "${host_os}" in
cygwin* | mingw32* | beos* | darwin*)
;;
*)
- AC_CHECK_LIB(m,sin,,,)
+ AC_CHECK_LIB(m,sin,[libm_lib=yes], [libm_lib=no],)
+ if test "x$libm_lib" = "xyes" ; then
+ LIBS="-lm $LIBS"
+ tiff_libs_private="-lm ${tiff_libs_private}"
+ fi
;;
esac
-tiff_libs_private=
-AC_SUBST(tiff_libs_private)
-
dnl Checks for header files.
AC_CHECK_HEADERS([assert.h fcntl.h io.h limits.h malloc.h search.h sys/time.h unistd.h])