From 2c61e9c76a9665ca0f93d6a21a17030fe22b8f1c Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Fri, 20 Jun 2008 18:09:48 +0000 Subject: Modified configuration script to actually verify if the compiler is good enough at detecting compilation errors or at least it has been properly configured to do so. Configuration heavily depends on this capability, so if this compiler sanity check fails the configuration process will now fail. --- ares/configure.ac | 61 ++++++++++++++++++++++++++++++++----------------------- 1 file changed, 36 insertions(+), 25 deletions(-) (limited to 'ares/configure.ac') diff --git a/ares/configure.ac b/ares/configure.ac index 0cca59e3b..6aaf47896 100644 --- a/ares/configure.ac +++ b/ares/configure.ac @@ -123,28 +123,6 @@ dnl gethostbyname_r() version dnl ********************************************************************** CURL_DETECT_ICC([CFLAGS="$CFLAGS -we 147"]) -dnl ********************************************************************** -dnl Make sure that our checks for headers windows.h winsock.h winsock2.h -dnl and ws2tcpip.h take precedence over any other further checks which -dnl could be done later using AC_CHECK_HEADER or AC_CHECK_HEADERS for -dnl this specific header files. And do them before its results are used. -dnl ********************************************************************** - -CURL_CHECK_HEADER_WINDOWS -CURL_CHECK_NATIVE_WINDOWS -case X-"$ac_cv_native_windows" in - X-yes) - CURL_CHECK_HEADER_WINSOCK - CURL_CHECK_HEADER_WINSOCK2 - CURL_CHECK_HEADER_WS2TCPIP - ;; - *) - ac_cv_header_winsock_h="no" - ac_cv_header_winsock2_h="no" - ac_cv_header_ws2tcpip_h="no" - ;; -esac - dnl ********************************************************************** dnl platform/compiler/architecture specific checks/flags dnl ********************************************************************** @@ -182,6 +160,42 @@ case $host in # esac +CURL_CHECK_DEF([__xlc__]) +if test "$curl_cv_have_def___xlc__" = "yes"; then + dnl Force xlc to stop after the compilation phase, and not + dnl generate object code file when compilation has errors. + CFLAGS="$CFLAGS -qhalt=e" +fi + +CURL_CHECK_COMPILER_HALT_ON_ERROR +CURL_CHECK_COMPILER_ARRAY_SIZE_NEGATIVE + +dnl ********************************************************************** +dnl Compilation based checks should not be done before this point. +dnl ********************************************************************** + +dnl ********************************************************************** +dnl Make sure that our checks for headers windows.h winsock.h winsock2.h +dnl and ws2tcpip.h take precedence over any other further checks which +dnl could be done later using AC_CHECK_HEADER or AC_CHECK_HEADERS for +dnl this specific header files. And do them before its results are used. +dnl ********************************************************************** + +CURL_CHECK_HEADER_WINDOWS +CURL_CHECK_NATIVE_WINDOWS +case X-"$ac_cv_native_windows" in + X-yes) + CURL_CHECK_HEADER_WINSOCK + CURL_CHECK_HEADER_WINSOCK2 + CURL_CHECK_HEADER_WS2TCPIP + ;; + *) + ac_cv_header_winsock_h="no" + ac_cv_header_winsock2_h="no" + ac_cv_header_ws2tcpip_h="no" + ;; +esac + dnl ********************************************************************** dnl Checks for libraries. dnl ********************************************************************** @@ -431,9 +445,6 @@ if test "x$RECENTAIX" = "xyes"; then dnl the optimizer assumes that pointers can only point to dnl an object of the same type. CFLAGS="$CFLAGS -qnoansialias" - dnl Force AIX xlc to stop after the compilation phase, and not - dnl generate object code, when the source compiles with errors. - CFLAGS="$CFLAGS -qhalt=e" ) fi -- cgit v1.2.3