[gnome-nettool] Modernize autotools configuration
- From: Javier Jardón <jjardon src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-nettool] Modernize autotools configuration
- Date: Thu, 8 Apr 2010 03:05:25 +0000 (UTC)
commit cd5b7982db09cd67e1f25509b77f1a1dfbbafa14
Author: Javier Jardón <jjardon gnome org>
Date: Thu Apr 8 04:46:20 2010 +0200
Modernize autotools configuration
PACKAGE_URL and PACKAGE_VERSION are used now in the about
dialog.
New requirements:
autoconf >= 2.64
automake >= 1.11.1
libtool >= 2.2
intltool >= 0.40
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=615130
Makefile.am | 2 +
autogen.sh | 18 +++++++---
configure.in => configure.ac | 73 ++++++++++++++++++++++++++----------------
src/callbacks.c | 5 +--
4 files changed, 61 insertions(+), 37 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index fdb5bc5..24da9b9 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,3 +1,5 @@
+ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
+
SUBDIRS = pixmaps src help po
DISTCHECK_CONFIGURE_FLAGS = --disable-scrollkeeper
diff --git a/autogen.sh b/autogen.sh
index b133204..b0ff2b3 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -4,12 +4,18 @@
srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
-PKG_NAME="gnome-netinfo"
-REQUIRED_AUTOMAKE_VERSION=1.9
+PKG_NAME="gnome-nettool"
-if [ ! -f "$srcdir/src/nettool.c" ]; then
- echo "$srcdir doesn't look like source directory for $PKG_NAME" >&2
- exit 1
-fi
+(test -f $srcdir/configure.ac) || {
+ echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
+ echo " top-level $PKG_NAME directory"
+ exit 1
+}
+
+which gnome-autogen.sh || {
+ echo "You need to install gnome-common module and make"
+ echo "sure the gnome-autogen.sh script is in your \$PATH."
+ exit 1
+}
USE_GNOME2_MACROS=1 . gnome-autogen.sh
diff --git a/configure.in b/configure.ac
similarity index 61%
rename from configure.in
rename to configure.ac
index 2ca910b..a841dcd 100644
--- a/configure.in
+++ b/configure.ac
@@ -1,38 +1,40 @@
-AC_PREREQ(2.59)
-AC_INIT([GNOME Nettool], [2.30.0], [http://bugzilla.gnome.org/enter_bug.cgi?product=gnome-nettool], [gnome-nettool])
-AC_CONFIG_SRCDIR([src/ping.c])
-
-dnl Useful to call aclocal after 'make'
-AC_SUBST(ACLOCAL_AMFLAGS, "$ACLOCAL_FLAGS")
+AC_PREREQ([2.64])
+AC_INIT([GNOME Nettool],
+ [2.30.0],
+ [http://bugzilla.gnome.org/enter_bug.cgi?product=gnome-nettool],
+ [gnome-nettool],
+ [http://projects.gnome.org/gnome-network/]) #FIXME: website should be updated, it is even yet named gnome-network
AC_CONFIG_HEADERS([config.h])
-AM_INIT_AUTOMAKE([1.9 foreign])
+AC_CONFIG_SRCDIR([src/ping.c])
AC_CONFIG_MACRO_DIR([m4])
-AM_MAINTAINER_MODE
-IT_PROG_INTLTOOL([0.35.0])
+AM_INIT_AUTOMAKE([1.11.1 foreign])
+AM_MAINTAINER_MODE([enable])
+# Support silent build rules, requires at least automake-1.11. Disable
+# by either passing --disable-silent-rules to configure or passing V=1
+# to make
+AM_SILENT_RULES([yes])
-AC_ISC_POSIX
+# Check for programs
AC_PROG_CC
-AC_HEADER_STDC([])
+
+# Initialize libtool
+LT_PREREQ([2.2])
+LT_INIT
+
+# Check headers
AC_CHECK_HEADERS(sys/sockio.h)
AC_CHECK_HEADERS(sys/socket.h ifaddrs.h,,AC_MSG_ERROR(Required header not found: $ac_header))
-dnl AC_ARG_PROGRAM
-AM_PROG_LIBTOOL
-
-GNOME_COMPILE_WARNINGS(yes)
-CFLAGS="$CFLAGS $WARN_CFLAGS"
dnl ******************************************
dnl ** pkg-config dependacy checks **
dnl ******************************************
-
-
GTK_REQUIRED=2.19.7
GCONF_REQUIRED=1.1.11
-PKG_CHECK_MODULES(NETTOOL,
- gtk+-2.0 >= $GTK_REQUIRED
+PKG_CHECK_MODULES(NETTOOL,
+ gtk+-2.0 >= $GTK_REQUIRED
gconf-2.0 >= $GCONF_REQUIRED
gmodule-export-2.0
gnome-doc-utils
@@ -43,20 +45,31 @@ AC_SUBST(NETTOOL_LIBS)
dnl
dnl Translations
dnl
+IT_PROG_INTLTOOL([0.40.0])
+
GETTEXT_PACKAGE=gnome-nettool
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[The gettext package])
AM_GLIB_GNU_GETTEXT
-AC_SUBST(CFLAGS)
-AC_SUBST(CPPFLAGS)
-AC_SUBST(LDFLAGS)
-
GNOME_DOC_INIT
dnl
+dnl GConf stuff
+dnl
+AC_PATH_PROG(GCONFTOOL, gconftool-2, no)
+if test x"$GCONFTOOL" = xno; then
+ AC_MSG_ERROR([gconftool-2 executable not found in your path - should be installed with GConf])
+fi
+AM_GCONF_SOURCE_2
+
+
+dnl
dnl Debugging flags
dnl
+GNOME_COMPILE_WARNINGS([maximum])
+CFLAGS="$CFLAGS $WARN_CFLAGS"
+
set_debug=no
AC_ARG_ENABLE(debug,
[ --enable-debug Lots of noisy debug messages],
@@ -70,9 +83,13 @@ else
AC_MSG_RESULT(no)
fi
+AC_SUBST(CFLAGS)
+AC_SUBST(CPPFLAGS)
+AC_SUBST(LDFLAGS)
+
AC_CONFIG_FILES([
Makefile
-po/Makefile.in
+help/Makefile
pixmaps/Makefile
pixmaps/icons/Makefile
pixmaps/icons/16x16/Makefile
@@ -85,7 +102,7 @@ pixmaps/icons/32x32/Makefile
pixmaps/icons/32x32/apps/Makefile
pixmaps/icons/scalable/Makefile
pixmaps/icons/scalable/apps/Makefile
-help/Makefile
-src/Makefile
-src/gnome-nettool.desktop.in])
+po/Makefile.in
+src/gnome-nettool.desktop.in
+src/Makefile])
AC_OUTPUT
diff --git a/src/callbacks.c b/src/callbacks.c
index 06e032b..92b95b2 100644
--- a/src/callbacks.c
+++ b/src/callbacks.c
@@ -341,9 +341,8 @@ on_about_activate (gpointer window, GtkWidget *menu_item)
"license", "GPL 2+",
"logo-icon-name", "gnome-nettool",
"translator-credits", translator_credits,
- "version", VERSION,
- /* FIXME: website should be updated, it's even yet named gnome-network */
- "website", "http://www.gnome.org/projects/gnome-network/",
+ "version", PACKAGE_VERSION,
+ "website", PACKAGE_URL,
"wrap-license", TRUE,
NULL);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]