Bug #554042: Fix configure fail on checking 'unsigned long is at least as big as guint32'

This is new patch including fix checking 'unsigned long is at least as big as
guint32' and 'guile long_long is at least as big as gint64'

Patch by Halton Huo.
BP

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17653 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Christian Stimming 2008-10-25 19:58:52 +00:00
parent e8feb39e8d
commit f10533f2c6

View File

@ -412,7 +412,9 @@ fi
### Check size of long_long - some guile's are broken. ### Check size of long_long - some guile's are broken.
AC_MSG_CHECKING(if guile long_long is at least as big as gint64) AC_MSG_CHECKING(if guile long_long is at least as big as gint64)
GNC_OLDCFLAGS="$CFLAGS" GNC_OLDCFLAGS="$CFLAGS"
GNC_OLDLDFLAGS="$LDFLAGS"
CFLAGS="${GNOME_CFLAGS} ${GUILE_INCS} ${CFLAGS} ${GLIB_CFLAGS}" CFLAGS="${GNOME_CFLAGS} ${GUILE_INCS} ${CFLAGS} ${GLIB_CFLAGS}"
LDFLAGS="${LDFLAGS} ${GLIB_LIBS}"
AC_TRY_RUN([ AC_TRY_RUN([
#include <glib.h> #include <glib.h>
#include <libguile/__scm.h> #include <libguile/__scm.h>
@ -433,13 +435,16 @@ AC_TRY_RUN([
sizeof(gint64))) sizeof(gint64)))
]) ])
CFLAGS="$GNC_OLDCFLAGS" CFLAGS="$GNC_OLDCFLAGS"
LDFLAGS="$GNC_OLDLDFLAGS"
# One of the places this is critical is in gnc_scm_to_gint64 and inverse. # One of the places this is critical is in gnc_scm_to_gint64 and inverse.
# However, I'm sure we require this elsewhere, so don't remove this test # However, I'm sure we require this elsewhere, so don't remove this test
# unless you've done sufficient code review/testing. # unless you've done sufficient code review/testing.
AC_MSG_CHECKING(if unsigned long is at least as big as guint32) AC_MSG_CHECKING(if unsigned long is at least as big as guint32)
GNC_OLDCFLAGS="$CFLAGS" GNC_OLDCFLAGS="$CFLAGS"
GNC_OLDLDFLAGS="$LDFLAGS"
CFLAGS="${GNOME_CFLAGS} ${GUILE_INCS} ${CFLAGS} ${GLIB_CFLAGS}" CFLAGS="${GNOME_CFLAGS} ${GUILE_INCS} ${CFLAGS} ${GLIB_CFLAGS}"
LDFLAGS="${LDFLAGS} ${GLIB_LIBS}"
AC_TRY_RUN([ AC_TRY_RUN([
#include <glib.h> #include <glib.h>
int main(int argc, char *argv[]) { int main(int argc, char *argv[]) {
@ -454,6 +459,7 @@ AC_TRY_RUN([
AC_MSG_RESULT(assuming yes) AC_MSG_RESULT(assuming yes)
]) ])
CFLAGS="$GNC_OLDCFLAGS" CFLAGS="$GNC_OLDCFLAGS"
LDFLAGS="$GNC_OLDLDFLAGS"
### -------------------------------------------------------------------------- ### --------------------------------------------------------------------------