bug-commoncpp
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CommonC++ autoconf use?


From: David Sugar
Subject: Re: CommonC++ autoconf use?
Date: Sun, 30 Jan 2005 10:37:48 -0500
User-agent: Mozilla Thunderbird 1.0 (Macintosh/20041206)

Well, I usually just use something like:

REQUIRES="1.1.2"
OST_CCXX2_VERSION([$REQUIRES])

and assuming aclocal is passed a -I directory path where the ost_check2.m4 file lives, all should be happy.

However, very recently (starting with 1.3.0) we have been experimenting with pkgconfig as well. With pkgconfig, a .pc file is used. The problem I am finding is that the pkg_xxx macros do NOT search for pkgconfig files in the prefix path you might set in configure, but only in the original install directory prefix that pkgconfig was itself installed under. This lead to some creative coding in configure.ac like:

if test -z "$PKG_CONFIG_PATH" ; then
        PKG_CONFIG_PATH="/usr/local/lib/pkgconfig"
fi

if test "$prefix" != "NONE" ; then
        PKG_CONFIG_PATH="$prefix/lib/pkgconfig:$PKG_CONFIG_PATH"
fi

export PKG_CONFIG_PATH

PKG_CHECK_MODULES(COMMON, libccgnu2 >= 1.3.1)
CXXFLAGS="$CXXFLAGS $COMMON_CFLAGS"
COMMON_LIBPATH=`pkg-config --variable=libdir libccgnu2`
LIBS="$LIBS -L$COMMON_LIBPATH $COMMON_LIBS"
COMMON_MODFLAGS=`pkg-config --variable=modflags libccgnu2`
AC_SUBST(COMMON_MODFLAGS)

Scot Wilcoxon wrote:
What is the current method for using CommonC++ with autoconf?
In trying to follow the CommonC++2 1.0 document "Automake Services", I
found several of the configure.ac "AM_*" macros are not defined.

Configure emits:
...
checking dependency style of g++... gcc3
./configure: line 2677: syntax error near unexpected token `1.0.0'
./configure: line 2677: `OST_CCXX2_VERSION(1.0.0)'

I tried quoting "1.0.0" in several ways, and placing ost_check2.m4 in
various directories (the reference to "your project's autoconf "m4"
directory" is quite ambiguous).



_______________________________________________
Bug-commoncpp mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/bug-commoncpp

Attachment: dyfet.vcf
Description: Vcard


reply via email to

[Prev in Thread] Current Thread [Next in Thread]