Next: , Up: overview   [Contents][Index]


1.1 Linking code with the library

This package installs a data file for pkg-config, so when searching for the installed library with the GNU Autotools, we can add the following macro use to configure.ac:

PKG_CHECK_MODULES([CCMEMORY],[ccmemory >= 0.1.0])

which will set the variables CCMEMORY_LIBS and CCMEMORY_CFLAGS. The macros for GNU Autoconf installed by pkg-config are documented in the manual page pkg-config(1). To avoid problems with pkg-config, we need to remember that:

Alternatively we can use the raw GNU Autoconf macros:

AC_CHECK_LIB([ccmemory],[ccmem_version_string],,
  [AC_MSG_FAILURE([test for CCMemory library failed])])
AC_CHECK_HEADERS([ccmemory.h],,
  [AC_MSG_FAILURE([test for CCMemory header failed])])

Next: , Up: overview   [Contents][Index]

This document describes version 0.2.2-devel.3 of CCMemory.