From: Roy Marples Date: Sun, 10 Nov 2013 11:17:40 +0000 (+0000) Subject: Set blank CFLAGS/CPPFLAGS and then append user CFLAGS/CPPFLAGS. X-Git-Tag: v6.2.0~59 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2e9244794f3def04bd8421f35dd09498636bb6a3;p=thirdparty%2Fdhcpcd.git Set blank CFLAGS/CPPFLAGS and then append user CFLAGS/CPPFLAGS. This allows us to pass them to the configure tests and keep our sed to extract them portable. --- diff --git a/configure b/configure index d1738381..e420bf7e 100755 --- a/configure +++ b/configure @@ -265,15 +265,21 @@ fi $CC --version | $SED -e '1!d' echo "CC= $CC" >>$CONFIG_MK +# Set to blank, then append user config +# We do this so our SED call to append to XCC remains portable +echo "CFLAGS=" >>$CONFIG_MK +echo "CPPFLAGS=" >>$CONFIG_MK +echo "LDFLAGS=" >>$CONFIG_MK if [ -n "$CFLAGS" ]; then - echo "CFLAGS= $CFLAGS" >>$CONFIG_MK + echo "CFLAGS+= $CFLAGS" >>$CONFIG_MK fi if [ -n "$CPPFLAGS" ]; then - echo "CPPFLAGS= $CPPFLAGS" >>$CONFIG_MK + echo "CPPFLAGS+= $CPPFLAGS" >>$CONFIG_MK fi if [ -n "$LDFLAGS" ]; then - echo "LDFLAGS= $LDFLAGS" >>$CONFIG_MK + echo "LDFLAGS+= $LDFLAGS" >>$CONFIG_MK fi + if [ "$STATIC" = yes ]; then echo "LDFLAGS+= -static" >>$CONFIG_MK fi