dnl CF_ENABLE_PC_FILES version: 6 updated: 2011/09/10 16:31:04
dnl ------------------
dnl This is the "--enable-pc-files" option, which is available if there is a
dnl pkg-config configuration on the local machine.
AC_DEFUN([CF_ENABLE_PC_FILES],[
AC_REQUIRE([CF_PKG_CONFIG])
AC_REQUIRE([CF_WITH_PKG_CONFIG_LIBDIR])

if test "$PKG_CONFIG" != no ; then
	if test -n "$PKG_CONFIG_LIBDIR" && test -d "$PKG_CONFIG_LIBDIR" ; then
		AC_MSG_CHECKING(if we should install .pc files for $PKG_CONFIG)
		AC_ARG_ENABLE(pc-files,
			[  --enable-pc-files       generate and install .pc files for pkg-config],
			[enable_pc_files=$enableval],
			[enable_pc_files=no])
		AC_MSG_RESULT($enable_pc_files)
	elif test -z "$PKG_CONFIG_LIBDIR" || test "$PKG_CONFIG_LIBDIR" != no; then
		enable_pc_files=no
		AC_MSG_WARN(did not find $PKG_CONFIG library)
	fi
else
	enable_pc_files=no
fi
])dnl
