diff options
author | DongHun Kwak <dh0128.kwak@samsung.com> | 2021-03-03 15:15:05 +0900 |
---|---|---|
committer | DongHun Kwak <dh0128.kwak@samsung.com> | 2021-03-03 15:15:05 +0900 |
commit | 919cec9979a865f8169eaa30e5ff6de8e4fe5565 (patch) | |
tree | 0d8aca1d417e0462dae1a587077a93d6f44386a0 /configure.ac | |
parent | 614a0a207999f413206bf547e3c603ac015554b0 (diff) | |
download | git-upstream/2.4.0.tar.gz git-upstream/2.4.0.tar.bz2 git-upstream/2.4.0.zip |
Imported Upstream version 2.4.0upstream/2.4.0
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 55e5a9b3..bbdde85c 100644 --- a/configure.ac +++ b/configure.ac @@ -1046,6 +1046,29 @@ GIT_CONF_SUBST([NO_INITGROUPS]) # # Define NO_ICONV if your libc does not properly support iconv. +AC_DEFUN([BSD_SYSCTL_SRC], [ +AC_LANG_PROGRAM([[ +#include <stddef.h> +#include <sys/types.h> +#include <sys/sysctl.h> +]],[[ +int val, mib[2]; +size_t len; +mib[0] = CTL_HW; +mib[1] = 1; +len = sizeof(val); +return sysctl(mib, 2, &val, &len, NULL, 0) ? 1 : 0; +]])]) + +# +# Define HAVE_BSD_SYSCTL=YesPlease if a BSD-compatible sysctl function is available. +AC_MSG_CHECKING([for BSD sysctl]) +AC_COMPILE_IFELSE([BSD_SYSCTL_SRC], + [AC_MSG_RESULT([yes]) + HAVE_BSD_SYSCTL=YesPlease], + [AC_MSG_RESULT([no]) + HAVE_BSD_SYSCTL=]) +GIT_CONF_SUBST([HAVE_BSD_SYSCTL]) ## Other checks. # Define USE_PIC if you need the main git objects to be built with -fPIC |