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.
This commit is contained in:
Tollef Fog Heen 2008-01-31 02:43:41 +01:00
parent 3e6c5da35a
commit b4cdd18165
2 changed files with 20 additions and 5 deletions

View file

@ -1,5 +1,11 @@
2008-01-31 Tollef Fog Heen <tfheen@err.no>
* 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.

View file

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