summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authornigel <nigel@2f5784b3-3f2a-0410-8824-cb99058d5e15>2007-02-24 21:40:03 +0000
committernigel <nigel@2f5784b3-3f2a-0410-8824-cb99058d5e15>2007-02-24 21:40:03 +0000
commitc8cb607ab7e12e185e86a8b23d413b7f9536f24c (patch)
treee1c3675d531d498d2a84490908e187a249456d2c /configure.in
parente27c89c9227398c6feee3ca0748827fd064154cd (diff)
downloadpcre-c8cb607ab7e12e185e86a8b23d413b7f9536f24c.tar.gz
Load pcre-4.0 into code/trunk.
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@63 2f5784b3-3f2a-0410-8824-cb99058d5e15
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in69
1 files changed, 64 insertions, 5 deletions
diff --git a/configure.in b/configure.in
index e158d46..77bdaa9 100644
--- a/configure.in
+++ b/configure.in
@@ -16,11 +16,17 @@ 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=9
-PCRE_DATE=02-Jan-2002
+PCRE_MAJOR=4
+PCRE_MINOR=0
+PCRE_DATE=17-Feb-2003
PCRE_VERSION=${PCRE_MAJOR}.${PCRE_MINOR}
+dnl Default values for miscellaneous macros
+
+POSIX_MALLOC_THRESHOLD=-DPOSIX_MALLOC_THRESHOLD=10
+HOST_CC=${HOST_CC:-'$(CC)'}
+HOST_CFLAGS=${HOST_CFLAGS:-'$(CFLAGS)'}
+
dnl Provide versioning information for libtool shared libraries that
dnl are built by default on Unix systems.
@@ -31,7 +37,8 @@ dnl Checks for programs.
AC_PROG_CC
AC_PROG_INSTALL
-AC_PROG_RANLIB
+AC_LIBTOOL_WIN32_DLL
+AC_PROG_LIBTOOL
dnl Checks for header files.
@@ -50,7 +57,7 @@ AC_CHECK_FUNCS(bcopy memmove strerror)
dnl Handle --enable-utf8
AC_ARG_ENABLE(utf8,
-[ --enable-utf8 enable UTF8 support (incomplete)],
+[ --enable-utf8 enable UTF8 support],
if test "$enableval" = "yes"; then
UTF8=-DSUPPORT_UTF8
fi
@@ -74,6 +81,31 @@ if test "$enableval" = "yes"; then
fi
)
+dnl There doesn't seem to be a straightforward way of having parameters
+dnl that set values, other than fudging the --with thing. So that's what
+dnl I've done.
+
+dnl Handle --with-posix-malloc-threshold=n
+
+AC_ARG_WITH(posix-malloc-threshold,
+[ --with-posix-malloc-threshold=5 threshold for POSIX malloc usage],
+ POSIX_MALLOC_THRESHOLD=-DPOSIX_MALLOC_THRESHOLD=$withval
+)
+
+dnl Handle --with-link-size=n
+
+AC_ARG_WITH(link-size,
+[ --with-link-size=2 internal link size (2, 3, or 4 allowed)],
+ LINK_SIZE=-DLINK_SIZE=$withval
+)
+
+dnl Handle --with-match_limit=n
+
+AC_ARG_WITH(match-limit,
+[ --with-match-limit=10000000 default limit on internal looping)],
+ MATCH_LIMIT=-DMATCH_LIMIT=$withval
+)
+
dnl Now arrange to build libtool
AC_PROG_LIBTOOL
@@ -82,7 +114,11 @@ dnl "Export" these variables
AC_SUBST(HAVE_MEMMOVE)
AC_SUBST(HAVE_STRERROR)
+AC_SUBST(HOST_CC)
+AC_SUBST(HOST_CFLAGS)
AC_SUBST(NEWLINE)
+AC_SUBST(LINK_SIZE)
+AC_SUBST(MATCH_LIMIT)
AC_SUBST(UTF8)
AC_SUBST(PCRE_MAJOR)
AC_SUBST(PCRE_MINOR)
@@ -90,6 +126,29 @@ AC_SUBST(PCRE_DATE)
AC_SUBST(PCRE_VERSION)
AC_SUBST(PCRE_LIB_VERSION)
AC_SUBST(PCRE_POSIXLIB_VERSION)
+AC_SUBST(POSIX_MALLOC_THRESHOLD)
+
+dnl Stuff to make Win32 work better
+
+case $host_os in
+mingw* )
+ POSIX_OBJ=pcreposix.o
+ POSIX_LOBJ=pcreposix.lo
+ POSIX_LIB=
+ ;;
+* )
+ POSIX_OBJ=
+ POSIX_LOBJ=
+ POSIX_LIB=libpcreposix.la
+ ;;
+esac
+AC_SUBST(POSIX_OBJ)
+AC_SUBST(POSIX_LOBJ)
+AC_SUBST(POSIX_LIB)
+
+if test "x$enable_shared" = "xno" ; then
+ AC_DEFINE(PCRE_STATIC,1)
+fi
dnl This must be last; it determines what files are written as well as config.h
AC_OUTPUT(Makefile pcre.h:pcre.in pcre-config:pcre-config.in RunTest:RunTest.in,[chmod a+x RunTest pcre-config])