diff options
Diffstat (limited to 'configure.ac')
| -rw-r--r-- | configure.ac | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 8394997..5f99d95 100644 --- a/configure.ac +++ b/configure.ac | |||
| @@ -56,7 +56,7 @@ AC_TYPE_UINT32_T | |||
| 56 | AC_TYPE_UINT8_T | 56 | AC_TYPE_UINT8_T |
| 57 | 57 | ||
| 58 | # Checks for library functions. | 58 | # Checks for library functions. |
| 59 | AC_CHECK_FUNCS([asprintf strcasecmp strdup strerror strndup stpcpy vasprintf]) | 59 | AC_CHECK_FUNCS([asprintf strcasecmp strdup strerror strndup stpcpy vasprintf gmtime_r localtime_r timegm]) |
| 60 | 60 | ||
| 61 | # Checking endianness | 61 | # Checking endianness |
| 62 | AC_C_BIGENDIAN([AC_DEFINE([__BIG_ENDIAN__], [1], [big endian])], | 62 | AC_C_BIGENDIAN([AC_DEFINE([__BIG_ENDIAN__], [1], [big endian])], |
| @@ -78,6 +78,32 @@ case ${host_os} in | |||
| 78 | esac | 78 | esac |
| 79 | AM_CONDITIONAL(WIN32, test x$win32 = xtrue) | 79 | AM_CONDITIONAL(WIN32, test x$win32 = xtrue) |
| 80 | 80 | ||
| 81 | # Check if struct tm has a tm_gmtoff member | ||
| 82 | AC_CACHE_CHECK(for tm_gmtoff in struct tm, ac_cv_struct_tm_gmtoff, | ||
| 83 | AC_TRY_COMPILE([ | ||
| 84 | #include <time.h> | ||
| 85 | ], [ | ||
| 86 | struct tm tm; | ||
| 87 | tm.tm_gmtoff = 1; | ||
| 88 | ], ac_cv_struct_tm_gmtoff=yes, ac_cv_struct_tm_gmtoff=no)) | ||
| 89 | |||
| 90 | if (test "$ac_cv_struct_tm_gmtoff" = "yes"); then | ||
| 91 | AC_DEFINE(HAVE_TM_TM_GMTOFF, 1, [Define if struct tm has a tm_gmtoff member]) | ||
| 92 | fi | ||
| 93 | |||
| 94 | # Check if struct tm has a tm_zone member | ||
| 95 | AC_CACHE_CHECK(for tm_zone in struct tm, ac_cv_struct_tm_zone, | ||
| 96 | AC_TRY_COMPILE([ | ||
| 97 | #include <time.h> | ||
| 98 | ], [ | ||
| 99 | struct tm tm; | ||
| 100 | tm.tm_zone = 1; | ||
| 101 | ], ac_cv_struct_tm_zone=yes, ac_cv_struct_tm_zone=no)) | ||
| 102 | |||
| 103 | if (test "$ac_cv_struct_tm_zone" = "yes"); then | ||
| 104 | AC_DEFINE(HAVE_TM_TM_ZONE, 1, [Define if struct tm has a tm_zone member]) | ||
| 105 | fi | ||
| 106 | |||
| 81 | # Cython Python Bindings | 107 | # Cython Python Bindings |
| 82 | AC_ARG_WITH([cython], | 108 | AC_ARG_WITH([cython], |
| 83 | [AS_HELP_STRING([--without-cython], | 109 | [AS_HELP_STRING([--without-cython], |
