forked from wolfSSL/wolfssl
check if colrm is available for options.h creation
This commit is contained in:
17
configure.ac
17
configure.ac
@ -8641,8 +8641,23 @@ echo "extern \"C\" {" >> $OPTION_FILE
|
|||||||
echo "#endif" >> $OPTION_FILE
|
echo "#endif" >> $OPTION_FILE
|
||||||
echo "" >> $OPTION_FILE
|
echo "" >> $OPTION_FILE
|
||||||
|
|
||||||
|
# check for supported command to trim option with
|
||||||
|
which colrm &> /dev/null
|
||||||
|
RESULT=$?
|
||||||
|
if test "$RESULT" = "0"; then
|
||||||
|
TRIM="colrm 3"
|
||||||
|
else
|
||||||
|
which cut &> /dev/null
|
||||||
|
RESULT=$?
|
||||||
|
if test "$RESULT" = "0"; then
|
||||||
|
TRIM="cut -c1-2"
|
||||||
|
else
|
||||||
|
AC_MSG_ERROR([Could not find colrm or cut to make options file])
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
for option in $CPPFLAGS $AM_CPPFLAGS $CFLAGS $AM_CFLAGS; do
|
for option in $CPPFLAGS $AM_CPPFLAGS $CFLAGS $AM_CFLAGS; do
|
||||||
opt_type=$(echo $option | colrm 3)
|
opt_type=$(echo $option | $TRIM )
|
||||||
case "$opt_type" in
|
case "$opt_type" in
|
||||||
-D)
|
-D)
|
||||||
RHS_only=$(echo $option | sed 's/^-D//')
|
RHS_only=$(echo $option | sed 's/^-D//')
|
||||||
|
Reference in New Issue
Block a user