X-Git-Url: https://git.armaanb.net/?a=blobdiff_plain;f=configure;h=95df243baba743e2d14269b9bae11c2a6b6f8685;hb=346e58e98596142ac2f3059814bbc7708b6824fd;hp=95d8a568c9929b1ef3cdf582e476c02509200daf;hpb=1899c37ea48dd1932edd913c510411ee4c9c242f;p=opendoas.git diff --git a/configure b/configure index 95d8a56..95df243 100755 --- 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 -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 } @@ -337,9 +326,7 @@ int main(void) { execvpe("", p, p); return 0; }' -check_func "execvpe" "$src" || { - printf 'OPENBSD += execvpe.o\n' >>$CONFIG_MK -} +check_func "execvpe" "$src" || die "system has no execvpe(3): not supported" # # Check for setresuid(). @@ -350,22 +337,7 @@ int main(void) { setresuid(0, 0, 0); return 0; }' -check_func "setresuid" "$src" || { - printf 'OPENBSD += setresuid.o\n' >>$CONFIG_MK -} - -# -# Check for pledge(). -# -src=' -#include -int main(void) { - pledge("", NULL); - return 0; -}' -check_func "pledge" "$src" || { - printf 'OPENBSD += pledge-noop.o\n' >>$CONFIG_MK -} +check_func "setresuid" "$src" || die "system has no setresuid(2): not supported" # # Check for closefrom().