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

Contents of /code/trunk/configure.in

Parent Directory Parent Directory | Revision Log Revision Log


Revision 71 - (show annotations)
Sat Feb 24 21:40:24 2007 UTC (8 years, 6 months ago) by nigel
File size: 4720 byte(s)
Error occurred while calculating annotation data.
Load pcre-4.4 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 A safety precaution
9
10 AC_PREREQ(2.57)
11
12 dnl Arrange to build config.h from config.in. Note that pcre.h is
13 dnl built differently, as it is just a "substitution" file.
14 dnl Manual says this macro should come right after AC_INIT.
15 AC_CONFIG_HEADER(config.h:config.in)
16
17 dnl Provide the current PCRE version information. Do not use numbers
18 dnl with leading zeros for the minor version, as they end up in a C
19 dnl macro, and may be treated as octal constants. Stick to single
20 dnl digits for minor numbers less than 10. There are unlikely to be
21 dnl that many releases anyway.
22
23 PCRE_MAJOR=4
24 PCRE_MINOR=4
25 PCRE_DATE=21-August-2003
26 PCRE_VERSION=${PCRE_MAJOR}.${PCRE_MINOR}
27
28 dnl Default values for miscellaneous macros
29
30 POSIX_MALLOC_THRESHOLD=-DPOSIX_MALLOC_THRESHOLD=10
31
32 dnl Provide versioning information for libtool shared libraries that
33 dnl are built by default on Unix systems.
34
35 PCRE_LIB_VERSION=0:1:0
36 PCRE_POSIXLIB_VERSION=0:0:0
37
38 dnl Checks for programs.
39
40 AC_PROG_CC
41 AC_PROG_INSTALL
42 AC_LIBTOOL_WIN32_DLL
43 AC_PROG_LIBTOOL
44
45 dnl We need to find a compiler for compiling a program to run on the local host
46 dnl while building. It needs to be different from CC when cross-compiling.
47 dnl There is a macro called AC_PROG_CC_FOR_BUILD in the GNU archive for
48 dnl figuring this out automatically. Unfortunately, it does not work with the
49 dnl latest versions of autoconf. So for the moment, we just default to the
50 dnl same values as the "main" compiler. People who are corss-compiling will
51 dnl just have to adjust the Makefile by hand or set these values when they
52 dnl run "configure".
53
54 CC_FOR_BUILD=${CC_FOR_BUILD:-'$(CC)'}
55 CFLAGS_FOR_BUILD=${CFLAGS_FOR_BUILD:-'$(CFLAGS)'}
56 BUILD_EXEEXT=${BUILD_EXEEXT:-'$(EXEEXT)'}
57 BUILD_OBJEXT=${BUILD_OBJEXT:-'$(OBJEXT)'}
58
59 dnl Checks for header files.
60
61 AC_HEADER_STDC
62 AC_CHECK_HEADERS(limits.h)
63
64 dnl Checks for typedefs, structures, and compiler characteristics.
65
66 AC_C_CONST
67 AC_TYPE_SIZE_T
68
69 dnl Checks for library functions.
70
71 AC_CHECK_FUNCS(bcopy memmove strerror)
72
73 dnl Handle --enable-utf8
74
75 AC_ARG_ENABLE(utf8,
76 [ --enable-utf8 enable UTF8 support],
77 if test "$enableval" = "yes"; then
78 UTF8=-DSUPPORT_UTF8
79 fi
80 )
81
82 dnl Handle --enable-newline-is-cr
83
84 AC_ARG_ENABLE(newline-is-cr,
85 [ --enable-newline-is-cr use CR as the newline character],
86 if test "$enableval" = "yes"; then
87 NEWLINE=-DNEWLINE=13
88 fi
89 )
90
91 dnl Handle --enable-newline-is-lf
92
93 AC_ARG_ENABLE(newline-is-lf,
94 [ --enable-newline-is-lf use LF as the newline character],
95 if test "$enableval" = "yes"; then
96 NEWLINE=-DNEWLINE=10
97 fi
98 )
99
100 dnl There doesn't seem to be a straightforward way of having parameters
101 dnl that set values, other than fudging the --with thing. So that's what
102 dnl I've done.
103
104 dnl Handle --with-posix-malloc-threshold=n
105
106 AC_ARG_WITH(posix-malloc-threshold,
107 [ --with-posix-malloc-threshold=5 threshold for POSIX malloc usage],
108 POSIX_MALLOC_THRESHOLD=-DPOSIX_MALLOC_THRESHOLD=$withval
109 )
110
111 dnl Handle --with-link-size=n
112
113 AC_ARG_WITH(link-size,
114 [ --with-link-size=2 internal link size (2, 3, or 4 allowed)],
115 LINK_SIZE=-DLINK_SIZE=$withval
116 )
117
118 dnl Handle --with-match_limit=n
119
120 AC_ARG_WITH(match-limit,
121 [ --with-match-limit=10000000 default limit on internal looping)],
122 MATCH_LIMIT=-DMATCH_LIMIT=$withval
123 )
124
125 dnl Now arrange to build libtool
126
127 AC_PROG_LIBTOOL
128
129 dnl "Export" these variables
130
131 AC_SUBST(BUILD_EXEEXT)
132 AC_SUBST(BUILD_OBJEXT)
133 AC_SUBST(CC_FOR_BUILD)
134 AC_SUBST(CFLAGS_FOR_BUILD)
135 AC_SUBST(HAVE_MEMMOVE)
136 AC_SUBST(HAVE_STRERROR)
137 AC_SUBST(LINK_SIZE)
138 AC_SUBST(MATCH_LIMIT)
139 AC_SUBST(NEWLINE)
140 AC_SUBST(PCRE_MAJOR)
141 AC_SUBST(PCRE_MINOR)
142 AC_SUBST(PCRE_DATE)
143 AC_SUBST(PCRE_VERSION)
144 AC_SUBST(PCRE_LIB_VERSION)
145 AC_SUBST(PCRE_POSIXLIB_VERSION)
146 AC_SUBST(POSIX_MALLOC_THRESHOLD)
147 AC_SUBST(UTF8)
148
149 dnl Stuff to make MinGW work better. Special treatment is no longer
150 dnl needed for Cygwin.
151
152 case $host_os in
153 mingw* )
154 POSIX_OBJ=pcreposix.o
155 POSIX_LOBJ=pcreposix.lo
156 POSIX_LIB=
157 ON_WINDOWS=
158 NOT_ON_WINDOWS="#"
159 WIN_PREFIX=
160 ;;
161 * )
162 ON_WINDOWS="#"
163 NOT_ON_WINDOWS=
164 POSIX_OBJ=
165 POSIX_LOBJ=
166 POSIX_LIB=libpcreposix.la
167 WIN_PREFIX=
168 ;;
169 esac
170 AC_SUBST(WIN_PREFIX)
171 AC_SUBST(ON_WINDOWS)
172 AC_SUBST(NOT_ON_WINDOWS)
173 AC_SUBST(POSIX_OBJ)
174 AC_SUBST(POSIX_LOBJ)
175 AC_SUBST(POSIX_LIB)
176
177 if test "x$enable_shared" = "xno" ; then
178 AC_DEFINE([PCRE_STATIC],[1],[to link statically])
179 fi
180
181 dnl This must be last; it determines what files are written as well as config.h
182 AC_OUTPUT(Makefile pcre.h:pcre.in pcre-config:pcre-config.in RunTest:RunTest.in,[chmod a+x RunTest pcre-config])

  ViewVC Help
Powered by ViewVC 1.1.5