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([CRE2],[cre2 >= 0.1.0])

which will set the variables CRE2_LIBS and CRE2_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([cre2],[cre2_version_string],,
  [AC_MSG_FAILURE([test for C wrapper for RE2 library failed])])
AC_CHECK_HEADERS([cre2.h],,
  [AC_MSG_FAILURE([test for C wrapper for RE2 header failed])])

Up: overview   [Contents][Index]

This document describes version 0.4.0-devel.2 of CRE2.