Quoting Chris Shoemaker <[EMAIL PROTECTED]>:

Index: src/engine/Makefile.am
===================================================================
--- src/engine/Makefile.am      (revision 12339)
+++ src/engine/Makefile.am      (working copy)
@@ -10,6 +10,7 @@
        -I${top_srcdir}/src/gnc-module \
        -I${top_srcdir}/src/business/business-core/ \
        ${QOF_CFLAGS} \
+       -DQOF_LIB_DIR=\"${QOF_LIB_DIR}\" \
        ${GNUCASH_ENGINE_CFLAGS}

 libgncmod_engine_la_SOURCES = \

Like Derek said, the symbol is already defined.  It's just wrong.
This patch raises an interesting question, though.  What does cpp do
if you supply a macro definition as a command line argument _and_ in a
#define?  I have no idea, but I'm curious.

I'm not sure.  I'm surprised it works at all -- I would've expected it
to see a double define.   QOF_LIB_DIR is defined in qofla-dir.h which
is pulled in from qof.h.

Anyway, either method is valid by itself, and I happen to like this
method better for a symbol that only needs to be visible in a few
places rather than many.  And I prefer a real #define in some header
for a symbol that is used in many places.

I disagree.  We should make sure that qofla-dir.h is correct.

I think the simplest solution to the current problem is along these lines:

+   -DQOF_LIB_DIR=\"${libdir}\" \

and just forget the configure.in stuff.  I'm going to test something
like this shortly.

I don't like this at all, and it would totally screw you over if you have
an external QOF.

Actually, i think I know what the problem is.  I think we're evaluating the
variable too early.  I think we want to say something like:

  QOF_LIB_DIR='$(libdir)'

and just leave it at that.  The single-quotes are the important part.  I
think that will do the right thing.

-chris

-derek

--
      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-IA     N1NWH
      [EMAIL PROTECTED]                        PGP key available

_______________________________________________
gnucash-devel mailing list
[email protected]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel

Reply via email to