Newer
Older
dnl them here. If you want them simply define it in CPPFLAGS.
tmp_CFLAGS="$tmp_CFLAGS"
SGI_MIPS_C)
#
if test "$want_warnings" = "yes"; then
dnl Perform stricter semantic and lint-like checks
tmp_CFLAGS="$tmp_CFLAGS -fullwarn"
fi
;;
#
#
if test "$want_warnings" = "yes"; then
dnl Perform stricter semantic and lint-like checks
tmp_CFLAGS="$tmp_CFLAGS -fullwarn"
dnl Disable some remarks
dnl #1209: controlling expression is constant
tmp_CFLAGS="$tmp_CFLAGS -woff 1209"
fi
;;
#
#
if test "$want_warnings" = "yes"; then
dnl Perform stricter semantic and lint-like checks
tmp_CFLAGS="$tmp_CFLAGS -v"
fi
;;
#
#
if test "$want_warnings" = "yes"; then
dnl Activate all warnings
tmp_CFLAGS="$tmp_CFLAGS -Wall"
dnl Make string constants be of type const char *
tmp_CFLAGS="$tmp_CFLAGS -Wwrite-strings"
dnl Warn use of unsupported GCC features ignored by TCC
tmp_CFLAGS="$tmp_CFLAGS -Wunsupported"
fi
;;
#
WATCOM_UNIX_C)
#
if test "$want_warnings" = "yes"; then
dnl Issue all warnings
fi
;;
#
WATCOM_WINDOWS_C)
#
dnl Placeholder
tmp_CFLAGS="$tmp_CFLAGS"
;;
#
esac
#
squeeze tmp_CPPFLAGS
squeeze tmp_CFLAGS
#
if test ! -z "$tmp_CFLAGS" || test ! -z "$tmp_CPPFLAGS"; then
AC_MSG_CHECKING([if compiler accepts strict warning options])
CPPFLAGS="$tmp_save_CPPFLAGS $tmp_CPPFLAGS"
CFLAGS="$tmp_save_CFLAGS $tmp_CFLAGS"
squeeze CPPFLAGS
squeeze CFLAGS
CURL_COMPILER_WORKS_IFELSE([
AC_MSG_RESULT([yes])
AC_MSG_NOTICE([compiler options added: $tmp_CFLAGS $tmp_CPPFLAGS])
],[
AC_MSG_RESULT([no])
AC_MSG_WARN([compiler options rejected: $tmp_CFLAGS $tmp_CPPFLAGS])
dnl restore initial settings
CPPFLAGS="$tmp_save_CPPFLAGS"
CFLAGS="$tmp_save_CFLAGS"
])
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
dnl CURL_SHFUNC_SQUEEZE
dnl -------------------------------------------------
dnl Declares a shell function squeeze() which removes
dnl redundant whitespace out of a shell variable.
AC_DEFUN([CURL_SHFUNC_SQUEEZE], [
squeeze() {
_sqz_result=""
eval _sqz_input=\[$][$]1
for _sqz_token in $_sqz_input; do
if test -z "$_sqz_result"; then
_sqz_result="$_sqz_token"
else
_sqz_result="$_sqz_result $_sqz_token"
fi
done
eval [$]1=\$_sqz_result
return 0
}
])
dnl CURL_PROCESS_DEBUG_BUILD_OPTS
dnl -------------------------------------------------
dnl Settings which depend on configure's debug given
dnl option, and further configure the build process.
dnl Don't use this macro for compiler dependant stuff.
AC_DEFUN([CURL_PROCESS_DEBUG_BUILD_OPTS], [
AC_REQUIRE([CURL_CHECK_OPTION_DEBUG])dnl
AC_REQUIRE([CURL_SHFUNC_SQUEEZE])dnl
AC_BEFORE([$0],[AC_PROG_LIBTOOL])dnl
#
if test "$want_debug" = "yes"; then
CPPFLAGS="$CPPFLAGS -DCURLDEBUG"
squeeze CPPFLAGS
fi
#
])
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
dnl CURL_CHECK_PROG_CC
dnl -------------------------------------------------
dnl Check for compiler program, preventing CFLAGS and
dnl CPPFLAGS from being unexpectedly changed.
AC_DEFUN([CURL_CHECK_PROG_CC], [
ac_save_CFLAGS="$CFLAGS"
ac_save_CPPFLAGS="$CPPFLAGS"
AC_PROG_CC
CFLAGS="$ac_save_CFLAGS"
CPPFLAGS="$ac_save_CPPFLAGS"
])
dnl CURL_VAR_MATCH (VARNAME, VALUE)
dnl -------------------------------------------------
dnl Verifies if shell variable VARNAME contains VALUE.
dnl Contents of variable VARNAME and VALUE are handled
dnl as whitespace separated lists of words. If at least
dnl one word of VALUE is present in VARNAME the match
dnl is considered positive, otherwise false.
AC_DEFUN([CURL_VAR_MATCH], [
ac_var_match_word="no"
for word1 in $[$1]; do
for word2 in [$2]; do
if test "$word1" = "$word2"; then
ac_var_match_word="yes"
fi
done
done
])
dnl CURL_VAR_MATCH_IFELSE (VARNAME, VALUE,
dnl [ACTION-IF-MATCH], [ACTION-IF-NOT-MATCH])
dnl -------------------------------------------------
dnl This performs a CURL_VAR_MATCH check and executes
dnl first branch if the match is positive, otherwise
dnl the second branch is executed.
AC_DEFUN([CURL_VAR_MATCH_IFELSE], [
CURL_VAR_MATCH([$1],[$2])
if test "$ac_var_match_word" = "yes"; then
ifelse($3,,:,[$3])
ifelse($4,,,[else
fi
])
dnl CURL_VAR_STRIP (VARNAME, VALUE)
dnl -------------------------------------------------
dnl Contents of variable VARNAME and VALUE are handled
dnl as whitespace separated lists of words. Each word
dnl from VALUE is removed from VARNAME when present.
AC_DEFUN([CURL_VAR_STRIP], [
AC_REQUIRE([CURL_SHFUNC_SQUEEZE])dnl
ac_var_stripped=""
for word1 in $[$1]; do
ac_var_strip_word="no"
for word2 in [$2]; do
if test "$word1" = "$word2"; then
ac_var_strip_word="yes"
fi
done
if test "$ac_var_strip_word" = "no"; then
ac_var_stripped="$ac_var_stripped $word1"
fi
done
dnl squeeze whitespace out of result
[$1]="$ac_var_stripped"
squeeze [$1]