2013.03.29 00:40 "[Tiff] [PATCH] Fix pkg-config file for static linking", by Brad Smith

2013.03.29 00:40 "[Tiff] [PATCH] Fix pkg-config file for static linking", by Brad Smith

The following patch corrects the generated pkg-config file for static linking.

Index: configure.ac
===================================================================
RCS file: /cvs/maptools/cvsroot/libtiff/configure.ac,v
retrieving revision 1.98
diff -u -p -r1.98 configure.ac

--- configure.ac        22 Sep 2012 16:12:44 -0000      1.98
+++ configure.ac        29 Mar 2013 00:28:26 -0000

@@ -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])

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.