• Skip to sidebar navigation
  • Skip to content

Bitbucket

  • More
    ProjectsRepositories
  • Help
    • Online help
    • Learn Git
    • Welcome to Bitbucket
    • Keyboard shortcuts
  • Log In
Alexander Dahl
  1. Alexander Dahl

buildroot

Public
Actions
  • Clone
  • Compare

Learn more about cloning repositories

You have read-only access

Navigation
  • Source
  • Commits
  • Branches
  • All Branches Graph
  • Forks
  1. Alexander Dahl
  2. buildroot

Source

buildroot/package/libgeotiff/0001-use-pkg-config.patch
Peter KorsgaardPeter Korsgaard committed 298cd8eaa2103 Feb 2015
Raw file
Source viewDiff to previous
xxxxxxxxxx
 
Use pkg-config for libtiff detection
​
Using pkg-config allows proper behavior in static-only contexts: the
libtiff library might depend on libz and libjpeg.
​
This patch also fixes a few other issues in the configure.ac script
that prevents autoreconf to work, or proper detection of the proj
library.
​
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
​
Index: b/configure.ac
===================================================================
--- a/configure.ac
+++ b/configure.ac
@@ -196,39 +196,12 @@
 
 TIFF_CONFIG="no"
 
-AC_ARG_WITH(libtiff, [  --with-libtiff=dir      Use libtiff in directory dir],,)
-
-if test "$with_libtiff" != "" ; then
-  if test -f $with_libtiff/include/tiffio.h -a -d $with_libtiff/lib ; then
-    LIBS="-L$with_libtiff/lib -ltiff $LIBS"
-    TIFF_INC=-I$with_libtiff/include
-  else
-    LIBS="-L$with_libtiff -ltiff $LIBS"
-    TIFF_INC=-I$with_libtiff
-  fi
-  LIBS_SAVED="$LIBS"
-  AC_CHECK_LIB(tiff,TIFFOpen,[TIFF_CONFIG=yes],
-               AC_MSG_ERROR([failed to link with -ltiff to find TIFFOpen]),-lm)
-  AC_CHECK_LIB(tiff,TIFFMergeFieldInfo,[TIFF_CONFIG=yes],
-               AC_MSG_ERROR([Libtiff 3.6.0 Beta or later required for this version of
-libgeotiff. Please upgrade or use an older version of libgeotiff.]),-lm)
-  LIBS="$LIBS_SAVED"
-else
-  AC_CHECK_LIB(tiff,TIFFOpen,[TIFF_CONFIG=yes],
-               AC_MSG_ERROR([You will need to substantially rewrite libxtiff to
-build libgeotiff without libtiff]),-lm)
-  LIBS_SAVED="$LIBS"
-  AC_CHECK_LIB(tiff,TIFFMergeFieldInfo,[TIFF_CONFIG=yes],
-               AC_MSG_ERROR([Libtiff 3.6.0 Beta or later required for this version of
-libgeotiff. Please upgrade libtiff or use an older version of libgeotiff.]),-lm)
-  LIBS="$LIBS -ltiff"
-  TIFF_INC=
-  TIFF_CONFIG="yes"
-fi
-
+PKG_CHECK_MODULES(LIBTIFF, libtiff-4)
+TIFF_INC="$LIBTIFF_CFLAGS"
+LIBS="$LIBS $LIBTIFF_LIBS"
+TIFF_CONFIG="yes"
 
 AC_SUBST([TIFF_INC])
-AC_SUBST([TIFF_PREFIX])
 AM_CONDITIONAL([TIFF_IS_CONFIG], [test ! x$TIFF_CONFIG = xno])
 
 dnl
@@ -280,15 +253,16 @@
   PROJ_INC=-I$PROJ_INC
 
   AC_SUBST(PROJ_INC,$PROJ_INC)
-  AC_DEFINE(HAVE_PROJECTS_H)
+  AC_DEFINE([HAVE_PROJECTS_H], [], [Whether proj library header is available])
   AC_DEFINE(HAVE_LIBPROJ)
   AC_SUBST([HAVE_LIBPROJ])
   PROJ_CONFIG="yes"
-
 else
   AC_CHECK_LIB(proj,pj_init,,,-lm)
   AC_CHECK_HEADERS(proj_api.h,,)
-  PROJ_CONFIG="yes"
+  if "$ac_cv_lib_proj_pj_init" = "yes" -a "$ac_cv_header_proj_api_h" = "yes"; then
+    PROJ_CONFIG="yes"
+  fi
 fi
 
 AM_CONDITIONAL([PROJ_IS_CONFIG], [test ! x$PROJ_CONFIG = xno])
  • Git repository management for enterprise teams powered by Atlassian Bitbucket
  • Atlassian Bitbucket v6.7.2
  • Documentation
  • Request a feature
  • About
  • Contact Atlassian
Atlassian

Everything looks good. We'll let you know here if there's anything you should know about.