mirror of
https://github.com/moparisthebest/curl
synced 2024-12-22 08:08:50 -05:00
Moved *_CHECK_COMPILER_HALT_ON_ERROR and *_CHECK_COMPILER_ARRAY_SIZE_NEGATIVE to *-compilers.m4 along with other *_CHECK_COMPILER_*
This commit is contained in:
parent
4d522b8f31
commit
cfda3e6a48
47
acinclude.m4
47
acinclude.m4
@ -22,53 +22,6 @@
|
||||
#***************************************************************************
|
||||
|
||||
|
||||
dnl CURL_CHECK_COMPILER_HALT_ON_ERROR
|
||||
dnl -------------------------------------------------
|
||||
dnl Verifies if the compiler actually halts after the
|
||||
dnl compilation phase without generating any object
|
||||
dnl code file, when the source compiles with errors.
|
||||
|
||||
AC_DEFUN([CURL_CHECK_COMPILER_HALT_ON_ERROR], [
|
||||
AC_MSG_CHECKING([if compiler halts on compilation errors])
|
||||
AC_COMPILE_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
]],[[
|
||||
force compilation error
|
||||
]])
|
||||
],[
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_ERROR([compiler does not halt on compilation errors.])
|
||||
],[
|
||||
AC_MSG_RESULT([yes])
|
||||
])
|
||||
])
|
||||
|
||||
|
||||
dnl CURL_CHECK_COMPILER_ARRAY_SIZE_NEGATIVE
|
||||
dnl -------------------------------------------------
|
||||
dnl Verifies if the compiler actually halts after the
|
||||
dnl compilation phase without generating any object
|
||||
dnl code file, when the source code tries to define a
|
||||
dnl type for a constant array with negative dimension.
|
||||
|
||||
AC_DEFUN([CURL_CHECK_COMPILER_ARRAY_SIZE_NEGATIVE], [
|
||||
AC_REQUIRE([CURL_CHECK_COMPILER_HALT_ON_ERROR])dnl
|
||||
AC_MSG_CHECKING([if compiler halts on negative sized arrays])
|
||||
AC_COMPILE_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
typedef char bad_t[sizeof(char) == sizeof(int) ? -1 : -1 ];
|
||||
]],[[
|
||||
bad_t dummy;
|
||||
]])
|
||||
],[
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_ERROR([compiler does not halt on negative sized arrays.])
|
||||
],[
|
||||
AC_MSG_RESULT([yes])
|
||||
])
|
||||
])
|
||||
|
||||
|
||||
dnl CURL_CHECK_DEF (SYMBOL, [INCLUDES], [SILENT])
|
||||
dnl -------------------------------------------------
|
||||
dnl Use the C preprocessor to find out if the given object-style symbol
|
||||
|
@ -1,52 +1,5 @@
|
||||
|
||||
|
||||
dnl CURL_CHECK_COMPILER_HALT_ON_ERROR
|
||||
dnl -------------------------------------------------
|
||||
dnl Verifies if the compiler actually halts after the
|
||||
dnl compilation phase without generating any object
|
||||
dnl code file, when the source compiles with errors.
|
||||
|
||||
AC_DEFUN([CURL_CHECK_COMPILER_HALT_ON_ERROR], [
|
||||
AC_MSG_CHECKING([if compiler halts on compilation errors])
|
||||
AC_COMPILE_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
]],[[
|
||||
force compilation error
|
||||
]])
|
||||
],[
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_ERROR([compiler does not halt on compilation errors.])
|
||||
],[
|
||||
AC_MSG_RESULT([yes])
|
||||
])
|
||||
])
|
||||
|
||||
|
||||
dnl CURL_CHECK_COMPILER_ARRAY_SIZE_NEGATIVE
|
||||
dnl -------------------------------------------------
|
||||
dnl Verifies if the compiler actually halts after the
|
||||
dnl compilation phase without generating any object
|
||||
dnl code file, when the source code tries to define a
|
||||
dnl type for a constant array with negative dimension.
|
||||
|
||||
AC_DEFUN([CURL_CHECK_COMPILER_ARRAY_SIZE_NEGATIVE], [
|
||||
AC_REQUIRE([CURL_CHECK_COMPILER_HALT_ON_ERROR])dnl
|
||||
AC_MSG_CHECKING([if compiler halts on negative sized arrays])
|
||||
AC_COMPILE_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
typedef char bad_t[sizeof(char) == sizeof(int) ? -1 : -1 ];
|
||||
]],[[
|
||||
bad_t dummy;
|
||||
]])
|
||||
],[
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_ERROR([compiler does not halt on negative sized arrays.])
|
||||
],[
|
||||
AC_MSG_RESULT([yes])
|
||||
])
|
||||
])
|
||||
|
||||
|
||||
dnl CURL_CHECK_DEF (SYMBOL, [INCLUDES], [SILENT])
|
||||
dnl -------------------------------------------------
|
||||
dnl Use the C preprocessor to find out if the given object-style symbol
|
||||
|
@ -158,8 +158,8 @@ case $host in
|
||||
#
|
||||
esac
|
||||
|
||||
CURL_CHECK_COMPILER_HALT_ON_ERROR
|
||||
CURL_CHECK_COMPILER_ARRAY_SIZE_NEGATIVE
|
||||
CARES_CHECK_COMPILER_HALT_ON_ERROR
|
||||
CARES_CHECK_COMPILER_ARRAY_SIZE_NEGATIVE
|
||||
|
||||
dnl **********************************************************************
|
||||
dnl Compilation based checks should not be done before this point.
|
||||
|
@ -1,7 +1,7 @@
|
||||
#***************************************************************************
|
||||
# $Id$
|
||||
#
|
||||
# Copyright (C) 2008 by Daniel Stenberg et al
|
||||
# Copyright (C) 2009 by Daniel Stenberg et al
|
||||
#
|
||||
# Permission to use, copy, modify, and distribute this software and its
|
||||
# documentation for any purpose and without fee is hereby granted, provided
|
||||
@ -16,7 +16,7 @@
|
||||
#***************************************************************************
|
||||
|
||||
# File version for 'aclocal' use. Keep it a single number.
|
||||
# serial 48
|
||||
# serial 49
|
||||
|
||||
|
||||
dnl CARES_CHECK_COMPILER
|
||||
@ -374,8 +374,8 @@ dnl -------------------------------------------------
|
||||
dnl Changes standard include paths present in CFLAGS
|
||||
dnl and CPPFLAGS into isystem include paths. This is
|
||||
dnl done to prevent GNUC from generating warnings on
|
||||
dnl headers from these locations, even though this is
|
||||
dnl not reliable on ancient GNUC versions.
|
||||
dnl headers from these locations, although on ancient
|
||||
dnl GNUC versions these warnings are not silenced.
|
||||
|
||||
AC_DEFUN([CARES_CONVERT_INCLUDE_TO_ISYSTEM], [
|
||||
AC_REQUIRE([CARES_SHFUNC_SQUEEZE])dnl
|
||||
@ -1121,6 +1121,53 @@ AC_DEFUN([CARES_CHECK_PROG_CC], [
|
||||
])
|
||||
|
||||
|
||||
dnl CARES_CHECK_COMPILER_HALT_ON_ERROR
|
||||
dnl -------------------------------------------------
|
||||
dnl Verifies if the compiler actually halts after the
|
||||
dnl compilation phase without generating any object
|
||||
dnl code file, when the source compiles with errors.
|
||||
|
||||
AC_DEFUN([CARES_CHECK_COMPILER_HALT_ON_ERROR], [
|
||||
AC_MSG_CHECKING([if compiler halts on compilation errors])
|
||||
AC_COMPILE_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
]],[[
|
||||
force compilation error
|
||||
]])
|
||||
],[
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_ERROR([compiler does not halt on compilation errors.])
|
||||
],[
|
||||
AC_MSG_RESULT([yes])
|
||||
])
|
||||
])
|
||||
|
||||
|
||||
dnl CARES_CHECK_COMPILER_ARRAY_SIZE_NEGATIVE
|
||||
dnl -------------------------------------------------
|
||||
dnl Verifies if the compiler actually halts after the
|
||||
dnl compilation phase without generating any object
|
||||
dnl code file, when the source code tries to define a
|
||||
dnl type for a constant array with negative dimension.
|
||||
|
||||
AC_DEFUN([CARES_CHECK_COMPILER_ARRAY_SIZE_NEGATIVE], [
|
||||
AC_REQUIRE([CARES_CHECK_COMPILER_HALT_ON_ERROR])dnl
|
||||
AC_MSG_CHECKING([if compiler halts on negative sized arrays])
|
||||
AC_COMPILE_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
typedef char bad_t[sizeof(char) == sizeof(int) ? -1 : -1 ];
|
||||
]],[[
|
||||
bad_t dummy;
|
||||
]])
|
||||
],[
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_ERROR([compiler does not halt on negative sized arrays.])
|
||||
],[
|
||||
AC_MSG_RESULT([yes])
|
||||
])
|
||||
])
|
||||
|
||||
|
||||
dnl CARES_VAR_MATCH (VARNAME, VALUE)
|
||||
dnl -------------------------------------------------
|
||||
dnl Verifies if shell variable VARNAME contains VALUE.
|
||||
|
@ -22,7 +22,7 @@
|
||||
#***************************************************************************
|
||||
|
||||
# File version for 'aclocal' use. Keep it a single number.
|
||||
# serial 48
|
||||
# serial 49
|
||||
|
||||
|
||||
dnl CURL_CHECK_COMPILER
|
||||
@ -380,8 +380,8 @@ dnl -------------------------------------------------
|
||||
dnl Changes standard include paths present in CFLAGS
|
||||
dnl and CPPFLAGS into isystem include paths. This is
|
||||
dnl done to prevent GNUC from generating warnings on
|
||||
dnl headers from these locations, even though this is
|
||||
dnl not reliable on ancient GNUC versions.
|
||||
dnl headers from these locations, although on ancient
|
||||
dnl GNUC versions these warnings are not silenced.
|
||||
|
||||
AC_DEFUN([CURL_CONVERT_INCLUDE_TO_ISYSTEM], [
|
||||
AC_REQUIRE([CURL_SHFUNC_SQUEEZE])dnl
|
||||
@ -1113,6 +1113,53 @@ AC_DEFUN([CURL_CHECK_PROG_CC], [
|
||||
])
|
||||
|
||||
|
||||
dnl CURL_CHECK_COMPILER_HALT_ON_ERROR
|
||||
dnl -------------------------------------------------
|
||||
dnl Verifies if the compiler actually halts after the
|
||||
dnl compilation phase without generating any object
|
||||
dnl code file, when the source compiles with errors.
|
||||
|
||||
AC_DEFUN([CURL_CHECK_COMPILER_HALT_ON_ERROR], [
|
||||
AC_MSG_CHECKING([if compiler halts on compilation errors])
|
||||
AC_COMPILE_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
]],[[
|
||||
force compilation error
|
||||
]])
|
||||
],[
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_ERROR([compiler does not halt on compilation errors.])
|
||||
],[
|
||||
AC_MSG_RESULT([yes])
|
||||
])
|
||||
])
|
||||
|
||||
|
||||
dnl CURL_CHECK_COMPILER_ARRAY_SIZE_NEGATIVE
|
||||
dnl -------------------------------------------------
|
||||
dnl Verifies if the compiler actually halts after the
|
||||
dnl compilation phase without generating any object
|
||||
dnl code file, when the source code tries to define a
|
||||
dnl type for a constant array with negative dimension.
|
||||
|
||||
AC_DEFUN([CURL_CHECK_COMPILER_ARRAY_SIZE_NEGATIVE], [
|
||||
AC_REQUIRE([CURL_CHECK_COMPILER_HALT_ON_ERROR])dnl
|
||||
AC_MSG_CHECKING([if compiler halts on negative sized arrays])
|
||||
AC_COMPILE_IFELSE([
|
||||
AC_LANG_PROGRAM([[
|
||||
typedef char bad_t[sizeof(char) == sizeof(int) ? -1 : -1 ];
|
||||
]],[[
|
||||
bad_t dummy;
|
||||
]])
|
||||
],[
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_ERROR([compiler does not halt on negative sized arrays.])
|
||||
],[
|
||||
AC_MSG_RESULT([yes])
|
||||
])
|
||||
])
|
||||
|
||||
|
||||
dnl CURL_VAR_MATCH (VARNAME, VALUE)
|
||||
dnl -------------------------------------------------
|
||||
dnl Verifies if shell variable VARNAME contains VALUE.
|
||||
|
Loading…
Reference in New Issue
Block a user