blob: 0ab24d2500969748df5fdcaff21ee609b6dd7343 [file] [log] [blame]
subrata_modakbc217072009-02-10 13:38:11 +00001dnl
2dnl Copyright (c) Red Hat Inc., 2009
3dnl
4dnl This program is free software; you can redistribute it and/or
5dnl modify it under the terms of the GNU General Public License as
6dnl published by the Free Software Foundation; either version 2 of
7dnl the License, or (at your option) any later version.
8dnl
9dnl This program is distributed in the hope that it will be useful,
10dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
11dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
12dnl the GNU General Public License for more details.
13dnl
14dnl You should have received a copy of the GNU General Public License
15dnl along with this program; if not, write to the Free Software
16dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
17dnl USA
18dnl
19dnl Author: Masatake YAMATO <yamato@redhat.com>
20dnl
21
22# LTP_CHECK_LIB(/LIBRARY/,/FUNCTIONS/,[/OTHER-LIBRARIES/])
23# --------------------------------------------------
24# LTP_CHECK_LIB works like AC_CHECK_LIB.
25# But it is customized for LTP.
26#
27# 1. LIBS is not updated even if /FUNCTION/ is found in /LIBRARY/.
28# 2. Instead of LIBS, /LIBRARY/_LIBS is set.
29# 3. LIBS_/LIBRARY/ is passed to AC_SUBST.
30#
31AC_DEFUN([LTP_CHECK_LIB],LIBRARY_LIBS
32[AH_TEMPLATE(AS_TR_CPP([HAVE_LIB$1]),
33[Define to 1 if you have the `$1' library (-l$1).])
34AC_CHECK_LIB($1,$2,[AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_LIB$1)) AS_TR_CPP([$1_LIBS])="-l$1 $3"],,$3)
35AC_SUBST(AS_TR_CPP([$1_LIBS]))])