replae with pointer
[rrdtool.git] / configure.ac
index cc03319..49f1281 100644 (file)
@@ -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 <time.h>]],
+        [[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 <time.h>]],
+        [[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=