Can't save in r12331

Derek Atkins warlord at MIT.EDU
Fri Jan 13 16:04:40 EST 2006


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.

> BTW, wouldn't it be nice if ./configure would notice when configure.in
> was newer than itself and rerun autoconf.  Or at least warn.

Hmm..  It does for me.

> -chris

-- 
       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
       warlord at MIT.EDU                        PGP key available



More information about the gnucash-devel mailing list