]> err.no Git - pkg-config/commitdiff
configure.in: If prefix is unset, add /usr/lib/pkgconfig and
authorTollef Fog Heen <tfheen@err.no>
Thu, 31 Jan 2008 01:43:41 +0000 (02:43 +0100)
committerTollef Fog Heen <tfheen@err.no>
Thu, 31 Jan 2008 01:43:41 +0000 (02:43 +0100)
/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
configure.in

index 6bfe2ed98be23102598b8af842e521e98f5b601b..1af79aab7f4eff9cc0aee11b640957392720d0b1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
index 66905b4a7a48ad870d51f8b37cd4bd31970877ca..e7cf12422c572dd101cbbdd5dc8af4a8e4e46a7a 100644 (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])
 
 ])