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