mirror of
https://github.com/zeromq/libzmq.git
synced 2024-12-26 23:01:04 +08:00
Merge pull request #4309 from dgloe-hpe/3313-fork-detection
Problem: Fix fork detection on gcc 7
This commit is contained in:
commit
5a9c174dab
@ -5,9 +5,11 @@ that grants permission to relicense its copyrights in the libzmq C++
|
||||
library (ZeroMQ) under the Mozilla Public License v2 (MPLv2).
|
||||
|
||||
A portion of the commits made by the Github handle "brc859844", with
|
||||
commit author "Brett Cameron <Brett.Cameron@hp.com>", are copyright of Hewlett Packard Enterprise.
|
||||
commit author "Brett Cameron <Brett.Cameron@hp.com>", and the commits made
|
||||
by the Github handle "dgloe-hpe", with commit author
|
||||
"David Gloe <david.gloe@hpe.com>", are copyright of Hewlett Packard Enterprise.
|
||||
This document hereby grants the libzmq project team to relicense libzmq,
|
||||
including all past, present and future contributions of the author listed above.
|
||||
including all past, present and future contributions of the authors listed above.
|
||||
|
||||
Hewlett Packard Enterprise
|
||||
2019/03/12
|
||||
|
19
configure.ac
19
configure.ac
@ -795,9 +795,24 @@ AC_LANG_POP([C++])
|
||||
|
||||
# Checks for library functions.
|
||||
AC_TYPE_SIGNAL
|
||||
AC_CHECK_FUNCS(perror gettimeofday clock_gettime memset socket getifaddrs freeifaddrs fork mkdtemp accept4)
|
||||
AC_CHECK_FUNCS(perror gettimeofday clock_gettime memset socket getifaddrs freeifaddrs mkdtemp accept4)
|
||||
AC_CHECK_HEADERS([alloca.h])
|
||||
|
||||
# AC_CHECK_FUNCS(fork) fails on gcc 7
|
||||
AC_MSG_CHECKING([whether fork is available])
|
||||
AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM(
|
||||
[[#include <unistd.h>]],
|
||||
[[return fork();]])
|
||||
],[
|
||||
AC_MSG_RESULT([yes])
|
||||
AC_DEFINE(HAVE_FORK, [1], [fork is available])
|
||||
AM_CONDITIONAL(HAVE_FORK, true)
|
||||
],[
|
||||
AC_MSG_RESULT([no])
|
||||
AM_CONDITIONAL(HAVE_FORK, false)
|
||||
])
|
||||
|
||||
# string.h doesn't seem to be included by default in Fedora 30
|
||||
AC_MSG_CHECKING([whether strnlen is available])
|
||||
AC_COMPILE_IFELSE(
|
||||
@ -995,8 +1010,6 @@ LIBZMQ_CHECK_GETRANDOM([
|
||||
[Whether getrandom is supported.])
|
||||
])
|
||||
|
||||
AM_CONDITIONAL(HAVE_FORK, test "x$ac_cv_func_fork" = "xyes")
|
||||
|
||||
if test "x$cross_compiling" = "xyes"; then
|
||||
# Enable draft by default when cross-compiling
|
||||
defaultval=yes
|
||||
|
Loading…
x
Reference in New Issue
Block a user