1 dnl Process this file with autoconf to produce a configure script.
3 dnl This is required at the start; the name is the name of a file
4 dnl it should be seeing, to verify it is in the same directory.
8 dnl Arrange to build config.h from config.in. Note that pcre.h is
9 dnl built differently, as it is just a "substitution" file.
10 dnl Manual says this macro should come right after AC_INIT.
11 AC_CONFIG_HEADER(config.h:config.in)
13 dnl Provide the current PCRE version information. Do not use numbers
14 dnl with leading zeros for the minor version, as they end up in a C
15 dnl macro, and may be treated as octal constants. Stick to single
16 dnl digits for minor numbers less than 10. There are unlikely to be
17 dnl that many releases anyway.
22 PCRE_VERSION=${PCRE_MAJOR}.${PCRE_MINOR}
24 dnl Provide versioning information for libtool shared libraries that
25 dnl are built by default on Unix systems.
27 PCRE_LIB_VERSION=0:1:0
28 PCRE_POSIXLIB_VERSION=0:0:0
30 dnl Checks for programs.
35 dnl Checks for header files.
38 AC_CHECK_HEADERS(limits.h)
40 dnl Checks for typedefs, structures, and compiler characteristics.
45 dnl Checks for library functions.
47 AC_CHECK_FUNCS(bcopy memmove strerror)
49 dnl Handle --enable-shared-libraries
54 [ --disable-shared build PCRE as a static library],
55 if test "$enableval" = "no"; then
61 dnl Handle --enable-utf8
64 [ --enable-utf8 enable UTF8 support (incomplete)],
65 if test "$enableval" = "yes"; then
70 dnl "Export" these variables
72 AC_SUBST(HAVE_MEMMOVE)
73 AC_SUBST(HAVE_STRERROR)
80 AC_SUBST(PCRE_VERSION)
81 AC_SUBST(PCRE_LIB_VERSION)
82 AC_SUBST(PCRE_POSIXLIB_VERSION)
84 dnl This must be last; it determines what files are written
85 AC_OUTPUT(Makefile pcre.h:pcre.in pcre-config:pcre-config.in RunTest:RunTest.in,[chmod a+x RunTest pcre-config])