]> www.ginac.de Git - cln.git/commitdiff
build: don't insist on turning on optimization.
authorAlexei Sheplyakov <varg@theor.jinr.ru>
Sat, 23 Aug 2008 15:11:28 +0000 (19:11 +0400)
committerAlexei Sheplyakov <varg@theor.jinr.ru>
Wed, 27 Aug 2008 04:41:09 +0000 (08:41 +0400)
Since there's no CL_REQUIRE/CL_PROVIDE junk any more, optimization is
not mandatory.

configure.ac
m4/cc.m4

index 7b4d577e442983eafe45f3ec728b3c35a2809a91..ba188cb554b99f3261ebf448601b4a8270d38ad0 100644 (file)
@@ -41,11 +41,11 @@ d
 dnl
 dnl           checks for programs
 dnl
-CL_PROG_CC
+AC_PROG_CC
                       dnl sets variable CC
 AC_PROG_CPP
                       dnl sets variable CPP
-CL_PROG_CXX
+AC_PROG_CXX
                       dnl sets variable CXX
 AC_PROG_CXXCPP
                       dnl sets variable CXXCPP
index 768dba1d600eae55fb66b7cbbbc54dbd31910099..b1c001fa389756df58e6855be0d623027f125050 100644 (file)
--- a/m4/cc.m4
+++ b/m4/cc.m4
@@ -1,47 +1,3 @@
-dnl The CLN manual says that without CFLAGS or CXXFLAGS being set compilation
-dnl will happen with -O.  However, AC_PROG_CC and AC_PROG_CXX set CFLAGS and
-dnl CXXFLAGS to "-g -O2", which produces way too large binaries.
-
-
-dnl Wrapper around AC_PROG_CC setting CFLAGS to plain "-O" as opposed to
-dnl "-g -O2" for the GNU compiler (unless CFLAGS was set before).
-AC_DEFUN([CL_PROG_CC],
-[cl_test_CFLAGS=${CFLAGS+set}
-# Make sure this macro does not come after AC_PROG_CC.
-# Otherwise CFLAGS would already be set.
-AC_BEFORE([$0],[AC_PROG_CC])dnl
-AC_PROG_CC([$1])
-if test "$cl_test_CFLAGS" != set && test "$ac_compiler_gnu" = yes; then
-    CFLAGS="-O"
-fi
-])
-
-
-dnl Wrapper around AC_PROG_CXX setting CXXFLAGS to plain "-O" as opposed to
-dnl "-g -O2" for the GNU compiler (unless CXXFLAGS was set before).  Also
-dnl emits a warning if G++ is used and optimization turned off.
-AC_DEFUN([CL_PROG_CXX],
-[cl_test_CXXFLAGS=${CXXFLAGS+set}
-# Make sure this macro does not come after AC_PROG_CXX.
-# Otherwise CXXFLAGS would already be set.
-AC_BEFORE([$0],[AC_PROG_CXX])dnl
-AC_PROG_CXX([$1])
-if test "$ac_compiler_gnu" = yes; then
-  if test "$cl_test_CXXFLAGS" != set; then
-    # User has not set CXXFLAGS.
-    CXXFLAGS="-O"
-  else
-    # Warn if optimization has been turned off with GCC.
-    # Optimization is used for module ordering.
-    case $CXXFLAGS in
-      [ *\ -O | -O | -O\ * | *\ -O\ * | -O[!0]* | *\ -O[!0]*) ;; ]
-      *) AC_MSG_WARN([Optimization turned off. I recommend you unset CXXFLAGS.]);;
-    esac
-  fi
-fi
-])
-
-
 dnl Checks whether the stack can be marked nonexecutable by passing an option
 dnl to the C-compiler when acting on .s files. Appends that option to ASFLAGS.
 dnl This macro is adapted from one found in GLIBC-2.3.5.