[gtranslator] Modernize autotools configuration
- From: Javier Jardón <jjardon src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gtranslator] Modernize autotools configuration
- Date: Sat, 6 Feb 2010 13:57:10 +0000 (UTC)
commit bfb915c23a4e38e8577ed6796d3909c8207d0297
Author: Javier Jardón <jjardon gnome org>
Date: Fri Feb 5 01:10:09 2010 +0100
Modernize autotools configuration
New requirements:
libtool >= 2.63.2
automake >= 1.10
libtool >= 2.2.6
intltool >= 0.40.0
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=609040
Makefile.am | 3 +-
autogen.sh | 23 ++----
configure.ac | 112 +++++++++++----------------
plugins/alternate-language/Makefile.am | 2 +-
plugins/charmap/Makefile.am | 2 +-
plugins/dictionary/Makefile.am | 2 +-
plugins/fullscreen/Makefile.am | 2 +-
plugins/glossary/glossary-panel.c | 2 +-
plugins/insert-params/Makefile.am | 2 +-
plugins/insert-tags/Makefile.am | 2 +-
plugins/open-tran/Makefile.am | 2 +-
plugins/source-code-view/Makefile.am | 2 +-
src/Makefile.am | 5 +-
src/dialogs/Makefile.am | 2 +-
src/gtr-actions-help.c | 4 +-
src/plugin-system/Makefile.am | 2 +-
src/translation-memory/Makefile.am | 2 +-
src/translation-memory/berkeley/Makefile.am | 2 +-
18 files changed, 70 insertions(+), 103 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 8655c77..96d92d9 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,4 +1,5 @@
-## the main Makefile.am
+# Point to our macro directory and pick up user flags from the environment
+ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
SUBDIRS = data help man src doc plugins po
diff --git a/autogen.sh b/autogen.sh
index 8d3d22f..fc148e9 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -14,21 +14,10 @@ PKG_NAME="gtranslator"
exit 1
}
-ifs_save="$IFS"; IFS=":"
-for dir in $PATH ; do
- test -z "$dir" && dir=.
- if test -f $dir/gnome-autogen.sh ; then
- gnome_autogen="$dir/gnome-autogen.sh"
- gnome_datadir=`echo $dir | sed -e 's,/bin$,/share,'`
- break
- fi
-done
-IFS="$ifs_save"
-
-if test -z "$gnome_autogen" ; then
- echo "You need to install the gnome-common module and make"
- echo "sure the gnome-autogen.sh script is in your \$PATH."
- exit 1
-fi
+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
+}
-REQUIRED_AUTOMAKE_VERSION=1.9 USE_GNOME2_MACROS=1 . gnome-autogen.sh
+USE_GNOME2_MACROS=1 . gnome-autogen.sh
diff --git a/configure.ac b/configure.ac
index 36253c7..262f8ce 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,68 +3,66 @@ dnl Process this file with autoconf to produce a configure script.
dnl -------------------------------------------------------------------
dnl (C) 2000-2004 Fatih Demir <kabalak kabalak net>
dnl -------------------------------------------------------------------
-AC_PREREQ(2.52)
-AC_INIT(gtranslator, 1.9.7,
- http://bugzilla.gnome.org/enter_bug.cgi?product=gtranslator)
+AC_PREREQ(2.63.2)
+AC_INIT([gtranslator],[1.9.7],[http://bugzilla.gnome.org/enter_bug.cgi?product=gtranslator],[gtranslator],[http://gtranslator.sourceforge.net/])
-AC_CONFIG_SRCDIR(src/main.c)
+AC_CONFIG_SRCDIR([src/main.c])
+AC_CONFIG_HEADER([config.h])
AC_CONFIG_MACRO_DIR([m4])
-AM_CONFIG_HEADER(config.h)
-AC_CONFIG_MACRO_DIR ([m4])
GTR_API_VERSION=2.0
AC_SUBST(GTR_API_VERSION)
-AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
+AM_INIT_AUTOMAKE([1.10 check-news])
AM_MAINTAINER_MODE
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
+dnl -------------------------------------------------------------------
+dnl Check for some standard stuff.
+dnl -------------------------------------------------------------------
+# Checks for programs
+AC_PROG_CC
AC_PROG_INSTALL
+# Initialize libtool
+LT_PREREQ([2.2.6])
+LT_INIT
+
+# Checks for header files.
+AC_CHECK_HEADERS([locale.h stdlib.h string.h sys/socket.h unistd.h])
+
+# Checks for typedefs, structures, and compiler characteristics.
+AC_TYPE_SIZE_T
+
+# Checks for library functions.
+AC_CHECK_FUNCS([memset setlocale strchr strdup strstr])
+
dnl -------------------------------------------------------------------
dnl Use intltools.
dnl -------------------------------------------------------------------
-IT_PROG_INTLTOOL([0.35.0])
-GETTEXT_PACKAGE=gtranslator
-AC_SUBST(GETTEXT_PACKAGE)
+IT_PROG_INTLTOOL([0.40.0])
+
+AC_SUBST([GETTEXT_PACKAGE], [gtranslator])
+AM_GNU_GETTEXT_VERSION([0.17])
AM_GLIB_GNU_GETTEXT
-AC_CHECK_FUNC(bind_textdomain_codeset,,[AC_CHECK_LIB(intl,bind_textdomain_codeset)])
-AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],["$GETTEXT_PACKAGE"],[Gettext package])
+AC_DEFINE([GETTEXT_PACKAGE], [PACKAGE_TARNAME], [Define to the gettext package name.])
dnl -------------------------------------------------------------------
-dnl Standard bla-bla checks.
+dnl Documentation
dnl -------------------------------------------------------------------
-AC_PROG_CC
-AC_ISC_POSIX
-AM_PROG_LIBTOOL
-AC_TYPE_SIGNAL
GNOME_DOC_INIT
GTK_DOC_CHECK([1.0])
dnl -------------------------------------------------------------------
-dnl The standard checks for the compiler.
-dnl -------------------------------------------------------------------
-AC_HEADER_STDC
-
-dnl -------------------------------------------------------------------
dnl The standard extended GNOME compile warning options ...
dnl -------------------------------------------------------------------
-GNOME_COMPILE_WARNINGS(maximum)
-
-AC_ARG_ENABLE(deprecations,
- [AC_HELP_STRING([--enable-deprecations],
- [warn about deprecated usages [default=no]])],,
- [enable_deprecations=no])
-
-if test "x$enable_deprecations" = "xyes"; then
- DISABLE_DEPRECATED_CFLAGS="\
--DG_DISABLE_DEPRECATED \
--DGDK_DISABLE_DEPRECATED \
--DGTK_DISABLE_DEPRECATED \
--DGDK_PIXBUF_DISABLE_DEPRECATED \
--DGNOME_DISABLE_DEPRECATED"
- AC_SUBST(DISABLE_DEPRECATED_CFLAGS)
-fi
+# Uncomment this when GtkSourceView uses single includes: GB#563786
+#GNOME_MAINTAINER_MODE_DEFINES
+GNOME_COMPILE_WARNINGS([maximum])
+
+
+AC_PATH_PROG([GLIB_GENMARSHAL], [glib-genmarshal])
+AC_PATH_PROG([GLIB_MKENUMS], [glib-mkenums])
dnl ==========================================================================
dnl
@@ -103,9 +101,6 @@ PKG_CHECK_MODULES(GTRANSLATOR, [
AC_SUBST(GTRANSLATOR_CFLAGS)
AC_SUBST(GTRANSLATOR_LIBS)
-AC_PATH_PROG([GLIB_GENMARSHAL], [glib-genmarshal])
-AC_PATH_PROG([GLIB_MKENUMS], [glib-mkenums])
-
dnl ------------------------
dnl Check for win32 platform
dnl ------------------------
@@ -136,14 +131,6 @@ fi
AC_SUBST(PLUGIN_LIBTOOL_FLAGS)
-dnl -------------------------------------------------------------------
-dnl Whether we use the broken, unsupported gtk+ functions
-dnl -------------------------------------------------------------------
-AC_ARG_ENABLE(gtk_enable_broken, [ --enable-gtk-broken Use broken GTK functions ],[
- gtk_enable_broken=yes
- AC_DEFINE(GTK_ENABLE_BROKEN, [yes], [Define this to use broken GTK functions])
-])
-
dnl ------
dnl GCONF
dnl ------
@@ -156,16 +143,6 @@ if test "$GCONFTOOL" = "no"; then
fi
dnl -------------------------------------------------------------------
-dnl Check for gettext >= 0.17.0 - uses it's parser/writer functions
-dnl -------------------------------------------------------------------
-AC_CHECK_HEADER([gettext-po.h])
-AC_CHECK_LIB([gettextpo], [po_format_list], [
- LDFLAGS="$LDFLAGS -lgettextpo"
-],[
- AC_MSG_ERROR(Missing or inadequate gettext library. Need at least version 0.17.0)
-])
-
-dnl -------------------------------------------------------------------
dnl Check for libdb >= 4.3
dnl -------------------------------------------------------------------
AX_BERKELEY_DB(4.3, [
@@ -181,8 +158,7 @@ dnl Check for gtkspell >= 2.0 and use it if found
dnl -------------------------------------------------------------------
have_gtkspell=no
AC_ARG_WITH(gtkspell,
- AC_HELP_STRING([--with-gtkspell],
- [Build with spell support]),,
+ AS_HELP_STRING([--with-gtkspell],[Build with spell support]),,
with_gtkspell=auto)
if test x"$with_gtkspell" != "xno"
@@ -231,8 +207,7 @@ AM_CONDITIONAL(USE_LIBSOUP, test x"$have_libsoup" = "xyes")
# ================================================================
have_gdict=no
AC_ARG_WITH(dictionary,
- AC_HELP_STRING([--with-dictionary],
- [Build with dictionary support]),,
+ AS_HELP_STRING([--with-dictionary],[Build with dictionary support]),,
with_dictionary=auto)
if test x"$with_dictionary" != "xno"
@@ -273,7 +248,7 @@ dnl -------------------------------------------------------------------
dnl Enable debug builds.
dnl -------------------------------------------------------------------
AC_ARG_ENABLE(debug,
- AC_HELP_STRING([--enable-debug],[Turn on debugging flags (default=yes)]),
+ AS_HELP_STRING([--enable-debug],[Turn on debugging flags (default=yes)]),
,enable_debug=yes)
AC_MSG_CHECKING([if a debug friendly version should be build])
if test "x$enable_debug" = "xyes" ; then
@@ -293,7 +268,7 @@ AC_SUBST(MY_DATE)
dnl -------------------------------------------------------------------
dnl Put out the configured files.
dnl -------------------------------------------------------------------
-AC_OUTPUT([
+AC_CONFIG_FILES([
Makefile
gtranslator.spec
data/Makefile
@@ -326,6 +301,7 @@ src/plugin-system/Makefile
src/translation-memory/Makefile
src/translation-memory/berkeley/Makefile
])
+AC_OUTPUT
dnl ------------------------------------------------------------------
dnl Print an information screen at the end of the process
@@ -335,11 +311,11 @@ echo "
------------------------------------------------------------------
-- gtranslator compilation options
-gtranslator version : ${VERSION}
+gtranslator version : ${PACKAGE_VERSION}
debug friendly build : ${enable_debug:-no}
-build with deprecation : ${enable_deprecated:-no}
-compilation flags : ${CFLAGS}
+compilation flags : ${CFLAGS}
+compilation warnings : ${WARN_CFLAGS}
------------------------------------------------------------------
"
diff --git a/plugins/alternate-language/Makefile.am b/plugins/alternate-language/Makefile.am
index 6e0ca97..be890a7 100644
--- a/plugins/alternate-language/Makefile.am
+++ b/plugins/alternate-language/Makefile.am
@@ -8,7 +8,7 @@ INCLUDES = \
-I$(top_srcdir)/src/dialogs \
$(GTRANSLATOR_CFLAGS) \
$(WARN_CFLAGS) \
- $(DISABLE_DEPRECATED_CFLAGS) \
+ $(DISABLE_DEPRECATED) \
-DGTR_LOCALEDIR=\""$(prefix)/$(DATADIRNAME)/locale"\"
plugin_LTLIBRARIES = \
diff --git a/plugins/charmap/Makefile.am b/plugins/charmap/Makefile.am
index cd55176..3833c40 100644
--- a/plugins/charmap/Makefile.am
+++ b/plugins/charmap/Makefile.am
@@ -9,7 +9,7 @@ INCLUDES = \
$(GTRANSLATOR_CFLAGS) \
$(GUCHARMAP_CFLAGS) \
$(WARN_CFLAGS) \
- $(DISABLE_DEPRECATED_CFLAGS) \
+ $(DISABLE_DEPRECATED) \
-DGTR_LOCALEDIR=\""$(prefix)/$(DATADIRNAME)/locale"\"
plugin_LTLIBRARIES = libcharmap.la
diff --git a/plugins/dictionary/Makefile.am b/plugins/dictionary/Makefile.am
index 9aacfb6..fc856af 100644
--- a/plugins/dictionary/Makefile.am
+++ b/plugins/dictionary/Makefile.am
@@ -9,7 +9,7 @@ INCLUDES = \
$(GTRANSLATOR_CFLAGS) \
$(DICTIONARY_CFLAGS) \
$(WARN_CFLAGS) \
- $(DISABLE_DEPRECATED_CFLAGS) \
+ $(DISABLE_DEPRECATED) \
-DGTR_LOCALEDIR=\""$(prefix)/$(DATADIRNAME)/locale"\"
plugin_LTLIBRARIES = libdict.la
diff --git a/plugins/fullscreen/Makefile.am b/plugins/fullscreen/Makefile.am
index 07664c2..60aadd7 100644
--- a/plugins/fullscreen/Makefile.am
+++ b/plugins/fullscreen/Makefile.am
@@ -8,7 +8,7 @@ INCLUDES = \
-I$(top_srcdir)/src/dialogs \
$(GTRANSLATOR_CFLAGS) \
$(WARN_CFLAGS) \
- $(DISABLE_DEPRECATED_CFLAGS) \
+ $(DISABLE_DEPRECATED) \
-DGTR_LOCALEDIR=\""$(prefix)/$(DATADIRNAME)/locale"\"
plugin_LTLIBRARIES = \
diff --git a/plugins/glossary/glossary-panel.c b/plugins/glossary/glossary-panel.c
index 58dc7fc..b794ed6 100644
--- a/plugins/glossary/glossary-panel.c
+++ b/plugins/glossary/glossary-panel.c
@@ -88,7 +88,7 @@ G_DEFINE_TYPE (GtrGlossaryPanel, gtranslator_glossary_panel,
/*
* allocate the struct
*/
- ret = (personPtr) malloc (sizeof (person));
+ ret = (personPtr) g_malloc (sizeof (person));
if (ret == NULL)
{
fprintf (stderr, "out of memory\n");
diff --git a/plugins/insert-params/Makefile.am b/plugins/insert-params/Makefile.am
index c608c6a..fbd3312 100644
--- a/plugins/insert-params/Makefile.am
+++ b/plugins/insert-params/Makefile.am
@@ -8,7 +8,7 @@ INCLUDES = \
-I$(top_srcdir)/src/dialogs \
$(GTRANSLATOR_CFLAGS) \
$(WARN_CFLAGS) \
- $(DISABLE_DEPRECATED_CFLAGS) \
+ $(DISABLE_DEPRECATED) \
-DGTR_LOCALEDIR=\""$(prefix)/$(DATADIRNAME)/locale"\"
plugin_LTLIBRARIES = \
diff --git a/plugins/insert-tags/Makefile.am b/plugins/insert-tags/Makefile.am
index daddb9a..b9d4871 100644
--- a/plugins/insert-tags/Makefile.am
+++ b/plugins/insert-tags/Makefile.am
@@ -8,7 +8,7 @@ INCLUDES = \
-I$(top_srcdir)/src/dialogs \
$(GTRANSLATOR_CFLAGS) \
$(WARN_CFLAGS) \
- $(DISABLE_DEPRECATED_CFLAGS) \
+ $(DISABLE_DEPRECATED) \
-DGTR_LOCALEDIR=\""$(prefix)/$(DATADIRNAME)/locale"\"
plugin_LTLIBRARIES = \
diff --git a/plugins/open-tran/Makefile.am b/plugins/open-tran/Makefile.am
index e4d8e00..a5e0859 100644
--- a/plugins/open-tran/Makefile.am
+++ b/plugins/open-tran/Makefile.am
@@ -11,7 +11,7 @@ INCLUDES = \
$(GTRANSLATOR_CFLAGS) \
$(SOUP_CFLAGS) \
$(WARN_CFLAGS) \
- $(DISABLE_DEPRECATED_CFLAGS) \
+ $(DISABLE_DEPRECATED) \
-DGTR_LOCALEDIR=\""$(prefix)/$(DATADIRNAME)/locale"\"
plugin_LTLIBRARIES = libopentran.la
diff --git a/plugins/source-code-view/Makefile.am b/plugins/source-code-view/Makefile.am
index c507988..7e39c4e 100644
--- a/plugins/source-code-view/Makefile.am
+++ b/plugins/source-code-view/Makefile.am
@@ -7,7 +7,7 @@ INCLUDES = \
-I$(top_srcdir)/src/plugin-system \
$(GTRANSLATOR_CFLAGS) \
$(WARN_CFLAGS) \
- $(DISABLE_DEPRECATED_CFLAGS) \
+ $(DISABLE_DEPRECATED) \
-DDATADIR=\""$(pkgdatadir)"\" \
-DGTR_LOCALEDIR=\""$(prefix)/$(DATADIRNAME)/locale"\"
diff --git a/src/Makefile.am b/src/Makefile.am
index d12b203..1d57898 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -26,7 +26,8 @@ INCLUDES = \
$(GTRANSLATOR_CFLAGS) \
$(GTKSPELL_CFLAGS) \
$(SPELLCHECK_CFLAGS) \
- $(DEPRECATED_FLAGS) \
+ $(WARN_CFLAGS) \
+ $(DISABLE_DEPRECATED) \
-DG_LOG_DOMAIN=\""$(PACKAGE)"\" \
-DSCRIPTSDIR=\""$(pkgdatadir)"/scripts\" \
-DWINDOW_ICON=\""$(datadir)"/pixmaps/gtranslator.png\" \
@@ -40,7 +41,7 @@ bin_PROGRAMS = \
gtranslator_SOURCES = main.c
-gtranslator_LDADD = libgtranslator.la $(GTRANSLATOR_LIBS) $(GTKSPELL_LIBS) $(INTLLIBS)
+gtranslator_LDADD = libgtranslator.la $(GTRANSLATOR_LIBS) $(GTKSPELL_LIBS) $(INTLLIBS) -lgettextpo
if PLATFORM_WIN32
gtranslator_LDFLAGS = -Wl,--export-all-symbols -mwindows -Wl,--out-implib,libgedit-$(GTR_API_VERSION).a
diff --git a/src/dialogs/Makefile.am b/src/dialogs/Makefile.am
index 9a05865..2a4a8d9 100644
--- a/src/dialogs/Makefile.am
+++ b/src/dialogs/Makefile.am
@@ -8,7 +8,7 @@ INCLUDES = \
-DPIXMAPSDIR=\""$(datadir)"/pixmaps/gtranslator\" \
$(GTRANSLATOR_CFLAGS) \
$(WARN_CFLAGS) \
- $(DISABLE_DEPRECATED_CFLAGS)
+ $(DISABLE_DEPRECATED)
noinst_LTLIBRARIES = \
libdialogs.la
diff --git a/src/gtr-actions-help.c b/src/gtr-actions-help.c
index 7855316..09860e8 100644
--- a/src/gtr-actions-help.c
+++ b/src/gtr-actions-help.c
@@ -133,8 +133,8 @@ gtranslator_about_dialog (GtkAction * action, GtrWindow * window)
* up in the "about" box
*/
"translator-credits", _("translator-credits"),
- "version", VERSION,
- "website", "http://gtranslator.sourceforge.net/",
+ "version", PACKAGE_VERSION,
+ "website", PACKAGE_URL,
"wrap-license", TRUE,
"website-label", _("Gtr Web Site"), NULL);
diff --git a/src/plugin-system/Makefile.am b/src/plugin-system/Makefile.am
index f1cb65e..39c082b 100644
--- a/src/plugin-system/Makefile.am
+++ b/src/plugin-system/Makefile.am
@@ -9,7 +9,7 @@ INCLUDES = \
-DGTR_PLUGINDIR=\""$(libdir)/gtranslator/plugins"\" \
$(GTRANSLATOR_CFLAGS) \
$(WARN_CFLAGS) \
- $(DISABLE_DEPRECATED_CFLAGS)
+ $(DISABLE_DEPRECATED)
noinst_LTLIBRARIES = \
libpluginsystem.la
diff --git a/src/translation-memory/Makefile.am b/src/translation-memory/Makefile.am
index 41b31be..16696e8 100644
--- a/src/translation-memory/Makefile.am
+++ b/src/translation-memory/Makefile.am
@@ -9,7 +9,7 @@ INCLUDES = \
-DPIXMAPSDIR=\""$(datadir)"/pixmaps/gtranslator\" \
$(GTRANSLATOR_CFLAGS) \
$(WARN_CFLAGS) \
- $(DISABLE_DEPRECATED_CFLAGS)
+ $(DISABLE_DEPRECATED)
noinst_LTLIBRARIES = \
libtranslationmemory.la
diff --git a/src/translation-memory/berkeley/Makefile.am b/src/translation-memory/berkeley/Makefile.am
index 2964244..a3e4092 100644
--- a/src/translation-memory/berkeley/Makefile.am
+++ b/src/translation-memory/berkeley/Makefile.am
@@ -8,7 +8,7 @@ INCLUDES = \
-DPIXMAPSDIR=\""$(datadir)"/pixmaps/gtranslator\" \
$(GTRANSLATOR_CFLAGS) \
$(WARN_CFLAGS) \
- $(DISABLE_DEPRECATED_CFLAGS)
+ $(DISABLE_DEPRECATED)
noinst_LTLIBRARIES = \
libberkeley.la
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]