diff options
author | Martin Baulig <baulig@suse.de> | 2000-09-30 14:47:31 +0000 |
---|---|---|
committer | Martin Baulig <martin@src.gnome.org> | 2000-09-30 14:47:31 +0000 |
commit | 363633f64268e3e46b932158e6a5af346a85dad4 (patch) | |
tree | 30adfe55dbb6be33c17947b85e0493df43f9ab80 /macros2 | |
parent | 74e080dac151c1c538d71621df48e715597ee6f5 (diff) | |
download | shared-mime-info-363633f64268e3e46b932158e6a5af346a85dad4.tar.gz |
Switch to pkg-config to check for GTK+ 2.0; Removed all
2000-09-30 Martin Baulig <baulig@suse.de>
* gnome-x-checks.m4: Switch to pkg-config to check for GTK+ 2.0;
Removed all `gnome_cv_passdown_x_*' variables and `USE_DEVGTK'.
* gnome-common.m4 (GNOME_COMMON_INIT): Added the always-false
INSIDE_GNOME_COMMON automake conditional.
(GNOME_GTKDOC_CHECK): New macro.
(GNOME_DEBUG_CHECK): New macro.
svn path=/trunk/; revision=1419
Diffstat (limited to 'macros2')
-rw-r--r-- | macros2/ChangeLog | 10 | ||||
-rw-r--r-- | macros2/gnome-common.m4 | 33 | ||||
-rw-r--r-- | macros2/gnome-x-checks.m4 | 35 |
3 files changed, 45 insertions, 33 deletions
diff --git a/macros2/ChangeLog b/macros2/ChangeLog index b246563a..d4eb8676 100644 --- a/macros2/ChangeLog +++ b/macros2/ChangeLog @@ -1,3 +1,13 @@ +2000-09-30 Martin Baulig <baulig@suse.de> + + * gnome-x-checks.m4: Switch to pkg-config to check for GTK+ 2.0; + Removed all `gnome_cv_passdown_x_*' variables and `USE_DEVGTK'. + + * gnome-common.m4 (GNOME_COMMON_INIT): Added the always-false + INSIDE_GNOME_COMMON automake conditional. + (GNOME_GTKDOC_CHECK): New macro. + (GNOME_DEBUG_CHECK): New macro. + Thu Aug 24 02:28:57 2000 George Lebl <jirka@5z.com> * gnome-x-checks.m4: use the correct name in AC_PROVIDE diff --git a/macros2/gnome-common.m4 b/macros2/gnome-common.m4 index c0dda4d0..d229843a 100644 --- a/macros2/gnome-common.m4 +++ b/macros2/gnome-common.m4 @@ -1,6 +1,5 @@ # gnome-common.m4 # -# This only for packages that are not in the GNOME CVS tree. dnl GNOME_COMMON_INIT @@ -16,5 +15,37 @@ AC_DEFUN([GNOME_COMMON_INIT], AC_SUBST(GNOME_ACLOCAL_FLAGS) ACLOCAL="$ACLOCAL $GNOME_ACLOCAL_FLAGS" + + AM_CONDITIONAL(INSIDE_GNOME_DOCU, false) +]) + +AC_DEFUN([GNOME_GTKDOC_CHECK], +[ + AC_CHECK_PROG(GTKDOC, gtkdoc-mkdb, true, false) + AM_CONDITIONAL(HAVE_GTK_DOC, $GTKDOC) + AC_SUBST(HAVE_GTK_DOC) + + dnl Let people disable the gtk-doc stuff. + AC_ARG_ENABLE(gtk-doc, [ --enable-gtk-doc Use gtk-doc to build documentation [default=auto]], enable_gtk_doc="$enableval", enable_gtk_doc=auto) + + if test x$enable_gtk_doc = xauto ; then + if test x$GTKDOC = xtrue ; then + enable_gtk_doc=yes + else + enable_gtk_doc=no + fi + fi + + dnl NOTE: We need to use a separate automake conditional for this + dnl to make this work with the tarballs. + AM_CONDITIONAL(ENABLE_GTK_DOC, test x$enable_gtk_doc = xyes) ]) +AC_DEFUN([GNOME_DEBUG_CHECK], +[ + AC_ARG_ENABLE(debug, [ --enable-debug turn on debugging [default=no]], enable_debug="$enableval", enable_debug=no) + + if test x$enable_debug = xyes ; then + AC_DEFINE(GNOME_ENABLE_DEBUG) + fi +]) diff --git a/macros2/gnome-x-checks.m4 b/macros2/gnome-x-checks.m4 index 55434be3..b5338eba 100644 --- a/macros2/gnome-x-checks.m4 +++ b/macros2/gnome-x-checks.m4 @@ -15,38 +15,9 @@ dnl gnome_cv_passdown_{x_libs,X_LIBS,X_CFLAGS} dnl AC_DEFUN([GNOME2_X_CHECKS], [ - AM_PATH_GTK_2_0(1.3.1,,AC_MSG_ERROR(GTK not installed, or gtk-config not in path)) - dnl Hope that GTK_CFLAGS have only -I and -D. Otherwise, we could - dnl test -z "$x_includes" || CPPFLAGS="$CPPFLAGS -I$x_includes" - dnl - dnl Use CPPFLAGS instead of CFLAGS because AC_CHECK_HEADERS uses - dnl CPPFLAGS, not CFLAGS - CPPFLAGS="$CPPFLAGS $GTK_CFLAGS" - - saved_ldflags="$LDFLAGS" - LDFLAGS="$LDFLAGS $GTK_LIBS" - - gnome_cv_passdown_x_libs="$GTK_LIBS" - gnome_cv_passdown_X_LIBS="$GTK_LIBS" - gnome_cv_passdown_X_CFLAGS="$GTK_CFLAGS" - gnome_cv_passdown_GTK_LIBS="$GTK_LIBS" - - LDFLAGS="$saved_ldflags $GTK_LIBS" - -dnl We are requiring GTK >= 1.1.1, which means this will be fine anyhow. - USE_DEVGTK=true - -dnl AC_MSG_CHECKING([whether to use features from (unstable) GTK+ 1.1.x]) -dnl AC_EGREP_CPP(answer_affirmatively, -dnl [#include <gtk/gtkfeatures.h> -dnl #ifdef GTK_HAVE_FEATURES_1_1_0 -dnl answer_affirmatively -dnl #endif -dnl ], dev_gtk=yes, dev_gtk=no) -dnl if test "$dev_gtk" = "yes"; then -dnl USE_DEVGTK=true -dnl fi -dnl AC_MSG_RESULT("$dev_gtk") + PKG_CHECK_MODULES(GTK, gtk+-2.0:1.3.1) + AC_SUBST(GTK_CFLAGS) + AC_SUBST(GTK_LIBS) GNOME_HAVE_SM=true case "$GTK_LIBS" in |