mirror of
https://github.com/NixOS/nix
synced 2025-07-08 11:03:54 +02:00
configure.ac: remove another uname check
uname checks are not cross-safe.
The normalization for Cygwin doesn't need any equivalent for host_os
because nothing actually checked whether sys_name was cygwin any more.
(cherry picked from commit cff8fd69b6
)
This commit is contained in:
parent
015ca6a7a5
commit
bb98526123
1 changed files with 22 additions and 25 deletions
47
configure.ac
47
configure.ac
|
@ -33,14 +33,6 @@ AC_ARG_WITH(system, AC_HELP_STRING([--with-system=SYSTEM],
|
||||||
system="$machine_name-`echo $host_os | "$SED" -e's/@<:@0-9.@:>@*$//g'`";;
|
system="$machine_name-`echo $host_os | "$SED" -e's/@<:@0-9.@:>@*$//g'`";;
|
||||||
esac])
|
esac])
|
||||||
|
|
||||||
sys_name=$(uname -s | tr 'A-Z ' 'a-z_')
|
|
||||||
|
|
||||||
case $sys_name in
|
|
||||||
cygwin*)
|
|
||||||
sys_name=cygwin
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
AC_MSG_RESULT($system)
|
AC_MSG_RESULT($system)
|
||||||
AC_SUBST(system)
|
AC_SUBST(system)
|
||||||
AC_DEFINE_UNQUOTED(SYSTEM, ["$system"], [platform identifier ('cpu-os')])
|
AC_DEFINE_UNQUOTED(SYSTEM, ["$system"], [platform identifier ('cpu-os')])
|
||||||
|
@ -67,10 +59,12 @@ AC_SYS_LARGEFILE
|
||||||
|
|
||||||
# Solaris-specific stuff.
|
# Solaris-specific stuff.
|
||||||
AC_STRUCT_DIRENT_D_TYPE
|
AC_STRUCT_DIRENT_D_TYPE
|
||||||
if test "$sys_name" = sunos; then
|
case "$host_os" in
|
||||||
|
solaris*)
|
||||||
# Solaris requires -lsocket -lnsl for network functions
|
# Solaris requires -lsocket -lnsl for network functions
|
||||||
LDFLAGS="-lsocket -lnsl $LDFLAGS"
|
LDFLAGS="-lsocket -lnsl $LDFLAGS"
|
||||||
fi
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
|
||||||
# Check for pubsetbuf.
|
# Check for pubsetbuf.
|
||||||
|
@ -231,22 +225,25 @@ PKG_CHECK_MODULES([LIBBROTLI], [libbrotlienc libbrotlidec], [CXXFLAGS="$LIBBROTL
|
||||||
|
|
||||||
|
|
||||||
# Look for libseccomp, required for Linux sandboxing.
|
# Look for libseccomp, required for Linux sandboxing.
|
||||||
if test "$sys_name" = linux; then
|
case "$host_os" in
|
||||||
AC_ARG_ENABLE([seccomp-sandboxing],
|
linux*)
|
||||||
AC_HELP_STRING([--disable-seccomp-sandboxing],
|
AC_ARG_ENABLE([seccomp-sandboxing],
|
||||||
[Don't build support for seccomp sandboxing (only recommended if your arch doesn't support libseccomp yet!)]
|
AC_HELP_STRING([--disable-seccomp-sandboxing],
|
||||||
))
|
[Don't build support for seccomp sandboxing (only recommended if your arch doesn't support libseccomp yet!)]
|
||||||
if test "x$enable_seccomp_sandboxing" != "xno"; then
|
))
|
||||||
PKG_CHECK_MODULES([LIBSECCOMP], [libseccomp],
|
if test "x$enable_seccomp_sandboxing" != "xno"; then
|
||||||
[CXXFLAGS="$LIBSECCOMP_CFLAGS $CXXFLAGS"])
|
PKG_CHECK_MODULES([LIBSECCOMP], [libseccomp],
|
||||||
have_seccomp=1
|
[CXXFLAGS="$LIBSECCOMP_CFLAGS $CXXFLAGS"])
|
||||||
AC_DEFINE([HAVE_SECCOMP], [1], [Whether seccomp is available and should be used for sandboxing.])
|
have_seccomp=1
|
||||||
else
|
AC_DEFINE([HAVE_SECCOMP], [1], [Whether seccomp is available and should be used for sandboxing.])
|
||||||
|
else
|
||||||
|
have_seccomp=
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
*)
|
||||||
have_seccomp=
|
have_seccomp=
|
||||||
fi
|
;;
|
||||||
else
|
esac
|
||||||
have_seccomp=
|
|
||||||
fi
|
|
||||||
AC_SUBST(HAVE_SECCOMP, [$have_seccomp])
|
AC_SUBST(HAVE_SECCOMP, [$have_seccomp])
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue