/[pcre]/code/trunk/configure.in
ViewVC logotype

Contents of /code/trunk/configure.in

Parent Directory Parent Directory | Revision Log Revision Log


Revision 63 - (show annotations) (download)
Sat Feb 24 21:40:03 2007 UTC (7 years, 6 months ago) by nigel
File size: 3704 byte(s)
Load pcre-4.0 into code/trunk.

1 dnl Process this file with autoconf to produce a configure script.
2
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.
5
6 AC_INIT(dftables.c)
7
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)
12
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.
18
19 PCRE_MAJOR=4
20 PCRE_MINOR=0
21 PCRE_DATE=17-Feb-2003
22 PCRE_VERSION=${PCRE_MAJOR}.${PCRE_MINOR}
23
24 dnl Default values for miscellaneous macros
25
26 POSIX_MALLOC_THRESHOLD=-DPOSIX_MALLOC_THRESHOLD=10
27 HOST_CC=${HOST_CC:-'$(CC)'}
28 HOST_CFLAGS=${HOST_CFLAGS:-'$(CFLAGS)'}
29
30 dnl Provide versioning information for libtool shared libraries that
31 dnl are built by default on Unix systems.
32
33 PCRE_LIB_VERSION=0:1:0
34 PCRE_POSIXLIB_VERSION=0:0:0
35
36 dnl Checks for programs.
37
38 AC_PROG_CC
39 AC_PROG_INSTALL
40 AC_LIBTOOL_WIN32_DLL
41 AC_PROG_LIBTOOL
42
43 dnl Checks for header files.
44
45 AC_HEADER_STDC
46 AC_CHECK_HEADERS(limits.h)
47
48 dnl Checks for typedefs, structures, and compiler characteristics.
49
50 AC_C_CONST
51 AC_TYPE_SIZE_T
52
53 dnl Checks for library functions.
54
55 AC_CHECK_FUNCS(bcopy memmove strerror)
56
57 dnl Handle --enable-utf8
58
59 AC_ARG_ENABLE(utf8,
60 [ --enable-utf8 enable UTF8 support],
61 if test "$enableval" = "yes"; then
62 UTF8=-DSUPPORT_UTF8
63 fi
64 )
65
66 dnl Handle --enable-newline-is-cr
67
68 AC_ARG_ENABLE(newline-is-cr,
69 [ --enable-newline-is-cr use CR as the newline character],
70 if test "$enableval" = "yes"; then
71 NEWLINE=-DNEWLINE=13
72 fi
73 )
74
75 dnl Handle --enable-newline-is-lf
76
77 AC_ARG_ENABLE(newline-is-lf,
78 [ --enable-newline-is-lf use LF as the newline character],
79 if test "$enableval" = "yes"; then
80 NEWLINE=-DNEWLINE=10
81 fi
82 )
83
84 dnl There doesn't seem to be a straightforward way of having parameters
85 dnl that set values, other than fudging the --with thing. So that's what
86 dnl I've done.
87
88 dnl Handle --with-posix-malloc-threshold=n
89
90 AC_ARG_WITH(posix-malloc-threshold,
91 [ --with-posix-malloc-threshold=5 threshold for POSIX malloc usage],
92 POSIX_MALLOC_THRESHOLD=-DPOSIX_MALLOC_THRESHOLD=$withval
93 )
94
95 dnl Handle --with-link-size=n
96
97 AC_ARG_WITH(link-size,
98 [ --with-link-size=2 internal link size (2, 3, or 4 allowed)],
99 LINK_SIZE=-DLINK_SIZE=$withval
100 )
101
102 dnl Handle --with-match_limit=n
103
104 AC_ARG_WITH(match-limit,
105 [ --with-match-limit=10000000 default limit on internal looping)],
106 MATCH_LIMIT=-DMATCH_LIMIT=$withval
107 )
108
109 dnl Now arrange to build libtool
110
111 AC_PROG_LIBTOOL
112
113 dnl "Export" these variables
114
115 AC_SUBST(HAVE_MEMMOVE)
116 AC_SUBST(HAVE_STRERROR)
117 AC_SUBST(HOST_CC)
118 AC_SUBST(HOST_CFLAGS)
119 AC_SUBST(NEWLINE)
120 AC_SUBST(LINK_SIZE)
121 AC_SUBST(MATCH_LIMIT)
122 AC_SUBST(UTF8)
123 AC_SUBST(PCRE_MAJOR)
124 AC_SUBST(PCRE_MINOR)
125 AC_SUBST(PCRE_DATE)
126 AC_SUBST(PCRE_VERSION)
127 AC_SUBST(PCRE_LIB_VERSION)
128 AC_SUBST(PCRE_POSIXLIB_VERSION)
129 AC_SUBST(POSIX_MALLOC_THRESHOLD)
130
131 dnl Stuff to make Win32 work better
132
133 case $host_os in
134 mingw* )
135 POSIX_OBJ=pcreposix.o
136 POSIX_LOBJ=pcreposix.lo
137 POSIX_LIB=
138 ;;
139 * )
140 POSIX_OBJ=
141 POSIX_LOBJ=
142 POSIX_LIB=libpcreposix.la
143 ;;
144 esac
145 AC_SUBST(POSIX_OBJ)
146 AC_SUBST(POSIX_LOBJ)
147 AC_SUBST(POSIX_LIB)
148
149 if test "x$enable_shared" = "xno" ; then
150 AC_DEFINE(PCRE_STATIC,1)
151 fi
152
153 dnl This must be last; it determines what files are written as well as config.h
154 AC_OUTPUT(Makefile pcre.h:pcre.in pcre-config:pcre-config.in RunTest:RunTest.in,[chmod a+x RunTest pcre-config])

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12