summaryrefslogtreecommitdiffstats
path: root/bootstrap
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2003-09-15 19:58:27 (GMT)
committerBrad King <brad.king@kitware.com>2003-09-15 19:58:27 (GMT)
commit54584d1cb94b5cc50a7441b0390d9a4c594fb820 (patch)
tree4b0f5eae3ffcf085f9a0b4f9d154e79f06efc7f0 /bootstrap
parent0cd97b4030b858de8b218fa61c0d064459fcc0d1 (diff)
downloadCMake-54584d1cb94b5cc50a7441b0390d9a4c594fb820.zip
CMake-54584d1cb94b5cc50a7441b0390d9a4c594fb820.tar.gz
CMake-54584d1cb94b5cc50a7441b0390d9a4c594fb820.tar.bz2
BUG: Need to check for -Ae flag on HP-UX cc compiler. Needed for ANSI C compilation.
Diffstat (limited to 'bootstrap')
-rwxr-xr-xbootstrap25
1 files changed, 25 insertions, 0 deletions
diff --git a/bootstrap b/bootstrap
index 94f7aa3..254bb3f 100755
--- a/bootstrap
+++ b/bootstrap
@@ -515,6 +515,31 @@ EOF
fi
cmake_test_flags=
+# If we are on HP-UX, check for -Ae for the C compiler.
+cmake_test_flags="-Ae"
+if [ "x${cmake_system}" = "xHP-UX" ]; then
+ TMPFILE=`cmake_tmp_file`
+ cat > ${TMPFILE}.c <<EOF
+ int main(int argc, char** argv) { (void)argc; (void)argv; return 0; }
+EOF
+ cmake_need_Ae=0
+ if cmake_try_run "${cmake_c_compiler}" "${cmake_c_flags}" "${TMPFILE}.c" >> cmake_bootstrap.log 2>&1; then
+ :
+ else
+ if cmake_try_run "${cmake_c_compiler}" "${cmake_c_flags} ${cmake_test_flags}" "${TMPFILE}.c" >> cmake_bootstrap.log 2>&1; then
+ cmake_need_Ae=1
+ fi
+ fi
+ if [ "x${cmake_need_Ae}" = "x1" ]; then
+ cmake_c_flags="${cmake_c_flags} ${cmake_test_flags}"
+ echo "${cmake_c_compiler} needs ${cmake_test_flags}"
+ else
+ echo "${cmake_c_compiler} does not need ${cmake_test_flags}"
+ fi
+ rm -f "${TMPFILE}.c"
+fi
+cmake_test_flags=
+
# Just to be safe, let us store compiler and flags to the header file
cmake_report cmConfigure.h.tmp "/*"