[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Condor-devel] configure.ac --with-gcc-version-check flag
- Date: Fri, 15 Feb 2008 13:04:27 -0600
- From: Matthew Farrellee <matt@xxxxxxxxxxx>
- Subject: [Condor-devel] configure.ac --with-gcc-version-check flag
I'd like to add a --with[out]-gcc-version-check-flag to configure. The
purpose is to allow configure to continue even when it does not find a
blessed version of gcc. The resulting build attempt may or may not be
successful because of the unsupported version of gcc, but that should
not be a concern.
This will simplify quick clipped ports, by eliminating the need to edit
configure.ac, and will help bt in cross tests on platforms that Condor
is not compiled on but where the tests must be configured.
I would like to commit this flag, which is off by default, to the 7.0
series before the next 7.1 merge to help bt.
Note: I considered providing meaningful values for CompilerMajor,
CompilerMajor, CompilerMinor, CompilerPatch, but rejected the idea on
the grounds that they might be confused in the code, and when you use
this flag you are putting your ability to build in your own hands.
Best,
matt
---
diff --git a/src/configure.ac b/src/configure.ac
index af0150f..4a1aefb 100644
--- a/src/configure.ac
+++ b/src/configure.ac
@@ -507,6 +507,12 @@ AC_ARG_WITH(proper,
[PROPER=$withval],
[PROPER=no])
+AC_ARG_WITH(gcc-version-check,
+ [AS_HELP_STRING([--with-gcc-version-check],
+ [Fail if the gcc version is not explicitly blessed])],
+ [GCC_VERSION_CHECK=$withval],
+ [GCC_VERSION_CHECK=yes])
+
AC_ARG_WITH(full-port,
[AS_HELP_STRING([--with-full-port],
[Perform a full build, i.e. Standard Universe included])],
@@ -841,9 +847,17 @@ case "$gcc_vers" in
CompilerPatch="2"
;;
* )
- AC_MSG_RESULT([ERROR])
- AC_MSG_ERROR([Condor will not compile with gcc version $gcc_vers])
- ;;
+ if test "x$GCC_VERSION_CHECK" = "xyes"; then
+ AC_MSG_RESULT([ERROR])
+ AC_MSG_ERROR([Condor will not compile with gcc version $gcc_vers])
+ else
+ AC_MSG_RESULT([$gcc_vers (UNSUPPORTED)])
+ CompilerKind="UNSUPPORTED"
+ CompilerMajor="0"
+ CompilerMinor="0"
+ CompilerPatch="0"
+ fi
+ ;;
esac
AC_MSG_RESULT([$gcc_vers])