summaryrefslogtreecommitdiff
path: root/m4/ax_open62541_path.m4
diff options
context:
space:
mode:
authorOlaf Mandel <olaf@mandel.name>2016-06-24 21:21:00 +0200
committerOlaf Mandel <olaf@mandel.name>2016-06-24 21:21:00 +0200
commitd1d3898de7427138378f1c4018173f0602c3ebf4 (patch)
tree23d88a0494dd8def89f20ed8d13d8b6818bef4b8 /m4/ax_open62541_path.m4
parenta37f14d3d1711f7903778b84fef0fb8c644feadc (diff)
downloadautoconf-archive-d1d3898de7427138378f1c4018173f0602c3ebf4.tar.gz
AX_OPEN62541_PATH: set AM_DISTCHECK_CONFIGURE_FLAGS
When configuring --with-open62541=<path>, the make distcheck target often failed because the open62541 library was not found on the system. So set the AM_DISTCHECK_CONFIGURE_FLAGS variable with the required values (absolute paths in case the user defined relative paths).
Diffstat (limited to 'm4/ax_open62541_path.m4')
-rw-r--r--m4/ax_open62541_path.m417
1 files changed, 14 insertions, 3 deletions
diff --git a/m4/ax_open62541_path.m4 b/m4/ax_open62541_path.m4
index 4cc933f..9ef7045 100644
--- a/m4/ax_open62541_path.m4
+++ b/m4/ax_open62541_path.m4
@@ -33,7 +33,8 @@
# OPEN62541_LDPATH, which contains
# LD_LIBRARY_PATH=$LD_LIBRARY_PATH:<abs_path_to_build> : this is intended
# to be used for all commands that need to execute a program using the
-# library (e.g. make check).
+# library (e.g. make check). If paths are set, they are forwarded to
+# distcheck.
#
# For --with-open62541, the dir is optional: if either the values "no"
# (from --without-open62541) or "yes" (for no argument) are specified,
@@ -57,7 +58,7 @@
# and this notice are preserved. This file is offered as-is, without any
# warranty.
-#serial 2
+#serial 3
# AX_OPEN62541_PATH()
# -------------------
@@ -90,11 +91,21 @@ AS_IF([test x${with_open62541:+set} == xset -a "x$with_open62541" != xno]dnl
[ -I$with_open62541/plugins -I$with_open62541_build/src_generated]dnl
[ -I$with_open62541_build"
LDFLAGS="$LDFLAGS${LDFLAGS:+ }-L$with_open62541_build"
+with_open62541_abs=`(
+ cd "$with_open62541"
+ pwd)`
with_open62541_build_abs=`(
cd "$with_open62541_build"
pwd)`
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH${LD_LIBRARY_PATH:+:}]dnl
[$with_open62541_build_abs"
AC_SUBST([OPEN62541_LDPATH], ["LD_LIBRARY_PATH=\$\$LD_LIBRARY_PATH]dnl
-[\$\${LD_LIBRARY_PATH:+:}$with_open62541_build_abs"])])
+[\$\${LD_LIBRARY_PATH:+:}$with_open62541_build_abs"])
+AC_SUBST([AM_DISTCHECK_CONFIGURE_FLAGS], ["$AM_DISTCHECK_CONFIGURE_FLAGS]dnl
+[${AM_DISTCHECK_CONFIGURE_FLAGS:+ }--with-open62541=$with_open62541_abs"])
+AS_IF([test x$with_open62541/build != xwith_open62541_build],
+ [AC_SUBST([AM_DISTCHECK_CONFIGURE_FLAGS],
+ ["$AM_DISTCHECK_CONFIGURE_FLAGS]dnl
+[ --with-open62541-build=$with_open62541_build_abs"])])
+])
])# AX_OPEN62541_PATH