diff options
author | Brad King <brad.king@kitware.com> | 2002-09-06 21:19:18 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2002-09-06 21:19:18 (GMT) |
commit | 29058923349566477620c905c3ac5d150518cedc (patch) | |
tree | 6749adb6632309f78afafdf1cbddb81637f898f3 /Templates/cconfigure.in | |
parent | 41628d2602733993d74a24cc557083a6a007c845 (diff) | |
download | CMake-29058923349566477620c905c3ac5d150518cedc.zip CMake-29058923349566477620c905c3ac5d150518cedc.tar.gz CMake-29058923349566477620c905c3ac5d150518cedc.tar.bz2 |
ENH: Improved configure test implementations by using AC_TRY_COMPILE.
Diffstat (limited to 'Templates/cconfigure.in')
-rw-r--r-- | Templates/cconfigure.in | 41 |
1 files changed, 25 insertions, 16 deletions
diff --git a/Templates/cconfigure.in b/Templates/cconfigure.in index 6edc469..f8f23d1 100644 --- a/Templates/cconfigure.in +++ b/Templates/cconfigure.in @@ -595,22 +595,31 @@ CMAKE_ANSI_CFLAGS="" if test $ac_cv_prog_gcc = no; then case $system in HP-UX-*) - echo $ac_n "checking whether ${CC} accepts -Aa""... $ac_c" 1>&6 - echo 'void f(){}' > conftest.c - if test -z "`${CC} -Aa -c conftest.c 2>&1`"; then - echo "$ac_t""yes" 1>&6 - CMAKE_ANSI_CFLAGS="$CMAKE_ANSI_CFLAGS -Aa" - else - echo "$ac_t""no" 1>&6 - fi - echo $ac_n "checking whether ${CC} accepts -Ae""... $ac_c" 1>&6 - if test -z "`${CC} -Ae -c conftest.c 2>&1`"; then - echo "$ac_t""yes" 1>&6 - CMAKE_ANSI_CFLAGS="$CMAKE_ANSI_CFLAGS -Ae" - else - echo "$ac_t""no" 1>&6 - fi - rm -f conftest* + CFLAGS_ORIG="$FLAGS" + CFLAGS="-Aa $CFLAGS" + AC_MSG_CHECKING([whether ${CC} accepts -Aa]) + AC_TRY_COMPILE([ + void foo() {} + ],,[ + AC_MSG_RESULT(yes) + CMAKE_ANSI_CFLAGS="$CMAKE_ANSI_CFLAGS -Aa" + ],[ + AC_MSG_RESULT(no) + ]) + CFLAGS="$CFLAGS_ORIG" + + CFLAGS_ORIG="$FLAGS" + CFLAGS="-Ae $CFLAGS" + AC_MSG_CHECKING([whether ${CC} accepts -Ae]) + AC_TRY_COMPILE([ + void foo() {} + ],,[ + AC_MSG_RESULT(yes) + CMAKE_ANSI_CFLAGS="$CMAKE_ANSI_CFLAGS -Ae" + ],[ + AC_MSG_RESULT(no) + ]) + CFLAGS="$CFLAGS_ORIG" ;; esac fi |