gnucash maint: Multiple changes pushed
Geert Janssens
gjanssens at code.gnucash.org
Sat Jan 31 07:16:46 EST 2015
Updated via https://github.com/Gnucash/gnucash/commit/785c6d62 (commit)
via https://github.com/Gnucash/gnucash/commit/b3781c16 (commit)
from https://github.com/Gnucash/gnucash/commit/c312b865 (commit)
commit 785c6d621bf93f4970a167295650777d386d6dbb
Author: Geert Janssens <janssens-geert at telenet.be>
Date: Sat Jan 31 14:33:33 2015 +0100
Bug 731889 - guile 2 exports different autoconf macros than what is expected
Check for the now required ltdl.h and bail out if not found
diff --git a/configure.ac b/configure.ac
index e09df33..743419b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -473,6 +473,11 @@ AM_CONDITIONAL(GNC_HAVE_GUILE_2, test "x${gnc_have_guile_2}" = xyes)
AC_SUBST(GUILE_EFFECTIVE_VERSION)
AC_SUBST(GUILE, [`pwd`/gnc-guile])
+AC_CHECK_HEADERS(ltdl.h,
+ [],
+ [AC_MSG_ERROR([ltdl.h not found. Perhaps you need to install
+the intltool-ltdl development packages ?])])
+
### --------------------------------------------------------------------------
### SWIG version checks (only when building from SCM)
#
commit b3781c16d0d84be66bdd4b4a507ca5803f394f57
Author: John Ralls <jralls at ceridwen.us>
Date: Thu Jan 29 13:39:23 2015 -0800
Bug 731889 - guile 2 exports different autoconf macros than what is expected
Replace the autogen-sh time configuration which doesn't really work
correctly by making a local interpreter which links whichever library
pkg-config finds.
Also makes Guile-2.0 the default by looking for it first.
diff --git a/Makefile.am b/Makefile.am
index 432800f..443be45 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -6,6 +6,11 @@ GNC_ETAGS_FILE = @GNC_ETAGS_FILE@
noinst_DATA = make-gnucash-potfiles
+noinst_PROGRAMS = gnc-guile
+gnc_guile_SOURCES = util/guile.c
+gnc_guile_CFLAGS = ${GUILE_CFLAGS}
+gnc_guile_LDADD = ${GUILE_LIBS}
+
dist_doc_DATA = \
AUTHORS \
COPYING \
diff --git a/configure.ac b/configure.ac
index dd504a6..e09df33 100644
--- a/configure.ac
+++ b/configure.ac
@@ -452,31 +452,16 @@ AC_CHECK_FUNCS(gethostid link)
# - check minimum version
# - determine GUILE_CFLAGS and GUILE_LIBS
-# Note: systems that install both guile 1.8 and guile 2 use different
-# names for the 1.8 and 2.0 autoconf macros to avoid conflicts.
-# So the tests below will check for known macro names in the order
-# that we assume will always result in the proper macros being called
-# for the guile version that has been detected.
gnc_have_guile_2=no
gnc_have_guile_www=no
PKG_CHECK_MODULES(GUILE,
- [guile-1.8 >= 1.8.5],
- [m4_ifdef([GUILE1_8_PROGS],
- [ GUILE1_8_PROGS ],
- [ m4_ifdef([GUILE1_PROGS],
- [ GUILE1_PROGS ],
- [ GUILE_PROGS ])])
- ], [
- PKG_CHECK_MODULES(GUILE,
[guile-2.0 >= 2.0.0],
- [m4_ifdef([GUILE_PROGS],
- [ GUILE_PROGS
- gnc_have_guile_2=yes ],
- [ AC_MSG_ERROR([ guile 2 is found on your system, but we did
- find the right autoconf macros. Please rerun autogen.sh first. If this
- does not solve the problem, please report this as a bug
- in GnuCash, so we can fix this for your platform.]) ])
- ],
+ [gnc_have_guile_2=yes
+ GUILE_EFFECTIVE_VERSION=2.0
+ AC_PATH_PROG([GUILD], guild)],
+ [PKG_CHECK_MODULES(GUILE,
+ [guile-1.8 >= 1.8.5],
+ [GUILE_EFFECTIVE_VERSION=1.8],
[AC_MSG_ERROR([
guile does not appear to be installed correctly, or is not in the
correct version range. Perhaps you have not installed the guile
@@ -484,9 +469,9 @@ PKG_CHECK_MODULES(GUILE,
])])
])
-AM_CONDITIONAL(GNC_HAVE_GUILE_2, test "${gnc_have_guile_2}" = yes)
+AM_CONDITIONAL(GNC_HAVE_GUILE_2, test "x${gnc_have_guile_2}" = xyes)
AC_SUBST(GUILE_EFFECTIVE_VERSION)
-
+AC_SUBST(GUILE, [`pwd`/gnc-guile])
### --------------------------------------------------------------------------
### SWIG version checks (only when building from SCM)
diff --git a/util/guile.c b/util/guile.c
new file mode 100644
index 0000000..3e01b57
--- /dev/null
+++ b/util/guile.c
@@ -0,0 +1,71 @@
+/* Copyright (C) 1996,1997,2000,2001, 2006, 2008 Free Software Foundation, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+/* This is the 'main' function for the `guile' executable. It is not
+ included in libguile.a.
+
+ Eventually, we hope this file will be automatically generated,
+ based on the list of installed, statically linked libraries on the
+ system. For now, please don't put interesting code in here. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#ifdef __MINGW32__
+# define SCM_IMPORT 1
+#endif
+#include <libguile.h>
+
+#ifdef HAVE_CONFIG_H
+#include <libguile/scmconfig.h>
+#endif
+#include <ltdl.h>
+
+#ifdef HAVE_WINSOCK2_H
+#include <winsock2.h>
+#endif
+
+static void
+inner_main (void *closure SCM_UNUSED, int argc, char **argv)
+{
+#ifdef __MINGW32__
+ /* This is necessary to startup the Winsock API under Win32. */
+ WSADATA WSAData;
+ WSAStartup (0x0202, &WSAData);
+#endif /* __MINGW32__ */
+
+ /* module initializations would go here */
+ scm_shell (argc, argv);
+
+#ifdef __MINGW32__
+ WSACleanup ();
+#endif /* __MINGW32__ */
+}
+
+int
+main (int argc, char **argv)
+{
+ scm_boot_guile (argc, argv, inner_main, 0);
+ return 0; /* never reached */
+}
+
+/*
+ Local Variables:
+ c-file-style: "gnu"
+ End:
+*/
Summary of changes:
Makefile.am | 5 +++++
configure.ac | 34 ++++++++++-------------------
util/guile.c | 71 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 88 insertions(+), 22 deletions(-)
create mode 100644 util/guile.c
More information about the gnucash-changes
mailing list