aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorLev Walkin <vlm@lionet.info>2014-02-24 00:57:18 -0800
committerLev Walkin <vlm@lionet.info>2014-02-24 00:57:18 -0800
commitb40ec41655a6f59705df247d71754aa42505485b (patch)
tree1ef842079e2327ac833f91118b9b7f262d8e1175 /configure.ac
parent1550e5c94e03f543d69ee7265e07657f88e9a1d3 (diff)
do not check certain features on non-64 systems
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac11
1 files changed, 11 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 287f023d..bf710e84 100644
--- a/configure.ac
+++ b/configure.ac
@@ -62,6 +62,17 @@ AC_TYPE_SIZE_T
AC_STRUCT_TM
AC_CHECK_TYPE(intmax_t, int64_t)
+dnl Test if we should check features that depend on 64-bitness.
+AC_MSG_CHECKING(size of long is longer than 32 bit)
+AS_VAR_PUSHDEF([WIDE_LONG], [WIDE_LONG])
+AC_TRY_COMPILE([#include "confdefs.h"
+#include <sys/types.h>
+], [switch (0) case 0: case (sizeof ($1) >= 8):;],
+ WIDE_LONG=yes, WIDE_LONG=no)
+AC_MSG_RESULT($WIDE_LONG)
+AM_CONDITIONAL([TEST_64BIT], [test x$WIDE_LONG = xyes])
+AS_VAR_POPDEF([WIDE_LONG])
+
dnl For mingw
AC_SEARCH_LIBS(getopt, iberty)