configure.ac: detect sysinfo
PATCH 1/1 configure.ac: detect sysinfo
This change helps cross-compilation from Linux systems by not assuming the host system has sysinfo(2) because it was built on Linux.
Signed-off-by Jonas 'Sortie' Termansen <[email protected]>
--- Makefile | 4 ++++ config.mak.uname | 2 +- configure.ac | 5 +++++ 3 files changed, 10 insertions(+), 1 deletion(-)
Makefile +4 -0
@@ -2087,6 +2087,10 @@ ifdef HAVE_STRINGS_H BASIC_CFLAGS += -DHAVE_STRINGS_H endif +ifdef HAVE_SYSINFO + BASIC_CFLAGS += -DHAVE_SYSINFO +endif + ifdef HAVE_DEV_TTY BASIC_CFLAGS += -DHAVE_DEV_TTY endif
config.mak.uname +1 -1
@@ -59,7 +59,7 @@ ifeq ($(uname_S),Linux) HAVE_SYNC_FILE_RANGE = YesPlease HAVE_GETDELIM = YesPlease FREAD_READS_DIRECTORIES = UnfortunatelyYes - BASIC_CFLAGS += -DHAVE_SYSINFO + HAVE_SYSINFO = YesPlease PROCFS_EXECUTABLE_PATH = /proc/self/exe HAVE_PLATFORM_PROCINFO = YesPlease COMPAT_OBJS += compat/linux/procinfo.o
configure.ac +5 -0
@@ -1164,6 +1164,11 @@ GIT_CHECK_FUNC(getdelim, [HAVE_GETDELIM=YesPlease], [HAVE_GETDELIM=]) GIT_CONF_SUBST([HAVE_GETDELIM]) +# Define HAVE_SYSINFO if you have sysinfo in the C library. +GIT_CHECK_FUNC(sysinfo, +[HAVE_SYSINFO=YesPlease], +[HAVE_SYSINFO=]) +GIT_CONF_SUBST([HAVE_SYSINFO]) # # # Define NO_MMAP if you want to avoid mmap.
Signature · 1 line
2.45.2