From 8f2af017d55bf33e7867e9ddacbe2db4d46c8dc1 Mon Sep 17 00:00:00 2001 From: Geert Janssens Date: Sat, 15 Dec 2012 19:15:23 +0000 Subject: [PATCH] Move configure test to a more appropriate location And remove a reference in the comment to a no longer existing function git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22657 57a11ea4-9604-0410-9ed3-97b8803252fd --- configure.ac | 47 +++++++++++++++++++++++------------------------ 1 file changed, 23 insertions(+), 24 deletions(-) diff --git a/configure.ac b/configure.ac index 757be06f91..979c80abaf 100644 --- a/configure.ac +++ b/configure.ac @@ -241,6 +241,29 @@ PKG_CHECK_MODULES(GLIB, AC_CHECK_HEADERS(dirent.h dlfcn.h dl.h utmp.h locale.h mcheck.h unistd.h wctype.h) +# I'm sure we (used to?) require this in various places, so don't remove +# this test unless you've done sufficient code review/testing. +AC_MSG_CHECKING(if unsigned long is at least as big as guint32) +GNC_OLDCFLAGS="$CFLAGS" +GNC_OLDLDFLAGS="$LDFLAGS" +CFLAGS="${GNOME_CFLAGS} ${GUILE_INCS} ${CFLAGS} ${GLIB_CFLAGS}" +LDFLAGS="${LDFLAGS} ${GLIB_LIBS}" +AC_TRY_RUN([ + #include + int main(int argc, char *argv[]) { + return(!(sizeof(unsigned long) >= sizeof(guint32))); + } +],[ + AC_MSG_RESULT(yes) +],[ + AC_MSG_RESULT(no) + AC_MSG_ERROR(cannot continue, size of unsigned long too small.) +],[ + AC_MSG_RESULT(assuming yes) +]) +CFLAGS="$GNC_OLDCFLAGS" +LDFLAGS="$GNC_OLDLDFLAGS" + # Gnucash replaced dlopen/dlsym by the g_module functions; dlsym # is needed optionally in one place for BSD linkers, though. DL_LIB= @@ -400,30 +423,6 @@ AC_SUBST(GUILE_INCS) AC_SUBST(GUILE_LIBS) AC_SUBST(GUILE) -# 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 -# unless you've done sufficient code review/testing. -AC_MSG_CHECKING(if unsigned long is at least as big as guint32) -GNC_OLDCFLAGS="$CFLAGS" -GNC_OLDLDFLAGS="$LDFLAGS" -CFLAGS="${GNOME_CFLAGS} ${GUILE_INCS} ${CFLAGS} ${GLIB_CFLAGS}" -LDFLAGS="${LDFLAGS} ${GLIB_LIBS}" -AC_TRY_RUN([ - #include - int main(int argc, char *argv[]) { - return(!(sizeof(unsigned long) >= sizeof(guint32))); - } -],[ - AC_MSG_RESULT(yes) -],[ - AC_MSG_RESULT(no) - AC_MSG_ERROR(cannot continue, size of unsigned long too small.) -],[ - AC_MSG_RESULT(assuming yes) -]) -CFLAGS="$GNC_OLDCFLAGS" -LDFLAGS="$GNC_OLDLDFLAGS" - ### -------------------------------------------------------------------------- ### See if we need guile-www