AC_SUBST(LIBAUTE_CFLAGS)
AC_SUBST(LIBAUTE_LIBS)
-PKG_CHECK_MODULES(LIBCONFI, [libconfi >= 0.0.2], AC_DEFINE(HAVE_LIBCONFI, [1], [libconfi is present]), have_libconfi=yes)
+PKG_CHECK_MODULES(LIBCONFI, [libconfi >= 0.0.2], [AC_DEFINE(HAVE_LIBCONFI, [1], [libconfi is present]), have_libconfi=yes], have_libconfi=no)
AM_CONDITIONAL(HAVE_LIBCONFI, test x"$have_libconfi" = "xyes")
AC_SUBST(LIBCONFI_CFLAGS)
AC_SUBST(LIBCONFI_LIBS)
+if test x"$have_libconfi" = "xyes"
+then
+ AC_SUBST(PKGCONFIG_DEPEND, [", libconfi"])
+fi
+
# Checks for header files.
# Checks for typedefs, structures, and compiler characteristics.
Name: @PACKAGE_NAME@
Description: Libreria per la gestione dell'autenticazione attraverso plugin
Version: @PACKAGE_VERSION@
-Requires: glib-2.0, libconfi
+Requires: glib-2.0 @PKGCONFIG_DEPEND@
Libs: -L${libdir} -laute
Cflags: -I${includedir}