gnome-common/macros2 cleanup

Most of the shared macros in gnome-common are either unused, redundant or don't really need to be in a shared macros directory. It would be good to clean some/all of these out in the gnome 2.3 timeframe. Below is a list of the macros, and their uses in GNOME CVS.

   * AC_CHECK_UTMP (check-utmp.m4): only used by libzvt.  Should
     probably be local to libzvt.
   * GNOME_COMPILE_WARNINGS (compiler-flags.m4): used in many places.
   * AC_CHECK_CURSES (curses.m4): a copy of this is in
     gnome-utils/acinclude.m4.  Referenced in script of
     dr-genius, gnome-games, goose, nethack and vte.  Not sure how many
     of those actually use curses, but it is not clear that the macro
     should be in gnome-common
   * GNOME_COMMON_INIT (gnome-common.m4): used to add gnome-common's
     macros directory to ACINCLUDE_FLAGS.  Called by many configure
     scripts.  Only useful if you think gnome-common is a good idea.
   * GNOME_GTKDOC_CHECK (gnome-common.m4): checks for gtk-doc.  I have
     a patch for gtk-doc that includes a replacement macro that would
     obsolete this one.
   * GNOME_DEBUG_CHECK (gnome-common.m4): adds a --enable-debug flag to
     configure and defines a cpp macro.
   * GNOME_CHECK_CXX (gnome-cxx-check.m4): simple 5 line macro that is
     only used in gnome-games' configure script.  Should probably be
     moved to gnome-games' acinclude.m4 or inlined directly.
   * AM_GNOME2_GETTEXT (gnome-gettext.m4): doesn't appear to be used in
     any non-stale module.  People should probably be using the macro
     from gettext or glib instead.
   * GNOME_REQUIRE_PKGCONFIG (gnome-pkgconfig.m4): checks for presence
     of pkg-config program.  Not really needed if you are using
     PKG_CHECK_MODULES.  Only called by librsvg.
   * GNOME_PLATFORM_GNOME_2 (gnome-platform.m4): adds a configure
     switch to select between gnome 1.x and 2.x platforms (of dubious
     usefulness -- we officially recommend that people should branch
     modules in cases like this ...).  Also calls
     GNOME_REQUIRE_PKGCONFIG.  Called by lots of packages.  Mostly useless.
   * GNOME_PTHREAD_CHECK (gnome-pthread-check.m4): contains a comment
     saying people should be using glib's gthreads lib instead.  Called
     by a lot of old modules, but called by a few current ones such as
     gnome-vfs (dunno if it is a stale check or not).
   * GNOME2_X_CHECKS (gnome-x-checks.m4): called by configure scripts
     of battstat_applet (obsolete?), gpdf and xpdf.  Probably not worth
     keeping in gnome-common.
   * AC_STRUCT_LINGER (linger.m4): referenced in gnome-vfs's configure
     script which also includes an inlined version of the macro, so
     this could disapear.

Based on this, the only macros I would consider worth keeping in gnome-common are:


It might be worth keeping AC_CHECK_CURSES because it is still used by a number of modules. GNOME_COMMON_INIT could be eliminated if we started installing the macros into the standard $(datadir)/aclocal directory.

Some of the obsolete macros could be replaced with simpler ones that call the new macros but are defined with AU_DEFUN instead of AC_DEFUN. This way a warning message will be printed when "autoconf -W obsolete" is called if the configure script calls the macro.

The common script could probably do with a bit of a cleanup. The main one is to allow modules to select an autoconf version other than automake-1.4. While you might consider this unnecessary if we standardise on a single automake version, it will help during transition.

What does everyone else think about this?


Email: james daa com au

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