[regexxer] Replace most of autogen.sh by autoreconf
- From: Daniel Elstner <daniel src gnome org>
- To: svn-commits-list gnome org
- Subject: [regexxer] Replace most of autogen.sh by autoreconf
- Date: Wed, 24 Jun 2009 18:22:58 +0000 (UTC)
commit a697b6203318b59637589111363e069d0fe39ab6
Author: Daniel Elstner <danielk openismus com>
Date: Wed Jun 24 20:14:18 2009 +0200
Replace most of autogen.sh by autoreconf
* autogen.sh: Reduce script to stub which invokes autoreconf and
then configure. Unfortunately it was necessary to play some tricks
in order to fool autoreconf into invoking intltoolize instead of
autopoint.
* Makefile.am (ACLOCAL_AMFLAGS): Substitute ${ACLOCAL_FLAGS} instead
of $(ACLOCAL_FLAGS) because autoreconf misparses the latter.
* configure.ac: Remove decorational parentheses.
(AM_GNU_GETTEXT_VERSION): Specify minimum gettext version to tell
autoreconf that gettext is being used.
Makefile.am | 2 +-
autogen.sh | 80 +++++----------------------------------------------------
configure.ac | 11 ++++---
3 files changed, 14 insertions(+), 79 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index bfb1b39..2f13daa 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -23,7 +23,7 @@
## http://members.pcug.org.au/~millerp/rmch/recu-make-cons-harm.html
AUTOMAKE_OPTIONS = subdir-objects
-ACLOCAL_AMFLAGS = -I m4 $(ACLOCAL_FLAGS)
+ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
DISTCHECK_CONFIGURE_FLAGS = --disable-schemas-install --enable-warnings=fatal
SUBDIRS = po
diff --git a/autogen.sh b/autogen.sh
index 00a960b..f70bc0e 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,75 +1,9 @@
-#! /bin/sh
-
-# Copyright (c) 2004-2007 Daniel Elstner <daniel kitta gmail com>
-#
-# This file is part of regexxer.
-#
-# regexxer is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# regexxer is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with regexxer; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-
+#! /bin/sh -e
test -n "$srcdir" || srcdir=`dirname "$0"`
test -n "$srcdir" || srcdir=.
-
-if test "$#$NOCONFIGURE" = 0
-then
- echo "I am going to run $srcdir/configure with no arguments -- if you"
- echo "wish to pass any to it, please specify them on the $0 command line."
-fi
-
-# Let the user override the default choice of tools.
-if test -z "$ACLOCAL" || test -z "$AUTOMAKE"
-then
- # Prefer explicitely versioned executables.
- for version in 1.10 1.9 1.8
- do
- if { "aclocal-$version" --version && "automake-$version" --version; } </dev/null >/dev/null 2>&1
- then
- ACLOCAL=aclocal-$version
- AUTOMAKE=automake-$version
- break
- fi
- done
-fi
-
-( # Enter a subshell to temporarily change the working directory.
- cd "$srcdir" || exit 1
-
- # Explicitely delete some old cruft, which seems to be
- # more reliable than --force options and the like.
- rm -f ABOUT-NLS acconfig.h config.cache config.guess config.rpath config.sub \
- depcomp install-sh intltool-extract.in intltool-merge.in intltool-update.in \
- missing mkinstalldirs po/Makefile.in.in
- rm -rf autom4te.cache
-
- #WARNINGS=all; export WARNINGS
- # Trace commands and exit if a command fails.
- set -ex
-
- glib-gettextize --copy --force
- intltoolize --automake --copy --force
- ${ACLOCAL-aclocal} -I m4 $ACLOCAL_FLAGS
- ${AUTOCONF-autoconf}
- ${AUTOHEADER-autoheader}
- ${AUTOMAKE-automake} --add-missing --copy $AUTOMAKE_FLAGS
-) || exit 1
-
-if test -z "$NOCONFIGURE"
-then
- echo "+ $srcdir/configure $*"
- "$srcdir/configure" "$@" || exit 1
- echo
- echo 'Now type "make" to compile regexxer.'
-fi
-
-exit 0
+(
+ cd "$srcdir"
+ export AUTOPOINT='intltoolize --automake --copy'
+ autoreconf --force --install
+)
+test -n "$NOCONFIGURE" || "$srcdir/configure" "$@"
diff --git a/configure.ac b/configure.ac
index 0863bf7..50d1b0e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -26,12 +26,13 @@ AC_CONFIG_HEADERS([config.h])
AM_INIT_AUTOMAKE([1.8 -Wall gnu no-define nostdinc check-news])
AC_ARG_VAR([ACLOCAL_FLAGS], [aclocal flags, e.g. -I <macro dir>])
-AC_PROG_CC()
-AC_PROG_CXX()
+AC_PROG_CC
+AC_PROG_CXX
IT_PROG_INTLTOOL([0.35])
AC_SUBST([GETTEXT_PACKAGE], [regexxer])
-AM_GLIB_GNU_GETTEXT()
+AM_GNU_GETTEXT_VERSION([0.11])
+AM_GLIB_GNU_GETTEXT
# gmodule-export-2.0 adds -Wl,--export-dynamic to the linker flags
# so that libglade can get at the custom widget creation functions.
@@ -43,7 +44,7 @@ DK_PKG_PATH_PROG([GDK_PIXBUF_CSOURCE], [gdk-pixbuf-2.0], [gdk-pixbuf-csource])
DK_PKG_PATH_PROG([GTK_UPDATE_ICON_CACHE], [gtk+-2.0], [gtk-update-icon-cache])
DK_PKG_PATH_PROG([GCONFTOOL], [gconf-2.0], [gconftool-2])
-AM_GCONF_SOURCE_2()
+AM_GCONF_SOURCE_2
AC_LANG([C++])
@@ -60,4 +61,4 @@ DK_ARG_ENABLE_WARNINGS([REGEXXER_WARNING_FLAGS],
[GLIBMM GTKMM])
AC_CONFIG_FILES([Makefile po/Makefile.in])
-AC_OUTPUT()
+AC_OUTPUT
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]