diff options
Diffstat (limited to 'm4')
-rw-r--r-- | m4/check-os-options.m4 | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/m4/check-os-options.m4 b/m4/check-os-options.m4 index c014efb..644bf71 100644 --- a/m4/check-os-options.m4 +++ b/m4/check-os-options.m4 | |||
@@ -123,10 +123,20 @@ char buf[1]; getentropy(buf, 1); | |||
123 | *) ;; | 123 | *) ;; |
124 | esac | 124 | esac |
125 | 125 | ||
126 | AC_ARG_ENABLE([nc], | 126 | # Check if time_t is sized correctly |
127 | AS_HELP_STRING([--enable-nc], [Enable installing TLS-enabled nc(1)])) | 127 | AC_CHECK_SIZEOF([time_t], [time.h]) |
128 | AM_CONDITIONAL([ENABLE_NC], [test "x$enable_nc" = xyes]) | 128 | AM_CONDITIONAL([SMALL_TIME_T], [test "$ac_cv_sizeof_time_t" = "4"]) |
129 | AM_CONDITIONAL([BUILD_NC], [test x$BUILD_NC = xyes -o "x$enable_nc" = xyes]) | 129 | if test "$ac_cv_sizeof_time_t" = "4"; then |
130 | AC_DEFINE([SMALL_TIME_T]) | ||
131 | echo " ** Warning, this system is unable to represent times past 2038" | ||
132 | echo " ** It will behave incorrectly when handling valid RFC5280 dates" | ||
133 | |||
134 | if test "$host_os" = "mingw32" ; then | ||
135 | echo " **" | ||
136 | echo " ** You can solve this by adjusting the build flags in your" | ||
137 | echo " ** mingw-w64 toolchain. Refer to README.windows for details." | ||
138 | fi | ||
139 | fi | ||
130 | 140 | ||
131 | AM_CONDITIONAL([HOST_AIX], [test x$HOST_OS = xaix]) | 141 | AM_CONDITIONAL([HOST_AIX], [test x$HOST_OS = xaix]) |
132 | AM_CONDITIONAL([HOST_CYGWIN], [test x$HOST_OS = xcygwin]) | 142 | AM_CONDITIONAL([HOST_CYGWIN], [test x$HOST_OS = xcygwin]) |