[Libreoffice-commits] .: configure.in
Tor Lillqvist
tml at kemper.freedesktop.org
Mon May 16 18:41:09 PDT 2011
configure.in | 34 ++++++++++++++++++++++++++--------
1 file changed, 26 insertions(+), 8 deletions(-)
New commits:
commit b628da22680af8f78f765f36b893141cc2f9995c
Author: Tor Lillqvist <tlillqvist at novell.com>
Date: Tue May 17 04:34:53 2011 +0300
Allow for lack of AC_CHECK_ALIGNOF unless cross-compiling
The Autoconf 2.59 on Mac OS X 10.4 for instance lacks
AC_CHECK_ALIGNOF.
This means we can't get rid of the typesconfig program in
sal/typesconfig until we can require a newer Autoconf.
Also correct the hardcoded alignments for MSVC. (Not that they get
used; As we are not cross-compiling with MSVC we will run the
typesconfig program for it.)
diff --git a/configure.in b/configure.in
index 5b652d2..36ea275 100755
--- a/configure.in
+++ b/configure.in
@@ -2463,10 +2463,6 @@ dnl ===================================================================
AC_CHECK_SIZEOF(long long)
AC_CHECK_SIZEOF(double)
AC_CHECK_SIZEOF(void*)
- AC_CHECK_ALIGNOF(short)
- AC_CHECK_ALIGNOF(int)
- AC_CHECK_ALIGNOF(long)
- AC_CHECK_ALIGNOF(double)
SIZEOF_SHORT=$ac_cv_sizeof_short
SIZEOF_INT=$ac_cv_sizeof_int
@@ -2475,6 +2471,28 @@ dnl ===================================================================
SIZEOF_DOUBLE=$ac_cv_sizeof_double
SIZEOF_POINTER=$ac_cv_sizeof_voidp
+ dnl Allow build without AC_CHECK_ALIGNOF, grrr
+ m4_pattern_allow([AC_CHECK_ALIGNOF])
+ m4_ifdef([AC_CHECK_ALIGNOF],
+ ,
+ [
+ dnl We know that the ALIGNOF_ variables are used only when cross-compiling
+ dnl in sal/typesconfig/makefile.mk...
+ if test "$cross_compiling" = "yes"; then
+ AC_MSG_ERROR([When cross-compiling you must use a recent Autoconf with [AC_][CHECK_ALIGNOF]])
+ fi
+ m4_define([AC_CHECK_ALIGNOF],
+ [
+ AC_MSG_WARN([Cannot determine alignment of $1])
+ AS_TR_SH([ac_cv_alignof_$3])=unknown
+ ])
+ ])
+
+ AC_CHECK_ALIGNOF(short,[#include <stddef.h>])
+ AC_CHECK_ALIGNOF(int,[#include <stddef.h>])
+ AC_CHECK_ALIGNOF(long,[#include <stddef.h>])
+ AC_CHECK_ALIGNOF(double,[#include <stddef.h>])
+
ALIGNOF_SHORT=$ac_cv_alignof_short
ALIGNOF_INT=$ac_cv_alignof_int
ALIGNOF_LONG=$ac_cv_alignof_long
@@ -2502,10 +2520,10 @@ else
else
SIZEOF_POINTER=8
fi
- ALIGNOF_SHORT=1
- ALIGNOF_INT=1
- ALIGNOF_LONG=1
- ALIGNOF_DOUBLE=1
+ ALIGNOF_SHORT=2
+ ALIGNOF_INT=4
+ ALIGNOF_LONG=4
+ ALIGNOF_DOUBLE=8
WORDS_BIGENDIAN=no
LFS_CFLAGS=''
fi
More information about the Libreoffice-commits
mailing list