Can't save in r12331

Chris Shoemaker c.shoemaker at cox.net
Fri Jan 13 16:42:34 EST 2006


On Fri, Jan 13, 2006 at 04:04:40PM -0500, Derek Atkins wrote:
> Quoting Chris Shoemaker <c.shoemaker at cox.net>:
> 
> >On Fri, Jan 13, 2006 at 03:34:12PM -0500, Derek Atkins wrote:
> >>Chris Shoemaker <c.shoemaker at cox.net> writes:
> >>
> >>> Our configure.in:
> >>> if test x$QOF_XML_DIR = x; then
> >>>         QOF_LIB_DIR=`eval echo $libdir | sed "s%^NONE%$prefix%"`
> >>>         QOF_LIB_DIR=`eval echo $QOF_LIB_DIR | sed "s%^NONE%$prefix%"`
> >>>         QOF_CFLAGS="-I\${top_srcdir}/lib/libqof/qof"
> >>>         QOF_LIBS="\${top_srcdir}/lib/libqof/qof/libqof.la"
> >>> #       QOF_LIB_DIR=`eval echo ${libdir}`
> >>>         QOF_VERSION="internal"
> >>>         QOF_PREFIX="internal"
> >>>         QOF_XML_DIR=`eval echo ${datadir}/xml/qsf`
> >>>         LIBQOF_LIBRARY_VERSION=1:2:0
> >>>         LIBQOF_BACKEND_QSF_LIBRARY_VERSION=0:1:0
> >>>         AC_SUBST(LIBQOF_LIBRARY_VERSION)
> >>>         AC_SUBST(LIBQOF_BACKEND_QSF_LIBRARY_VERSION)
> >>>         AC_DEFINE(HAVE_LIBQOF,,[We will use the internal QOF code])
> >>>         HAVE_LIBQOF="use_internal"
> >>> fi
> >>>
> >>> I'm guessing that if --prefix is not specified, then it will be 'NONE'
> >>> and this will fail.  Maybe we want:
> >>>
> >>>         QOF_LIB_DIR='${GNC_LIBDIR}'
> >>
> >>We might want 'eval echo $(GNC_LIBDIR)'..  But I don't know if that
> >>will help in this case because $(GNC_LIBDIR) == $(libdir).
> >
> >That's what we want.  Did you notice the '#'?  Except that $GNC_LIBDIR
> >== $pkglibdir sometimes.  Might not $pkglibdir != $libdir?
> 
> Yes, but did you notice the line about three above it where QOF_LIB_DIR
> is set?  That's not the problem.  The priblem is that when you have no
> prefix set, $prefix is set to NONE until MUCH LATER in the configure
> process.
> 
> >>What we
> >>MIGHT need to do is make an assumption about prefix.  I'm not sure
> >>where the NONE is coming from.
> >
> >I don't think so.  $prefix == NONE when no --prefix is supplied.  Of
> >course, we have to fix QOF_XML_DIR, too, but it might not be as simple
> >as just:
> >       QOF_XML_DIR=`eval echo ${GNC_SHAREDIR}/xml/qsf`
> 
> Nope, it's not that simple.  $(GNC_SHAREDIR) is still defined in terms
> of $prefix, which is still NONE if no --prefix is installed.  No, we
> need to check if "x$prefix" = xNONE and if so use $ac_default_prefix
> instead in those sed expressions.

The whole thing makes about zero sense to me.  Why are we even doing
this in configure.in at all?

Don't we already have access to all the expanded path variables in our
Makefiles?  Why can't we avoid all this in configure.in and just do
the substitution or header creation in the Makefile?  Just like we do
with src/engine/gncla-dir.h.  That makes a whole lot more sense to me,
and we know it even works for VPATH builds.

-chris


More information about the gnucash-devel mailing list