Alien-cares
view release on metacpan or search on metacpan
libcares/m4/cares-compilers.m4 view on Meta::CPAN
AC_DEFUN([CARES_CHECK_COMPILER_HPUX_C], [
AC_MSG_CHECKING([if compiler is HP-UX C])
CURL_CHECK_DEF([__HP_cc], [], [silent])
if test "$curl_cv_have_def___HP_cc" = "yes"; then
AC_MSG_RESULT([yes])
compiler_id="HP_UX_C"
flags_dbg_all="-g -s"
flags_dbg_yes="-g"
flags_dbg_off="-s"
flags_opt_all="-O +O0 +O1 +O2 +O3 +O4"
flags_opt_yes="+O2"
flags_opt_off="+O0"
else
AC_MSG_RESULT([no])
fi
])
dnl CARES_CHECK_COMPILER_IBM_C
dnl -------------------------------------------------
dnl Verify if compiler being used is IBM C.
AC_DEFUN([CARES_CHECK_COMPILER_IBM_C], [
AC_MSG_CHECKING([if compiler is IBM C])
CURL_CHECK_DEF([__IBMC__], [], [silent])
if test "$curl_cv_have_def___IBMC__" = "yes"; then
AC_MSG_RESULT([yes])
compiler_id="IBM_C"
flags_dbg_all="-g -g0 -g1 -g2 -g3"
flags_dbg_yes="-g"
flags_dbg_off=""
flags_opt_all="-O -O0 -O1 -O2 -O3 -O4 -O5"
flags_opt_all="$flags_opt_all -qnooptimize"
flags_opt_all="$flags_opt_all -qoptimize=0"
flags_opt_all="$flags_opt_all -qoptimize=1"
flags_opt_all="$flags_opt_all -qoptimize=2"
flags_opt_all="$flags_opt_all -qoptimize=3"
flags_opt_all="$flags_opt_all -qoptimize=4"
flags_opt_all="$flags_opt_all -qoptimize=5"
flags_opt_yes="-O2"
flags_opt_off="-qnooptimize"
flags_prefer_cppflags="yes"
else
AC_MSG_RESULT([no])
fi
])
dnl CARES_CHECK_COMPILER_INTEL_C
dnl -------------------------------------------------
dnl Verify if compiler being used is Intel C.
AC_DEFUN([CARES_CHECK_COMPILER_INTEL_C], [
AC_BEFORE([$0],[CARES_CHECK_COMPILER_GNU_C])dnl
AC_MSG_CHECKING([if compiler is Intel C])
CURL_CHECK_DEF([__INTEL_COMPILER], [], [silent])
if test "$curl_cv_have_def___INTEL_COMPILER" = "yes"; then
AC_MSG_RESULT([yes])
compiler_num="$curl_cv_def___INTEL_COMPILER"
CURL_CHECK_DEF([__unix__], [], [silent])
if test "$curl_cv_have_def___unix__" = "yes"; then
compiler_id="INTEL_UNIX_C"
flags_dbg_all="-g -g0"
flags_dbg_yes="-g"
flags_dbg_off="-g0"
flags_opt_all="-O -O0 -O1 -O2 -O3 -Os"
flags_opt_yes="-O2"
flags_opt_off="-O0"
else
compiler_id="INTEL_WINDOWS_C"
flags_dbg_all="/ZI /Zi /zI /zi /ZD /Zd /zD /zd /Z7 /z7 /Oy /Oy-"
flags_dbg_all="$flags_dbg_all /debug"
flags_dbg_all="$flags_dbg_all /debug:none"
flags_dbg_all="$flags_dbg_all /debug:minimal"
flags_dbg_all="$flags_dbg_all /debug:partial"
flags_dbg_all="$flags_dbg_all /debug:full"
flags_dbg_all="$flags_dbg_all /debug:semantic_stepping"
flags_dbg_all="$flags_dbg_all /debug:extended"
flags_dbg_yes="/Zi /Oy-"
flags_dbg_off="/debug:none /Oy-"
flags_opt_all="/O /O0 /O1 /O2 /O3 /Od /Og /Og- /Oi /Oi-"
flags_opt_yes="/O2"
flags_opt_off="/Od"
fi
else
AC_MSG_RESULT([no])
fi
])
dnl CARES_CHECK_COMPILER_LCC
dnl -------------------------------------------------
dnl Verify if compiler being used is LCC.
AC_DEFUN([CARES_CHECK_COMPILER_LCC], [
AC_MSG_CHECKING([if compiler is LCC])
CURL_CHECK_DEF([__LCC__], [], [silent])
if test "$curl_cv_have_def___LCC__" = "yes"; then
AC_MSG_RESULT([yes])
compiler_id="LCC"
flags_dbg_all="-g"
flags_dbg_yes="-g"
flags_dbg_off=""
flags_opt_all=""
flags_opt_yes=""
flags_opt_off=""
else
AC_MSG_RESULT([no])
fi
])
dnl CARES_CHECK_COMPILER_SGI_MIPS_C
dnl -------------------------------------------------
dnl Verify if compiler being used is SGI MIPS C.
AC_DEFUN([CARES_CHECK_COMPILER_SGI_MIPS_C], [
AC_REQUIRE([CARES_CHECK_COMPILER_SGI_MIPSPRO_C])dnl
AC_MSG_CHECKING([if compiler is SGI MIPS C])
CURL_CHECK_DEF([__GNUC__], [], [silent])
CURL_CHECK_DEF([__sgi], [], [silent])
libcares/m4/cares-compilers.m4 view on Meta::CPAN
#
tmp_save_CPPFLAGS="$CPPFLAGS"
tmp_save_CFLAGS="$CFLAGS"
tmp_CPPFLAGS=""
tmp_CFLAGS=""
#
case "$compiler_id" in
#
CLANG)
#
dnl Disable warnings for unused arguments, otherwise clang will
dnl warn about compile-time arguments used during link-time, like
dnl -O and -g and -pedantic.
tmp_CFLAGS="$tmp_CFLAGS -Qunused-arguments"
;;
#
DEC_C)
#
dnl Select strict ANSI C compiler mode
tmp_CFLAGS="$tmp_CFLAGS -std1"
dnl Turn off optimizer ANSI C aliasing rules
tmp_CFLAGS="$tmp_CFLAGS -noansi_alias"
dnl Generate warnings for missing function prototypes
tmp_CFLAGS="$tmp_CFLAGS -warnprotos"
dnl Change some warnings into fatal errors
tmp_CFLAGS="$tmp_CFLAGS -msg_fatal toofewargs,toomanyargs"
;;
#
GNU_C)
#
dnl Placeholder
tmp_CFLAGS="$tmp_CFLAGS"
;;
#
HP_UX_C)
#
dnl Disallow run-time dereferencing of null pointers
tmp_CFLAGS="$tmp_CFLAGS -z"
dnl Disable some remarks
dnl #4227: padding struct with n bytes to align member
dnl #4255: padding size of struct with n bytes to alignment boundary
tmp_CFLAGS="$tmp_CFLAGS +W 4227,4255"
;;
#
IBM_C)
#
dnl Ensure that compiler optimizations are always thread-safe.
tmp_CPPFLAGS="$tmp_CPPFLAGS -qthreaded"
dnl Disable type based strict aliasing optimizations, using worst
dnl case aliasing assumptions when compiling. Type based aliasing
dnl would restrict the lvalues that could be safely used to access
dnl a data object.
tmp_CPPFLAGS="$tmp_CPPFLAGS -qnoansialias"
dnl Force compiler to stop after the compilation phase, without
dnl generating an object code file when compilation has errors.
tmp_CPPFLAGS="$tmp_CPPFLAGS -qhalt=e"
;;
#
INTEL_UNIX_C)
#
dnl On unix this compiler uses gcc's header files, so
dnl we select ANSI C89 dialect plus GNU extensions.
tmp_CFLAGS="$tmp_CFLAGS -std=gnu89"
dnl Change some warnings into errors
dnl #140: too many arguments in function call
dnl #147: declaration is incompatible with 'previous one'
dnl #165: too few arguments in function call
dnl #266: function declared implicitly
tmp_CPPFLAGS="$tmp_CPPFLAGS -we 140,147,165,266"
dnl Disable some remarks
dnl #279: controlling expression is constant
dnl #981: operands are evaluated in unspecified order
dnl #1469: "cc" clobber ignored
tmp_CPPFLAGS="$tmp_CPPFLAGS -wd 279,981,1469"
;;
#
INTEL_WINDOWS_C)
#
dnl Placeholder
tmp_CFLAGS="$tmp_CFLAGS"
;;
#
LCC)
#
dnl Disallow run-time dereferencing of null pointers
tmp_CFLAGS="$tmp_CFLAGS -n"
;;
#
SGI_MIPS_C)
#
dnl Placeholder
tmp_CFLAGS="$tmp_CFLAGS"
;;
#
SGI_MIPSPRO_C)
#
dnl Placeholder
tmp_CFLAGS="$tmp_CFLAGS"
;;
#
SUNPRO_C)
#
dnl Placeholder
tmp_CFLAGS="$tmp_CFLAGS"
;;
#
TINY_C)
#
dnl Placeholder
tmp_CFLAGS="$tmp_CFLAGS"
;;
#
WATCOM_UNIX_C)
#
dnl Placeholder
tmp_CFLAGS="$tmp_CFLAGS"
;;
#
WATCOM_WINDOWS_C)
#
dnl Placeholder
( run in 1.359 second using v1.01-cache-2.11-cpan-39bf76dae61 )