summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorNorbert Thiebaud <nthiebaud@gmail.com>2012-03-23 02:02:53 -0500
committerNorbert Thiebaud <nthiebaud@gmail.com>2012-03-23 02:02:53 -0500
commitc0a99301f5d854cad8baeaca798549424937598d (patch)
treefb000a3d211ae5056de03473727132b1e835c668 /configure.in
parent9d2968d6dd12cda797aa31bc0f0798f835cd073a (diff)
allow for the use of --enable-ccache on Windows
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in84
1 files changed, 41 insertions, 43 deletions
diff --git a/configure.in b/configure.in
index ef42ca9acbc7..3f084e62d03b 100644
--- a/configure.in
+++ b/configure.in
@@ -2139,7 +2139,7 @@ AC_SUBST(SYSBASE)
dnl ===================================================================
dnl Checks if ccache is available
dnl ===================================================================
-if test "$enable_ccache" = "yes" -o \( "$enable_ccache" = "" -a "$enable_icecream" != "yes" \); then
+if test "$enable_ccache" = "yes" -o \( "$enable_ccache" = "" -a "$enable_icecream" != "yes" -a "$build_os" != "cygwin" \); then
case "%$CC%$CXX%" in
# If $CC and/or $CXX already contain "ccache" (possibly suffixed with some verison number etc),
# assume that's good then
@@ -2519,31 +2519,6 @@ if test "$GCC" = "yes"; then
fi
AC_SUBST(COM_GCC_IS_CLANG)
-#
-# prefix C with ccache if needed
-#
-if test "$_os" != "WINNT" -o "$WITH_MINGW" = "yes"; then
- if test "$CCACHE" != ""; then
- AC_MSG_CHECKING([whether $CC is already ccached])
-
- AC_LANG_PUSH([C])
- save_CFLAGS=$CFLAGS
- CFLAGS="$CFLAGS --ccache-skip -O2"
- dnl an empty program will do, we're checking the compiler flags
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],
- [use_ccache=yes], [use_ccache=no])
- if test $use_ccache = yes; then
- AC_MSG_RESULT([yes])
- else
- CC="$CCACHE $CC"
- AC_MSG_RESULT([no])
- fi
- CFLAGS=$save_CFLAGS
- AC_LANG_POP([C])
- fi
-
-fi
-
HAVE_LD_BSYMBOLIC_FUNCTIONS=
if test "$GCC" = "yes"; then
AC_MSG_CHECKING( for -Bsymbolic-functions linker support )
@@ -2798,6 +2773,31 @@ MSPDB_PATH="$formatted_path"
AC_SUBST(SHOWINCLUDES_PREFIX)
#
+# prefix C with ccache if needed
+#
+if test "$_os" != "WINNT" -o "$WITH_MINGW" = "yes"; then
+ if test "$CCACHE" != ""; then
+ AC_MSG_CHECKING([whether $CC is already ccached])
+
+ AC_LANG_PUSH([C])
+ save_CFLAGS=$CFLAGS
+ CFLAGS="$CFLAGS --ccache-skip -O2"
+ dnl an empty program will do, we're checking the compiler flags
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],
+ [use_ccache=yes], [use_ccache=no])
+ if test $use_ccache = yes; then
+ AC_MSG_RESULT([yes])
+ else
+ CC="$CCACHE $CC"
+ AC_MSG_RESULT([no])
+ fi
+ CFLAGS=$save_CFLAGS
+ AC_LANG_POP([C])
+ fi
+
+fi
+
+#
# determine CPU, CPUNAME, GUI, GUIBASE, ...
#
LIB64="lib"
@@ -3980,24 +3980,22 @@ fi
#
# prefx CXX with ccache if needed
#
-if test "$_os" != "WINNT" -o "$WITH_MINGW" = "yes"; then
- if test "$CCACHE" != ""; then
- AC_MSG_CHECKING([whether $CXX is already ccached])
- AC_LANG_PUSH([C++])
- save_CXXFLAGS=$CXXFLAGS
- CXXFLAGS="$CXXFLAGS --ccache-skip -O2"
- dnl an empty program will do, we're checking the compiler flags
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],
- [use_ccache=yes], [use_ccache=no])
- if test $use_ccache = yes; then
- AC_MSG_RESULT([yes])
- else
- CXX="$CCACHE $CXX"
- AC_MSG_RESULT([no])
- fi
- CXXFLAGS=$save_CXXFLAGS
- AC_LANG_POP([C++])
+if test "$CCACHE" != ""; then
+ AC_MSG_CHECKING([whether $CXX is already ccached])
+ AC_LANG_PUSH([C++])
+ save_CXXFLAGS=$CXXFLAGS
+ CXXFLAGS="$CXXFLAGS --ccache-skip -O2"
+ dnl an empty program will do, we're checking the compiler flags
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],
+ [use_ccache=yes], [use_ccache=no])
+ if test $use_ccache = yes; then
+ AC_MSG_RESULT([yes])
+ else
+ CXX="$CCACHE $CXX"
+ AC_MSG_RESULT([no])
fi
+ CXXFLAGS=$save_CXXFLAGS
+ AC_LANG_POP([C++])
fi
dnl ===================================================================