autoconf graciously fail on missing pkg-config

This commit is contained in:
Nirgal Vourgère 2014-10-17 11:10:22 +02:00
parent 85f8efc85f
commit 4b08559d66
2 changed files with 17 additions and 2 deletions

3
README
View File

@ -61,6 +61,9 @@ If you want to build the SQL engine, you'll need bison or byacc, and flex.
If you want to build the ODBC driver, you'll need unixodbc (version 2.2.10 or
above) or iodbc.
If you want to build the graphical user interface, you'll need glib2.0 and
glib2.0-dev.
If you want to build man pages, you'll need txt2man. Source is available at
http://mvertes.free.fr/download/.

View File

@ -132,14 +132,26 @@ fi
dnl Conditionally build odbc wide version
AM_CONDITIONAL(ICONV, test "$am_cv_func_iconv" = "yes")
dnl Testing presence of pkg-config
AC_MSG_CHECKING([pkg-config m4 macros])
if test m4_ifdef([PKG_CHECK_MODULES], [yes], [no]) == yes; then
AC_MSG_RESULT([yes]);
else
AC_MSG_RESULT([no]);
AC_MSG_ERROR([
pkg-config is required.
See pkg-config.freedesktop.org])
fi
dnl check for glib/gtk/gnome
PKG_CHECK_MODULES(GLIB, glib-2.0, ,
PKG_CHECK_MODULES([GLIB], [glib-2.0], ,
AC_MSG_ERROR([
glib 2.0 is required by MDB Tools (runtime and devel).
It can be downloaded at www.gtk.org.
]))
PKG_CHECK_MODULES(GNOME,gtk+-2.0 >= 2.14 libglade-2.0 libgnomeui-2.0, HAVE_GNOME=true, HAVE_GNOME=false)
PKG_CHECK_MODULES([GNOME], [gtk+-2.0 >= 2.14 libglade-2.0 libgnomeui-2.0], HAVE_GNOME=true, HAVE_GNOME=false)
AC_ARG_ENABLE(gmdb2,
AS_HELP_STRING([--disable-gmdb2],[do not build gmdb2]),