Added --with-xenomai-config to override xenomai config command, also allowing special environment variables to be passed.
Example : --with-xenomai-config="DESTDIR=/path/to/staging /path/to/xeno-config"
--- a/configure.ac Tue Feb 13 17:16:01 2018 +0100
+++ b/configure.ac Sun Jul 08 13:33:09 2018 +0200
@@ -624,22 +624,35 @@
]
)
+AC_ARG_WITH([xenomai-config],
+ AC_HELP_STRING(
+ [--with-xenomai-config=<CMD>],
+ [Xenomai config invokation, default to xenomai-dir/bin/xeno-config]
+ ),
+ [
+ xenomaiconfig=[$withval]
+ ],
+ [
+ xenomaiconfig="$xenomaidir/bin/xeno-config"
+ ]
+)
+
AC_MSG_CHECKING([for Xenomai path])
if test -z "${xenomaidir}"; then
AC_MSG_RESULT([not specified.])
else
- if test \! -r ${xenomaidir}/include/xeno_config.h; then
+ if test \! -r ${xenomaiconfig}; then
AC_MSG_ERROR([no Xenomai installation found in ${xenomaidir}!])
fi
AC_MSG_RESULT([$xenomaidir])
- xeno_native_cflags=`$xenomaidir/bin/xeno-config --skin native --cflags`
- xeno_native_ldflags=`$xenomaidir/bin/xeno-config --skin native --ldflags`
- xeno_posix_cflags=`$xenomaidir/bin/xeno-config --skin posix --cflags`
- xeno_posix_ldflags=`$xenomaidir/bin/xeno-config --skin posix --ldflags`
- xeno_rtdm_cflags=`$xenomaidir/bin/xeno-config --skin rtdm --cflags`
- xeno_rtdm_ldflags=`$xenomaidir/bin/xeno-config --skin rtdm --ldflags`
+ xeno_native_cflags=`$xenomaiconfig --skin native --cflags`
+ xeno_native_ldflags=`$xenomaiconfig --skin native --ldflags`
+ xeno_posix_cflags=`$xenomaiconfig --skin posix --cflags`
+ xeno_posix_ldflags=`$xenomaiconfig --skin posix --ldflags`
+ xeno_rtdm_cflags=`$xenomaiconfig --skin rtdm --cflags`
+ xeno_rtdm_ldflags=`$xenomaiconfig --skin rtdm --ldflags`
fi
AC_SUBST(XENOMAI_DIR,[$xenomaidir])