]> granicus.if.org Git - sudo/commitdiff
Don't check for posix_spawn() or posix_spawnp() if we were unable
authorTodd C. Miller <Todd.Miller@courtesan.com>
Wed, 24 Feb 2016 23:00:08 +0000 (16:00 -0700)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Wed, 24 Feb 2016 23:00:08 +0000 (16:00 -0700)
to find spawn.h.  This should only be a problem on systems with
broken headers.  Bug #730

configure
configure.ac

index 9a328c7c42663df1f66f5de09a172bb4d72784a7..4cdba6eda7673789d535bfea061b2be823815034 100755 (executable)
--- a/configure
+++ b/configure
@@ -19952,7 +19952,8 @@ fi
 done
 
     # Check for posix_spawn, and posix_spawnp
-    for ac_func in posix_spawn posix_spawnp
+    if test X"$ac_cv_header_spawn_h" = X"yes"; then
+       for ac_func in posix_spawn posix_spawnp
 do :
   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
@@ -19964,6 +19965,7 @@ _ACEOF
 fi
 done
 
+    fi
 fi
 
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
index d5aba59b033333a7c03769e00d3ec05326e8690f..4c063979f935398361e780e47775c18f980d2486 100644 (file)
@@ -2689,7 +2689,9 @@ if test X"$with_noexec" != X"no"; then
     # Check for non-standard exec functions
     AC_CHECK_FUNCS([exect execvP execvpe])
     # Check for posix_spawn, and posix_spawnp
-    AC_CHECK_FUNCS([posix_spawn posix_spawnp])
+    if test X"$ac_cv_header_spawn_h" = X"yes"; then
+       AC_CHECK_FUNCS([posix_spawn posix_spawnp])
+    fi
 fi
 
 dnl