Newer
Older
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"
])
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
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
#
])
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
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]