From bc9e517842177250ffd708da9e89484eab89c842 Mon Sep 17 00:00:00 2001 From: James Henstridge Date: Wed, 10 Nov 2004 07:59:38 +0000 Subject: [PATCH] remove intltool stuff on distclean. 2004-11-10 James Henstridge * Makefile.am (DISTCLEANFILES): remove intltool stuff on distclean. * src/themes/Makefile.am (uninstall-local): add uninstall rule. * src/Makefile.am (libmetacity_private_la_CFLAGS): set this variable so that the files shared with metacity get compiled with different names. * configure.in: use more modern macros in some places, and make sure that $ACLOCAL_AMFLAGS is set so that rebuilds work better. * autogen.sh (conf_flags): use newer automake. --- ChangeLog | 15 ++++++ Makefile.am | 2 + autogen.sh | 115 ++++++++++++++++++----------------------- configure.in | 68 +++++++++++++++++------- src/Makefile.am | 5 +- src/themes/Makefile.am | 14 +++++ 6 files changed, 136 insertions(+), 83 deletions(-) diff --git a/ChangeLog b/ChangeLog index 34a49bdf1..d78c72fa4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,18 @@ +2004-11-10 James Henstridge + + * Makefile.am (DISTCLEANFILES): remove intltool stuff on distclean. + + * src/themes/Makefile.am (uninstall-local): add uninstall rule. + + * src/Makefile.am (libmetacity_private_la_CFLAGS): set this + variable so that the files shared with metacity get compiled with + different names. + + * configure.in: use more modern macros in some places, and make + sure that $ACLOCAL_AMFLAGS is set so that rebuilds work better. + + * autogen.sh (conf_flags): use newer automake. + 2004-11-06 Vincent Untz * src/metacity.schemas.in: gnome-panel-screenshot was renamed to diff --git a/Makefile.am b/Makefile.am index 9427d6dd0..3cca7fb07 100644 --- a/Makefile.am +++ b/Makefile.am @@ -3,3 +3,5 @@ SUBDIRS=src po doc EXTRA_DIST=HACKING rationales.txt \ intltool-extract.in intltool-merge.in intltool-update.in + +DISTCLEANFILES = intltool-extract intltool-merge intltool-update diff --git a/autogen.sh b/autogen.sh index ca19b073a..d22053fe1 100755 --- a/autogen.sh +++ b/autogen.sh @@ -12,35 +12,36 @@ FILE=src/display.c DIE=0 -AUTOMAKE=automake-1.4 -ACLOCAL=aclocal-1.4 - -($AUTOMAKE --version) < /dev/null > /dev/null 2>&1 || { - AUTOMAKE=automake - ACLOCAL=aclocal -} - (autoconf --version) < /dev/null > /dev/null 2>&1 || { echo echo "You must have autoconf installed to compile $PROJECT." echo "Download the appropriate package for your distribution," - echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/" + echo "or get the source tarball at http://ftp.gnu.org/gnu/autoconf/" DIE=1 } -($AUTOMAKE --version) < /dev/null > /dev/null 2>&1 || { - echo - echo "You must have automake installed to compile $PROJECT." - echo "Get ftp://sourceware.cygnus.com/pub/automake/automake-1.4.tar.gz" - echo "(or a newer version if it is available)" - DIE=1 -} +if automake-1.9 --version < /dev/null > /dev/null 2>&1; then + AUTOMAKE=automake-1.9 + ACLOCAL=aclocal-1.9 +elif automake-1.8 --version < /dev/null > /dev/null 2>&1; then + AUTOMAKE=automake-1.8 + ACLOCAL=aclocal-1.8 +elif automake-1.7 --version < /dev/null > /dev/null 2>&1; then + AUTOMAKE=automake-1.7 + ACLOCAL=aclocal-1.7 +else + echo + echo "You must have automake >= 1.7 installed to compile $PROJECT." + echo "Get http://ftp.gnu.org/gnu/automake/automake-1.9.3.tar.bz2" + echo "(or a newer version if it is available)" + DIE=1 +fi (grep "^AM_PROG_LIBTOOL" configure.in >/dev/null) && { (libtool --version) < /dev/null > /dev/null 2>&1 || { echo echo "**Error**: You must have \`libtool' installed to compile $PROJECT." - echo "Get ftp://ftp.gnu.org/pub/gnu/libtool-1.2d.tar.gz" + echo "Get http://ftp.gnu.org/gnu/libtool/libtool-1.5.10.tar.gz" echo "(or a newer version if it is available)" DIE=1 } @@ -84,10 +85,7 @@ if test -z "$*"; then echo "to pass any to it, please specify them on the $0 command line." fi -case $CC in -*xlc | *xlc\ * | *lcc | *lcc\ *) am_opt=--include-deps;; -esac - +topdir=`pwd` for coin in . do dr=`dirname $coin` @@ -95,51 +93,40 @@ do echo skipping $dr -- flagged as no auto-gen else echo processing $dr - macrodirs=`sed -n -e 's,AM_ACLOCAL_INCLUDE(\(.*\)),\1,gp' < $coin` - ( cd $dr - aclocalinclude="$ACLOCAL_FLAGS" - for k in $macrodirs; do - if test -d $k; then - aclocalinclude="$aclocalinclude -I $k" - ##else - ## echo "**Warning**: No such directory \`$k'. Ignored." - fi - done - if grep "^AM_GLIB_GNU_GETTEXT" configure.in >/dev/null; then - if grep "sed.*POTFILES" configure.in >/dev/null; then - : do nothing -- we still have an old unmodified configure.in - else - echo "Creating $dr/aclocal.m4 ..." - test -r $dr/aclocal.m4 || touch $dr/aclocal.m4 - echo "Running glib-gettextize... Ignore non-fatal messages." - echo "no" | glib-gettextize --force --copy - echo "Making $dr/aclocal.m4 writable ..." - test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4 - fi - fi - if grep "^AC_PROG_INTLTOOL" configure.in >/dev/null; then - echo "Running intltoolize..." - intltoolize --force --copy --automake - fi - if grep "^AM_PROG_LIBTOOL" configure.in >/dev/null; then - echo "Running libtoolize..." - libtoolize --force --copy + cd $dr + if grep "^AM_GLIB_GNU_GETTEXT" configure.in >/dev/null; then + if grep "sed.*POTFILES" configure.in >/dev/null; then + : do nothing -- we still have an old unmodified configure.in + else + echo "Creating $dr/aclocal.m4 ..." + test -r $dr/aclocal.m4 || touch $dr/aclocal.m4 + echo "Running glib-gettextize... Ignore non-fatal messages." + echo "no" | glib-gettextize --force --copy || exit $? + echo "Making $dr/aclocal.m4 writable ..." + test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4 fi + fi + if grep "^AC_PROG_INTLTOOL" configure.in >/dev/null; then + echo "Running intltoolize..." + intltoolize --force --copy --automake || exit $? + fi + if grep "^AM_PROG_LIBTOOL" configure.in >/dev/null; then + echo "Running libtoolize..." + libtoolize --force --copy || exit $? + fi - echo "Running $ACLOCAL $aclocalinclude ..." - $ACLOCAL $aclocalinclude + echo "Running $ACLOCAL $ACLOCAL_FLAGS ..." + $ACLOCAL $ACLOCAL_FLAGS || exit $? + echo "Running autoconf ..." + autoconf || exit $? + if grep "^AM_CONFIG_HEADER" configure.in >/dev/null; then + echo "Running autoheader..." + autoheader || exit $? + fi + echo "Running $AUTOMAKE..." + $AUTOMAKE --add-missing --force --gnu || exit $? - if grep "^AM_CONFIG_HEADER" configure.in >/dev/null; then - echo "Running autoheader..." - autoheader - fi - - echo "Running $AUTOMAKE --gnu $am_opt ..." - $AUTOMAKE --add-missing --gnu $am_opt - - echo "Running autoconf ..." - autoconf - ) + cd $topdir fi done @@ -150,7 +137,7 @@ cd "$ORIGDIR" if test x$NOCONFIGURE = x; then echo Running $srcdir/configure $conf_flags "$@" ... $srcdir/configure $conf_flags "$@" \ - && echo Now type \`make\' to compile $PROJECT || exit 1 + && echo Now type \`make\' to compile $PROJECT || exit $? else echo Skipping configure process. fi diff --git a/configure.in b/configure.in index d5b9073e6..12bb4a146 100644 --- a/configure.in +++ b/configure.in @@ -1,19 +1,20 @@ AC_PREREQ(2.50) -AC_INIT(src/display.c) +AC_INIT([metacity], [2.9.1], + [http://bugzilla.gnome.org/enter_bug.cgi?product=metacity]) -AM_CONFIG_HEADER(config.h) +AC_CONFIG_SRCDIR(src/display.c) +AC_CONFIG_HEADERS(config.h) -AM_INIT_AUTOMAKE(metacity, 2.9.1) +AM_INIT_AUTOMAKE +AM_MAINTAINER_MODE # Honor aclocal flags -ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS" +AC_SUBST(ACLOCAL_AMFLAGS, "\${ACLOCAL_FLAGS}") GETTEXT_PACKAGE=metacity AC_SUBST(GETTEXT_PACKAGE) AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[Name of default gettext domain]) -AM_MAINTAINER_MODE - AC_PROG_INTLTOOL([0.21]) AC_PROG_CC AC_ISC_POSIX @@ -99,37 +100,64 @@ changequote([,])dnl METACITY_PC_MODULES='gtk+-2.0 >= 2.2.0 pango >= 1.2.0' -AC_ARG_ENABLE(config-dialog, [ --enable-config-dialog enable the config dialog that you need with GNOME 2.0 (obsolete with GNOME 2.2)],,enable_config_dialog=no) +AC_ARG_ENABLE(config-dialog, + AC_HELP_STRING([--enable-config-dialog], + [enable the config dialog that you need with GNOME 2.0 (obsolete with GNOME 2.2)]),, + enable_config_dialog=no) AM_CONDITIONAL(BUILD_CONFIG_DIALOG, test x$enable_config_dialog = xyes) if test x$enable_config_dialog = xyes; then AC_DEFINE(BUILD_CONFIG_DIALOG,1,[Build configuration dialog]) fi -AC_ARG_ENABLE(gconf, [ --disable-gconf disable gconf usage, for embedded/size-sensitive non-GNOME builds],,enable_gconf=yes) +AC_ARG_ENABLE(gconf, + AC_HELP_STRING([--disable-gconf], + [disable gconf usage, for embedded/size-sensitive non-GNOME builds]),, + enable_gconf=yes) if test x$enable_gconf = xyes; then AC_DEFINE(HAVE_GCONF,1,[Build with gconf support]) METACITY_PC_MODULES="$METACITY_PC_MODULES gconf-2.0 >= 1.2.0" fi -AC_ARG_ENABLE(verbose-mode, [ --disable-verbose disable metacity's ability to do verbose logging, for embedded/size-sensitive custom builds],,enable_verbose_mode=yes) +AC_ARG_ENABLE(verbose-mode, + AC_HELP_STRING([--disable-verbose], + [disable metacity's ability to do verbose logging, for embedded/size-sensitive custom builds]),, + enable_verbose_mode=yes) if test x$enable_verbose_mode = xyes; then AC_DEFINE(WITH_VERBOSE_MODE,1,[Build with verbose mode support]) fi -AC_ARG_ENABLE(sm, [ --disable-sm disable metacity's session management support, for embedded/size-sensitive custom non-GNOME builds],,enable_sm=auto) +AC_ARG_ENABLE(sm, + AC_HELP_STRING([--disable-sm], + [disable metacity's session management support, for embedded/size-sensitive custom non-GNOME builds]),, + enable_sm=auto) -AC_ARG_ENABLE(startup-notification, [ --disable-startup-notification disable metacity's startup notification support, for embedded/size-sensitive custom non-GNOME builds],,enable_startup_notification=auto) +AC_ARG_ENABLE(startup-notification, + AC_HELP_STRING([--disable-startup-notification], + [disable metacity's startup notification support, for embedded/size-sensitive custom non-GNOME builds]),, + enable_startup_notification=auto) -AC_ARG_ENABLE(compositor, [ --disable-compositor disable metacity's compositing manager],,enable_compositor=auto) +AC_ARG_ENABLE(compositor, + AC_HELP_STRING([--disable-compositor], + [disable metacity's compositing manager]),, + enable_compositor=auto) -AC_ARG_ENABLE(xsync, [ --disable-xsync disable metacity's use of the XSync extension],,enable_xsync=auto) +AC_ARG_ENABLE(xsync, + AC_HELP_STRING([--disable-xsync], + [disable metacity's use of the XSync extension]),, + enable_xsync=auto) -AC_ARG_ENABLE(render, [ --disable-render disable metacity's use of the RENDER extension],,enable_render=auto) +AC_ARG_ENABLE(render, + AC_HELP_STRING([--disable-render], + [disable metacity's use of the RENDER extension]),, + enable_render=auto) -AC_ARG_ENABLE(shape, [ --disable-shape disable metacity's use of the shaped window extension],,enable_shape=auto) +AC_ARG_ENABLE(shape, + AC_HELP_STRING([--disable-shape], + [disable metacity's use of the shaped window extension]),, + enable_shape=auto) ## try definining HAVE_BACKTRACE AC_CHECK_HEADERS(execinfo.h, [AC_CHECK_FUNCS(backtrace)]) @@ -251,8 +279,10 @@ ALL_X_LIBS="$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS" metacity_save_cppflags="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $X_CFLAGS" -AC_ARG_ENABLE(xinerama,[ --disable-xinerama disable metacity's use of the Xinerama extension], - try_xinerama=$enable_xinerama,try_xinerama=yes) +AC_ARG_ENABLE(xinerama, + AC_HELP_STRING([--disable-xinerama], + [disable metacity's use of the Xinerama extension]), + try_xinerama=$enable_xinerama,try_xinerama=yes) use_solaris_xinerama=no use_xfree_xinerama=no @@ -429,7 +459,7 @@ if test x$enable_gconf = xyes; then AM_GCONF_SOURCE_2 fi -AC_OUTPUT([ +AC_CONFIG_FILES([ Makefile doc/Makefile src/Makefile @@ -440,6 +470,8 @@ src/themes/Makefile po/Makefile.in ]) +AC_OUTPUT + if test x$enable_gconf = xno; then echo "*** WARNING WARNING WARNING WARNING WARNING" echo "*** Building without GConf" diff --git a/src/Makefile.am b/src/Makefile.am index 391a79d37..5d3ffeb44 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -90,6 +90,9 @@ metacity_SOURCES= \ xprops.h \ $(EGGFILES) +# by setting libmetacity_private_la_CFLAGS, the files shared with +# metacity proper will be compiled with different names. +libmetacity_private_la_CFLAGS = libmetacity_private_la_SOURCES= \ gradient.c \ gradient.h \ @@ -164,7 +167,7 @@ VARIABLES=default_icon_data $(srcdir)/default_icon.png \ stock_delete_data $(srcdir)/stock_delete.png BUILT_SOURCES = inlinepixbufs.h -CLEANFILES = inlinepixbufs.h +CLEANFILES = inlinepixbufs.h metacity.desktop metacity.schemas inlinepixbufs.h: $(IMAGES) $(GDK_PIXBUF_CSOURCE) --raw --build-list $(VARIABLES) >$(srcdir)/inlinepixbufs.h diff --git a/src/themes/Makefile.am b/src/themes/Makefile.am index 9d0bd5ee8..82c504e85 100644 --- a/src/themes/Makefile.am +++ b/src/themes/Makefile.am @@ -23,6 +23,20 @@ install-data-local: done) \ done +uninstall-local: + for THEME in $(THEMES); do \ + echo '-- Uninstalling theme '$$THEME; \ + (uninstallfiles=`find $(srcdir)/$$THEME -name "*.png" -o -name "*.xml"`; \ + for i in $$uninstallfiles; do \ + i=`basename $$i`; \ + echo '-- Removing '$$i ; \ + rm -f $(DESTDIR)$(THEME_DIR)/$$THEME/$(THEME_SUBDIR)/$$i ; \ + done); \ + rmdir $(DESTDIR)$(THEME_DIR)/$$THEME/$(THEME_SUBDIR) || :; \ + rmdir $(DESTDIR)$(THEME_DIR)/$$THEME || :; \ + done + -rmdir $(DESTDIR)$(THEME_DIR) + dist-hook: mkdir $(distdir)/themes; \ for THEME in $(THEMES); do \