aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDuncaen <mail@duncano.de>2016-06-27 18:47:24 +0200
committerDuncaen <mail@duncano.de>2016-06-27 18:47:24 +0200
commit45d57dad74fc9bfea1597a4903ce902eaf76529a (patch)
tree80279e83d857b52d80666531a7a4f493c37ab523
parentc05e559c4c473655da25d0fcae207aa3345b029b (diff)
downloadopendoas-45d57dad74fc9bfea1597a4903ce902eaf76529a.tar.gz
fix --with(out)-pam configure option
-rwxr-xr-xconfigure44
1 files changed, 24 insertions, 20 deletions
diff --git a/configure b/configure
index 48a515a..6c35a92 100755
--- a/configure
+++ b/configure
@@ -24,6 +24,8 @@ usage: configure [options]
--enable-debug enable debugging
--enable-static prepare for static build
+ --without-pam disable pam support
+
--help, -h display this help and exit
EOF
exit 0
@@ -33,21 +35,22 @@ for x; do
opt=${x%%=*}
var=${x#*=}
case "$opt" in
- --prefix) PREFIX=$var;;
- --exec-prefix) EPREFIX=$var;;
- --bindir) BINDIR=$var;;
- --datadir) SHAREDIR=$var;;
- --mandir) MANDIR=$var;;
- --sysconfdir) SYSCONFDIR=$var;;
- --pamdir) PAMDIR=$var;;
- --build) BUILD=$var;;
- --host) HOST=$var;;
- --target) TARGET=$var;;
- --enable-debug) DEBUG=yes;;
- --enable-static) BUILD_STATIC=yes;;
- --without-pam) WITHOUT_PAM=yes;;
- --help|-h) usage;;
- *) die "Error: unknown option $opt";;
+ --prefix) PREFIX=$var ;;
+ --exec-prefix) EPREFIX=$var ;;
+ --bindir) BINDIR=$var ;;
+ --datadir) SHAREDIR=$var ;;
+ --mandir) MANDIR=$var ;;
+ --sysconfdir) SYSCONFDIR=$var ;;
+ --pamdir) PAMDIR=$var ;;
+ --build) BUILD=$var ;;
+ --host) HOST=$var ;;
+ --target) TARGET=$var ;;
+ --enable-debug) DEBUG=yes ;;
+ --enable-static) BUILD_STATIC=yes ;;
+ --with-pam) WITHOUT_PAM= ;;
+ --without-pam) WITHOUT_PAM=yes ;;
+ --help|-h) usage ;;
+ *) die "Error: unknown option $opt" ;;
esac
done
@@ -274,11 +277,12 @@ src='
int main(void) {
return 0;
}'
-[ -z "$WITHOUT_PAM" -a -z "$have_bsd_auth_h" ] && \
- check_func "pam_appl_h" "$src" && {
+check_func "pam_appl_h" "$src" && {
+ [ -z "$WITHOUT_PAM" -a -z "$have_bsd_auth_h" ] && {
printf 'SRCS += pam.c\n' >>$CONFIG_MK
printf 'LDFLAGS += -lpam\n' >>$CONFIG_MK
}
+}
#
# Check for shadow.h.
@@ -288,10 +292,10 @@ src='
int main(void) {
return 0;
}'
-[ -z "$WITHOUT_PAM" -a -z "$have_bsd_auth_h" ] || \
- check_func "shadow_h" "$src" && {
+check_func "shadow_h" "$src" && {
+ [ -n "$WITHOUT_PAM" -a -z "$have_bsd_auth_h" ] && \
printf 'LDFLAGS += -lcrypt\n' >>$CONFIG_MK
- }
+}
#
# Check for execvpe().