summaryrefslogtreecommitdiff
path: root/srclib/pcre/configure.in
blob: a947f19d2dcfd35a8d0f701d00a75deb59916160 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
dnl Process this file with autoconf to produce a configure script.

dnl This is required at the start; the name is the name of a file
dnl it should be seeing, to verify it is in the same directory.

AC_INIT(dftables.c)

dnl Arrange to build config.h from config.in. Note that pcre.h is
dnl built differently, as it is just a "substitution" file.
dnl Manual says this macro should come right after AC_INIT.
AC_CONFIG_HEADER(config.h:config.in)

dnl Provide the current PCRE version information. Do not use numbers
dnl with leading zeros for the minor version, as they end up in a C
dnl macro, and may be treated as octal constants. Stick to single
dnl digits for minor numbers less than 10. There are unlikely to be
dnl that many releases anyway.

PCRE_MAJOR=3
PCRE_MINOR=1
PCRE_DATE=09-Feb-2000
PCRE_VERSION=${PCRE_MAJOR}.${PCRE_MINOR}

dnl Provide versioning information for libtool shared libraries that
dnl are built by default on Unix systems.

PCRE_LIB_VERSION=0:0:0
PCRE_POSIXLIB_VERSION=0:0:0

dnl Checks for programs.

AC_PROG_CC
AC_PROG_RANLIB

dnl Checks for header files.

AC_HEADER_STDC
AC_CHECK_HEADERS(limits.h)

dnl Checks for typedefs, structures, and compiler characteristics.

AC_C_CONST
AC_TYPE_SIZE_T

dnl Checks for library functions.

AC_CHECK_FUNCS(memmove strerror)

dnl Handle --enable-shared-libraries

LIBTOOL=libtool
LIBSUFFIX=la
AC_ARG_ENABLE(shared,
[  --disable-shared        build PCRE as a static library],
if test "$enableval" = "no"; then
  LIBTOOL=
  LIBSUFFIX=a
fi
)

dnl "Export" these variables

AC_SUBST(HAVE_MEMMOVE)
AC_SUBST(HAVE_STRERROR)
AC_SUBST(LIBTOOL)
AC_SUBST(LIBSUFFIX)
AC_SUBST(PCRE_MAJOR)
AC_SUBST(PCRE_MINOR)
AC_SUBST(PCRE_DATE)
AC_SUBST(PCRE_VERSION)
AC_SUBST(PCRE_LIB_VERSION)
AC_SUBST(PCRE_POSIXLIB_VERSION)

dnl This must be last; it determines what files are written
AC_OUTPUT(Makefile pcre.h:pcre.in pcre-config,[chmod a+x pcre-config])