diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 721edb015e..eeedfedd23 100644 --- a/configure.ac +++ b/configure.ac @@ -5443,6 +5443,30 @@ if test "$have_getrandom" = yes; then [Define to 1 if the getrandom() function is available]) fi +# checks for POSIX shared memory, used by Modules/_multiprocessing/posixshmem.c +# shm_* may only be available if linking against librt +save_LIBS="$LIBS" +save_includes_default="$ac_includes_default" +AC_SEARCH_LIBS(shm_open, rt) +if test "$ac_cv_search_shm_open" = "-lrt"; then + AC_DEFINE(SHM_NEEDS_LIBRT, 1, + [Define to 1 if you must link with -lrt for shm_open().]) +fi +AC_CHECK_HEADERS(sys/mman.h) +# temporarily override ac_includes_default for AC_CHECK_FUNCS below +ac_includes_default="\ +${ac_includes_default} +#ifndef __cplusplus +# ifdef HAVE_SYS_MMAN_H +# include <sys/mman.h> +# endif +#endif +" +AC_CHECK_FUNCS([shm_open shm_unlink]) +# we don't want to link with librt always, restore LIBS +LIBS="$save_LIBS" +ac_includes_default="$save_includes_default" + # Check for usable OpenSSL AX_CHECK_OPENSSL([have_openssl=yes],[have_openssl=no]) |