[ghex] Modernize autotools configuration
- From: Javier Jardón <jjardon src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [ghex] Modernize autotools configuration
- Date: Mon, 8 Feb 2010 00:31:36 +0000 (UTC)
commit 3bb3ed1136ab47891d92644e548247a51aba1bea
Author: Javier Jardón <jjardon gnome org>
Date: Wed Jan 27 07:48:37 2010 +0100
Modernize autotools configuration
New requirements:
autoconf >= 2.61
automake >= 1.10
libtool >= 2.2.6
Makefile.am | 2 +
autogen.sh | 11 +++----
configure.in => configure.ac | 63 ++++++++++++++++++++++--------------------
src/Makefile.am | 3 +-
4 files changed, 42 insertions(+), 37 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index e121e68..3a88506 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,5 +1,7 @@
## Process this file with automake to produce Makefile.in.
+ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
+
DISTCHECK_CONFIGURE_FLAGS = --disable-scrollkeeper --disable-schemas-install
SUBDIRS = po src help icons
diff --git a/autogen.sh b/autogen.sh
index d5465a8..18fbd45 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -15,12 +15,11 @@ PKG_NAME="GHex"
exit 1
}
-# Check for gnome-autogen.sh existance -- SnM
+# Check for gnome-autogen.sh existance
which gnome-autogen.sh || {
- echo "You need to install gnome-common from the GNOME CVS"
- exit 1
+ echo "You need to install gnome-common from GNOME Git (or from"
+ echo "your OS vendor's package manager)."
+ exit 1
}
-
-#. $srcdir/macros/autogen.sh -- SnM
-REQUIRED_AUTOMAKE_VERSION=1.7 USE_GNOME2_MACROS=1 USE_COMMON_DOC_BUILD=yes . gnome-autogen.sh
+USE_GNOME2_MACROS=1 USE_COMMON_DOC_BUILD=yes . gnome-autogen.sh
diff --git a/configure.in b/configure.ac
similarity index 63%
rename from configure.in
rename to configure.ac
index 9c48015..421ca73 100644
--- a/configure.in
+++ b/configure.ac
@@ -1,24 +1,32 @@
-AC_PREREQ(2.53)
-AC_INIT([ghex], [2.24.0],
- [http://bugzilla.gnome.org/enter_bug.cgi?product=ghex])
-AC_CONFIG_SRCDIR(src/ghex-window.c)
-AM_INIT_AUTOMAKE
-AM_CONFIG_HEADER(config.h)
+AC_PREREQ(2.61)
+AC_INIT([ghex],[2.24.0],[http://bugzilla.gnome.org/enter_bug.cgi?product=ghex],[ghex])
+AC_CONFIG_HEADERS([config.h])
+AC_CONFIG_SRCDIR([src/ghex-window.c])
+AC_CONFIG_MACRO_DIR([m4])
+
+AM_INIT_AUTOMAKE([1.10])
+m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
AM_MAINTAINER_MODE
-GNOME_DOC_INIT
+# Check for programs
+AC_PROG_CC
+AC_PROG_INSTALL
-IT_PROG_INTLTOOL([0.35.0])
+# Initialize libtool
+LT_PREREQ([2.2.6])
+LT_INIT([disable-static])
-AC_ISC_POSIX
-AC_PROG_CC
-AC_STDC_HEADERS
-AM_PROG_LIBTOOL
+# Check for header files.
+AC_CHECK_HEADERS([string.h unistd.h])
-AC_PROG_INSTALL
-AC_PROG_LN_S
-AC_PROG_MAKE_SET
+# Check for typedefs, structures, and compiler characteristics.
+AC_TYPE_SIZE_T
+
+# Check for library functions.
+AC_CHECK_FUNCS([pow strstr strtoul])
+
+AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal)
LIBGTKHEX_RELEASE=1.0
AC_SUBST(LIBGTKHEX_RELEASE)
@@ -54,25 +62,16 @@ AC_SUBST(GAILUTIL_LIBS)
dnl =================================================================
dnl Gettext stuff
dnl =================================================================
+IT_PROG_INTLTOOL([0.40.0])
GETTEXT_PACKAGE=ghex-2.0
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Gettext package name.])
AM_GLIB_GNU_GETTEXT
+dnl =================================================================
-AC_CHECK_LIB(popt, poptGetArgs, [POPT_LIBS="-lpopt"],
-AC_MSG_ERROR([popt is required to build ghex.
-You can download the latest version from ftp://ftp.rpm.org/pub/rpm/dist/rpm-4.0.x/]))
-AC_SUBST(POPT_LIBS)
-
-AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal)
-
-dnl A switch to enable *_DISABLE__DEPRECATED flags
-AC_ARG_ENABLE(deprecations,
- [AC_HELP_STRING([--enable-deprecations],
- [warn about deprecated usages [default=no]])],
- GHEX_DEPRECATED_CFLAGS="-DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGNOME_DISABLE_DEPRECATED -DPANGO_DISABLE_DEPRECATED",
- GHEX_DEPRECATED_CFLAGS="")
-AC_SUBST(GHEX_DEPRECATED_CFLAGS)
+# Uncomment this when we get rid of bonobo code: GB #590996
+#GNOME_MAINTAINER_MODE_DEFINES
+GNOME_COMPILE_WARNINGS([maximum])
AC_ARG_ENABLE(debug,
[ --enable-debug Enables extra debugging output], AC_DEFINE(ENABLE_DEBUG, 1, [Should verbose debugging output be enabled.]))
@@ -86,7 +85,10 @@ fi
AM_GCONF_SOURCE_2
-AC_OUTPUT([
+GNOME_DOC_INIT([0.9.0],,
+ [AC_MSG_WARN([[gnome-doc-utils not found: documentation will not be built.]])])
+
+AC_CONFIG_FILES([
Makefile
po/Makefile.in
src/Makefile
@@ -99,3 +101,4 @@ icons/32x32/Makefile
icons/48x48/Makefile
ghex.spec
gtkhex.pc])
+AC_OUTPUT
diff --git a/src/Makefile.am b/src/Makefile.am
index 25cfa43..34e7081 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -7,7 +7,8 @@ INCLUDES = \
-DDATADIR=\""$(datadir)"\" \
-DPREFIX=\""$(prefix)"\" \
$(GHEX_CFLAGS) $(GAILUTIL_CFLAGS) \
- $(GHEX_DEPRECATED_CFLAGS)
+ $(WARN_CFLAGS) \
+ $(DISABLE_DEPRECATED)
BUILT_SOURCES = \
ghex-marshal.c \
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]