diff options
author | Simon McVittie <smcv@debian.org> | 2011-04-13 22:56:53 +0200 |
---|---|---|
committer | Tollef Fog Heen <tfheen@err.no> | 2011-04-13 22:56:53 +0200 |
commit | 01005bbbd0155b606c1f3df845ccfaff81e0c6ff (patch) | |
tree | f0531f90f8e245a14da991d2d47d599c2316aeea /configure.ac | |
parent | 57d6c40d7a202e2b953674781c2c145e44371781 (diff) | |
download | pkg-config-01005bbbd0155b606c1f3df845ccfaff81e0c6ff.tar.gz |
Add --with-system-include-path etc.
Instead of hard-coding /usr/include, we now use the environment variable
PKG_CONFIG_SYSTEM_INCLUDE_PATH, defaulting to the argument of
./configure --with-system-include-path, which in turn defaults to
/usr/include.
Similarly, PKG_CONFIG_SYSTEM_LIBRARY_PATH defaults to /usr/lib or
/usr/lib:/usr/lib64 as appropriate.
(As currently implemented, this causes a behaviour change on Win32 -
the option -I/usr/include will now be filtered out.)
The intended usage is for Debian to configure pkg-config with
--with-system-include-path=/usr/include/$(DEB_HOST_GNU_TYPE):/usr/include
and the corresponding library path, for multiarch support
(<http://bugs.debian.org/482884>).
Based on work by Colin Walters <walters@verbum.org>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 30 |
1 files changed, 25 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac index 67577a7..ace5682 100644 --- a/configure.ac +++ b/configure.ac @@ -34,6 +34,31 @@ fi PKG_CONFIG_FIND_PC_PATH +AC_MSG_CHECKING([for --with-system-include-path]) +AC_ARG_WITH(system_include_path, + [ --with-system-include-path Avoid -I flags that add the given directories ], + [ system_include_path="$withval" ], + [ system_include_path="/usr/include" ]) + AC_MSG_RESULT([$system_include_path]) + AC_SUBST([system_include_path]) + +AC_MSG_CHECKING([for --with-system-library-path]) +AC_ARG_WITH(system_library_path, + [ --with-system-library-path Avoid -L flags that add the given directories ], + [ system_library_path="$withval" ], + [ +case "$libdir" in +*lib64) + system_library_path="/usr/lib64:/usr/lib" + ;; +*) + system_library_path="/usr/lib" + ;; +esac +]) + AC_MSG_RESULT([$system_library_path]) + AC_SUBST([system_library_path]) + # # Code taken from gtk+-2.0's configure.in. # @@ -92,11 +117,6 @@ case "$host" in esac AC_MSG_RESULT([$native_win32]) -case "$libdir" in -*lib64) AC_DEFINE(PREFER_LIB64,1,[Define if your native architecture defines libdir to be $prefix/lib64 instead of $prefix/lib.]) ;; -*) : ;; -esac - if test "x$GLIB_CFLAGS" = "x" && test "x$GLIB_LIBS" = "x"; then AC_CHECK_PROGS([PKG_CONFIG], [pkg-config], []) if test -n $PKG_CONFIG && $PKG_CONFIG --exists glib-2.0; then |