summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2024-04-29 15:30:39 -0400
committerTavian Barnes <tavianator@tavianator.com>2024-04-29 16:25:46 -0400
commit37caa3d71fd8bb4d0d9204e4a2f5cac234fa25fd (patch)
treeaf4dd493b89a17dfdce2957dac90f068decf1667 /config
parentb8ed989642b9f0f6c1301bcff6f1498935cbd81c (diff)
build: Replace `make config` with a `./configure` script
This lets us do more traditional out-of-tree builds like $ ../path/to/bfs/configure $ make The .mk files are moved from ./config to ./build, mostly so that ./configure will auto-complete easily.
Diffstat (limited to 'config')
-rwxr-xr-xconfig/cc.sh16
-rw-r--r--config/config.mk63
-rwxr-xr-xconfig/define-if.sh20
-rw-r--r--config/deps.mk18
-rw-r--r--config/empty.c6
-rw-r--r--config/exports.mk20
-rw-r--r--config/flags.mk136
-rw-r--r--config/has/acl-get-entry.c8
-rw-r--r--config/has/acl-get-file.c8
-rw-r--r--config/has/acl-get-tag-type.c10
-rw-r--r--config/has/acl-is-trivial-np.c12
-rw-r--r--config/has/acl-trivial.c8
-rw-r--r--config/has/aligned-alloc.c8
-rw-r--r--config/has/confstr.c9
-rw-r--r--config/has/extattr-get-file.c10
-rw-r--r--config/has/extattr-get-link.c10
-rw-r--r--config/has/extattr-list-file.c10
-rw-r--r--config/has/extattr-list-link.c10
-rw-r--r--config/has/fdclosedir.c8
-rw-r--r--config/has/getdents.c10
-rw-r--r--config/has/getdents64-syscall.c12
-rw-r--r--config/has/getdents64.c10
-rw-r--r--config/has/getprogname-gnu.c9
-rw-r--r--config/has/getprogname.c9
-rw-r--r--config/has/max-align-t.c8
-rw-r--r--config/has/pipe2.c10
-rw-r--r--config/has/posix-spawn-addfchdir-np.c11
-rw-r--r--config/has/posix-spawn-addfchdir.c11
-rw-r--r--config/has/st-acmtim.c12
-rw-r--r--config/has/st-acmtimespec.c12
-rw-r--r--config/has/st-birthtim.c9
-rw-r--r--config/has/st-birthtimespec.c9
-rw-r--r--config/has/st-flags.c9
-rw-r--r--config/has/statx-syscall.c13
-rw-r--r--config/has/statx.c11
-rw-r--r--config/has/strerror-l.c11
-rw-r--r--config/has/strerror-r-gnu.c11
-rw-r--r--config/has/strerror-r-posix.c11
-rw-r--r--config/has/tm-gmtoff.c9
-rw-r--r--config/has/uselocale.c9
-rw-r--r--config/header.mk69
-rwxr-xr-xconfig/pkgconf.sh100
-rw-r--r--config/pkgs.mk36
-rw-r--r--config/prelude.mk162
-rw-r--r--config/use/libacl.c9
-rw-r--r--config/use/libcap.c9
-rw-r--r--config/use/libselinux.c9
-rw-r--r--config/use/liburing.c9
-rw-r--r--config/use/oniguruma.c9
49 files changed, 0 insertions, 1018 deletions
diff --git a/config/cc.sh b/config/cc.sh
deleted file mode 100755
index 45d51ca..0000000
--- a/config/cc.sh
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/sh
-
-# Copyright © Tavian Barnes <tavianator@tavianator.com>
-# SPDX-License-Identifier: 0BSD
-
-# Run the compiler and check if it succeeded
-
-set -eu
-
-TMP=$(mktemp)
-trap 'rm -f "$TMP"' EXIT
-
-(
- set -x
- $XCC $XCPPFLAGS $XCFLAGS $XLDFLAGS "$@" $XLDLIBS -o "$TMP"
-)
diff --git a/config/config.mk b/config/config.mk
deleted file mode 100644
index 280c6ac..0000000
--- a/config/config.mk
+++ /dev/null
@@ -1,63 +0,0 @@
-# Copyright © Tavian Barnes <tavianator@tavianator.com>
-# SPDX-License-Identifier: 0BSD
-
-# Makefile fragment that implements `make config`
-
-include config/prelude.mk
-include config/exports.mk
-
-# All configuration steps
-config: ${CONFIG} ${GEN}/config.h
-.PHONY: config
-
-# Makefile fragments generated by `make config`
-MKS := \
- ${GEN}/vars.mk \
- ${GEN}/flags.mk \
- ${GEN}/deps.mk \
- ${GEN}/pkgs.mk
-
-# The main configuration file, which includes the others
-${CONFIG}: ${MKS}
- ${MSG} "[ GEN] ${TGT}"
- @printf '# %s\n' "${TGT}" >$@
- @printf 'include $${GEN}/%s\n' ${MKS:${GEN}/%=%} >>$@
- ${VCAT} ${CONFIG}
-.PHONY: ${CONFIG}
-
-# Saves the configurable variables
-${GEN}/vars.mk::
- @${MKDIR} ${@D}
- ${MSG} "[ GEN] ${TGT}"
- @printf '# %s\n' "${TGT}" >$@
- @printf 'PREFIX := %s\n' "$$XPREFIX" >>$@
- @printf 'MANDIR := %s\n' "$$XMANDIR" >>$@
- @printf 'OS := %s\n' "$${OS:-$$(uname)}" >>$@
- @printf 'CC := %s\n' "$$XCC" >>$@
- @printf 'INSTALL := %s\n' "$$XINSTALL" >>$@
- @printf 'MKDIR := %s\n' "$$XMKDIR" >>$@
- @printf 'PKG_CONFIG := %s\n' "$$XPKG_CONFIG" >>$@
- @printf 'RM := %s\n' "$$XRM" >>$@
- @printf 'PKGS :=\n' >>$@
- ${VCAT} $@
-
-# Sets the build flags. This depends on vars.mk and uses a recursive make so
-# that the default flags can depend on variables like ${OS}.
-${GEN}/flags.mk: ${GEN}/vars.mk
- @+${MAKE} -sf config/flags.mk $@
-.PHONY: ${GEN}/flags.mk
-
-# Check for dependency generation support
-${GEN}/deps.mk: ${GEN}/flags.mk
- @+${MAKE} -sf config/deps.mk $@
-.PHONY: ${GEN}/deps.mk
-
-# Auto-detect dependencies and their build flags
-${GEN}/pkgs.mk: ${GEN}/flags.mk
- @+${MAKE} -sf config/pkgs.mk $@
-.PHONY: ${GEN}/pkgs.mk
-
-# Compile-time feature detection
-${GEN}/config.h: ${CONFIG}
- @+${MAKE} -sf config/header.mk $@
-.PHONY: ${GEN}/config.h
diff --git a/config/define-if.sh b/config/define-if.sh
deleted file mode 100755
index 059c1ac..0000000
--- a/config/define-if.sh
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/sh
-
-# Copyright © Tavian Barnes <tavianator@tavianator.com>
-# SPDX-License-Identifier: 0BSD
-
-# Output a C preprocessor definition based on whether a command succeeds
-
-set -eu
-
-SLUG="${1#config/}"
-SLUG="${SLUG%.c}"
-MACRO="BFS_$(printf '%s' "$SLUG" | tr '/a-z-' '_A-Z_')"
-shift
-
-if "$@"; then
- printf '#define %s true\n' "$MACRO"
-else
- printf '#define %s false\n' "$MACRO"
- exit 1
-fi
diff --git a/config/deps.mk b/config/deps.mk
deleted file mode 100644
index ac394a5..0000000
--- a/config/deps.mk
+++ /dev/null
@@ -1,18 +0,0 @@
-# Copyright © Tavian Barnes <tavianator@tavianator.com>
-# SPDX-License-Identifier: 0BSD
-
-# Makefile that generates gen/deps.mk
-
-include config/prelude.mk
-include ${GEN}/vars.mk
-include ${GEN}/flags.mk
-include config/exports.mk
-
-${GEN}/deps.mk::
- ${MSG} "[ GEN] ${TGT}"
- printf '# %s\n' "${TGT}" >$@
- if config/cc.sh -MD -MP -MF /dev/null config/empty.c; then \
- printf 'DEPFLAGS = -MD -MP\n'; \
- fi >>$@ 2>$@.log
- ${VCAT} $@
- printf -- '-include %s\n' ${OBJS:.o=.d} >>$@
diff --git a/config/empty.c b/config/empty.c
deleted file mode 100644
index 4fa9a5b..0000000
--- a/config/empty.c
+++ /dev/null
@@ -1,6 +0,0 @@
-// Copyright © Tavian Barnes <tavianator@tavianator.com>
-// SPDX-License-Identifier: 0BSD
-
-int main(void) {
- return 0;
-}
diff --git a/config/exports.mk b/config/exports.mk
deleted file mode 100644
index ed19134..0000000
--- a/config/exports.mk
+++ /dev/null
@@ -1,20 +0,0 @@
-# Copyright © Tavian Barnes <tavianator@tavianator.com>
-# SPDX-License-Identifier: 0BSD
-
-# Makefile fragment that exports variables used by configuration scripts
-
-export XPREFIX=${PREFIX}
-export XMANDIR=${MANDIR}
-
-export XCC=${CC}
-export XINSTALL=${INSTALL}
-export XMKDIR=${MKDIR}
-export XPKG_CONFIG=${PKG_CONFIG}
-export XRM=${RM}
-
-export XCPPFLAGS=${CPPFLAGS}
-export XCFLAGS=${CFLAGS}
-export XLDFLAGS=${LDFLAGS}
-export XLDLIBS=${LDLIBS}
-
-export XNOLIBS=${NOLIBS}
diff --git a/config/flags.mk b/config/flags.mk
deleted file mode 100644
index 837c30f..0000000
--- a/config/flags.mk
+++ /dev/null
@@ -1,136 +0,0 @@
-# Copyright © Tavian Barnes <tavianator@tavianator.com>
-# SPDX-License-Identifier: 0BSD
-
-# Makefile that generates gen/flags.mk
-
-include config/prelude.mk
-include ${GEN}/vars.mk
-
-# Configurable flags
-CPPFLAGS ?=
-CFLAGS ?= \
- -g \
- -Wall \
- -Wformat=2 \
- -Werror=implicit \
- -Wimplicit-fallthrough \
- -Wmissing-declarations \
- -Wshadow \
- -Wsign-compare \
- -Wstrict-prototypes
-LDFLAGS ?=
-LDLIBS ?=
-
-export XCPPFLAGS=${CPPFLAGS}
-export XCFLAGS=${CFLAGS}
-export XLDFLAGS=${LDFLAGS}
-export XLDLIBS=${LDLIBS}
-
-# Immutable flags
-export BFS_CPPFLAGS= \
- -Isrc \
- -I${GEN} \
- -D__EXTENSIONS__ \
- -D_ATFILE_SOURCE \
- -D_BSD_SOURCE \
- -D_DARWIN_C_SOURCE \
- -D_DEFAULT_SOURCE \
- -D_GNU_SOURCE \
- -D_POSIX_PTHREAD_SEMANTICS \
- -D_FILE_OFFSET_BITS=64 \
- -D_TIME_BITS=64
-export BFS_CFLAGS= -std=c17 -pthread
-
-# Platform-specific system libraries
-LDLIBS,DragonFly := -lposix1e
-LDLIBS,Linux := -lrt
-LDLIBS,NetBSD := -lutil
-LDLIBS,SunOS := -lsec -lsocket -lnsl
-export BFS_LDLIBS=${LDLIBS,${OS}}
-
-# Build profiles
-_ASAN := ${TRUTHY,${ASAN}}
-_LSAN := ${TRUTHY,${LSAN}}
-_MSAN := ${TRUTHY,${MSAN}}
-_TSAN := ${TRUTHY,${TSAN}}
-_UBSAN := ${TRUTHY,${UBSAN}}
-_GCOV := ${TRUTHY,${GCOV}}
-_LINT := ${TRUTHY,${LINT}}
-_RELEASE := ${TRUTHY,${RELEASE}}
-
-# https://github.com/google/sanitizers/issues/342
-TSAN_CPPFLAGS,y := -DBFS_USE_TARGET_CLONES=0
-export TSAN_CPPFLAGS=${TSAN_CPPFLAGS,${_TSAN}}
-
-ASAN_CFLAGS,y := -fsanitize=address
-LSAN_CFLAGS,y := -fsanitize=leak
-MSAN_CFLAGS,y := -fsanitize=memory -fsanitize-memory-track-origins
-TSAN_CFLAGS,y := -fsanitize=thread
-UBSAN_CFLAGS.y := -fsanitize=undefined
-
-export ASAN_CFLAGS=${ASAN_CFLAGS,${_ASAN}}
-export LSAN_CFLAGS=${LSAN_CFLAGS,${_LSAN}}
-export MSAN_CFLAGS=${MSAN_CFLAGS,${_MSAN}}
-export TSAN_CFLAGS=${TSAN_CFLAGS,${_TSAN}}
-export UBSAN_CFLAGS=${UBSAN_CFLAGS,${_UBSAN}}
-
-SAN_CFLAGS,y := -fno-sanitize-recover=all
-INSANE := ${NOT,${_ASAN}${_LSAN}${_MSAN}${_TSAN}${_UBSAN}}
-SAN := ${NOT,${INSANE}}
-export SAN_CFLAGS=${SAN_CFLAGS,${SAN}}
-
-# MSAN and TSAN both need all code to be instrumented
-YESLIBS := ${NOT,${_MSAN}${_TSAN}}
-NOLIBS ?= ${NOT,${YESLIBS}}
-export XNOLIBS=${NOLIBS}
-
-# gcov only intercepts fork()/exec() with -std=gnu*
-GCOV_CFLAGS,y := -std=gnu17 --coverage
-export GCOV_CFLAGS=${GCOV_CFLAGS,${_GCOV}}
-
-LINT_CPPFLAGS,y := -D_FORTIFY_SOURCE=3 -DBFS_LINT
-LINT_CFLAGS,y := -Werror -O2
-
-export LINT_CPPFLAGS=${LINT_CPPFLAGS,${_LINT}}
-export LINT_CFLAGS=${LINT_CFLAGS,${_LINT}}
-
-RELEASE_CPPFLAGS,y := -DNDEBUG
-RELEASE_CFLAGS,y := -O3 -flto=auto
-
-export RELEASE_CPPFLAGS=${RELEASE_CPPFLAGS,${_RELEASE}}
-export RELEASE_CFLAGS=${RELEASE_CFLAGS,${_RELEASE}}
-
-# Set a variable
-SETVAR = printf '%s := %s\n' >>$@
-
-# Append to a variable, if non-empty
-APPEND = append() { test -z "$$2" || printf '%s += %s\n' "$$1" "$$2" >>$@; }; append
-
-${GEN}/flags.mk::
- ${MSG} "[ GEN] ${TGT}"
- printf '# %s\n' "${TGT}" >$@
- ${SETVAR} CPPFLAGS "$$BFS_CPPFLAGS"
- ${APPEND} CPPFLAGS "$$TSAN_CPPFLAGS"
- ${APPEND} CPPFLAGS "$$LINT_CPPFLAGS"
- ${APPEND} CPPFLAGS "$$RELEASE_CPPFLAGS"
- ${APPEND} CPPFLAGS "$$XCPPFLAGS"
- ${APPEND} CPPFLAGS "$$EXTRA_CPPFLAGS"
- ${SETVAR} CFLAGS "$$BFS_CFLAGS"
- ${APPEND} CFLAGS "$$ASAN_CFLAGS"
- ${APPEND} CFLAGS "$$LSAN_CFLAGS"
- ${APPEND} CFLAGS "$$MSAN_CFLAGS"
- ${APPEND} CFLAGS "$$TSAN_CFLAGS"
- ${APPEND} CFLAGS "$$UBSAN_CFLAGS"
- ${APPEND} CFLAGS "$$SAN_CFLAGS"
- ${APPEND} CFLAGS "$$GCOV_CFLAGS"
- ${APPEND} CFLAGS "$$LINT_CFLAGS"
- ${APPEND} CFLAGS "$$RELEASE_CFLAGS"
- ${APPEND} CFLAGS "$$XCFLAGS"
- ${APPEND} CFLAGS "$$EXTRA_CFLAGS"
- ${SETVAR} LDFLAGS "$$XLDFLAGS"
- ${SETVAR} LDLIBS "$$XLDLIBS"
- ${APPEND} LDLIBS "$$EXTRA_LDLIBS"
- ${APPEND} LDLIBS "$$BFS_LDLIBS"
- ${SETVAR} NOLIBS "$$XNOLIBS"
- test "${OS}-${SAN}" != FreeBSD-y || printf 'POSTLINK = elfctl -e +noaslr $$@\n' >>$@
- ${VCAT} $@
diff --git a/config/has/acl-get-entry.c b/config/has/acl-get-entry.c
deleted file mode 100644
index 3cce771..0000000
--- a/config/has/acl-get-entry.c
+++ /dev/null
@@ -1,8 +0,0 @@
-#include <sys/types.h>
-#include <sys/acl.h>
-
-int main(void) {
- acl_t acl = acl_get_file(".", ACL_TYPE_DEFAULT);
- acl_entry_t entry;
- return acl_get_entry(acl, ACL_FIRST_ENTRY, &entry);
-}
diff --git a/config/has/acl-get-file.c b/config/has/acl-get-file.c
deleted file mode 100644
index 89fbf23..0000000
--- a/config/has/acl-get-file.c
+++ /dev/null
@@ -1,8 +0,0 @@
-#include <stddef.h>
-#include <sys/types.h>
-#include <sys/acl.h>
-
-int main(void) {
- acl_t acl = acl_get_file(".", ACL_TYPE_DEFAULT);
- return acl == (acl_t)NULL;
-}
diff --git a/config/has/acl-get-tag-type.c b/config/has/acl-get-tag-type.c
deleted file mode 100644
index 2901956..0000000
--- a/config/has/acl-get-tag-type.c
+++ /dev/null
@@ -1,10 +0,0 @@
-#include <string.h>
-#include <sys/types.h>
-#include <sys/acl.h>
-
-int main(void) {
- acl_entry_t entry;
- memset(&entry, 0, sizeof(entry));
- acl_tag_t tag;
- return acl_get_tag_type(entry, &tag);
-}
diff --git a/config/has/acl-is-trivial-np.c b/config/has/acl-is-trivial-np.c
deleted file mode 100644
index 9ca9fc7..0000000
--- a/config/has/acl-is-trivial-np.c
+++ /dev/null
@@ -1,12 +0,0 @@
-// Copyright © Tavian Barnes <tavianator@tavianator.com>
-// SPDX-License-Identifier: 0BSD
-
-#include <sys/types.h>
-#include <sys/acl.h>
-
-int main(void) {
- acl_t acl = acl_get_fd(3);
- int trivial;
- acl_is_trivial_np(acl, &trivial);
- return 0;
-}
diff --git a/config/has/acl-trivial.c b/config/has/acl-trivial.c
deleted file mode 100644
index 7efc838..0000000
--- a/config/has/acl-trivial.c
+++ /dev/null
@@ -1,8 +0,0 @@
-// Copyright © Tavian Barnes <tavianator@tavianator.com>
-// SPDX-License-Identifier: 0BSD
-
-#include <sys/acl.h>
-
-int main(void) {
- return acl_trivial(".");
-}
diff --git a/config/has/aligned-alloc.c b/config/has/aligned-alloc.c
deleted file mode 100644
index 4460038..0000000
--- a/config/has/aligned-alloc.c
+++ /dev/null
@@ -1,8 +0,0 @@
-// Copyright © Tavian Barnes <tavianator@tavianator.com>
-// SPDX-License-Identifier: 0BSD
-
-#include <stdlib.h>
-
-int main(void) {
- return !aligned_alloc(_Alignof(void *), sizeof(void *));
-}
diff --git a/config/has/confstr.c b/config/has/confstr.c
deleted file mode 100644
index 58280b4..0000000
--- a/config/has/confstr.c
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright © Tavian Barnes <tavianator@tavianator.com>
-// SPDX-License-Identifier: 0BSD
-
-#include <unistd.h>
-
-int main(void) {
- confstr(_CS_PATH, NULL, 0);
- return 0;
-}
diff --git a/config/has/extattr-get-file.c b/config/has/extattr-get-file.c
deleted file mode 100644
index ac9cf96..0000000
--- a/config/has/extattr-get-file.c
+++ /dev/null
@@ -1,10 +0,0 @@
-// Copyright © Tavian Barnes <tavianator@tavianator.com>
-// SPDX-License-Identifier: 0BSD
-
-#include <stddef.h>
-#include <sys/types.h>
-#include <sys/extattr.h>
-
-int main(void) {
- return extattr_get_file("file", EXTATTR_NAMESPACE_USER, "xattr", NULL, 0);
-}
diff --git a/config/has/extattr-get-link.c b/config/has/extattr-get-link.c
deleted file mode 100644
index c35be5b..0000000
--- a/config/has/extattr-get-link.c
+++ /dev/null
@@ -1,10 +0,0 @@
-// Copyright © Tavian Barnes <tavianator@tavianator.com>
-// SPDX-License-Identifier: 0BSD
-
-#include <stddef.h>
-#include <sys/types.h>
-#include <sys/extattr.h>
-
-int main(void) {
- return extattr_get_link("link", EXTATTR_NAMESPACE_USER, "xattr", NULL, 0);
-}
diff --git a/config/has/extattr-list-file.c b/config/has/extattr-list-file.c
deleted file mode 100644
index e68a8bb..0000000
--- a/config/has/extattr-list-file.c
+++ /dev/null
@@ -1,10 +0,0 @@
-// Copyright © Tavian Barnes <tavianator@tavianator.com>
-// SPDX-License-Identifier: 0BSD
-
-#include <stddef.h>
-#include <sys/types.h>
-#include <sys/extattr.h>
-
-int main(void) {
- return extattr_list_file("file", EXTATTR_NAMESPACE_USER, NULL, 0);
-}
diff --git a/config/has/extattr-list-link.c b/config/has/extattr-list-link.c
deleted file mode 100644
index 49f0ec2..0000000
--- a/config/has/extattr-list-link.c
+++ /dev/null
@@ -1,10 +0,0 @@
-// Copyright © Tavian Barnes <tavianator@tavianator.com>
-// SPDX-License-Identifier: 0BSD
-
-#include <stddef.h>
-#include <sys/types.h>
-#include <sys/extattr.h>
-
-int main(void) {
- return extattr_list_link("link", EXTATTR_NAMESPACE_USER, NULL, 0);
-}
diff --git a/config/has/fdclosedir.c b/config/has/fdclosedir.c
deleted file mode 100644
index f4ad1f5..0000000
--- a/config/has/fdclosedir.c
+++ /dev/null
@@ -1,8 +0,0 @@
-// Copyright © Tavian Barnes <tavianator@tavianator.com>
-// SPDX-License-Identifier: 0BSD
-
-#include <dirent.h>
-
-int main(void) {
- return fdclosedir(opendir("."));
-}
diff --git a/config/has/getdents.c b/config/has/getdents.c
deleted file mode 100644
index d0d4228..0000000
--- a/config/has/getdents.c
+++ /dev/null
@@ -1,10 +0,0 @@
-// Copyright © Tavian Barnes <tavianator@tavianator.com>
-// SPDX-License-Identifier: 0BSD
-
-#include <dirent.h>
-
-int main(void) {
- struct dirent de;
- getdents(3, &de, 1024);
- return 0;
-}
diff --git a/config/has/getdents64-syscall.c b/config/has/getdents64-syscall.c
deleted file mode 100644
index 4838c14..0000000
--- a/config/has/getdents64-syscall.c
+++ /dev/null
@@ -1,12 +0,0 @@
-// Copyright © Tavian Barnes <tavianator@tavianator.com>
-// SPDX-License-Identifier: 0BSD
-
-#include <dirent.h>
-#include <sys/syscall.h>
-#include <unistd.h>
-
-int main(void) {
- struct dirent64 de;
- syscall(SYS_getdents64, 3, &de, 1024);
- return 0;
-}
diff --git a/config/has/getdents64.c b/config/has/getdents64.c
deleted file mode 100644
index 1abf36d..0000000
--- a/config/has/getdents64.c
+++ /dev/null
@@ -1,10 +0,0 @@
-// Copyright © Tavian Barnes <tavianator@tavianator.com>
-// SPDX-License-Identifier: 0BSD
-
-#include <dirent.h>
-
-int main(void) {
- struct dirent64 de;
- getdents64(3, &de, 1024);
- return 0;
-}
diff --git a/config/has/getprogname-gnu.c b/config/has/getprogname-gnu.c
deleted file mode 100644
index 6b97c5e..0000000
--- a/config/has/getprogname-gnu.c
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright © Tavian Barnes <tavianator@tavianator.com>
-// SPDX-License-Identifier: 0BSD
-
-#include <errno.h>
-
-int main(void) {
- const char *str = program_invocation_short_name;
- return str[0];
-}
diff --git a/config/has/getprogname.c b/config/has/getprogname.c
deleted file mode 100644
index 83dc8e8..0000000
--- a/config/has/getprogname.c
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright © Tavian Barnes <tavianator@tavianator.com>
-// SPDX-License-Identifier: 0BSD
-
-#include <stdlib.h>
-
-int main(void) {
- const char *str = getprogname();
- return str[0];
-}
diff --git a/config/has/max-align-t.c b/config/has/max-align-t.c
deleted file mode 100644
index 96165ce..0000000
--- a/config/has/max-align-t.c
+++ /dev/null
@@ -1,8 +0,0 @@
-// Copyright © Tavian Barnes <tavianator@tavianator.com>
-// SPDX-License-Identifier: 0BSD
-
-#include <stddef.h>
-
-int main(void) {
- return _Alignof(max_align_t);
-}
diff --git a/config/has/pipe2.c b/config/has/pipe2.c
deleted file mode 100644
index 4cb43b5..0000000
--- a/config/has/pipe2.c
+++ /dev/null
@@ -1,10 +0,0 @@
-// Copyright © Tavian Barnes <tavianator@tavianator.com>
-// SPDX-License-Identifier: 0BSD
-
-#include <fcntl.h>
-#include <unistd.h>
-
-int main(void) {
- int fds[2];
- return pipe2(fds, O_CLOEXEC);
-}
diff --git a/config/has/posix-spawn-addfchdir-np.c b/config/has/posix-spawn-addfchdir-np.c
deleted file mode 100644
index b870a53..0000000
--- a/config/has/posix-spawn-addfchdir-np.c
+++ /dev/null
@@ -1,11 +0,0 @@
-// Copyright © Tavian Barnes <tavianator@tavianator.com>
-// SPDX-License-Identifier: 0BSD
-
-#include <spawn.h>
-
-int main(void) {
- posix_spawn_file_actions_t actions;
- posix_spawn_file_actions_init(&actions);
- posix_spawn_file_actions_addfchdir_np(&actions, 3);
- return 0;
-}
diff --git a/config/has/posix-spawn-addfchdir.c b/config/has/posix-spawn-addfchdir.c
deleted file mode 100644
index c52ff81..0000000
--- a/config/has/posix-spawn-addfchdir.c
+++ /dev/null
@@ -1,11 +0,0 @@
-// Copyright © Tavian Barnes <tavianator@tavianator.com>
-// SPDX-License-Identifier: 0BSD
-
-#include <spawn.h>
-
-int main(void) {
- posix_spawn_file_actions_t actions;
- posix_spawn_file_actions_init(&actions);
- posix_spawn_file_actions_addfchdir(&actions, 3);
- return 0;
-}
diff --git a/config/has/st-acmtim.c b/config/has/st-acmtim.c
deleted file mode 100644
index d687ab0..0000000
--- a/config/has/st-acmtim.c
+++ /dev/null
@@ -1,12 +0,0 @@
-// Copyright © Tavian Barnes <tavianator@tavianator.com>
-// SPDX-License-Identifier: 0BSD
-
-#include <sys/stat.h>
-
-int main(void) {
- struct stat sb = {0};
- unsigned int a = sb.st_atim.tv_sec;
- unsigned int c = sb.st_ctim.tv_sec;
- unsigned int m = sb.st_mtim.tv_sec;
- return a + c + m;
-}
diff --git a/config/has/st-acmtimespec.c b/config/has/st-acmtimespec.c
deleted file mode 100644
index f747bc0..0000000
--- a/config/has/st-acmtimespec.c
+++ /dev/null
@@ -1,12 +0,0 @@
-// Copyright © Tavian Barnes <tavianator@tavianator.com>
-// SPDX-License-Identifier: 0BSD
-
-#include <sys/stat.h>
-
-int main(void) {
- struct stat sb = {0};
- unsigned int a = sb.st_atimespec.tv_sec;
- unsigned int c = sb.st_ctimespec.tv_sec;
- unsigned int m = sb.st_mtimespec.tv_sec;
- return a + c + m;
-}
diff --git a/config/has/st-birthtim.c b/config/has/st-birthtim.c
deleted file mode 100644
index 4964571..0000000
--- a/config/has/st-birthtim.c
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright © Tavian Barnes <tavianator@tavianator.com>
-// SPDX-License-Identifier: 0BSD
-
-#include <sys/stat.h>
-
-int main(void) {
- struct stat sb = {0};
- return sb.st_birthtim.tv_sec;
-}
diff --git a/config/has/st-birthtimespec.c b/config/has/st-birthtimespec.c
deleted file mode 100644
index 91a613f..0000000
--- a/config/has/st-birthtimespec.c
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright © Tavian Barnes <tavianator@tavianator.com>
-// SPDX-License-Identifier: 0BSD
-
-#include <sys/stat.h>
-
-int main(void) {
- struct stat sb = {0};
- return sb.st_birthtimespec.tv_sec;
-}
diff --git a/config/has/st-flags.c b/config/has/st-flags.c
deleted file mode 100644
index b1d0c32..0000000
--- a/config/has/st-flags.c
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright © Tavian Barnes <tavianator@tavianator.com>
-// SPDX-License-Identifier: 0BSD
-
-#include <sys/stat.h>
-
-int main(void) {
- struct stat sb = {0};
- return sb.st_flags;
-}
diff --git a/config/has/statx-syscall.c b/config/has/statx-syscall.c
deleted file mode 100644
index 87ec869..0000000
--- a/config/has/statx-syscall.c
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright © Tavian Barnes <tavianator@tavianator.com>
-// SPDX-License-Identifier: 0BSD
-
-#include <fcntl.h>
-#include <linux/stat.h>
-#include <sys/syscall.h>
-#include <unistd.h>
-
-int main(void) {
- struct statx sb;
- syscall(SYS_statx, AT_FDCWD, ".", 0, STATX_BASIC_STATS, &sb);
- return 0;
-}
diff --git a/config/has/statx.c b/config/has/statx.c
deleted file mode 100644
index 65f1674..0000000
--- a/config/has/statx.c
+++ /dev/null
@@ -1,11 +0,0 @@
-// Copyright © Tavian Barnes <tavianator@tavianator.com>
-// SPDX-License-Identifier: 0BSD
-
-#include <fcntl.h>
-#include <sys/stat.h>
-
-int main(void) {
- struct statx sb;
- statx(AT_FDCWD, ".", 0, STATX_BASIC_STATS, &sb);
- return 0;
-}
diff --git a/config/has/strerror-l.c b/config/has/strerror-l.c
deleted file mode 100644
index 3dcc4d7..0000000
--- a/config/has/strerror-l.c
+++ /dev/null
@@ -1,11 +0,0 @@
-// Copyright © Tavian Barnes <tavianator@tavianator.com>
-// SPDX-License-Identifier: 0BSD
-
-#include <errno.h>
-#include <locale.h>
-#include <string.h>
-
-int main(void) {
- locale_t locale = duplocale(LC_GLOBAL_LOCALE);
- return !strerror_l(ENOMEM, locale);
-}
diff --git a/config/has/strerror-r-gnu.c b/config/has/strerror-r-gnu.c
deleted file mode 100644
index 26ca0ee..0000000
--- a/config/has/strerror-r-gnu.c
+++ /dev/null
@@ -1,11 +0,0 @@
-// Copyright © Tavian Barnes <tavianator@tavianator.com>
-// SPDX-License-Identifier: 0BSD
-
-#include <errno.h>
-#include <string.h>
-
-int main(void) {
- char buf[2