HTCondor Project List Archives



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Condor-devel] configure.ac --with-gcc-version-check flag



Zachary Miller wrote:
On Fri, Feb 15, 2008 at 01:04:27PM -0600, Matthew Farrellee wrote:
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.

sounds good to me, except that i'd like to see it called
  --enable-gcc-version-check  (default)
  --disable-gcc-version-check


cheers,
-zach

Good idea. Done.

Best,


matt

diff --git a/src/configure.ac b/src/configure.ac
index af0150f..8c3f481 100644
--- a/src/configure.ac
+++ b/src/configure.ac
@@ -507,6 +507,12 @@ AC_ARG_WITH(proper,
   [PROPER=$withval],
   [PROPER=no])

+AC_ARG_ENABLE(gcc-version-check,
+  [AS_HELP_STRING([--disable-gcc-version-check],
+     [Disable the gcc version check])],
+  [],
+  [enable_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$enable_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])