summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--acinclude.m412
1 files changed, 10 insertions, 2 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index 82f3894449..04d7f17d10 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -9,9 +9,17 @@ dnl
AC_DEFUN(AC_CHECK_CC_OPTION,[
echo "main(){return 0;}" > conftest.$ac_ext
opt="$1"
- var=`echo -n $opt|tr -c a-zA-Z0-9 _`
+ if echo '\c' | grep -s c >/dev/null 2>&1
+ then
+ echo_n="-n"
+ echo_c=""
+ else
+ echo_n=""
+ echo_c='\c'
+ fi
+ var=`echo $echo_n "$opt$echo_c"|tr -c a-zA-Z0-9 _`
AC_MSG_CHECKING([if compiler supports -$1 really])
- ac_compile='${CC-cc} -$opt -c $CFLAGS $CPPFLAGS conftest.$ac_ext 2>&1'
+ ac_compile="${CC-cc} -$opt -c $CFLAGS $CPPFLAGS conftest.$ac_ext 2>&1"
if eval $ac_compile | egrep "$opt" > /dev/null 2>&1 ; then
eval php_cc_$var=no
AC_MSG_RESULT(no)