From 630ec3f1eca0543b2d10c409822ea4acb657c87c Mon Sep 17 00:00:00 2001 From: Max Romanov Date: Fri, 1 Dec 2017 16:28:06 +0300 Subject: Using compiler capability to generate dependencies. This closes #58 issue on GitHub. --- auto/feature | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'auto/feature') diff --git a/auto/feature b/auto/feature index f7e7f25d..55df46bc 100644 --- a/auto/feature +++ b/auto/feature @@ -74,13 +74,15 @@ END if /bin/sh -c "($NXT_AUTOTEST)" >> $NXT_AUTOCONF_ERR 2>&1; then $echo " found" nxt_found=yes - cat << END >> $NXT_AUTO_CONFIG_H + if [ -n "$nxt_feature_name" ]; then + cat << END >> $NXT_AUTO_CONFIG_H #ifndef $nxt_feature_name #define $nxt_feature_name 1 #endif END + fi else $echo " found but is not working" fi @@ -89,13 +91,15 @@ END *) $echo " found" nxt_found=yes - cat << END >> $NXT_AUTO_CONFIG_H + if [ -n "$nxt_feature_name" ]; then + cat << END >> $NXT_AUTO_CONFIG_H #ifndef $nxt_feature_name #define $nxt_feature_name 1 #endif END + fi ;; esac -- cgit