1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
|
# Specify 'allow-without' to allow --without-perl to be used
# TODO: Upstream
--- configure.ac.orig 2025-06-16 05:42:57 UTC
+++ configure.ac
@@ -396,7 +396,7 @@ GIT_ARG_SET_PATH(shell)
GIT_ARG_SET_PATH(shell)
#
# Define PERL_PATH to provide path to Perl.
-GIT_ARG_SET_PATH(perl)
+GIT_ARG_SET_PATH(perl, allow-without)
#
# Define PYTHON_PATH to provide path to Python.
GIT_ARG_SET_PATH(python, allow-without)
@@ -1068,32 +1068,6 @@ GIT_CONF_SUBST([CHARSET_LIB])
GIT_CONF_SUBST([CHARSET_LIB])
#
-# Define HAVE_SYSINFO=YesPlease if sysinfo is available.
-#
-AC_DEFUN([HAVE_SYSINFO_SRC], [
-AC_LANG_PROGRAM([[
-#include <stdint.h>
-#include <sys/sysinfo.h>
-]], [[
-struct sysinfo si;
-uint64_t t = 0;
-if (!sysinfo(&si)) {
- t = si.totalram;
- if (si.mem_unit > 1)
- t *= (uint64_t)si.mem_unit;
-}
-return t;
-]])])
-
-AC_MSG_CHECKING([for sysinfo])
-AC_COMPILE_IFELSE([HAVE_SYSINFO_SRC],
- [AC_MSG_RESULT([yes])
- HAVE_SYSINFO=YesPlease],
- [AC_MSG_RESULT([no])
- HAVE_SYSINFO=])
-GIT_CONF_SUBST([HAVE_SYSINFO])
-
-#
# Define HAVE_CLOCK_GETTIME=YesPlease if clock_gettime is available.
GIT_CHECK_FUNC(clock_gettime,
[HAVE_CLOCK_GETTIME=YesPlease],
@@ -1220,6 +1194,41 @@ GIT_CONF_SUBST([HAVE_BSD_SYSCTL])
[AC_MSG_RESULT([no])
HAVE_BSD_SYSCTL=])
GIT_CONF_SUBST([HAVE_BSD_SYSCTL])
+
+#
+# Define HAVE_SYSINFO=YesPlease if sysinfo is available.
+#
+
+HAVE_SYSINFO=
+# on a *BSD system, sysctl() takes precedence over the
+# sysinfo() compatibility library (if installed).
+
+if test -z "$HAVE_BSD_SYSCTL"; then
+
+ AC_DEFUN([HAVE_SYSINFO_SRC], [
+ AC_LANG_PROGRAM([[
+ #include <stdint.h>
+ #include <sys/sysinfo.h>
+ ]], [[
+ struct sysinfo si;
+ uint64_t t = 0;
+ if (!sysinfo(&si)) {
+ t = si.totalram;
+ if (si.mem_unit > 1)
+ t *= (uint64_t)si.mem_unit;
+ }
+ return t;
+ ]])])
+
+ AC_MSG_CHECKING([for sysinfo])
+ AC_COMPILE_IFELSE([HAVE_SYSINFO_SRC],
+ [AC_MSG_RESULT([yes])
+ HAVE_SYSINFO=YesPlease],
+ [AC_MSG_RESULT([no])
+ HAVE_SYSINFO=])
+ GIT_CONF_SUBST([HAVE_SYSINFO])
+
+fi
## Other checks.
# Define NO_SYMLINK_HEAD if you never want .git/HEAD to be a symbolic link.
|