summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5f4d497)
raw | patch | inline | side by side (parent: 5f4d497)
author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Thu, 23 Jun 2011 05:45:36 +0000 (05:45 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Thu, 23 Jun 2011 05:45:36 +0000 (05:45 +0000) |
git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.4/program@2186 a5681a0c-68f1-0310-ab6d-d61299d08faa
configure.ac | patch | blob | history |
diff --git a/configure.ac b/configure.ac
index 12f6ece0a3c49ef06b204d5f1132abc13682f024..29c427bb406fafd17d0a8c446dada3b97beaa143 100644 (file)
--- a/configure.ac
+++ b/configure.ac
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 <time.h>]],
- [[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 <time.h>]],
- [[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)