AC_PROG_CXX
AC_LANG([C++])
-AX_COMPILE_CHECK_SIZEOF(time_t)
-AS_IF([test $ac_size -lt 8], [AC_MSG_ERROR([size of time_t is $ac_size, which is not large enough to fix the y2k38 bug])])
-AX_CHECK_SIGN([time_t], [:], [AC_MSG_ERROR([time_t is unsigned, PowerDNS code relies on it being signed])], [
- #include <sys/types.h>
-])
+PDNS_CHECK_TIME_T
PDNS_CHECK_BISON
PDNS_CHECK_FLEX
--- /dev/null
+AC_DEFUN([PDNS_CHECK_TIME_T], [
+AX_COMPILE_CHECK_SIZEOF(time_t)
+AS_IF([test $ac_size -lt 8], [AC_MSG_ERROR([size of time_t is $ac_size, which is not large enough to fix the y2k38 bug])])
+AX_CHECK_SIGN([time_t], [:], [AC_MSG_ERROR([time_t is unsigned, PowerDNS code relies on it being signed])], [
+ #include <sys/types.h>
+])
+])
AC_PROG_CXX
AC_LANG([C++])
-AX_COMPILE_CHECK_SIZEOF(time_t)
-AS_IF([test $ac_size -lt 8], [AC_MSG_ERROR([size of time_t is $ac_size, which is not large enough to fix the y2k38 bug])])
-AX_CHECK_SIGN([time_t], [:], [AC_MSG_ERROR([time_t is unsigned, PowerDNS code relies on it being signed])], [
- #include <sys/types.h>
-])
+PDNS_CHECK_TIME_T
AC_DEFINE([DNSDIST], [1],
[This is dnsdist]
--- /dev/null
+../../../m4/pdns_check_time_t.m4
\ No newline at end of file
AC_PROG_CXX
AC_LANG([C++])
-AX_COMPILE_CHECK_SIZEOF(time_t)
-AS_IF([test $ac_size -lt 8], [AC_MSG_ERROR([size of time_t is $ac_size, which is not large enough to fix the y2k38 bug])])
-AX_CHECK_SIGN([time_t], [:], [AC_MSG_ERROR([time_t is unsigned, PowerDNS code relies on it being signed])], [
- #include <sys/types.h>
-])
+PDNS_CHECK_TIME_T
AC_DEFINE([RECURSOR], [1],
[This is the PowerDNS Recursor]
--- /dev/null
+../../../m4/pdns_check_time_t.m4
\ No newline at end of file