summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorPeter Seiderer <ps.report@gmx.net>2015-03-13 22:44:31 +0100
committerPeter Hutterer <peter.hutterer@who-t.net>2015-03-16 08:57:42 +1000
commitbc428e02117cdbc6541ef1f581187ee33a13a116 (patch)
treede5d13eeb2b167e02260f790d49fc27e99d0f34e /configure.ac
parent6c87163a2ac58c1a49d9c8c2ad050c5dee8671d7 (diff)
downloadlibevdev-bc428e02117cdbc6541ef1f581187ee33a13a116.tar.gz
Disable test-static-link in case of shared only build.
Fixes the following buildroot compile failure: libtool: link: [..]/host/usr/bin/arm-buildroot-linux-uclibcgnueabi-gcc -std=gnu99 -I.. -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -static -o test-static-link test_static_link-test-link.o ../libevdev/.libs/libevdev.so -Wl,-rpath -Wl,[...]/build/libevdev-1.4/libevdev/.libs [...]/arm-buildroot-linux-uclibcgnueabi/bin/ld: attempted static link of dynamic object `../libevdev/.libs/libevdev.so' collect2: error: ld returned 1 exit status Makefile:719: recipe for target 'test-static-link' failed Signed-off-by: Peter Seiderer <ps.report@gmx.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac19
1 files changed, 14 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac
index c25b36f..59c691b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -75,6 +75,7 @@ else
fi
AM_CONDITIONAL(HAVE_VALGRIND, [test "x$VALGRIND" != "x"])
AM_CONDITIONAL(ENABLE_RUNTIME_TESTS, [test "x$HAVE_CHECK" = "xyes"])
+AM_CONDITIONAL(ENABLE_STATIC_LINK_TEST, [test "x$enable_static" = "xyes"])
with_cflags=""
if test "x$GCC" = "xyes"; then
@@ -128,13 +129,21 @@ AM_PATH_PYTHON([2.6])
# nm to check for leaking symbols in the static library
AC_PATH_PROG(NM, [nm])
AM_CONDITIONAL(HAVE_NM, [test "x$NM" != "x"])
-if test "x$NM" == "x"; then
- AC_MSG_WARN([nm not found - skipping symbol leak test])
- have_nm="no"
+if test "x$enable_static" = "xno"; then
+ static_symbol_leaks_test="no - static build disabled"
else
- have_nm="yes"
+ if test "x$NM" = "x"; then
+ AC_MSG_WARN([nm not found - skipping symbol leak test])
+ have_nm="no"
+ static_symbol_leaks_test="no - nm not found"
+ else
+ have_nm="yes"
+ static_symbol_leaks_test="yes"
+ fi
fi
+AM_CONDITIONAL(ENABLE_STATIC_SYMBOL_LEAKS_TEST, [test "x$static_symbol_leaks_test" = "xyes"])
+
AC_CONFIG_FILES([Makefile
libevdev/Makefile
doc/Makefile
@@ -152,5 +161,5 @@ AC_MSG_RESULT([
Build documentation ${have_doxygen}
Enable unit-tests ${HAVE_CHECK}
Enable profiling ${enable_gcov}
- Static library symbol check ${have_nm}
+ Static library symbol check ${static_symbol_leaks_test}
])