X-Git-Url: https://git.octo.it/?p=rrdtool.git;a=blobdiff_plain;f=configure.ac;h=49f1281d98bac506cc302f0c4755f4fdd7eb6015;hp=cc033195802179a2722266e7c4b60698e518e319;hb=2ede02bffc36ad8e2aff1b55c548bc780e11b1d2;hpb=0044bc9e909f8bd1b4df28d2d3a8d08047071822 diff --git a/configure.ac b/configure.ac index cc03319..49f1281 100644 --- a/configure.ac +++ b/configure.ac @@ -36,9 +36,12 @@ AC_SUBST(LIBVERS) AC_CANONICAL_TARGET m4_version_prereq(2.60, [AC_USE_SYSTEM_EXTENSIONS], [#]) -AM_INIT_AUTOMAKE(m4_version_prereq(2.63, [silent-rules], [[]])) +AM_INIT_AUTOMAKE AM_MAINTAINER_MODE -m4_version_prereq(2.63, [AM_SILENT_RULES([yes])], [#]) +# Enable silent build rules by default, requires at least +# Automake-1.11. Disable by either passing --disable-silent-rules to +# configure or passing V=1 to make +m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) AC_CONFIG_HEADERS([rrd_config.h]) AC_CONFIG_MACRO_DIR([m4]) @@ -449,6 +452,33 @@ AC_LINK_IFELSE( ) ] ) + +dnl is time_t long or long long ? +AC_DEFINE([TIME_T_IS_LONG], [], [time_t is long]) +AC_DEFINE([TIME_T_IS_LONG_LONG], [], [time_t is long long]) +AC_MSG_CHECKING([the type of time_t]) +AC_RUN_IFELSE( + AC_LANG_PROGRAM( + [[#include ]], + [[if (sizeof(long) != sizeof(time_t)) return 1; ]] + ), + [ AC_MSG_RESULT([time_t is long]) + AC_DEFINE([TIME_T_IS_LONG]) + ], + [ AC_RUN_IFELSE( + AC_LANG_PROGRAM( + [[#include ]], + [[if (sizeof(long long) != sizeof(time_t)) return 1; ]] + ), + [ + AC_MSG_RESULT([time_t is long long]) + AC_DEFINE([TIME_T_IS_LONG_LONG]) + ], + [AC_MSG_ERROR([can not figure type of time_t])] + ) + ] +) + AC_LANG_POP(C) CONFIGURE_PART(Find 3rd-Party Libraries) @@ -513,10 +543,10 @@ AC_ARG_ENABLE(perl,AS_HELP_STRING([--disable-perl],[do not build the perl module [],[enable_perl=yes]) -AC_ARG_VAR(PERLCC, [[] C compiler for Perl modules]) -AC_ARG_VAR(PERLCCFLAGS, [[] CC flags for Perl modules]) -AC_ARG_VAR(PERLLD, [[same as PERLCC] Linker for Perl modules]) -AC_ARG_VAR(PERLLDFLAGS, [[] LD flags for Perl modules]) +AC_ARG_VAR(PERLCC, [C compiler for Perl modules]) +AC_ARG_VAR(PERLCCFLAGS, [CC flags for Perl modules]) +AC_ARG_VAR(PERLLD, [Linker for Perl modules]) +AC_ARG_VAR(PERLLDFLAGS, [LD flags for Perl modules]) if test "x$PERL" = "xno" -o x$enable_perl = xno; then COMP_PERL=