# --- T2-COPYRIGHT-BEGIN --- # t2/package/*/samba/samba-waf.in # Copyright (C) 2026 The T2 SDE Project # SPDX-License-Identifier: GPL-2.0 # --- T2-COPYRIGHT-END --- # samba waf: provide cross-answers instead of running target test programs samba_waf_cross_answers() { local nsig=$(printf '#include \n_NSIG\n' | $CC -E -P - | tail -n 1) local lp64=NO lfs=NO nsig=$(($nsig)) [ "$arch_sizeof_char_p" = 8 ] && lp64=OK [ "$arch_sizeof_long" = 8 ] && lfs=OK cat > $builddir/samba-cross-answers.txt <<-EOT Checking uname sysname type: "Linux" Checking uname machine type: "$arch_machine" Checking uname release type: "unknown" Checking uname version type: "unknown" rpath library support: OK -Wl,--version-script support: OK Checking getconf LFS_CFLAGS: (1, "") Checking for large file support without additional flags: $lfs Checking for -D_FILE_OFFSET_BITS=64: OK Checking correct behavior of strtoll: NO Checking for working strptime: OK Checking for C99 vsnprintf: "1" Checking for HAVE_SHARED_MMAP: OK Checking for HAVE_MREMAP: OK Checking for HAVE_INCOHERENT_MMAP: NO Checking for HAVE_SECURE_MKSTEMP: OK Checking for gnutls fips mode support: NO Checking value of NSIG: "$nsig" Checking value of _NSIG: "$nsig" Checking value of SIGRTMAX: "$((nsig - 1))" Checking value of SIGRTMIN: (1, "") Checking for a 64-bit host to support lmdb: $lp64 Checking errno of iconv for illegal multibyte sequence: OK Checking whether POSIX capabilities are available: OK Checking if can we convert from CP850 to UCS-2LE: OK Checking if can we convert from UTF-8 to UCS-2LE: OK vfs_fileid checking for statfs() and struct statfs.f_fsid: OK Checking whether we can use Linux thread-specific credentials: "OK" Checking whether fcntl locking is available: OK Checking whether fcntl lock supports open file description locks: OK Checking whether fcntl supports flags to send direct I/O availability signals: OK Checking whether fcntl supports setting/getting hints: NO Checking for the maximum value of the 'time_t' type: $lp64 Checking whether the realpath function allows a NULL argument: OK Checking for ftruncate extend: OK Checking for readlink breakage: NO getcwd takes a NULL argument: OK checking for clnt_create(): OK Checking whether the WRFILE -keytab is supported: OK EOT } if atstage cross; then var_append confopt ' ' "--cross-compile --cross-answers=$builddir/samba-cross-answers.txt" hook_add preconf 5 samba_waf_cross_answers fi