From: Guido Draheim Date: Thu, 21 May 2009 21:12:35 +0000 (+0000) Subject: ticket:2479788 - integrating libpcap host_cpu list for the cross_compiling case X-Git-Tag: v0.13.52~6 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5e006f25dbeb15072c4115df03c175ecad7fbe90;p=zziplib ticket:2479788 - integrating libpcap host_cpu list for the cross_compiling case --- diff --git a/TODO b/TODO index ab30ddc..fd60c6e 100644 --- a/TODO +++ b/TODO @@ -1,14 +1,8 @@ SHORTTERM -- single-file documentation (a docbook?) - handle international filenames more gracefully (unicode API?) - most is multithreaded ... but zzip_dir_open (Thorsten Schöning) - rboerdijk@ does also report errors on overlapping reads, another one pointed to the usage of seek_set that may cause the problems -- extend aligned-access check in the autoconf macro such that it can - cover the cross-compiling case - libpcap AC_LBL_UNALIGNED_ACCESS - uses alpha*|arm*|bfin*|hp*|mips*|sh*|sparc*|ia64|nv1) - ac_cv_lbl_unaligned_fail=yes - for that. WISHLIST @@ -88,5 +82,8 @@ here or there - the code however should be prepared to get around any problems easily. Send patches! (especially Linux distributions makers are usually not sending their patches to upstream maintainers). +Note: the latest cross platform tests are done indirectly by using +the build.opensuse.org rpm packaging where one can run "make check" +just before doing the "make install" of the compiled library. diff --git a/m4/ax_check_aligned_access_required.m4 b/m4/ax_check_aligned_access_required.m4 index 28a9730..a7d43ca 100644 --- a/m4/ax_check_aligned_access_required.m4 +++ b/m4/ax_check_aligned_access_required.m4 @@ -14,12 +14,16 @@ dnl should be accessed per-byte in that case to avoid segfault type errors. dnl dnl @category C dnl @author Guido U. Draheim -dnl @version 2006-08-17 +dnl @version 2009-05-22 dnl @license GPLWithACException AC_DEFUN([AX_CHECK_ALIGNED_ACCESS_REQUIRED], [AC_CACHE_CHECK([if pointers to integers require aligned access], [ax_cv_have_aligned_access_required], +if test "$cross_compiling" = "yes"; then + case "$host_cpu" in alpha*|arm*|bfin*|hp*|mips*|sh*|sparc*|ia64|nv1) + ax_cv_have_aligned_access_required="yes" + ;; *) [AC_TRY_RUN([ #include #include @@ -43,6 +47,7 @@ int main() [ax_cv_have_aligned_access_required=no], [ax_cv_have_aligned_access_required=no]) ]) +;; esac if test "$ax_cv_have_aligned_access_required" = yes ; then AC_DEFINE([HAVE_ALIGNED_ACCESS_REQUIRED], [1], [Define if pointers to integers require aligned access])