summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <[email protected]>2016-11-21 22:16:00 +0100
committerSlávek Banko <[email protected]>2016-11-21 22:16:17 +0100
commit62e93e51983b74c63712b623a1efa5de55894bc7 (patch)
treec7570f57f9b894ebd76570f4079099358255229b
parentfe1bca751d511d94432afa88065f9d1f7365c223 (diff)
downloadbibletime-62e93e51983b74c63712b623a1efa5de55894bc7.tar.gz
bibletime-62e93e51983b74c63712b623a1efa5de55894bc7.zip
Add test whether the Sword needs for building __SANE_USERSPACE_TYPES__
This resolves FTBFS on some 64bit architectures Signed-off-by: Slávek Banko <[email protected]> (cherry picked from commit 470a29cd2a96eb8f50bfcd33f334e8c322c17a11)
-rw-r--r--configure.in.in25
1 files changed, 25 insertions, 0 deletions
diff --git a/configure.in.in b/configure.in.in
index ad74532..c3307f0 100644
--- a/configure.in.in
+++ b/configure.in.in
@@ -59,6 +59,31 @@ AC_SUBST(HOWTODIR)
dnl Check for the used distribution
AC_CHECK_DISTRIBUTION
+dnl Check for sword FTBFS on some 64bit architectures
+AC_LANG_SAVE
+AC_LANG_CPLUSPLUS
+AC_MSG_CHECKING([if Sword needs __SANE_USERSPACE_TYPES__])
+AC_TRY_COMPILE([
+ #include <signal.h>
+ #include <$ac_cv_sword_incdir/sysdata.h>
+ ],[],
+ AC_MSG_RESULT(no),
+ [AC_MSG_RESULT(yes)
+ sword_needs_sane_userspace_types=yes])
+if test "x$sword_needs_sane_userspace_types" = xyes; then
+ AC_MSG_CHECKING([if Sword builds with __SANE_USERSPACE_TYPES__])
+ AC_TRY_COMPILE([
+ #define __SANE_USERSPACE_TYPES__
+ #include <signal.h>
+ #include <$ac_cv_sword_incdir/sysdata.h>
+ ],[],
+ AC_MSG_RESULT(yes),
+ [AC_MSG_RESULT(no)
+ AC_MSG_ERROR(Sword causes FTBFS on this architecture!)])
+ CXXFLAGS="$CXXFLAGS -D__SANE_USERSPACE_TYPES__"
+fi
+AC_LANG_RESTORE
+
dnl Check bibletime API version
AC_LANG_SAVE
AC_LANG_CPLUSPLUS