summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3ef4450)
raw | patch | inline | side by side (parent: 3ef4450)
author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Thu, 15 May 2008 22:37:26 +0000 (22:37 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Thu, 15 May 2008 22:37:26 +0000 (22:37 +0000) |
Makefile.am | patch | blob | history | |
configure.ac | patch | blob | history | |
rrdtool-1.3-release | patch | blob | history | |
src/Makefile.am | patch | blob | history |
diff --git a/Makefile.am b/Makefile.am
index 2167bfc90a5d368a9069cf3d87a6393e8be5b3b2..9f20a78b96833fbad4f0c68ab8656be6f56e2793 100644 (file)
--- a/Makefile.am
+++ b/Makefile.am
RSYNC = rsync --rsh=ssh
# build the following subdirectories
-SUBDIRS = po src examples doc bindings
+if BUILD_LIBINTL
+PO=po
+else
+PO=
+endif
+
+SUBDIRS = $(PO) src examples doc bindings
# the following files are not mentioned in any other Makefile
EXTRA_DIST = COPYRIGHT CHANGES WIN32-BUILD-TIPS.txt TODO CONTRIBUTORS THREADS \
diff --git a/configure.ac b/configure.ac
index 0d11aa8563c07d66bab4e2711eaca18641f68485..a4a212db6d7a7bc83ba3ad56dde6efd547e401a7 100644 (file)
--- a/configure.ac
+++ b/configure.ac
AC_CANONICAL_TARGET
AM_INIT_AUTOMAKE
+AM_MAINTAINER_MODE
+
AC_CONFIG_HEADERS([rrd_config.h])
dnl all our local stuff like install scripts and include files
#error "Can't compile without isinf function"
#endif
+#if (! defined(HAVE_FDATASYNC) && defined(HAVE_FSYNC))
+#define fdatasync fsync
+#endif
+
+#if (!defined(HAVE_FDATASYNC) && !defined(HAVE_FSYNC))
+#error "Can't compile with without fsync and fdatasync"
+#endif
+
#endif /* RRD_CONFIG_H */
])
dnl Process Special Options
dnl -----------------------------------
-dnl gettext
-GETTEXT_PACKAGE=rrdtool
-AC_SUBST(GETTEXT_PACKAGE)
-AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[Gettext package])
-AM_GLIB_GNU_GETTEXT()
-IT_PROG_INTLTOOL([0.35.0],[no-xml])
-
-AM_MAINTAINER_MODE
-
dnl How the vertical axis label is printed
AC_ARG_VAR(RRDGRAPH_YLEGEND_ANGLE,
[Vertical label angle: -90.0 (default) or 90.0])
dnl Checks for header files.
AC_HEADER_STDC
AC_HEADER_DIRENT
-AC_CHECK_HEADERS(features.h sys/stat.h sys/types.h fcntl.h libintl.h locale.h fp_class.h malloc.h unistd.h ieeefp.h math.h sys/times.h sys/param.h sys/resource.h signal.h float.h stdio.h stdlib.h errno.h string.h ctype.h)
+AC_CHECK_HEADERS(features.h sys/stat.h sys/types.h fcntl.h locale.h fp_class.h malloc.h unistd.h ieeefp.h math.h sys/times.h sys/param.h sys/resource.h signal.h float.h stdio.h stdlib.h errno.h string.h ctype.h)
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_HEADER_TIME
AC_STRUCT_TM
+CONFIGURE_PART(Test Library Functions)
+
dnl Checks for libraries.
AC_CHECK_FUNC(acos, , AC_CHECK_LIB(m, acos))
+
dnl add pic flag in any case this makes sure all our code is relocatable
eval `./libtool --config | grep pic_flag`
CFLAGS="$CFLAGS $pic_flag"
-CONFIGURE_PART(Test Library Functions)
dnl Checks for library functions.
AC_FUNC_STRFTIME
dnl for each function found we get a definition in config.h
dnl of the form HAVE_FUNCTION
-AC_CHECK_FUNCS(tzset mbstowcs opendir readdir chdir chroot getuid setlocale strerror strerror_r snprintf vsnprintf fpclass class fp_class isnan memmove strchr mktime getrusage gettimeofday)
+AC_CHECK_FUNCS(tzset fsync mbstowcs opendir readdir chdir chroot getuid setlocale strerror strerror_r snprintf vsnprintf fpclass class fp_class isnan memmove strchr mktime getrusage gettimeofday)
+
+CONFIGURE_PART(Map/Fadvis/Madvise checking)
+
+dnl Could use these to know if we need to provide a prototype
+dnl AC_CHECK_DECLS(fdatasync, [], [], [#include <unistd.h>])
+
+dnl check for fdatasync. Solaris has fdatasync in the librt
+
+AC_CHECK_FUNCS(fdatasync, [], AC_CHECK_LIB(rt, fdatasync, [LIBS="${LIBS} -lrt"; AC_DEFINE(HAVE_FDATASYNC)],[]))
+dnl if there is no fdatasync we may get lucky with fsync
+AC_CHECK_FUNCS(fsync)
dnl XXX: dunno about windows.. add AC_CHECK_FUNCS(munmap) there too?
#include <fcntl.h>])
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()
+IT_PROG_INTLTOOL([0.35.0],[no-xml])
+
+AC_ARG_ENABLE(libintl,[ --disable-libintl i18n support (libintl)],
+[],[enable_libintl=yes])
+
+if test x$enable_libintl = xyes; then
+
+ AC_CHECK_HEADERS(libintl.h,[],[AC_MSG_RESULT(disabeling libintl build); enable_libintl=no])
+
+ 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
+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])
CONFIGURE_PART(IEEE Math Checks)
[AC_MSG_CHECKING(for fpclassify with <math.h>)
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <math.h>
volatile int x;volatile float f; ]], [[x = fpclassify(f)]])],[AC_MSG_RESULT(yes)
- AC_DEFINE(HAVE_FPCLASSIFY)],[AC_MSG_RESULT(no)])])
+ AC_DEFINE(HAVE_FPCLASSIFY,1)],[AC_MSG_RESULT(no)])])
AC_CHECK_FUNCS(isinf, ,
[AC_MSG_CHECKING(for isinf with <math.h>)
)
AC_LANG_POP(C)
-dnl Could use these to know if we need to provide a prototype
-dnl AC_CHECK_DECLS(fdatasync, [], [], [#include <unistd.h>])
-
-dnl solaris has fdatasync in the librt
-
-AC_CHECK_FUNC(fdatasync, [], AC_CHECK_LIB(rt, fdatasync, [LIBS="${LIBS} -lrt"],[]))
-
-
CONFIGURE_PART(Find 3rd-Party Libraries)
AM_CONDITIONAL(BUILD_RRDCGI,[test $enable_rrdcgi != no])
+
CORE_LIBS="$LIBS"
dnl EX_CHECK_ALL(z, zlibVersion, zlib.h, zlib, 1.2.3, http://www.gzip.org/zlib/, "")
AM_CONDITIONAL(BUILD_TCL, test "$enable_tcl" = "yes" )
AM_CONDITIONAL(BUILD_TCL_SITE, test "$enable_tcl_site" = "yes" )
+
AC_SUBST(TCL_PREFIX)
AC_SUBST(TCL_SHLIB_CFLAGS)
AC_SUBST(TCL_SHLIB_LD)
echo " Build Python Bindings: $enable_python"
echo " Build rrdcgi: $enable_rrdcgi"
echo " Build librrd MT: $enable_pthread"
+echo " Link with libintl: $enable_libintl"
echo
+echo " Libraries: $ALL_LIBS"
echo
echo "Type 'make' to compile the software and use 'make install' to "
echo "install everything to: $prefix."
diff --git a/rrdtool-1.3-release b/rrdtool-1.3-release
index fb1b13d75505b4501ac6701e48c249fae2363d23..6461d4858fd8d6aaa5f7b51de82e3edfe6331ca5 100755 (executable)
--- a/rrdtool-1.3-release
+++ b/rrdtool-1.3-release
PERLVERS=`perl -n -e 'm/NUMVERS=(\d+\.\d+)/ && print $1' configure.ac`
set -x
perl -i -p -e 's/^\$VERSION.+/\$VERSION='$PERLVERS';/' bindings/perl-*/*.pm
-perl -i -p -e 's/RRDtool 1\S+/RRDtool '$VERSION'/ && s/Copyright.+?Oetiker.+\d{4}/Copyright by Tobi Oetiker, 1997-2007/' src/*.h src/*.c
+perl -i -p -e 's/RRDtool 1\S+/RRDtool '$VERSION'/ && s/Copyright.+?Oetiker.+\d{4}/Copyright by Tobi Oetiker, 1997-2008/' src/*.h src/*.c
perl -i -p -e 's/^Version:.+/Version: '$VERSION'/' rrdtool.spec
perl -i -p -e 's/rrdtool-[\.\d]+\d(pre\d+)?(rc\d+)?/rrdtool-'$VERSION'/g' doc/rrdbuild.pod
svn diff
svn commit -m "prepare for the release of rrdtool-$VERSION"
mkdir /tmp/rrdtool-$$
OPWD=`pwd`
-cd /tmp/rrdtool-$$
-svn checkout svn://svn.oetiker.ch/rrdtool/trunk/program .
+cd /tmp
+svn export svn://svn.oetiker.ch/rrdtool/trunk/program rrdtool-$$
+cd rrdtool-$$
svn log --stop-on-copy --xml --verbose svn://svn.oetiker.ch/rrdtool/trunk | \
xsltproc --stringparam strip-prefix trunk/program $OPWD/svn2cl.xsl - >CHANGES
sh MakeMakefile
#PKG_CONFIG_PATH=/usr/pack/rrdtool-1.3svn-to/i686-debian-linux3.1/lib/pkgconfig/
#export PKG_CONFIG_PATH
-./configure
+./configure --enable-maintainer-mode
make dist
# do a test build
tar zxvf rrdtool*.tar.gz
diff --git a/src/Makefile.am b/src/Makefile.am
index 785224e410416402288b2877e27208f27f40f98e..daaacb6bee7d6ac1321bc5fd4b4b8030ec96053f 100644 (file)
--- a/src/Makefile.am
+++ b/src/Makefile.am
endif
librrdupd_la_SOURCES = $(UPD_C_FILES) rrd_not_thread_safe.c
-librrdupd_la_LIBADD = $(CORE_LIBS)
+librrdupd_la_LIBADD = $(CORE_LIBS) @LIB_LIBINTL@
librrd_la_SOURCES = $(RRD_C_FILES)
librrd_la_LIBADD = librrdupd.la $(ALL_LIBS)