From a28b5e645a9699e30b21615bb0d3aa4876376ee0 Mon Sep 17 00:00:00 2001 From: Derrick Brashear Date: Wed, 3 Oct 2012 07:47:06 -0400 Subject: [PATCH 1/1] configure: make use of native build assist tools possible provide a way to run native rxgen, config and compile_et Change-Id: I9d1a2b4a1d4100fdc4a042005586e8fc40f39f7b Reviewed-on: http://gerrit.openafs.org/8199 Tested-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Derrick Brashear --- acinclude.m4 | 20 ++++++++++++++++++++ src/config/Makefile.config.in | 6 +++--- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/acinclude.m4 b/acinclude.m4 index e67e155..28d60f9 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -233,6 +233,8 @@ AC_ARG_ENABLE([linux-syscall-probing], [enable Linux syscall probing (defaults to autodetect)])], , [enable_linux_syscall_probing="maybe"]) +AC_ARG_WITH([crosstools-dir], + [AS_HELP_STRING([--with-crosstools-dir=path], [use path for native versions of rxgen, compile_et and config])]) AC_ARG_WITH([xslt-processor], AS_HELP_STRING([--with-xslt-processor=ARG], @@ -1817,6 +1819,24 @@ if test "${DEST}x" = "x"; then DEST="${SRCDIR_PARENT}/${AFS_SYSNAME}/dest" fi +if test "x$with_crosstools_dir" != "x"; then + if test -f "$with_crosstools_dir/rxgen" -a -f "$with_crosstools_dir/compile_et" -a -f "$with_crosstools_dir/config"; then + COMPILE_ET_PATH=$with_crosstools_dir/compile_et + CONFIGTOOL_PATH=$with_crosstools_dir/config + RXGEN_PATH=$with_crosstools_dir/rxgen + else + AC_MSG_ERROR(Tools not found in $with_crosstools_dir) + exit 1 + fi +else + COMPILE_ET_PATH="${SRCDIR_PARENT}/src/comerr/compile_et" + CONFIGTOOL_PATH="${SRCDIR_PARENT}/src/config/config" + RXGEN_PATH="${SRCDIR_PARENT}/src/rxgen/rxgen" +fi +AC_SUBST(COMPILE_ET_PATH) +AC_SUBST(CONFIGTOOL_PATH) +AC_SUBST(RXGEN_PATH) + HELPER_SPLINT="${TOP_SRCDIR}/helper-splint.sh" HELPER_SPLINTCFG="${TOP_SRCDIR}/splint.cfg" AC_SUBST(HELPER_SPLINT) diff --git a/src/config/Makefile.config.in b/src/config/Makefile.config.in index 75b6327..2576c6d 100644 --- a/src/config/Makefile.config.in +++ b/src/config/Makefile.config.in @@ -144,9 +144,9 @@ KERNELDIR = ../libafs # # Build helper apps # -COMPILE_ET = ${TOP_OBJDIR}/src/comerr/compile_et -CONFIGTOOL = ${TOP_OBJDIR}/src/config/config -RXGEN = ${TOP_OBJDIR}/src/rxgen/rxgen +COMPILE_ET = @COMPILE_ET_PATH@ +CONFIGTOOL = @CONFIGTOOL_PATH@ +RXGEN = @RXGEN_PATH@ SHELL = @SHELL@ LWPTOOL = ${TOP_SRCDIR}/config/lwptool -- 1.9.4