diff options
author | Andrey Hristov <andrey@php.net> | 1999-04-26 18:06:04 +0000 |
---|---|---|
committer | Andrey Hristov <andrey@php.net> | 1999-04-26 18:06:04 +0000 |
commit | b9d3a80709b718553f7ee096e539ef6b6481d5f2 (patch) | |
tree | dae7ebc4704a8ceab67f5665069b145e9886e07b | |
parent | 3cd0af11eea32f802228004af8fe424c62c8fbfb (diff) | |
download | php-git-b9d3a80709b718553f7ee096e539ef6b6481d5f2.tar.gz |
Fixing a few thing to make AC_CHECK_CC_OPTION work.
-rw-r--r-- | acinclude.m4 | 12 |
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) |