On Thu, Oct 29, 2009 at 05:08:40PM -0400, Michael W. Lucas wrote:
On Thu, Oct 29, 2009 at 06:56:38PM +0100, Pal Tamas wrote:
Hi,
I'm working on getting syslog-ng 3.0.3 to support SQL on FreeBSD, and hopefully get it added to the FreeBSD package or port. It looks like something isn't quite right in the configure script, however.
I have libdbi 0.8.3 installed, but "./configure --enable-sql=yes" still reports:
checking for LIBDBI... gnome-config: not found no Did you installed pkg-config from ports? If not, please install it and re-run configure with the PKG_CONFIG_PATH set to /usr/local/lib/pkgconfig (this is where libdbi installed the dbi.pc config file)
Thanks for your answer. Yes, pkg-config was installed from ports, and it's a dependency for about 60 other packages built from source, so I assumed it was working. I also built libdbi from ports. But my /usr/local/lib/pkg-config is empty, and a "locate dbi.pc" shows it doesn't exist on this system. /usr/local/lib/pkg-config is also empty on the other -current boxes I run elsewhere.
I assume you're going to send me back to figure out why pkg-config isn't storing .pc files (and how building all the other software works without any .pc files on the system), but let's proceed to the other step... No need for it, libdbi 0.8.3 doesn't generate and install dbi.pc, only the CVS version and our in house tree. Sorry to mix those up.
checking for dbi_initialize in -ldbi... no This step will be skipped if library detection using pkg-config detection works. If not, please set include and library detection paths in CFLAGS and LDFLAGS variables before running configure. Ex: CFLAGS="-I/usr/local/include" LDFLAGS="-L/usr/local/lib" ./configure ...
Please note this only works in posix shells (bash, /bin/sh), in csh you have to set the variables before running configure.
That seems to have fixed the issue.
... checking for LIBDBI... gnome-config: not found no checking for dbi_initialize in -ldbi... yes ...
I could hack the FreeBSD port to support setting these variables, but I'd prefer to change as little as possible downstream. Is there any chance we could get the supporting changes made in the syslog-ng3 source? If not, I'll get these set in the FreeBSD port patch I'll be submitting (if necessary). Could you please test the following patch?
===== PATCH:BEGIN ===== diff --git a/configure.in b/configure.in index 66b3b12..672f5f6 100644 --- a/configure.in +++ b/configure.in @@ -280,6 +280,17 @@ if test "x$blb_cv_keepcaps" = "xyes"; then AC_DEFINE(HAVE_PR_SET_KEEPCAPS, 1, [have PR_SET_KEEPCAPS]) fi +patheval() +{ + OLD=$1 + NEW=`eval echo $1` + while test "x$OLD" != "x$NEW" + do + OLD=$NEW + NEW=`eval echo $OLD` + done + echo $OLD +} dnl *************************************************************************** dnl Checks for libraries @@ -382,7 +393,15 @@ PKG_CHECK_MODULES(LIBDBI, dbi >= $LIBDBI_MIN_VERSION, libdbi_pkgconfig_not_found if test "$libdbi_pkgconfig_not_found" -eq 1; then dnl if libdbi has no .pc file, try it without one - AC_CHECK_LIB(dbi, dbi_initialize, LIBDBI_LIBS="-ldbi"; LIBDBI_CFLAGS="-I/usr/include") + OCFLAGS=$CFLAGS + OLIBS=$LIBS + LIBDBI_CFLAGS="-I`patheval ${includedir}`" + LIBDBI_LIBS="-L`patheval ${libdir}` -L`patheval ${prefix}`/lib" + CFLAGS="$CFLAGS $LIBDBI_CFLAGS" + LIBS="$LIBS $LIBDBI_LIBS" + AC_CHECK_LIB(dbi, dbi_initialize) + CFLAGS=$OCFLAGS + LIBS=$OLIBS fi @@ -710,18 +729,6 @@ enable_value() fi } -patheval() -{ - OLD=$1 - NEW=`eval echo $1` - while test "x$OLD" != "x$NEW" - do - OLD=$NEW - NEW=`eval echo $OLD` - done - echo $OLD -} - AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [package name]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [version number]) AC_DEFINE_UNQUOTED(SOURCE_REVISION, "$SOURCE_REVISION", [source revision]) ===== PATCH:END ===== Apply it to the source tree, regenarate configure with autoconf(you might need to run aclocal first) and try configuring again. Regards, -- Pal Tamas/Folti folti@balabit.hu