1
# Configure paths for libunittest++
2
# Antonio Nicolás 2010-03-05, based on libagg.m4 by Kirill Smelkov
4
# AC_CHECK_LIBUNITTESTPP([MINIMUM-VERSION [, ACTION-IF-FOUND [,ACTION-IF-NOT-FOUND]]])
5
# Test for libunittest++, and define LIBUNITTESTPP_CFLAGS and LIBUNITTESTPP_LIBS
7
AC_DEFUN([AC_CHECK_LIBUNITTESTPP],
9
# Get the cflags and libraries from pkg-config libunittest++ ...
10
AC_ARG_WITH([libunittestpp],
11
AS_HELP_STRING([--with-libunittestpp=PREFIX],
12
[Prefix where libunittest++ is installed (optional)]),
13
[libunittestpp_prefix="$withval"],
14
[libunittestpp_prefix=""])
16
libunittestpp_name="unittest++"
17
if test "x$libunittestpp_prefix" != "x"; then
18
libunittestpp_name="$libunittestpp_prefix/lib/pkgconfig/unittest++.pc"
21
PKG_CHECK_MODULES([UNITTESTPP], "$libunittestpp_name", success=yes, success=no)
23
if test "x$success" = xyes; then
24
ifelse([$2], , :, [$2])
26
AC_SUBST([UNITTESTPP_CFLAGS])
27
AC_SUBST([UNITTESTPP_LIBS])
29
ifelse([$3], , :, [$3])
33
# end of libunittest++.m4