From 67be3511d41496ed3c26f082cbf1eb06d96003cb Mon Sep 17 00:00:00 2001 From: Nathan Kinder Date: Wed, 7 Feb 2007 23:26:19 +0000 Subject: Resolves: 227754 Summary: Set library search path when using AC_CHECK_LIB in db.m4. --- m4/db.m4 | 5 ++++- m4/netsnmp.m4 | 1 - m4/svrcore.m4 | 26 +++++++++++++++++++++++--- 3 files changed, 27 insertions(+), 5 deletions(-) (limited to 'm4') diff --git a/m4/db.m4 b/m4/db.m4 index 2e43b144..61bd34a6 100644 --- a/m4/db.m4 +++ b/m4/db.m4 @@ -1,5 +1,5 @@ # BEGIN COPYRIGHT BLOCK -# Copyright (C) 2006 Red Hat, Inc. +# Copyright (C) 2007 Red Hat, Inc. # All rights reserved. # # This program is free software; you can redistribute it and/or @@ -73,7 +73,10 @@ dnl libname is libdb-maj.min e.g. libdb-4.2 db_libver=${db_ver_maj}.${db_ver_min} dnl make sure the lib is available dnl use true so libdb won't be added to LIBS +save_ldflags="$LDFLAGS" +LDFLAGS="$db_lib" AC_CHECK_LIB([db-$db_libver], [db_create], [true], [AC_MSG_ERROR([$db_incdir/db.h is version $db_libver but libdb-$db_libver not found])], [$LIBNSL]) +LDFLAGS="$save_ldflags" diff --git a/m4/netsnmp.m4 b/m4/netsnmp.m4 index d8f32f44..10fccf84 100644 --- a/m4/netsnmp.m4 +++ b/m4/netsnmp.m4 @@ -87,7 +87,6 @@ fi dnl - find dependent libs with net-snmp-config if test -n "$netsnmp_inc"; then - AC_MSG_CHECKING(for netsnmp libs with net-snmp-config) if test -x "$NETSNMPDIR/bin/net-snmp-config"; then NETSNMP_CONFIG=$NETSNMPDIR/bin/net-snmp-config else diff --git a/m4/svrcore.m4 b/m4/svrcore.m4 index a2853734..5051f73d 100644 --- a/m4/svrcore.m4 +++ b/m4/svrcore.m4 @@ -1,6 +1,26 @@ -# -*- tab-width: 4; -*- +# BEGIN COPYRIGHT BLOCK +# Copyright (C) 2007 Red Hat, Inc. +# All rights reserved. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# END COPYRIGHT BLOCK +# # Configure paths for SVRCORE -# Public domain - Nathan Kinder 2006-06-26 + +AC_CHECKING(for svrcore) AC_MSG_CHECKING(for --with-svrcore) AC_ARG_WITH(svrcore, @@ -65,8 +85,8 @@ AC_ARG_WITH(svrcore-lib, dnl svrcore not given - look for pkg-config if test -z "$svrcore_inc" -o -z "$svrcore_lib"; then - AC_MSG_CHECKING(for svrcore with pkg-config) AC_PATH_PROG(PKG_CONFIG, pkg-config) + AC_MSG_CHECKING(for svrcore with pkg-config) if test -n "$PKG_CONFIG"; then if $PKG_CONFIG --exists svrcore; then svrcore_inc=`$PKG_CONFIG --cflags-only-I svrcore` -- cgit