# 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
}
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
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 :
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 \
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
--- /dev/null
+#!/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
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
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
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
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(
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)
# 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"
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])
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"
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
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
-# 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.
+
--- /dev/null
+# 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 =
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 >$@
#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