]> git.ipfire.org Git - thirdparty/rrdtool-1.x.git/commitdiff
the get ready for 1.4rc patch
authorTobias Oetiker <tobi@oetiker.ch>
Wed, 27 May 2009 13:39:44 +0000 (13:39 +0000)
committerTobias Oetiker <tobi@oetiker.ch>
Wed, 27 May 2009 13:39:44 +0000 (13:39 +0000)
* updated to automake 1.11 with silet build, with this warnings stand out much better in the build process.
  use make V=1 to see all as before
* switched from intltoolize to autopoint for gettext support
* moved m4 bits into their own subdirectory

--tobi

git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1819 a5681a0c-68f1-0310-ab6d-d61299d08faa

MakeMakefile
Makefile.am
autogen.sh [new file with mode: 0755]
bindings/Makefile.am
configure.ac
doc/Makefile.am
m4/acinclude.m4 [moved from acinclude.m4 with 100% similarity]
po/ChangeLog
po/Makevars [new file with mode: 0644]
src/Makefile.am
src/rrd_i18n.h

index 2765238a7ddf1dfe6e25eb1391c238f28204c359..bfcfddf78e4e5266277274d000a2f519e5f9737b 100755 (executable)
@@ -3,8 +3,8 @@
 # Run this script after the first cvs checkout to build
 # makefiles and friends
 
-#PATH="/usr/sepp/bin:$PATH"
-#export PATH
+PATH="/usr/pack/automake-1.11-to/amd64-linux-ubuntu8.04/bin:$PATH"
+export PATH
 
 vcheck (){
   perl <<PERL
@@ -17,10 +17,9 @@ PERL
 }
 
 ERROR=0
-LIBTOOL_VER="1.5.6"
-AUTOMAKE_VER="1.9.2"
-AUTOCONF_VER="2.59"
-INTLTOOL_VER="0.35.0"
+LIBTOOL_VER="2.2.6"
+AUTOMAKE_VER="1.11"
+AUTOCONF_VER="2.63"
 
 if vcheck $LIBTOOL_VER "libtool --version"
 then
@@ -30,61 +29,29 @@ fi
 
 if vcheck $AUTOMAKE_VER  "automake  --version"
 then
-  if vcheck $AUTOMAKE_VER  "automake-1.9 --version"
+  if vcheck $AUTOMAKE_VER  "automake-1.11 --version"
   then
     echo "get a copy of GNU automake >= $AUTOMAKE_VER"
     ERROR=1
   else
-    automake=automake-1.9
-    aclocal="aclocal-1.9"
-    for d in /usr/pack/automake-1.9.5-to/share/aclocal-1.9 /usr/share/aclocal-1.9 /usr/share/aclocal /usr/pack/rrdtool-1.3svn-to/share/aclocal /usr/pack/intltool-0.37.0-to/share/aclocal ; do
-      [ -d $d ] && aclocal="$aclocal -I $d"
-    done
+    AUTOMAKE="automake-1.11"
+    ACLOCAL="aclocal-1.11"
+    export AUTOMAKE ACLOCAL
   fi
-else
-    automake="automake"
-    aclocal="aclocal"
-#    aclocal="aclocal -I /usr/pack/libtool-1.5.14-to/share/aclocal"
 fi
 
+
 if vcheck $AUTOCONF_VER "autoconf --version"
 then
   echo "get a copy of GNU autoconf >= $autoconf_ver"
   ERROR=1
 fi
 
-if vcheck $INTLTOOL_VER "intltoolize --version"
-then
-  echo "get a copy of GNU intltoolize >= $INTLTOOL_VER"
-  ERROR=1
-fi
-       
 if [ $ERROR -ne 0 ]
 then
   exit 1
 fi
 
-# remove the bits we are going to recreate
-
-echo Removing old Makefiles
-touch Makefile
-find . -name "Makefile" -or -name "Makefile.in" -print0 | xargs -0 rm 
-echo Cleaning out other leftovers
-for x in configure install-sh intltool-merge.in rrd_config.h.in \
-         missing intltool-update po/Makefile.in.in config.sub \
-         intltool-extract intltool-extract.in config.guess \
-         depcomp intltool-update.in autom4te.cache \
-         intltool-merge compile; do
-  [ ! -L $x -a -d $x ] && rm -r "$x"
-  [ ! -L $x -a -f $x ] && rm "$x"
-done
-set -x
-intltoolize --automake -c -f
-$aclocal
-libtoolize --copy --force
-autoheader --force  
-$aclocal
-$automake --foreign --add-missing --force-missing --copy 
-autoconf --force
+./autogen.sh
 
 # vim: set syntax=sh :
index 78903cbf01bc9e6a9b022431dad6ed62644e6f0b..c1a12cf8856e6aedd08d8c3c4a2716287bcf8314 100644 (file)
@@ -2,17 +2,11 @@
 RSYNC = rsync --rsh=ssh
 
 # build the following subdirectories
-if BUILD_LIBINTL
-PO=po
-else
-PO=
-endif
 
-SUBDIRS = $(PO) src examples doc bindings
+SUBDIRS = po src examples doc bindings intl
 
  # the following files are not mentioned in any other Makefile
 EXTRA_DIST = COPYRIGHT CHANGES WIN32-BUILD-TIPS.txt TODO CONTRIBUTORS THREADS \
-             intltool-extract.in  intltool-merge.in    intltool-update.in \
             rrdtool.spec favicon.ico  win32/Makefile win32/config.h \
              win32/rrd.dsp win32/rrd.sln win32/rrd.vcproj \
              win32/rrd_config.h.msvc win32/rrdlib.vcproj win32/rrdtool.dsp \
@@ -27,7 +21,7 @@ CLEANFILES = config.cache
 AUTOMAKE_OPTIONS= foreign 
 
 # where we keep local rules for automake
-
+ACLOCAL_AMFLAGS=-I m4
 ACLOCAL_M4= $(top_srcdir)/aclocal.m4
 #AUTOHEADER = @AUTOHEADER@ --localdir=$(top_srcdir)/config
 #AUTOCONF = @AUTOCONF@ --localdir=$(top_srcdir)/config
diff --git a/autogen.sh b/autogen.sh
new file mode 100755 (executable)
index 0000000..5963868
--- /dev/null
@@ -0,0 +1,4 @@
+#!/bin/sh
+PATH="/usr/pack/automake-1.11-to/amd64-linux-ubuntu8.04/bin:$PATH"
+export PATH
+autoreconf --force --install --verbose -I config -I m4
index 4b5d6d483f799d282a28cea915d24bfcfacb70cc..70beba1695a31bad90387bd7360056c773a5694d 100644 (file)
@@ -20,10 +20,10 @@ EXTRA_DIST = perl-piped/MANIFEST perl-piped/README perl-piped/Makefile.PL perl-p
 all-local:  @COMP_PERL@ @COMP_RUBY@ @COMP_PYTHON@
 
 install-data-local:
-       test -f perl-piped/Makefile && cd perl-piped && $(MAKE) install || true
-       test -f perl-shared/Makefile && cd perl-shared && $(MAKE) install || true
-       test -f ruby/Makefile && cd ruby && $(MAKE) EPREFIX=$(DESTDIR)$(exec_prefix) $(RUBY_MAKE_OPTIONS) install || true
-       test -d python/build && cd python && env BUILDLIBDIR=../../src/.libs $(PYTHON) setup.py install --skip-build --prefix=$(DESTDIR)$(prefix) --exec-prefix=$(DESTDIR)$(exec_prefix) || true
+       $(AM_V_GEN)test -f perl-piped/Makefile && cd perl-piped && $(MAKE) install || true
+       $(AM_V_GEN)test -f perl-shared/Makefile && cd perl-shared && $(MAKE) install || true
+       $(AM_V_GEN)test -f ruby/Makefile && cd ruby && $(MAKE) EPREFIX=$(DESTDIR)$(exec_prefix) $(RUBY_MAKE_OPTIONS) install || true
+       $(AM_V_GEN)test -d python/build && cd python && env BUILDLIBDIR=../../src/.libs $(PYTHON) setup.py install --skip-build --prefix=$(DESTDIR)$(prefix) --exec-prefix=$(DESTDIR)$(exec_prefix) || true
 
 # rules for building the ruby module
 # RUBYARCHDIR= is to work around in a makefile quirk not sure 
index 8647eb00a2c6dfefeeabdc3728f495eba321721d..7d3dde7b75cb1e1cb3f00749523c955e12878b37 100644 (file)
@@ -9,14 +9,14 @@ dnl tell automake the this script is for rrdtool
 
 dnl the official version number is
 dnl a.b.c
-AC_INIT([rrdtool],[1.3.2])
+AC_INIT([rrdtool],[1.3.999])
 
 dnl for testing a numberical version number comes handy
 dnl the released version are
 dnl a.bccc
 dnl the devel versions will be something like
 dnl a.b999yymmddhh 
-NUMVERS=1.3002
+NUMVERS=1.3999
 AC_SUBST(NUMVERS)
 
 dnl for the linker to understand which versions the library are compatible with
@@ -27,14 +27,16 @@ dnl - if any functionality was removed do c++,r=0,a=0.
 dnl
 dnl see http://sourceware.org/autobook/autobook/autobook_91.html
 dnl 
-LIBVERS=4:1:0
+LIBVERS=5:0:1
 AC_SUBST(LIBVERS)
 
 AC_CANONICAL_TARGET
-AM_INIT_AUTOMAKE
+AC_USE_SYSTEM_EXTENSIONS
+AM_INIT_AUTOMAKE([silent-rules])
 AM_MAINTAINER_MODE
-
+AM_SILENT_RULES([yes])
 AC_CONFIG_HEADERS([rrd_config.h])
+AC_CONFIG_MACRO_DIR([m4])
 
 dnl all our local stuff like install scripts and include files
 dnl is in there
@@ -139,7 +141,7 @@ dnl Try to detect/use GNU features
 CFLAGS="$CFLAGS -D_GNU_SOURCE"
 
 dnl check for -Werror separatly
-dnl (quite a few autotool checks don't work with -Werror; also, the
+dnl (quite a few autotool checks do not work with -Werror; also, the
 dnl check for -Werror fails after checking and adding the other flags)
 AC_CACHE_CHECK([if gcc likes the -Werror flag], rd_cv_gcc_flag__Werror,
   [AC_COMPILE_IFELSE(
@@ -262,44 +264,8 @@ AC_CHECK_FUNCS(posix_fadvise)
 CONFIGURE_PART(Libintl Processing)
 
 
-dnl gettext
-GETTEXT_PACKAGE=rrdtool
-AC_SUBST(GETTEXT_PACKAGE)
-AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[Gettext package])
-
-AM_GLIB_GNU_GETTEXT()
-
-AC_ARG_ENABLE(libintl,AS_HELP_STRING([--disable-libintl],[i18n support (libintl)]),
-[],[enable_libintl=yes])
-
-if test x$enable_libintl = xyes; then
-  IT_PROG_INTLTOOL([0.35.0],[no-xml])
-fi
-
-if test x$enable_libintl = xyes -a x$MSGFMT = xno; then
-  AC_MSG_WARN(I could not find msgfmt. Diabeling libintl build.)
-  enable_libintl=no
-fi
-
-if test x$enable_libintl = xyes; then
-  AC_CHECK_HEADERS(libintl.h,[],[AC_MSG_RESULT(disabeling libintl build); enable_libintl=no])
-fi
-
-if test x$enable_libintl = xyes ; then
-  dnl it seems bsd synstems need to link against libintl
-  dnl when compiling rrdupdate. lets check        
-  AC_CHECK_LIB(intl, libintl_gettext,[LIB_LIBINTL="-lintl"])
-fi
-
-dnl use for linking rrdupdate
-AC_SUBST(LIB_LIBINTL)
-
-dnl do not touch the po stuff if we are not going to build intl
-AM_CONDITIONAL(BUILD_LIBINTL,[test x$enable_libintl = xyes])
-
-if test x$enable_libintl = xyes; then
-   AC_DEFINE([BUILD_LIBINTL], [], [Use this in code sections to mark them for libintl build])
-fi
+AM_GNU_GETTEXT_VERSION([0.17])
+AM_GNU_GETTEXT()
 
 CONFIGURE_PART(IEEE Math Checks)
  
@@ -585,7 +551,7 @@ AC_MSG_RESULT(${COMP_PERL:-No Perl Modules will be built})
 
 # Options to pass when configuring perl module
 langpref=$prefix
-test "$langpref" = "$(DESTDIR)NONE" && langpref='$(DESTDIR)'$ac_default_prefix
+test "$langpref" = '$(DESTDIR)NONE' && langpref='$(DESTDIR)'$ac_default_prefix
 test "$langpref" = "NONE" && langpref=$ac_default_prefix
 
 PERL_MAKE_OPTIONS="PREFIX=$langpref LIB=$langpref/lib/perl/$PERL_VERSION"
@@ -892,7 +858,8 @@ AC_CONFIG_FILES([examples/perftest.pl])
 AC_CONFIG_FILES([examples/Makefile])
 AC_CONFIG_FILES([examples/rrdcached/Makefile])
 AC_CONFIG_FILES([doc/Makefile])
-AC_CONFIG_FILES([po/Makefile.in])
+AC_CONFIG_FILES([po/Makefile.in]) 
+AC_CONFIG_FILES([intl/Makefile]) 
 AC_CONFIG_FILES([src/Makefile])
 AC_CONFIG_FILES([src/librrd.sym.in])
 AC_CONFIG_FILES([src/librrd.pc])
@@ -946,7 +913,7 @@ echo "    Build Tcl Bindings: $enable_tcl"
 echo " Build Python Bindings: $enable_python"
 echo "          Build rrdcgi: $enable_rrdcgi"
 echo "       Build librrd MT: $enable_pthread"
-echo "     Link with libintl: $enable_libintl"
+echo "           Use gettext: $USE_NLS"
 echo "           With libDBI: $have_libdbi"
 echo
 echo "             Libraries: $ALL_LIBS"
index 40b0b38966c474fdea5e487d2a9fa2781623aed0..617beb3625f3a71b7bf4b4761005a4668099ea1a 100644 (file)
@@ -46,22 +46,22 @@ all-local: link txt man html-local
        perl -n -e 'if (/^=include\s+(\S+)/){open F,"$$1.inc" || die $$?;print <F>; close F} else {print}'  $<  > $@
 
 .pod.1 .pm.1 .pl.1:
-       @POD2MAN@ --release=$(VERSION) --center=rrdtool $<  > $@
+       $(AM_V_GEN)@POD2MAN@ --release=$(VERSION) --center=rrdtool $<  > $@
 
 .1.txt:
-       GROFF_NO_SGR=1 @NROFF@ -man -Tlp $< > $@
+       $(AM_V_GEN)GROFF_NO_SGR=1 @NROFF@ -man -Tlp $< > $@
 
 .1.pdf:
-       @TROFF@ -man $< | ps2pdf - $@
+       $(AM_V_GEN)@TROFF@ -man $< | ps2pdf - $@
 
 .pm.html .pod.html .pl.html:
-       @POD2HTML@ --infile=$< --outfile=$@ --noindex --htmlroot=. --podpath=. --title=$*
+       $(AM_V_GEN)@POD2HTML@ --infile=$< --outfile=$@ --noindex --htmlroot=. --podpath=. --title=$*
 
 RRDs.pod:
-       $(LN_S) $(top_srcdir)/bindings/perl-shared/RRDs.pm RRDs.pod
+       $(AM_V_GEN)$(LN_S) $(top_srcdir)/bindings/perl-shared/RRDs.pm RRDs.pod
 
 RRDp.pod:
-       $(LN_S) $(top_srcdir)/bindings/perl-piped/RRDp.pm RRDp.pod
+       $(AM_V_GEN)$(LN_S) $(top_srcdir)/bindings/perl-piped/RRDp.pm RRDp.pod
 
 link: RRDp.pod RRDs.pod
 
@@ -76,4 +76,4 @@ pdf-local: $(PDF)
 pod: $(POD)
 
 install-data-hook:
-       cd $(DESTDIR)$(ihtmldir) && rm -f index.html && $(LN_S) rrdtool.html index.html
+       $(AM_V_GEN)cd $(DESTDIR)$(ihtmldir) && rm -f index.html && $(LN_S) rrdtool.html index.html
similarity index 100%
rename from acinclude.m4
rename to m4/acinclude.m4
index 8251db8edd7ab3fc619fb4be97003244722a9c6a..f738a7b02ff4dad402da1bde03d1b87515c34deb 100644 (file)
@@ -1 +1,12 @@
-# no change log yet
+2009-05-26  gettextize  <bug-gnu-gettext@gnu.org>
+
+       * Makefile.in.in: New file, from gettext-0.17.
+       * Rules-quot: New file, from gettext-0.17.
+       * boldquot.sed: New file, from gettext-0.17.
+       * en@boldquot.header: New file, from gettext-0.17.
+       * en@quot.header: New file, from gettext-0.17.
+       * insert-header.sin: New file, from gettext-0.17.
+       * quot.sed: New file, from gettext-0.17.
+       * remove-potcdate.sin: New file, from gettext-0.17.
+       * POTFILES.in: New file.
+
diff --git a/po/Makevars b/po/Makevars
new file mode 100644 (file)
index 0000000..c450650
--- /dev/null
@@ -0,0 +1,41 @@
+# Makefile variables for PO directory in any package using GNU gettext.
+
+# Usually the message domain is the same as the package name.
+DOMAIN = $(PACKAGE)
+
+# These two variables depend on the location of this directory.
+subdir = po
+top_builddir = ..
+
+# These options get passed to xgettext.
+XGETTEXT_OPTIONS = --keyword=_ --keyword=N_
+
+# This is the copyright holder that gets inserted into the header of the
+# $(DOMAIN).pot file.  Set this to the copyright holder of the surrounding
+# package.  (Note that the msgstr strings, extracted from the package's
+# sources, belong to the copyright holder of the package.)  Translators are
+# expected to transfer the copyright for their translations to this person
+# or entity, or to disclaim their copyright.  The empty string stands for
+# the public domain; in this case the translators are expected to disclaim
+# their copyright.
+COPYRIGHT_HOLDER = Tobias Oetiker
+
+# This is the email address or URL to which the translators shall report
+# bugs in the untranslated strings:
+# - Strings which are not entire sentences, see the maintainer guidelines
+#   in the GNU gettext documentation, section 'Preparing Strings'.
+# - Strings which use unclear terms or require additional context to be
+#   understood.
+# - Strings which make invalid assumptions about notation of date, time or
+#   money.
+# - Pluralisation problems.
+# - Incorrect English spelling.
+# - Incorrect formatting.
+# It can be your email address, or a mailing list address where translators
+# can write to without being subscribed, or the URL of a web page through
+# which the translators can contact you.
+MSGID_BUGS_ADDRESS = http://oss.oetiker.ch/rrdtool-trac/newticket
+
+# This is the list of locale categories, beyond LC_MESSAGES, for which the
+# message catalogs shall be used.  It is usually empty.
+EXTRA_LOCALE_CATEGORIES =
index 5cfc523760039260067dfae24789234c09de0ded..97b4f44318f316370cba15bf923bb79d455ae1dd 100644 (file)
@@ -124,4 +124,4 @@ EXTRA_DIST= librrd.pc.in strftime.c strftime.h  rrd_getopt.c rrd_getopt1.c rrd_g
 
 
 librrd.sym: librrd.sym.in
-       grep -v LIBC_HAS_GETOPT_LONG librrd.sym.in >$@
+       $(AM_V_GEN)grep -v LIBC_HAS_GETOPT_LONG librrd.sym.in >$@
index 9f640eff180b3ed02ed1c712206f9a7122393743..36d79e7b79b045323621440f3f880f2df118e955 100644 (file)
@@ -11,18 +11,18 @@ extern    "C" {
 #ifndef _RRD_I18N_H
 #define _RRD_I18N_H
 
-#ifndef _
-/* This is for other GNU distributions with internationalized messages.
-   When compiling libc, the _ macro is predefined.  */
-#if defined(HAVE_LIBINTL_H) && defined(BUILD_LIBINTL)
-#  include <libintl.h>
-#define _(String) gettext (String)
+#ifdef ENABLE_NLS
+#  ifdef _LIBC
+#    include <libintl.h>
+#  else
+#    include "gettext.h"
+#    define _(String) gettext (String)
+#  endif
 #else
-#define _(String) (String)
-#endif
-#define N_(String) (String)
+#  define _(String) (String)
 #endif
 
+#define N_(String) String
 
 #endif