]> Pileus Git - ~andy/gtk/commitdiff
subst GLIB_GENMARSHAL, GOBJECT_QUERY, GLIB_MKENUMS variables
authorHavoc Pennington <hp@redhat.com>
Thu, 7 Jun 2001 16:40:01 +0000 (16:40 +0000)
committerHavoc Pennington <hp@src.gnome.org>
Thu, 7 Jun 2001 16:40:01 +0000 (16:40 +0000)
2001-06-07  Havoc Pennington  <hp@redhat.com>

* m4macros/glib-2.0.m4: subst GLIB_GENMARSHAL, GOBJECT_QUERY,
GLIB_MKENUMS variables

* gmodule-2.0.pc.in: add gmodule_supported variable

* glib-2.0.pc.in: add glib_genmarshal, gobject_query,
glib_mkenums variables

* configure.in: put G_MODULE_SUPPORTED value into
.pc files

* autogen.sh: support AUTOGEN_SUBDIR_MODE

* Makefile.am: add -uninstalled.pc.in to EXTRA_DIST

2001-06-07  Havoc Pennington  <hp@redhat.com>

* pango/Makefile.am: add libpango.la to _DEPENDENCIES for the
other libs

* configure.in: use AM_PATH_GLIB_2_0

* autogen.sh: support AUTOGEN_SUBDIR_MODE

* Makefile.am: dist the .pc.in files

2001-06-07  Havoc Pennington  <hp@redhat.com>

* atk/Makefile.am: use @GLIB_GENMARSHAL@ so we can use uninstalled
glib-genmarshal

* configure.in: rearrange the library checks to support
uninstalled linking

* autogen.sh: add support for AUTOGEN_SUBDIR_MODE

* atk-uninstalled.pc.in: new file, allows linking to uninstalled
ATK in giant GTK tarball

2001-06-07  Havoc Pennington  <hp@redhat.com>

* tests/Makefile.am: add missing -I flag

* gtk/Makefile.am: use @GLIB_MKENUMS@, @GLIB_GENMARSHAL@, etc.

* configure.in: use pkg-config to see if GModule is
supported; fix to properly turn on included loaders
when GModule isn't supported; don't use AC_CHECK_LIB
when libs are not installed yet

* autogen.sh: add support for AUTOGEN_SUBDIR_MODE

* Makefile.am (SUBDIRS): add m4macros subdir

* gtk/Makefile.am: $(srcdir)/foo targets must be $(srcdir)/foo in
dependencies also.

20 files changed:
ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
Makefile.am
autogen.sh
configure.in
docs/tutorial/Makefile.am
gdk-2.0-uninstalled.pc.in [new file with mode: 0644]
gdk-pixbuf-2.0-uninstalled.pc.in [new file with mode: 0644]
gdk-pixbuf/Makefile.am
gtk+-2.0-uninstalled.pc.in [new file with mode: 0644]
gtk-2.0.m4 [deleted file]
gtk/Makefile.am
m4macros/Makefile.am [new file with mode: 0644]
m4macros/gtk-2.0.m4
tests/Makefile.am

index 085569bc8c8883e5fff653beae4f39c2c0d60d82..edd0d658465e8d000914f56b756c90d54162368d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,21 @@
+2001-06-07  Havoc Pennington  <hp@redhat.com>
+
+       * tests/Makefile.am: add missing -I flag
+
+       * gtk/Makefile.am: use @GLIB_MKENUMS@, @GLIB_GENMARSHAL@, etc.
+
+       * configure.in: use pkg-config to see if GModule is
+       supported; fix to properly turn on included loaders 
+       when GModule isn't supported; don't use AC_CHECK_LIB 
+       when libs are not installed yet
+
+       * autogen.sh: add support for AUTOGEN_SUBDIR_MODE
+
+       * Makefile.am (SUBDIRS): add m4macros subdir
+
+       * gtk/Makefile.am: $(srcdir)/foo targets must be $(srcdir)/foo in
+       dependencies also.
+
 Wed Jun  6 19:31:11 2001  Jonathan Blandford  <jrb@redhat.com>
 
        * gtk/gtktreeview.c (gtk_tree_view_set_model): fix silly bug
index 085569bc8c8883e5fff653beae4f39c2c0d60d82..edd0d658465e8d000914f56b756c90d54162368d 100644 (file)
@@ -1,3 +1,21 @@
+2001-06-07  Havoc Pennington  <hp@redhat.com>
+
+       * tests/Makefile.am: add missing -I flag
+
+       * gtk/Makefile.am: use @GLIB_MKENUMS@, @GLIB_GENMARSHAL@, etc.
+
+       * configure.in: use pkg-config to see if GModule is
+       supported; fix to properly turn on included loaders 
+       when GModule isn't supported; don't use AC_CHECK_LIB 
+       when libs are not installed yet
+
+       * autogen.sh: add support for AUTOGEN_SUBDIR_MODE
+
+       * Makefile.am (SUBDIRS): add m4macros subdir
+
+       * gtk/Makefile.am: $(srcdir)/foo targets must be $(srcdir)/foo in
+       dependencies also.
+
 Wed Jun  6 19:31:11 2001  Jonathan Blandford  <jrb@redhat.com>
 
        * gtk/gtktreeview.c (gtk_tree_view_set_model): fix silly bug
index 085569bc8c8883e5fff653beae4f39c2c0d60d82..edd0d658465e8d000914f56b756c90d54162368d 100644 (file)
@@ -1,3 +1,21 @@
+2001-06-07  Havoc Pennington  <hp@redhat.com>
+
+       * tests/Makefile.am: add missing -I flag
+
+       * gtk/Makefile.am: use @GLIB_MKENUMS@, @GLIB_GENMARSHAL@, etc.
+
+       * configure.in: use pkg-config to see if GModule is
+       supported; fix to properly turn on included loaders 
+       when GModule isn't supported; don't use AC_CHECK_LIB 
+       when libs are not installed yet
+
+       * autogen.sh: add support for AUTOGEN_SUBDIR_MODE
+
+       * Makefile.am (SUBDIRS): add m4macros subdir
+
+       * gtk/Makefile.am: $(srcdir)/foo targets must be $(srcdir)/foo in
+       dependencies also.
+
 Wed Jun  6 19:31:11 2001  Jonathan Blandford  <jrb@redhat.com>
 
        * gtk/gtktreeview.c (gtk_tree_view_set_model): fix silly bug
index 085569bc8c8883e5fff653beae4f39c2c0d60d82..edd0d658465e8d000914f56b756c90d54162368d 100644 (file)
@@ -1,3 +1,21 @@
+2001-06-07  Havoc Pennington  <hp@redhat.com>
+
+       * tests/Makefile.am: add missing -I flag
+
+       * gtk/Makefile.am: use @GLIB_MKENUMS@, @GLIB_GENMARSHAL@, etc.
+
+       * configure.in: use pkg-config to see if GModule is
+       supported; fix to properly turn on included loaders 
+       when GModule isn't supported; don't use AC_CHECK_LIB 
+       when libs are not installed yet
+
+       * autogen.sh: add support for AUTOGEN_SUBDIR_MODE
+
+       * Makefile.am (SUBDIRS): add m4macros subdir
+
+       * gtk/Makefile.am: $(srcdir)/foo targets must be $(srcdir)/foo in
+       dependencies also.
+
 Wed Jun  6 19:31:11 2001  Jonathan Blandford  <jrb@redhat.com>
 
        * gtk/gtktreeview.c (gtk_tree_view_set_model): fix silly bug
index 085569bc8c8883e5fff653beae4f39c2c0d60d82..edd0d658465e8d000914f56b756c90d54162368d 100644 (file)
@@ -1,3 +1,21 @@
+2001-06-07  Havoc Pennington  <hp@redhat.com>
+
+       * tests/Makefile.am: add missing -I flag
+
+       * gtk/Makefile.am: use @GLIB_MKENUMS@, @GLIB_GENMARSHAL@, etc.
+
+       * configure.in: use pkg-config to see if GModule is
+       supported; fix to properly turn on included loaders 
+       when GModule isn't supported; don't use AC_CHECK_LIB 
+       when libs are not installed yet
+
+       * autogen.sh: add support for AUTOGEN_SUBDIR_MODE
+
+       * Makefile.am (SUBDIRS): add m4macros subdir
+
+       * gtk/Makefile.am: $(srcdir)/foo targets must be $(srcdir)/foo in
+       dependencies also.
+
 Wed Jun  6 19:31:11 2001  Jonathan Blandford  <jrb@redhat.com>
 
        * gtk/gtktreeview.c (gtk_tree_view_set_model): fix silly bug
index 085569bc8c8883e5fff653beae4f39c2c0d60d82..edd0d658465e8d000914f56b756c90d54162368d 100644 (file)
@@ -1,3 +1,21 @@
+2001-06-07  Havoc Pennington  <hp@redhat.com>
+
+       * tests/Makefile.am: add missing -I flag
+
+       * gtk/Makefile.am: use @GLIB_MKENUMS@, @GLIB_GENMARSHAL@, etc.
+
+       * configure.in: use pkg-config to see if GModule is
+       supported; fix to properly turn on included loaders 
+       when GModule isn't supported; don't use AC_CHECK_LIB 
+       when libs are not installed yet
+
+       * autogen.sh: add support for AUTOGEN_SUBDIR_MODE
+
+       * Makefile.am (SUBDIRS): add m4macros subdir
+
+       * gtk/Makefile.am: $(srcdir)/foo targets must be $(srcdir)/foo in
+       dependencies also.
+
 Wed Jun  6 19:31:11 2001  Jonathan Blandford  <jrb@redhat.com>
 
        * gtk/gtktreeview.c (gtk_tree_view_set_model): fix silly bug
index 085569bc8c8883e5fff653beae4f39c2c0d60d82..edd0d658465e8d000914f56b756c90d54162368d 100644 (file)
@@ -1,3 +1,21 @@
+2001-06-07  Havoc Pennington  <hp@redhat.com>
+
+       * tests/Makefile.am: add missing -I flag
+
+       * gtk/Makefile.am: use @GLIB_MKENUMS@, @GLIB_GENMARSHAL@, etc.
+
+       * configure.in: use pkg-config to see if GModule is
+       supported; fix to properly turn on included loaders 
+       when GModule isn't supported; don't use AC_CHECK_LIB 
+       when libs are not installed yet
+
+       * autogen.sh: add support for AUTOGEN_SUBDIR_MODE
+
+       * Makefile.am (SUBDIRS): add m4macros subdir
+
+       * gtk/Makefile.am: $(srcdir)/foo targets must be $(srcdir)/foo in
+       dependencies also.
+
 Wed Jun  6 19:31:11 2001  Jonathan Blandford  <jrb@redhat.com>
 
        * gtk/gtktreeview.c (gtk_tree_view_set_model): fix silly bug
index 658560b29666bfd2b8f354abfabc3c3dc747f420..2d33584c700ddef8e0cbdf5a3ea917bb4dc665c8 100644 (file)
@@ -1,7 +1,7 @@
 ## Makefile.am for GTK+
 
 SRC_SUBDIRS = gdk-pixbuf gdk gtk modules demos tests contrib
-SUBDIRS = po $(SRC_SUBDIRS) docs build
+SUBDIRS = po $(SRC_SUBDIRS) docs build m4macros
 
 # require automake 1.4
 AUTOMAKE_OPTIONS = 1.4
@@ -9,7 +9,6 @@ AUTOMAKE_OPTIONS = 1.4
 EXTRA_DIST =                   \
        HACKING                 \
        gtk+.spec.in            \
-        gtk-2.0.m4             \
        makecopyright           \
        TODO                    \
        TODO.xml                \
@@ -127,6 +126,14 @@ gdk-$(GDKTARGET)-2.0.pc: gdk-2.0.pc
        rm -f gdk-$(GDKTARGET)-2.0.pc && \
        cp gdk-2.0.pc gdk-$(GDKTARGET)-2.0.pc
 
+gtk+-$(GDKTARGET)-2.0-uninstalled.pc: gtk+-2.0-uninstalled.pc
+       rm -f gtk+-$(GDKTARGET)-2.0-uninstalled.pc && \
+       cp gtk+-2.0-uninstalled.pc gtk+-$(GDKTARGET)-2.0-uninstalled.pc
+
+gdk-$(GDKTARGET)-2.0-uninstalled.pc: gdk-2.0-uninstalled.pc
+       rm -f gdk-$(GDKTARGET)-2.0-uninstalled.pc && \
+       cp gdk-2.0-uninstalled.pc gdk-$(GDKTARGET)-2.0-uninstalled.pc
+
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA= gdk-pixbuf-2.0.pc gdk-$(GDKTARGET)-2.0.pc gtk+-$(GDKTARGET)-2.0.pc
 
@@ -151,9 +158,6 @@ dist-hook: gtk+.spec
        fi \
        && cp gtk+.spec $(distdir)
 
-m4datadir = $(datadir)/aclocal
-m4data_DATA = gtk-2.0.m4
-
 .PHONY: files release sanity snapshot
 
 files:
index 5a2e43be64ed40e0e0f371cbc0ad8fd6b14859a4..bdaf6699c9384040c3f3ad3378d410ea32045ea5 100755 (executable)
@@ -65,9 +65,11 @@ test $TEST_TYPE $FILE || {
        exit 1
 }
 
-if test -z "$*"; then
-       echo "I am going to run ./configure with no arguments - if you wish "
-        echo "to pass any to it, please specify them on the $0 command line."
+if test -z "$AUTOGEN_SUBDIR_MODE"; then
+        if test -z "$*"; then
+                echo "I am going to run ./configure with no arguments - if you wish "
+                echo "to pass any to it, please specify them on the $0 command line."
+        fi
 fi
 
 case $CC in
@@ -102,7 +104,9 @@ automake -a $am_opt
 autoconf
 cd $ORIGDIR
 
-$srcdir/configure --enable-maintainer-mode "$@"
+if test -z "$AUTOGEN_SUBDIR_MODE"; then
+        $srcdir/configure --enable-maintainer-mode "$@"
 
-echo 
-echo "Now type 'make' to compile $PROJECT."
+        echo 
+        echo "Now type 'make' to compile $PROJECT."
+fi
\ No newline at end of file
index 2d37537cff3b4dd1e97a22cf776d727d9d9caacf..9cce115392b7cdd8eee2c1cb8c1ca6eaca1670af 100644 (file)
@@ -404,23 +404,11 @@ if test x$with_modules = xno; then
 else
     AC_MSG_RESULT(yes)
     AC_MSG_CHECKING(whether dynamic modules work)
-    oLIBS="$LIBS"
-    oCFLAGS="$CFLAGS"
-    CFLAGS="$GLIB_CFLAGS"
-    LIBS="$GLIB_LIBS"
-    AC_TRY_RUN([
-    #include <glib.h>
-    #include <gmodule.h>
-    main ()
-    {
-       if (g_module_supported ())
-           exit (0);
-       else
-           exit (1);
-    }
-    ], dynworks=true)
-    LIBS="$oLIBS"
-    CFLAGS="$oCFLAGS"
+    ## for loop is to strip newline 
+    tmp=`pkg-config --variable=gmodule_supported gmodule-2.0`
+    for I in $tmp; do
+        dynworks=$I
+    done
 fi
 
 dnl Now we check to see if our libtool supports shared lib deps
@@ -525,6 +513,15 @@ AC_MSG_CHECKING(pixbuf loaders to build)
 
 AC_ARG_WITH(included_loaders, [  --with-included-loaders=LOADER1,LOADER2,... Build the specified loaders into gdk-pixbuf (only used if module loading disabled)])
 
+if $dynworks; then 
+        :
+else
+   ## if the option was specified, leave it; otherwise disable included loaders
+   if test x$with_included_loaders = xno; then
+           with_included_loaders=yes
+   fi
+fi
+
 all_loaders="png,bmp,wbmp,gif,ico,jpeg,pnm,ras,tiff,xpm"
 included_loaders=""
 # If no loaders specified, include all
@@ -651,16 +648,21 @@ if test "x$gdktarget" = "xx11"; then
     PANGO_PACKAGES="pangox"
     have_xft=false
   fi
+
   AM_CONDITIONAL(HAVE_XFT, $have_xft)
 
   x_libs="`$PKG_CONFIG --libs $PANGO_PACKAGES`"
   x_cflags="`$PKG_CONFIG --cflags $PANGO_PACKAGES`"
   x_extra_libs=
 
-  # Sanity check for the X11 library
-  AC_CHECK_LIB(X11, XOpenDisplay, :,
-    AC_MSG_ERROR([*** libX11 not found. Check 'config.log' for more details.]),
-    $x_libs)
+  if $PKG_CONFIG --uninstalled $PANGO_PACKAGES; then
+      :
+  else  
+      # Sanity check for the X11 library
+      AC_CHECK_LIB(X11, XOpenDisplay, :,
+            AC_MSG_ERROR([*** libX11 not found. Check 'config.log' for more details.]),
+            $x_libs)
+  fi
 
   if test "x$enable_shm" = "xyes"; then
     # Check for the Xext library (needed for XShm extention)
@@ -883,9 +885,13 @@ fi
 
 CFLAGS="$CFLAGS $PANGO_CFLAGS"
 
-AC_CHECK_LIB(pango, pango_context_new, :, AC_MSG_ERROR([
+if $PKG_CONFIG --uninstalled $PANGO_PACKAGES; then
+        :
+else
+        AC_CHECK_LIB(pango, pango_context_new, :, AC_MSG_ERROR([
 *** Can't link to Pango. Pango is required to build
 *** GTK+. For more information see http://www.pango.org]), $PANGO_LIBS)
+fi
 
 CFLAGS="$saved_cflags"
 LDFLAGS="$saved_ldflags"
@@ -919,10 +925,13 @@ else
 ])
 fi
 
-AC_CHECK_LIB(atk, atk_object_get_type, : , AC_MSG_ERROR([
-*** Cannot link to Accessibility Toolkit. Accessibility Toolkit is required
-*** to build GTK+]), $ATK_LIBS $GLIB_LIBS)
-
+if $PKG_CONFIG --uninstalled $ATK_PACKAGES; then
+        :
+else
+        AC_CHECK_LIB(atk, atk_object_get_type, : , AC_MSG_ERROR([
+                *** Cannot link to Accessibility Toolkit. Accessibility Toolkit is required
+                *** to build GTK+]), $ATK_LIBS $GLIB_LIBS)
+fi
 
 GTK_PACKAGES=atk
 GTK_EXTRA_LIBS=
@@ -1091,6 +1100,9 @@ Makefile
 gdk-pixbuf-2.0.pc
 gdk-2.0.pc
 gtk+-2.0.pc
+gdk-pixbuf-2.0-uninstalled.pc
+gdk-2.0-uninstalled.pc
+gtk+-2.0-uninstalled.pc
 po/Makefile.in
 build/Makefile
 build/win32/Makefile
index e6c90624a936171ea9b1d84c433c93c1176ff22c..25e2c7ffde7221d2a1ab5dbe62b4cad34ae49c89 100644 (file)
@@ -85,7 +85,7 @@ TUTORIAL_IT_FILES=    html/gtk_tut_it.html            \
        html/gtk_tut_it-24.html         \
        text/gtk_tut_it.txt
 
-GTKDOCS_FIX=$(top_srcdir)/docs/gtkdocs_fix
+GTKDOCS_FIX=$(srcdir)/../gtkdocs_fix
 
 .PHONY: htmldir textdir tutorial tutorial_it tutorial_fr
 
diff --git a/gdk-2.0-uninstalled.pc.in b/gdk-2.0-uninstalled.pc.in
new file mode 100644 (file)
index 0000000..3c70b7b
--- /dev/null
@@ -0,0 +1,8 @@
+target=@gdktarget@
+
+Name: GDK Uninstalled
+Description: GIMP Drawing Kit (${target} target), Not Installed
+Version: @VERSION@
+Requires: gdk-pixbuf-2.0-uninstalled @GDK_PACKAGES@
+Libs: ${pc_top_builddir}/${pcfiledir}/gdk/libgdk-${target}-1.3.la @GDK_EXTRA_LIBS@
+Cflags: -I${pc_top_builddir}/${pcfiledir}/@srcdir@ -I${pc_top_builddir}/${pcfiledir} @GDK_EXTRA_CFLAGS@
diff --git a/gdk-pixbuf-2.0-uninstalled.pc.in b/gdk-pixbuf-2.0-uninstalled.pc.in
new file mode 100644 (file)
index 0000000..20b2f2d
--- /dev/null
@@ -0,0 +1,9 @@
+Name: GdkPixbuf Uninstalled
+Description: Image loading and scaling, Not Installed
+Version: @VERSION@
+Requires: gobject-2.0,gmodule-2.0
+Libs: ${pc_top_builddir}/${pcfiledir}/gdk-pixbuf/libgdk_pixbuf-1.3.la @GDK_PIXBUF_EXTRA_LIBS@
+Cflags: -I${pc_top_builddir}/${pcfiledir}/@srcdir@ -I${pc_top_builddir}/${pcfiledir} @GDK_PIXBUF_EXTRA_CFLAGS@
+
+
+
index 461a66121b52fce34331a305be8f0d28e1a30fe0..2c873bfa5965ce8be93db50fda000e55d0267ab2 100644 (file)
@@ -241,13 +241,15 @@ EXTRA_DIST =                      \
 
 
 gdk-pixbuf-marshal.h: @REBUILD@ $(srcdir)/gdk-pixbuf-marshal.list
-       cd $(srcdir) \
-       && glib-genmarshal --prefix=gdk_pixbuf_marshal gdk-pixbuf-marshal.list --header >> xgen-gmh \
+       cwd=`pwd` \
+       && cd $(srcdir) \
+       && $$cwd/@GLIB_GENMARSHAL@ --prefix=gdk_pixbuf_marshal gdk-pixbuf-marshal.list --header >> xgen-gmh \
        && (cmp -s xgen-gmh gdk-pixbuf-marshal.h || cp xgen-gmh gdk-pixbuf-marshal.h) \
        && rm -f xgen-gmh xgen-gmh~
 
 gdk-pixbuf-marshal.c: @REBUILD@ $(srcdir)/gdk-pixbuf-marshal.list
-       cd $(srcdir) \
-       && glib-genmarshal --prefix=gdk_pixbuf_marshal gdk-pixbuf-marshal.list --body >> xgen-gmc \
+       cwd=`pwd` \
+       && cd $(srcdir) \
+       && $$cwd/@GLIB_GENMARSHAL@ --prefix=gdk_pixbuf_marshal gdk-pixbuf-marshal.list --body >> xgen-gmc \
        && (cmp -s xgen-gmc gdk-pixbuf-marshal.c || cp xgen-gmc gdk-pixbuf-marshal.c) \
        && rm -f xgen-gmc xgen-gmc~
diff --git a/gtk+-2.0-uninstalled.pc.in b/gtk+-2.0-uninstalled.pc.in
new file mode 100644 (file)
index 0000000..48adef3
--- /dev/null
@@ -0,0 +1,8 @@
+target=@gdktarget@
+
+Name: GTK+ Uninstalled
+Description: GIMP Tool Kit (${target} target), Not Installed
+Version: @VERSION@
+Requires: gdk-${target}-2.0-uninstalled @GTK_PACKAGES@
+Libs: ${pc_top_builddir}/${pcfiledir}/libgtk-${target}-1.3.la @GTK_EXTRA_LIBS@
+Cflags: -I${pc_top_builddir}/${pcfiledir}/@srcdir@ -I${pc_top_builddir}/${pcfiledir} @GTK_EXTRA_CFLAGS@
diff --git a/gtk-2.0.m4 b/gtk-2.0.m4
deleted file mode 100644 (file)
index ef847d7..0000000
+++ /dev/null
@@ -1,180 +0,0 @@
-# Configure paths for GTK+
-# Owen Taylor     1997-2001
-
-dnl AM_PATH_GTK_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
-dnl Test for GTK+, and define GTK_CFLAGS and GTK_LIBS, if gthread is specified in MODULES, 
-dnl pass to pkg-config
-dnl
-AC_DEFUN(AM_PATH_GTK_2_0,
-[dnl 
-dnl Get the cflags and libraries from pkg-config
-dnl
-AC_ARG_ENABLE(gtktest, [  --disable-gtktest       Do not try to compile and run a test GTK+ program],
-                   , enable_gtktest=yes)
-
-  pkg_config_args=gtk+-2.0
-  for module in . $4
-  do
-      case "$module" in
-         gthread) 
-             pkg_config_args="$pkg_config_args gthread-2.0"
-         ;;
-      esac
-  done
-
-  min_gtk_version=ifelse([$1], ,1.3.3,$1)
-  AC_MSG_CHECKING(for GTK+ - version >= $min_gtk_version)
-
-  no_gtk=""
-
-  AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
-
-  if test x$PKG_CONFIG != xno ; then
-    if pkg-config --atleast-pkgconfig-version 0.5 ; then
-      :
-    else
-      echo *** pkg-config too old; version 0.5 or better required.
-      no_gtk=yes
-      PKG_CONFIG=no
-    fi
-  fi
-
-  if test x"$no_gtk" = x ; then
-    GTK_CFLAGS=`$PKG_CONFIG $pkg_config_args --cflags`
-    GTK_LIBS=`$PKG_CONFIG $pkg_config_args --libs`
-    gtk_config_major_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
-           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
-    gtk_config_minor_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
-           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
-    gtk_config_micro_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
-           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
-    if test "x$enable_gtktest" = "xyes" ; then
-      ac_save_CFLAGS="$CFLAGS"
-      ac_save_LIBS="$LIBS"
-      CFLAGS="$CFLAGS $GTK_CFLAGS"
-      LIBS="$GTK_LIBS $LIBS"
-dnl
-dnl Now check if the installed GTK+ is sufficiently new. (Also sanity
-dnl checks the results of pkg-config to some extent)
-dnl
-      rm -f conf.gtktest
-      AC_TRY_RUN([
-#include <gtk/gtk.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-int 
-main ()
-{
-  int major, minor, micro;
-  char *tmp_version;
-
-  system ("touch conf.gtktest");
-
-  /* HP/UX 9 (%@#!) writes to sscanf strings */
-  tmp_version = g_strdup("$min_gtk_version");
-  if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
-     printf("%s, bad version string\n", "$min_gtk_version");
-     exit(1);
-   }
-
-  if ((gtk_major_version != $gtk_config_major_version) ||
-      (gtk_minor_version != $gtk_config_minor_version) ||
-      (gtk_micro_version != $gtk_config_micro_version))
-    {
-      printf("\n*** 'pkg-config --modversion gtk+-2.0' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n", 
-             $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
-             gtk_major_version, gtk_minor_version, gtk_micro_version);
-      printf ("*** was found! If pkg-config was correct, then it is best\n");
-      printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
-      printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
-      printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
-      printf("*** required on your system.\n");
-      printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n");
-      printf("*** to point to the correct configuration files\n");
-    } 
-  else if ((gtk_major_version != GTK_MAJOR_VERSION) ||
-          (gtk_minor_version != GTK_MINOR_VERSION) ||
-           (gtk_micro_version != GTK_MICRO_VERSION))
-    {
-      printf("*** GTK+ header files (version %d.%d.%d) do not match\n",
-            GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION);
-      printf("*** library (version %d.%d.%d)\n",
-            gtk_major_version, gtk_minor_version, gtk_micro_version);
-    }
-  else
-    {
-      if ((gtk_major_version > major) ||
-        ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
-        ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)))
-      {
-        return 0;
-       }
-     else
-      {
-        printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n",
-               gtk_major_version, gtk_minor_version, gtk_micro_version);
-        printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n",
-              major, minor, micro);
-        printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n");
-        printf("***\n");
-        printf("*** If you have already installed a sufficiently new version, this error\n");
-        printf("*** probably means that the wrong copy of the pkg-config shell script is\n");
-        printf("*** being found. The easiest way to fix this is to remove the old version\n");
-        printf("*** of GTK+, but you can also set the PKG_CONFIG environment to point to the\n");
-        printf("*** correct copy of pkg-config. (In this case, you will have to\n");
-        printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
-        printf("*** so that the correct libraries are found at run-time))\n");
-      }
-    }
-  return 1;
-}
-],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
-       CFLAGS="$ac_save_CFLAGS"
-       LIBS="$ac_save_LIBS"
-     fi
-  fi
-  if test "x$no_gtk" = x ; then
-     AC_MSG_RESULT(yes (version $gtk_config_major_version.$gtk_config_minor_version.$gtk_config_micro_version))
-     ifelse([$2], , :, [$2])     
-  else
-     AC_MSG_RESULT(no)
-     if test "$PKG_CONFIG" = "no" ; then
-       echo "*** A new enough version of pkg-config was not found."
-       echo "*** See http://pkgconfig.sourceforge.net"
-     else
-       if test -f conf.gtktest ; then
-        :
-       else
-          echo "*** Could not run GTK+ test program, checking why..."
-          CFLAGS="$CFLAGS $GTK_CFLAGS"
-          LIBS="$LIBS $GTK_LIBS"
-          AC_TRY_LINK([
-#include <gtk/gtk.h>
-#include <stdio.h>
-],      [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ],
-        [ echo "*** The test program compiled, but did not run. This usually means"
-          echo "*** that the run-time linker is not finding GTK+ or finding the wrong"
-          echo "*** version of GTK+. If it is not finding GTK+, you'll need to set your"
-          echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
-          echo "*** to the installed location  Also, make sure you have run ldconfig if that"
-          echo "*** is required on your system"
-         echo "***"
-          echo "*** If you have an old version installed, it is best to remove it, although"
-          echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
-        [ echo "*** The test program failed to compile or link. See the file config.log for the"
-          echo "*** exact error that occured. This usually means GTK+ was incorrectly installed"
-          echo "*** or that you have moved GTK+ since it was installed. In the latter case, you"
-          echo "*** may want to edit the pkg-config script: $PKG_CONFIG" ])
-          CFLAGS="$ac_save_CFLAGS"
-          LIBS="$ac_save_LIBS"
-       fi
-     fi
-     GTK_CFLAGS=""
-     GTK_LIBS=""
-     ifelse([$3], , :, [$3])
-  fi
-  AC_SUBST(GTK_CFLAGS)
-  AC_SUBST(GTK_LIBS)
-  rm -f conf.gtktest
-])
index 50d2261f31ba333f86db166e2cc5c308402f0278..16a226141234519ce4b0f73e3d840dd2009eb7ec 100644 (file)
@@ -429,8 +429,9 @@ gtk.defs gtkmarshal.h gtktypebuiltins.h:          # never add deps here
 # srcdir to be writable, passing --disable-rebuilds to
 # ../configure will supress all autogeneration rules.
 $(srcdir)/stamp-gtk.defs: @REBUILD@ gtk.defs gtk-boxed.defs $(gtk_public_h_sources)
-       cd $(srcdir) \
-       && glib-mkenums --comments ";; @comment@" \
+       cwd=`pwd` \
+       && cd $(srcdir) \
+       && $$cwd/@GLIB_MKENUMS@ --comments ";; @comment@" \
                        --fprod "; enumerations from \"@filename@\"\n " \
                        --vhead "(define-@type@ @EnumName@" \
                        --vprod "   (@valuenick@ @VALUENAME@)" \
@@ -441,35 +442,38 @@ $(srcdir)/stamp-gtk.defs: @REBUILD@ gtk.defs gtk-boxed.defs $(gtk_public_h_sourc
        && rm -f xgen-gdef \
        && echo timestamp > $(@F)
 $(srcdir)/stamp-gtkmarshal.h: @REBUILD@ gtkmarshal.list gtkmarshal.h
-       cd $(srcdir) \
-       && glib-genmarshal --prefix=gtk_marshal gtkmarshal.list --header >> xgen-gmh \
+       cwd=`pwd` \
+       && cd $(srcdir) \
+       && $$cwd/@GLIB_GENMARSHAL@ --prefix=gtk_marshal gtkmarshal.list --header >> xgen-gmh \
        && (cmp -s xgen-gmh gtkmarshal.h || cp xgen-gmh gtkmarshal.h) \
        && rm -f xgen-gmh xgen-gmh~ \
        && echo timestamp > $(@F)
 $(srcdir)/gtkmarshal.c: @REBUILD@ $(srcdir)/stamp-gtkmarshal.h
-       cd $(srcdir) \
-       && glib-genmarshal --prefix=gtk_marshal gtkmarshal.list --body >> xgen-gmc \
-       && cp xgen-gmc gtkmarshal.c \
+       cwd=`pwd` \
+       && cd $(srcdir) \
+       && $$cwd/@GLIB_GENMARSHAL@ --prefix=gtk_marshal gtkmarshal.list --body >> xgen-gmc \
+       && cp xgen-gmc $(srcdir)/gtkmarshal.c \
        && rm -f xgen-gmc xgen-gmc~
-$(srcdir)/stamp-gtktypebuiltins.h: @REBUILD@ maketypes.awk stamp-gtk.defs gtktypebuiltins.h
+$(srcdir)/stamp-gtktypebuiltins.h: @REBUILD@ maketypes.awk $(srcdir)/stamp-gtk.defs gtktypebuiltins.h
        cd $(srcdir) \
        && LC_ALL=C $(AWK) -f maketypes.awk gtk.defs macros > xgen-gtbh \
        && (cmp -s xgen-gtbh gtktypebuiltins.h || cp xgen-gtbh gtktypebuiltins.h) \
        && rm -f xgen-gtbh \
        && echo timestamp > $(@F)
-$(srcdir)/gtktypebuiltins_vars.c: @REBUILD@ maketypes.awk stamp-gtk.defs
+$(srcdir)/gtktypebuiltins_vars.c: @REBUILD@ maketypes.awk $(srcdir)/stamp-gtk.defs
        cd $(srcdir) \
        && LC_ALL=C $(AWK) -f maketypes.awk gtk.defs variables > xgen-gtbvc \
        && cp xgen-gtbvc $(@F) \
        && rm -f xgen-gtbvc
-$(srcdir)/gtktypebuiltins_ids.c: @REBUILD@ maketypes.awk stamp-gtk.defs
+$(srcdir)/gtktypebuiltins_ids.c: @REBUILD@ maketypes.awk $(srcdir)/stamp-gtk.defs
        cd $(srcdir) \
        && LC_ALL=C $(AWK) -f maketypes.awk gtk.defs entries > xgen-gtbic \
        && cp xgen-gtbic $(@F) \
        && rm -f xgen-gtbic
 $(srcdir)/gtktypebuiltins_evals.c: @REBUILD@ $(gtk_public_h_sources)
-       cd $(srcdir) \
-       && glib-mkenums \
+       cwd=`pwd` \
+       && cd $(srcdir) \
+       && $$cwd/@GLIB_MKENUMS@ \
                        --fprod "\n/* enumerations from \"@filename@\" */" \
                        --vhead "static const GtkEnumValue _@enum_name@_values[] = {" \
                        --vprod "  { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
diff --git a/m4macros/Makefile.am b/m4macros/Makefile.am
new file mode 100644 (file)
index 0000000..9d96a58
--- /dev/null
@@ -0,0 +1,7 @@
+
+installed_m4= gtk-2.0.m4
+
+EXTRA_DIST=$(installed_m4)
+
+m4datadir = $(datadir)/aclocal
+m4data_DATA = $(installed_m4)
index ef847d714926c23c9ae7121373152066bdca2b84..8358f5e2ed11fa516c75869fb7e45225962c025f 100644 (file)
@@ -22,23 +22,36 @@ AC_ARG_ENABLE(gtktest, [  --disable-gtktest       Do not try to compile and run
       esac
   done
 
-  min_gtk_version=ifelse([$1], ,1.3.3,$1)
-  AC_MSG_CHECKING(for GTK+ - version >= $min_gtk_version)
-
   no_gtk=""
 
   AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
 
   if test x$PKG_CONFIG != xno ; then
-    if pkg-config --atleast-pkgconfig-version 0.5 ; then
+    if pkg-config --atleast-pkgconfig-version 0.7 ; then
       :
     else
-      echo *** pkg-config too old; version 0.5 or better required.
+      echo *** pkg-config too old; version 0.7 or better required.
       no_gtk=yes
       PKG_CONFIG=no
     fi
   fi
 
+  ## don't try to run the test against uninstalled libtool libs
+  if $PKG_CONFIG --uninstalled $pkg_config_args; then
+        echo "Will use uninstalled version of GTK+ found in PKG_CONFIG_PATH"
+        enable_gtktest=no
+  fi
+
+  min_gtk_version=ifelse([$1], ,1.3.3,$1)
+  AC_MSG_CHECKING(for GTK+ - version >= $min_gtk_version)
+
+
+  if $PKG_CONFIG --atleast-version $min_gtk_version $pkg_config_args; then
+        :
+  else
+        no_gtk = yes
+  fi
+
   if test x"$no_gtk" = x ; then
     GTK_CFLAGS=`$PKG_CONFIG $pkg_config_args --cflags`
     GTK_LIBS=`$PKG_CONFIG $pkg_config_args --libs`
index e3729bec7758a5d9d3756f832a04bbd0561e49fd..3271380abb691b1d2ae7dcd7566718421c801495 100644 (file)
@@ -3,6 +3,7 @@
 INCLUDES = @STRIP_BEGIN@ \
        -I$(top_srcdir)                                 \
        -I$(top_builddir)/gdk                           \
+       -I$(top_srcdir)/gdk                             \
        -DGTK_DISABLE_COMPAT_H                          \
        @GTK_DEBUG_FLAGS@                               \
        @GTK_DEP_CFLAGS@                                \