From b4cdd181659fa9764736a27af6ddf4a0734075b3 Mon Sep 17 00:00:00 2001 From: Tollef Fog Heen Date: Thu, 31 Jan 2008 02:43:41 +0100 Subject: [PATCH] configure.in: If prefix is unset, add /usr/lib/pkgconfig and /usr/share/pkgconfig to default search path. Based on patch by Damjan Jovanovic. Also, make configure always print the path it is defaulting to. --- ChangeLog | 6 ++++++ configure.in | 19 ++++++++++++++----- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6bfe2ed..1af79aa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2008-01-31 Tollef Fog Heen + * configure.in: If prefix is unset, add /usr/lib/pkgconfig and + /usr/share/pkgconfig to default search path. Based on patch by + Damjan Jovanovic. + + Also, make configure always print the path it is defaulting to. + * pkg.c (string_list_to_string): Patch from Paul Bender so flags other than -I and -L are passed through (with mangling) when PKG_CONFIG_SYSROOT_DIR is set. diff --git a/configure.in b/configure.in index 66905b4..e7cf124 100644 --- a/configure.in +++ b/configure.in @@ -11,12 +11,21 @@ AM_PROG_LIBTOOL AC_PROG_CC AC_DEFUN([PKG_CONFIG_FIND_PC_PATH], -[AC_ARG_WITH(pc_path, +[ +AC_MSG_CHECKING([for default search path for .pc files]) +AC_ARG_WITH(pc_path, [ --with-pc-path Override the default search path for .pc files ], - [ pc_path="$withval" - AC_MSG_CHECKING([for default search path for .pc files]) - AC_MSG_RESULT([$pc_path])], - [pc_path='${libdir}/pkgconfig:${datadir}/pkgconfig']) + [ pc_path="$withval" ], + [ +# This is slightly wrong, but hopefully causes less confusion than +# people being unable to find their .pc files in the standard location. +if test "${prefix}" = "NONE"; then + pc_path='${libdir}/pkgconfig:${datadir}/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig' +else + pc_path='${libdir}/pkgconfig:${datadir}/pkgconfig' +fi +]) + AC_MSG_RESULT([$pc_path]) AC_SUBST([pc_path]) ]) -- 2.39.5