fix build issues with SMP compiles
[oweals/openwrt.git] / openwrt / include / prereq.mk
index cbd26be1248ffe774c6e192d2feff28bd984ce76..e514855a67fdf3177a583270a22f97934097dce8 100644 (file)
@@ -29,7 +29,7 @@ define Require
 
     prereq-$(1): $(TMP_DIR) FORCE
                echo -n "Checking '$(1)'... "
-               if $(MAKE) -f $(INCLUDE_DIR)/prereq.mk check-$(1) >/dev/null 2>/dev/null; then \
+               if $(NO_TRACE_MAKE) -f $(INCLUDE_DIR)/prereq.mk check-$(1) >/dev/null 2>/dev/null; then \
                        echo 'ok.'; \
                else \
                        echo 'failed.'; \
@@ -59,7 +59,7 @@ define Require/working-make
        echo 'e0 = $$$$(foreach s,foobar,$$$$(eval $$$$s:))' >> $(TMP_DIR)/check.mk
        echo 'e1 = $$$$(foreach s,foobar, $$$$(eval $$$$s:))' >> $(TMP_DIR)/check.mk
        echo 'test: $$$$(strip $$$$(e0)) $$$$(strip $$$$(e1))' >> $(TMP_DIR)/check.mk
-       $(MAKE) -f $(TMP_DIR)/check.mk
+       $(NO_TRACE_MAKE) -f $(TMP_DIR)/check.mk
 endef
 
 $(eval $(call Require,working-make, \
@@ -84,6 +84,16 @@ $(eval $(call Require,working-g++, \
        No working GNU C++ Compiler (g++) was found on your system. \
 ))
 
+define Require/ncurses
+       echo 'int main(int argc, char **argv) { initscr(); return 0; }' | \
+               gcc -include ncurses.h -x c -o $(TMP_DIR)/a.out -lncurses -
+endef
+
+$(eval $(call Require,ncurses, \
+       No ncurses development files were not found on your system. \
+))
+
+
 define Require/zlib
        echo 'int main(int argc, char **argv) { gzdopen(0, "rb"); return 0; }' | \
                gcc -include zlib.h -x c -o $(TMP_DIR)/a.out -lz -