]> git.armaanb.net Git - opendoas.git/blobdiff - configure
configure: don't set --no-as-needed on MacOSX while running checks
[opendoas.git] / configure
index 632c74afff96c96218522059ef611accc8a6eca0..f8d351b46a405d854a75e917f498e2032e9f4168 100755 (executable)
--- a/configure
+++ b/configure
@@ -157,7 +157,11 @@ EOF
 # Add CPPFLAGS/CFLAGS/LDFLAGS to CC for testing features
 XCC="${CC:=cc} $CFLAGS $OS_CFLAGS $CPPFLAGS $LDFLAGS"
 # Make sure to disable --as-needed for CC tests.
-XCC="$XCC -Wl,--no-as-needed"
+
+case "$OS" in
+       darwin) ;;
+       *) XCC="$XCC -Wl,--no-as-needed" ;;
+esac
 
 check_func() {
        func="$1"; src="$2"; shift 2
@@ -360,7 +364,9 @@ int main(void) {
        execvpe("", p, p);
        return 0;
 }'
-check_func "execvpe" "$src" || die "system has no execvpe(3): not supported"
+check_func "execvpe" "$src" || {
+       printf 'SRCS += libopenbsd/execvpe.c\n' >>$CONFIG_MK
+}
 
 #
 # Check for setresuid().