Ok, I've sucessfully got the mainline version of GnuCash to build
against g-wrap 0.9.8. I had to apply the following patches to GnuCash
and g-wrap respectively.
I've also built a set of RPMs for RedHat 6.2 (using my own spec-file
which I created back in 0.9.1 days back in May -- I have no idea why
Mark didn't start with what I've done). In any event, I've improved
it a bit and separated out g-wrap from g-wrap-devel, in case we want
to compile with shared libraries.
I'd be more than happy to give anyone the RPMS, SRPMS, or SpecFile as
necessary. Hopefully my changes (both to g-wrap.m4 and g-wrap.spec)
can get merged back into the g-wrap package.
Enjoy!
-derek
GnuCash CHANGES:
acconfig.h
add SMOB variable
configure.in
hook into g-wrap.m4
G-Wrap Changes:
g-wrap.m4
get it to actually work
clean up the output
Index: acconfig.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/acconfig.h,v
retrieving revision 1.9
diff -u -r1.9 acconfig.h
--- acconfig.h 2000/09/29 08:01:40 1.9
+++ acconfig.h 2000/11/02 16:58:37
@@ -53,6 +53,9 @@
/* is guile available */
#undef HAVE_GUILE
+/* New or old Guile Smob for G-wrap */
+#undef GWRAP_OLD_GUILE_SMOB
+
/* Use the new gtkhtml widget instead of the old xmhtml widget */
#undef HAVE_LIBGTKHTML
Index: configure.in
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/configure.in,v
retrieving revision 1.140
diff -u -r1.140 configure.in
--- configure.in 2000/10/23 09:40:30 1.140
+++ configure.in 2000/11/02 16:58:40
@@ -264,29 +264,22 @@
G_WRAP_COMPILE_ARGS=""
G_WRAP_LINK_ARGS=""
-# Find the configure script
-AC_PATH_PROG(G_WRAP_CONFIG,g-wrap-config)
+AM_PATH_GWRAP(, , [AC_MSG_ERROR([
-if test -x "${G_WRAP_CONFIG}";
-then
- # Find out what the g-wrap compile and link flags are.
- G_WRAP_COMPILE_ARGS=`${G_WRAP_CONFIG} --c-compile-args guile`
- G_WRAP_LINK_ARGS=`${G_WRAP_CONFIG} --c-static-link-args guile`
-fi
+ g-wrap does not appear to be installed correctly. If you need to
+ install g-wrap, you can find it at ftp://ftp.gnucash.org/pub/g-wrap.
+])])
-# Find the tool
-AC_PATH_PROG(G_WRAP, g-wrap)
+# Find out what the g-wrap compile and link flags are.
+AC_MSG_CHECKING(for g-wrap compile args)
+G_WRAP_COMPILE_ARGS=`${G_WRAP_CONFIG} --c-compile-args guile`
+AC_MSG_RESULT($G_WRAP_COMPILE_ARGS)
-if test x"${G_WRAP_COMPILE_ARGS}" = x || \
- test x"${G_WRAP_LINK_ARGS}" = x || \
- test ! -x "${G_WRAP}";
-then
- AC_MSG_ERROR([
+AC_MSG_CHECKING(for g-wrap link args)
+G_WRAP_LINK_ARGS=`${G_WRAP_CONFIG} --c-static-link-args guile`
+AC_MSG_RESULT($G_WRAP_LINK_ARGS)
- g-wrap does not appear to be installed. It must be installed and
- its binary directory must be in your PATH. If you need to install
- g-wrap, you can find it at ftp://ftp.gnucash.org/pub/g-wrap.])
-fi
+AC_GWRAP_CHECK_GUILE
AC_SUBST(G_WRAP)
AC_SUBST(G_WRAP_CONFIG)
--- g-wrap-0.9.8/g-wrap.m4.no Wed Nov 1 23:04:06 2000
+++ g-wrap-0.9.8/g-wrap.m4 Thu Nov 2 11:46:27 2000
@@ -8,7 +8,7 @@
[if test x$GUILE = x ; then
AC_PATH_PROG(GUILE, guile, no)
fi
- AC_MSG_WARN(guile is $GUILE)
+ dnl AC_MSG_WARN(guile is $GUILE)
if test "${GUILE}" = "no" ; then
AC_MSG_ERROR(g-wrap couldn't find guile.)
fi
@@ -19,9 +19,13 @@
dnl in your acconfig.h or config.h.in, and
dnl include that config.h. If not, your code will not
dnl work with guile 1.3
+ AC_MSG_CHECKING(for whether guile uses old SMOB format)
if ${GUILE} -c '(if (string=? (version) "1.3") (exit 0) (exit 1))' ;
then
+ AC_MSG_RESULT(yes)
AC_DEFINE(GWRAP_OLD_GUILE_SMOB)
+ else
+ AC_MSG_RESULT(no)
fi
])
@@ -44,8 +48,6 @@
AC_PATH_PROG(GUILE, guile, no)
fi
-AC_MSG_CHECKING(for g-wrap - version >= ${min_gwrap_version})
-
dnl if prefix set, then set them explicitly
if test x${gwrap_prefix} != x ; then
G_WRAP = ${gwrap_prefix}/bin/g-wrap
@@ -54,19 +56,21 @@
AC_PATH_PROG(G_WRAP, g-wrap, no)
if test x${G_WRAP} = xno ; then
- AC_MSG_RESULT(no)
CHECK_VERSION="no"
- ifelse([$3], , true , [$3])
+ ifelse([$3], , true , [AC_MSG_WARN(g-wrap failed)
+ $3])
fi
AC_PATH_PROG(G_WRAP_CONFIG, g-wrap-config, no)
if test x${G_WRAP_CONFIG} = xno ; then
- AC_MSG_RESULT(no)
CHECK_VERSION="no"
- ifelse([$3], , true , [$3])
+ ifelse([$3], , true , [AC_MSG_WARN(g-wrap-config failed)
+ $3])
fi
fi
if test x$CHECK_VERSION != xno ; then
+AC_MSG_CHECKING(for g-wrap - version >= ${min_gwrap_version})
+
gwrap_major_version=`${G_WRAP} --version | \
sed 's/g-wrap \([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
gwrap_minor_version=`${G_WRAP} --version | \
@@ -89,7 +93,11 @@
((< ${gwrap_micro_version} ${micro_required}) (exit 1))\
(else (exit 0)))" ; then
AC_MSG_RESULT(yes)
- ifelse([$3], , true, [$3])
+ ifelse([$2], , true, [$2])
+else
+ AC_MSG_RESULT(no)
+ ifelse([$3], , true , [AC_MSG_WARN(guile check failed)
+ $3])
fi
dnl check version
fi])#### End of Patch data ####
--
Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
Member, MIT Student Information Processing Board (SIPB)
URL: http://web.mit.edu/warlord/ PP-ASEL N1NWH
[EMAIL PROTECTED] PGP key available
_______________________________________________
gnucash-devel mailing list
[EMAIL PROTECTED]
http://www.gnumatic.com/cgi-bin/mailman/listinfo/gnucash-devel