diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index c9d9f767..7b363d6d 100644 --- a/configure.ac +++ b/configure.ac @@ -1362,6 +1362,75 @@ int main(void) ] ) +AC_CACHE_CHECK([for usable PAGESIZE macro], [mhd_cv_macro_pagesize_usable], + [ + AC_LINK_IFELSE( + [ + AC_LANG_PROGRAM( + [[ +#ifdef HAVE_UNISTD_H +#include <unistd.h> +#endif +#ifdef HAVE_LIMITS_H +#include <limits.h> +#endif +#ifdef HAVE_SYS_PARAM_H +#include <sys/param.h> +#endif +#ifndef PAGESIZE +#error No PAGESIZE macro defined +choke me now +#endif + ]], + [[ + long pgsz = PAGESIZE + 0; + if (1 > pgsz) return 1; + ]] + ) + ], + [[mhd_cv_macro_pagesize_usable="yes"]], [[mhd_cv_macro_pagesize_usable="no"]] + ) + ] +) +AS_VAR_IF([[mhd_cv_macro_pagesize_usable]], [["yes"]], + [AC_DEFINE([[MHD_USE_PAGESIZE_MACRO]],[[1]],[Define if you have usable PAGESIZE macro])], + [ + AC_CACHE_CHECK([for usable PAGE_SIZE macro], [mhd_cv_macro_page_size_usable], + [ + AC_LINK_IFELSE( + [ + AC_LANG_PROGRAM( + [[ +#ifdef HAVE_UNISTD_H +#include <unistd.h> +#endif +#ifdef HAVE_LIMITS_H +#include <limits.h> +#endif +#ifdef HAVE_SYS_PARAM_H +#include <sys/param.h> +#endif +#ifndef PAGE_SIZE +#error No PAGE_SIZE macro defined +choke me now +#endif + ]], + [[ + long pgsz = PAGE_SIZE + 0; + if (1 > pgsz) return 1; + ]] + ) + ], + [[mhd_cv_macro_page_size_usable="yes"]], [[mhd_cv_macro_page_size_usable="no"]] + ) + ] + ) + AS_VAR_IF([[mhd_cv_macro_page_size_usable]], [["yes"]], + [AC_DEFINE([[MHD_USE_PAGE_SIZE_MACRO]],[[1]],[Define if you have usable PAGE_SIZE macro])] + ) + ] +) + # Check for inter-thread signaling type AC_ARG_ENABLE([[itc]], [AS_HELP_STRING([[--enable-itc=TYPE]], [use TYPE of inter-thread communication (pipe, socketpair, eventfd) [auto]])], [], |