[Box Backup] Distribution Patches - Debian - Part4: fix bootstrapping on debian

Reinhard Tartler boxbackup@boxbackup.org
Fri, 03 Apr 2009 09:08:33 +0200


remove cross compiling relevant commits

the combination of the following svn revisions is causing trouble when
trying to compile boxbackup on debian systems:

 - 2485
 - 2484
 - 2483

reverting 2483 alone doesn't help, I had to revert all of them.

--- old/configure.ac	2009-04-02 11:58:11 +0000
+++ new/configure.ac	2009-04-02 13:29:39 +0000
@@ -160,6 +160,7 @@ AC_CHECK_TYPES([uint8_t, uint16_t, uint3
 AC_HEADER_STDBOOL
 AC_C_CONST
 AC_C_BIGENDIAN
+AX_CHECK_NONALIGNED_ACCESS
 AC_TYPE_UID_T
 AC_TYPE_MODE_T
 AC_TYPE_OFF_T
@@ -242,12 +243,10 @@ AC_CHECK_DECLS([XATTR_NOFOLLOW],,, [[#in
 ## Check for large file support active. AC_SYS_LARGEFILE has already worked
 ## out how to enable it if necessary, we just use this to report to the user
 AC_CACHE_CHECK([if we have large file support enabled], [box_cv_have_large_file_support],
-  [AC_TRY_RUN([AC_LANG_PROGRAM([[$ac_includes_default]], [[
+  [AC_RUN_IFELSE([AC_LANG_PROGRAM([[$ac_includes_default]], [[
       return sizeof(off_t)==4;
     ]])],
-    [box_cv_have_large_file_support=yes],
-    [box_cv_have_large_file_support=no],
-    [box_cv_have_large_file_support=no # safe for cross-compile]
+    [box_cv_have_large_file_support=yes], [box_cv_have_large_file_support=no]
   )])
 
 if test "x$box_cv_have_large_file_support" = "xyes"; then

diff --git a/infrastructure/m4/ax_check_dirent_d_type.m4 b/infrastructure/m4/ax_check_dirent_d_type.m4
index 9c08d39..8351f13 100644
--- a/infrastructure/m4/ax_check_dirent_d_type.m4
+++ b/infrastructure/m4/ax_check_dirent_d_type.m4
@@ -16,7 +16,7 @@ AC_DEFUN([AX_CHECK_DIRENT_D_TYPE], [
   AC_CHECK_MEMBERS([struct dirent.d_type],,, [[#include <dirent.h>]])
   if test "x$ac_cv_member_struct_dirent_d_type" = "xyes"; then
     AC_CACHE_CHECK([[whether struct dirent.d_type is valid]], [box_cv_have_valid_dirent_d_type],
-      [AC_TRY_RUN(
+      [AC_RUN_IFELSE(
         [AC_LANG_PROGRAM([[
           $ac_includes_default
           #include <dirent.h>
@@ -26,9 +26,7 @@ AC_DEFUN([AX_CHECK_DIRENT_D_TYPE], [
           if(dir) res = readdir(dir);
           return res ? (res->d_type != DT_FILE && res->d_type != DT_DIR) : 1;
         ]])],
-        [box_cv_have_valid_dirent_d_type=yes],
-	[box_cv_have_valid_dirent_d_type=no],
-	[box_cv_have_valid_dirent_d_type=cross]
+        [box_cv_have_valid_dirent_d_type=yes], [box_cv_have_valid_dirent_d_type=no]
       )])
     if test "x$box_cv_have_valid_dirent_d_type" = "xyes"; then
       AC_DEFINE([HAVE_VALID_DIRENT_D_TYPE], 1, [Define to 1 if struct dirent.d_type is valid])
diff --git a/infrastructure/m4/ax_check_syscall_lseek.m4 b/infrastructure/m4/ax_check_syscall_lseek.m4
index 6c26e02..7d22c4b 100644
--- a/infrastructure/m4/ax_check_syscall_lseek.m4
+++ b/infrastructure/m4/ax_check_syscall_lseek.m4
@@ -16,7 +16,7 @@ AC_DEFUN([AX_CHECK_SYSCALL_LSEEK], [
   AC_REQUIRE([AX_FUNC_SYSCALL])dnl
   if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then
     AC_CACHE_CHECK([[whether syscall lseek requires dummy parameter]], [box_cv_have_lseek_dummy_param],
-      [AC_TRY_RUN(
+      [AC_RUN_IFELSE(
         [AC_LANG_PROGRAM([[
           $ac_includes_default
           #include <fcntl.h>
@@ -50,9 +50,7 @@ AC_DEFUN([AX_CHECK_SYSCALL_LSEEK], [
           unlink("lseektest");
           return res!=-1;
         ]])],
-        [box_cv_have_lseek_dummy_param=yes],
-	[box_cv_have_lseek_dummy_param=no],
-	[box_cv_have_lseek_dummy_param=no # assume not for cross-compiling]
+        [box_cv_have_lseek_dummy_param=yes], [box_cv_have_lseek_dummy_param=no]
       )])
     if test "x$box_cv_have_lseek_dummy_param" = "xyes"; then
       AC_DEFINE([HAVE_LSEEK_DUMMY_PARAM], 1,


-- 
Gruesse/greetings,
Reinhard Tartler, KeyID 945348A4