]> git.armaanb.net Git - opendoas.git/blobdiff - configure
add support for the verified auth ioctls using 'persist' rules. ok deraadt henning
[opendoas.git] / configure
index c5a4c397450539fe98c041b2db37f12434ea2f0e..f82f1e54e1e2db6602d2c0ec56474eba929d2a9a 100755 (executable)
--- a/configure
+++ b/configure
@@ -61,7 +61,7 @@ CONFIG_MK=config.mk
 rm -f "$CONFIG_MK"
 
 # : ${VERSION:="$(git describe --dirty --tags --long --always)"}
-: ${VERSION:="0.3.2"}
+: ${VERSION:="6.0"}
 
 cat <<EOF >>$CONFIG_MK
 PREFIX   ?=    ${PREFIX:="/usr"}
@@ -350,6 +350,115 @@ check_func "pledge" "$src" || {
        printf 'OPENBSD  +=     pledge-noop.o\n' >>$CONFIG_MK
 }
 
+#
+# Check for closefrom().
+#
+src='
+#include <unistd.h>
+int main(void) {
+       closefrom(0);
+       return 0;
+}'
+check_func "closefrom" "$src" || {
+       printf 'OPENBSD  +=     closefrom.o\n' >>$CONFIG_MK
+}
+
+#
+# Check for sysconf().
+#
+src='
+#include <unistd.h>
+int main(void) {
+       (void)sysconf(0);
+       return 0;
+}'
+check_func "sysconf" "$src"
+
+#
+# Check for /proc/$PID.
+#
+printf 'Checking for %-14s\t\t' "/proc/\$PID ..." >&2
+if test -d /proc/$$; then
+       printf 'yes.\n' >&2
+       printf 'CFLAGS   +=     -DHAVE_%s\n' "PROC_PID" >>$CONFIG_MK
+else
+       printf 'no.\n' >&2
+fi
+
+#
+# Check for dirfd().
+#
+src='
+#include <dirent.h>
+int main(void) {
+       (void)dirfd(0);
+       return 0;
+}'
+check_func "dirfd" "$src"
+
+#
+# Check for fcntl.h.
+#
+src='
+#include <fcntl.h>
+int main(void) {
+       return 0;
+}'
+check_func "fcntl_h" "$src"
+
+#
+# Check for F_CLOSEM.
+#
+src='
+#include <fcntl.h>
+#ifndef F_CLOSEM
+#error no F_CLOSEM
+#endif
+int main(void) {
+       return 0;
+}'
+check_func "F_CLOSEM" "$src"
+
+#
+# Check for dirent.h.
+#
+src='
+#include <dirent.h>
+int main(void) {
+       return 0;
+}'
+check_func "dirent_h" "$src"
+
+#
+# Check for sys/ndir.h.
+#
+src='
+#include <sys/ndir.h>
+int main(void) {
+       return 0;
+}'
+check_func "sys_ndir_h" "$src"
+
+#
+# Check for sys/dir.h.
+#
+src='
+#include <sys/dir.h>
+int main(void) {
+       return 0;
+}'
+check_func "sys_dir_h" "$src"
+
+#
+# Check for ndir.h.
+#
+src='
+#include <ndir.h>
+int main(void) {
+       return 0;
+}'
+check_func "ndir_h" "$src"
+
 #
 #
 #