Suggested patch for gimp.m4

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patch is intended to accomplish three things:

1) Don't barf if an old version of gimptool is used that doesn't
   support GIMP_DATA_DIR and GIMP_PLUGIN_DIR.

2) Work correctly with versions of the Gimp that don't have the
   GIMP_CHECK_VERSION macro (if any).

*** gimp.m4     Mon Oct 16 20:30:10 2000
--- /usr/share/aclocal/gimp.m4  Mon Oct 16 21:12:39 2000
***************
*** 50,55 ****
--- 50,60 ----
  
      GIMP_DATA_DIR=`$GIMPTOOL $gimptool_args --gimpdatadir`
      GIMP_PLUGIN_DIR=`$GIMPTOOL $gimptool_args --gimpplugindir`
+     nodatadir_test=`echo $GIMP_DATA_DIR | sed 's/^\(Usage\).*/\1/'`
+     if test "$nodatadir_test" = "Usage" ; then
+        GIMP_DATA_DIR=""
+        GIMP_PLUGIN_DIR=""
+     fi
  
      gimptool_major_version=`$GIMPTOOL $gimptool_args --version | \
             sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
***************
*** 73,78 ****
--- 78,91 ----
  
  #include <libgimp/gimp.h>
  
+ #ifndef GIMP_CHECK_VERSION
+ #define GIMP_CHECK_VERSION(major, minor, micro) \
+     (GIMP_MAJOR_VERSION > (major) || \
+      (GIMP_MAJOR_VERSION == (major) && GIMP_MINOR_VERSION > (minor)) || \
+      (GIMP_MAJOR_VERSION == (major) && GIMP_MINOR_VERSION == (minor) && \
+       GIMP_MICRO_VERSION >= (micro)))
+ #endif
+ 
  #if GIMP_CHECK_VERSION(1,1,20)
  GimpPlugInInfo
  #else
***************
*** 143,148 ****
--- 156,169 ----
            AC_TRY_LINK([
  #include <stdio.h>
  #include <libgimp/gimp.h>
+ 
+ #ifndef GIMP_CHECK_VERSION
+ #define GIMP_CHECK_VERSION(major, minor, micro) \
+     (GIMP_MAJOR_VERSION > (major) || \
+      (GIMP_MAJOR_VERSION == (major) && GIMP_MINOR_VERSION > (minor)) || \
+      (GIMP_MAJOR_VERSION == (major) && GIMP_MINOR_VERSION == (minor) && \
+       GIMP_MICRO_VERSION >= (micro)))
+ #endif
  
  #if GIMP_CHECK_VERSION(1,1,20)
  GimpPlugInInfo

-- 
Robert Krawitz <rlk@xxxxxxxxxxxx>      http://www.tiac.net/users/rlk/

Tall Clubs International  --  http://www.tall.org/ or 1-888-IM-TALL-2
Member of the League for Programming Freedom -- mail lpf@xxxxxxxxxxxx
Project lead for The Gimp Print --  http://gimp-print.sourceforge.net

"Linux doesn't dictate how I work, I dictate how Linux works."
--Eric Crampton


[Index of Archives]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [GIMP for Windows]     [KDE]     [GEGL]     [Gimp's Home]     [Gimp on GUI]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux