Added --with-xenomai-config to override xenomai config command, also allowing special environment variables to be passed. stable-1.5
authorEdouard Tisserant <edouard.tisserant@gmail.com>
Sun, 08 Jul 2018 13:33:09 +0200
branchstable-1.5
changeset 2699 ed6b9e0d7c05
parent 2698 9e65f782e8a1
child 2700 93ef210e9b56
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"
configure.ac
--- 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])