| 16 |
dnl digits for minor numbers less than 10. There are unlikely to be |
dnl digits for minor numbers less than 10. There are unlikely to be |
| 17 |
dnl that many releases anyway. |
dnl that many releases anyway. |
| 18 |
|
|
| 19 |
PCRE_MAJOR=3 |
PCRE_MAJOR=4 |
| 20 |
PCRE_MINOR=9 |
PCRE_MINOR=0 |
| 21 |
PCRE_DATE=02-Jan-2002 |
PCRE_DATE=17-Feb-2003 |
| 22 |
PCRE_VERSION=${PCRE_MAJOR}.${PCRE_MINOR} |
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 |
dnl Provide versioning information for libtool shared libraries that |
| 31 |
dnl are built by default on Unix systems. |
dnl are built by default on Unix systems. |
| 32 |
|
|
| 37 |
|
|
| 38 |
AC_PROG_CC |
AC_PROG_CC |
| 39 |
AC_PROG_INSTALL |
AC_PROG_INSTALL |
| 40 |
AC_PROG_RANLIB |
AC_LIBTOOL_WIN32_DLL |
| 41 |
|
AC_PROG_LIBTOOL |
| 42 |
|
|
| 43 |
dnl Checks for header files. |
dnl Checks for header files. |
| 44 |
|
|
| 57 |
dnl Handle --enable-utf8 |
dnl Handle --enable-utf8 |
| 58 |
|
|
| 59 |
AC_ARG_ENABLE(utf8, |
AC_ARG_ENABLE(utf8, |
| 60 |
[ --enable-utf8 enable UTF8 support (incomplete)], |
[ --enable-utf8 enable UTF8 support], |
| 61 |
if test "$enableval" = "yes"; then |
if test "$enableval" = "yes"; then |
| 62 |
UTF8=-DSUPPORT_UTF8 |
UTF8=-DSUPPORT_UTF8 |
| 63 |
fi |
fi |
| 81 |
fi |
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 |
dnl Now arrange to build libtool |
| 110 |
|
|
| 111 |
AC_PROG_LIBTOOL |
AC_PROG_LIBTOOL |
| 114 |
|
|
| 115 |
AC_SUBST(HAVE_MEMMOVE) |
AC_SUBST(HAVE_MEMMOVE) |
| 116 |
AC_SUBST(HAVE_STRERROR) |
AC_SUBST(HAVE_STRERROR) |
| 117 |
|
AC_SUBST(HOST_CC) |
| 118 |
|
AC_SUBST(HOST_CFLAGS) |
| 119 |
AC_SUBST(NEWLINE) |
AC_SUBST(NEWLINE) |
| 120 |
|
AC_SUBST(LINK_SIZE) |
| 121 |
|
AC_SUBST(MATCH_LIMIT) |
| 122 |
AC_SUBST(UTF8) |
AC_SUBST(UTF8) |
| 123 |
AC_SUBST(PCRE_MAJOR) |
AC_SUBST(PCRE_MAJOR) |
| 124 |
AC_SUBST(PCRE_MINOR) |
AC_SUBST(PCRE_MINOR) |
| 126 |
AC_SUBST(PCRE_VERSION) |
AC_SUBST(PCRE_VERSION) |
| 127 |
AC_SUBST(PCRE_LIB_VERSION) |
AC_SUBST(PCRE_LIB_VERSION) |
| 128 |
AC_SUBST(PCRE_POSIXLIB_VERSION) |
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 |
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]) |
AC_OUTPUT(Makefile pcre.h:pcre.in pcre-config:pcre-config.in RunTest:RunTest.in,[chmod a+x RunTest pcre-config]) |