]> git.armaanb.net Git - opendoas.git/blobdiff - configure
timestamp: error out if fstat and lstat st_ino and st_dev are not the same
[opendoas.git] / configure
index 95d8a568c9929b1ef3cdf582e476c02509200daf..4dfd287ade349527c511d53434813253b501cbb9 100755 (executable)
--- a/configure
+++ b/configure
@@ -27,7 +27,7 @@ usage: configure [options]
   --without-pam          disable pam support
   --without-shadow       disable shadow support
 
-  --without-timestamp    disable timestamp support
+  --with-timestamp       enable timestamp support
 
   --help, -h             display this help and exit
 EOF
@@ -148,20 +148,6 @@ check_func() {
 }
 
 authmethod() {
-       #
-       # Check for bsd_auth.h.
-       #
-       src='
-#include <bsd_auth.h>
-int main(void) {
-       return 0;
-}'
-       check_func "bsd_auth_h" "$src" && {
-               have_bsd_auth_h=1
-               printf 'bsd\n'
-               return 0
-       }
-
        #
        # Check for pam_appl.h.
        #
@@ -173,6 +159,7 @@ int main(void) {
        [ -z "$WITHOUT_PAM" ] && check_func "pam_appl_h" "$src" && {
                printf 'SRCS     +=     pam.c\n' >>$CONFIG_MK
                printf 'LDFLAGS  +=     -lpam\n' >>$CONFIG_MK
+               printf 'CPPFLAGS +=     -DUSE_PAM\n' >>$CONFIG_MK
                printf 'pam\n'
                return 0
        }
@@ -186,7 +173,9 @@ int main(void) {
        return 0;
 }'
        [ -z "$WITHOUT_SHADOW" ] && check_func "shadow_h" "$src" && {
+               printf 'SRCS     +=     shadow.c\n' >>$CONFIG_MK
                printf 'LDFLAGS  +=     -lcrypt\n' >>$CONFIG_MK
+               printf 'CPPFLAGS +=     -DUSE_SHADOW\n' >>$CONFIG_MK
                printf 'shadow\n'
                return 0
        }
@@ -196,8 +185,8 @@ int main(void) {
 
 persistmethod() {
        [ -z "$WITHOUT_TIMESTAMP" ] && {
-               printf 'CFLAGS  += -DPERSIST_TIMESTAMP\n' >>$CONFIG_MK
-               printf 'SRCS    += persist_timestamp.c\n' >>$CONFIG_MK
+               printf 'CPPFLAGS += -DUSE_TIMESTAMP\n' >>$CONFIG_MK
+               printf 'SRCS    += timestamp.c\n' >>$CONFIG_MK
                printf 'timestamp\n'
                return 0
        }
@@ -354,19 +343,6 @@ check_func "setresuid" "$src" || {
        printf 'OPENBSD  +=     setresuid.o\n' >>$CONFIG_MK
 }
 
-#
-# Check for pledge().
-#
-src='
-#include <unistd.h>
-int main(void) {
-       pledge("", NULL);
-       return 0;
-}'
-check_func "pledge" "$src" || {
-       printf 'OPENBSD  +=     pledge-noop.o\n' >>$CONFIG_MK
-}
-
 #
 # Check for closefrom().
 #