X-Git-Url: https://git.octo.it/?p=rrdtool.git;a=blobdiff_plain;f=configure.ac;h=0a68ceb69a7dd1408ec490c059f545e796f78014;hp=a5c9eaa3e2607e3649f317a17ad37557aae4e2ef;hb=765772ba1d71e8581f9e65c8c3579997bba5890e;hpb=4f00d9538b60caaa7990e5474227736d8a7795d3 diff --git a/configure.ac b/configure.ac index a5c9eaa..0a68ceb 100644 --- a/configure.ac +++ b/configure.ac @@ -499,27 +499,16 @@ dnl is time_t 32 of 64 bit ? AC_DEFINE([TIME_T_IS_32BIT], [], [time_t is 32bit]) AC_DEFINE([TIME_T_IS_64BIT], [], [time_t is 64bit]) AC_MSG_CHECKING([the type of time_t]) -AC_RUN_IFELSE( - AC_LANG_PROGRAM( - [[#include ]], - [[if (sizeof(time_t) != 4) return 1; ]] - ), - [ AC_MSG_RESULT([time_t is 32 bit]) - AC_DEFINE([TIME_T_IS_32BIT]) - ], - [ AC_RUN_IFELSE( - AC_LANG_PROGRAM( - [[#include ]], - [[if (sizeof(time_t) != 8) return 1; ]] - ), - [ - AC_MSG_RESULT([time_t is 64 bit]) - AC_DEFINE([TIME_T_IS_64BIT]) - ], - [AC_MSG_ERROR([can not figure type of time_t])] - ) - ] -) +AC_CHECK_SIZEOF([time_t]) +if test "x$ac_cv_sizeof_time_t" = "x4"; then + AC_MSG_RESULT([time_t is 32 bit]) + AC_DEFINE([TIME_T_IS_32BIT]) +elif test "x$ac_cv_sizeof_time_t" = "x8"; then + AC_MSG_RESULT([time_t is 64 bit]) + AC_DEFINE([TIME_T_IS_64BIT]) +else + AC_MSG_ERROR([can not figure type of time_t]) +fi AC_LANG_POP(C) @@ -915,8 +904,16 @@ fi AC_SUBST(COMP_PYTHON) dnl Check for nroff -AC_PATH_PROGS(NROFF, gnroff nroff) -AC_PATH_PROGS(TROFF, groff troff) +AC_ARG_VAR(NROFF, [path to the local nroff version]) +AC_PATH_PROGS(NROFF, [gnroff nroff]) +if test x$NROFF = x; then + AC_MSG_ERROR([I need a copy of *nroff to format the documentation]) +fi +AC_ARG_VAR(TROFF, [path to the local troff version]) +AC_PATH_PROGS(TROFF, [groff troff]) +if test x$TROFF = x; then + AC_MSG_ERROR([I need a copy of *troff to format the documentation]) +fi AC_ARG_VAR(RRDDOCDIR, [[DATADIR/doc/PACKAGE-VERSION] Documentation directory]) if test -z "$RRDDOCDIR"; then