diff configure.ac @ 4194:3dc897731d3b

new option to enable ccache * configure.ac: New option, --with-ccache. Set and substitute MXE_TARGET variable. * Makefile.in (USE_CCACHE, MXE_TARGET): New substitutions. (prerequisites, ccache-links, all-targets): New targets. (all): Use recursive make invocations to build prerequisites before all other targets.
author John W. Eaton <jwe@octave.org>
date Mon, 29 Aug 2016 13:26:30 -0400
parents 32814edc00db
children 3262d92eff57
line wrap: on
line diff
--- a/configure.ac	Mon Aug 29 12:02:46 2016 -0400
+++ b/configure.ac	Mon Aug 29 13:26:30 2016 -0400
@@ -74,6 +74,12 @@
 esac
 AC_SUBST(PKG_DIR)
 
+USE_CCACHE=no
+AC_ARG_WITH([ccache],
+  [AS_HELP_STRING([--with-ccache], [use ccache (default: no)])],
+  [if test "$withval" = yes; then USE_CCACHE=yes; fi], [])
+AC_SUBST(USE_CCACHE)
+
 ENABLE_WINDOWS_64=no
 AC_ARG_ENABLE(windows-64,
   [AS_HELP_STRING([--enable-windows-64],
@@ -239,6 +245,15 @@
 MXE_ROOTDIR=`cd "$builddir"; pwd`
 AC_SUBST(MXE_ROOTDIR)
 
+if test "$MXE_NATIVE_BUILD" = no; then
+  if test "$ENABLE_WINDOWS_64" = yes; then
+    MXE_TARGET=x86_64-w64-mingw32
+  else
+    MXE_TARGET=i686-w64-mingw32
+  fi
+fi
+AC_SUBST(MXE_TARGET)
+
 AC_CONFIG_FILES([Makefile tools/set-mxe-env.sh])
 AC_CONFIG_FILES([tools/makeinst-script.sh], [chmod a+x tools/makeinst-script.sh])