X-Git-Url: https://git.armaanb.net/?a=blobdiff_plain;f=configure;h=1c5d9899bda3981acab60fa5669455991c7008fd;hb=e8e8713b26723d2daf3de50b51d2ac209ad65716;hp=82b9331eba8ab60f2f0171fe6b25b252f3937600;hpb=29123f7c5b7cfb79419425ad4d2b7af153e06472;p=opendoas.git diff --git a/configure b/configure index 82b9331..1c5d989 100755 --- a/configure +++ b/configure @@ -116,11 +116,11 @@ case "$OS" in ;; netbsd) OS_CFLAGS="$OS_CFLAGS -D_OPENBSD_SOURCE" - printf 'LDFLAGS += -lutil\n' >>$CONFIG_MK + printf 'LDLIBS += -lutil\n' >>$CONFIG_MK : ${BINGRP:=wheel} ;; freebsd) - printf 'LDFLAGS += -lutil\n' >>$CONFIG_MK + printf 'LDLIBS += -lutil\n' >>$CONFIG_MK : ${BINGRP:=wheel} ;; darwin) @@ -153,7 +153,7 @@ BINGRP ?= ${BINGRP} EOF [ -n "$OS_CFLAGS" ] && \ - printf 'CFLAGS += %s\n' "$OS_CFLAGS" >>$CONFIG_MK + printf 'OS_CFLAGS += %s\n' "$OS_CFLAGS" >>$CONFIG_MK [ -n "$DEBUG" ] && \ printf 'CFLAGS += -O0 -g\n' >>$CONFIG_MK @@ -161,8 +161,8 @@ EOF [ -n "$BUILD_STATIC" ] && \ printf 'CFLAGS += -static\n' >>$CONFIG_MK -# Add CPPFLAGS/CFLAGS/LDFLAGS to CC for testing features -XCC="${CC:=cc} $CFLAGS $OS_CFLAGS $CPPFLAGS $LDFLAGS" +# Add CPPFLAGS/CFLAGS/LDFLAGS/LDLIBS to CC for testing features +XCC="${CC:=cc} $CFLAGS $OS_CFLAGS $CPPFLAGS $LDFLAGS $LDLIBS" # Make sure to disable --as-needed for CC tests. case "$OS" in @@ -200,7 +200,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 'LDLIBS += -lpam\n' >>$CONFIG_MK printf '#define USE_PAM\n' >>$CONFIG_H printf 'pam\n' @@ -219,7 +219,7 @@ int main(void) { }' [ -z "$WITHOUT_SHADOW" ] && check_func "shadow_h" "$src" && { printf 'SRCS += shadow.c\n' >>$CONFIG_MK - printf 'LDFLAGS += -lcrypt\n' >>$CONFIG_MK + printf 'LDLIBS += -lcrypt\n' >>$CONFIG_MK printf '#define USE_SHADOW\n' >>$CONFIG_H printf 'shadow\n' return 0 @@ -545,7 +545,7 @@ int main(void){return 0;} __attribute__((__unused__)) static void foo(void){return;} ' check_func "__attribute__" "$src" || { - printf 'CFLAGS += -DNO_ATTRIBUTE_ON_RETURN_TYPE=1\n' >>$CONFIG_MK + printf 'OS_CFLAGS += -DNO_ATTRIBUTE_ON_RETURN_TYPE=1\n' >>$CONFIG_MK } auth=$(authmethod)