| 1 |
nigel |
41 |
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 |
nigel |
43 |
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=3 |
| 20 |
nigel |
55 |
PCRE_MINOR=6 |
| 21 |
|
|
PCRE_DATE=23-Oct-2001 |
| 22 |
nigel |
43 |
PCRE_VERSION=${PCRE_MAJOR}.${PCRE_MINOR} |
| 23 |
|
|
|
| 24 |
|
|
dnl Provide versioning information for libtool shared libraries that |
| 25 |
|
|
dnl are built by default on Unix systems. |
| 26 |
|
|
|
| 27 |
nigel |
47 |
PCRE_LIB_VERSION=0:1:0 |
| 28 |
nigel |
43 |
PCRE_POSIXLIB_VERSION=0:0:0 |
| 29 |
|
|
|
| 30 |
nigel |
41 |
dnl Checks for programs. |
| 31 |
nigel |
43 |
|
| 32 |
nigel |
41 |
AC_PROG_CC |
| 33 |
nigel |
53 |
AC_PROG_INSTALL |
| 34 |
nigel |
41 |
AC_PROG_RANLIB |
| 35 |
|
|
|
| 36 |
|
|
dnl Checks for header files. |
| 37 |
nigel |
43 |
|
| 38 |
nigel |
41 |
AC_HEADER_STDC |
| 39 |
|
|
AC_CHECK_HEADERS(limits.h) |
| 40 |
|
|
|
| 41 |
|
|
dnl Checks for typedefs, structures, and compiler characteristics. |
| 42 |
nigel |
43 |
|
| 43 |
nigel |
41 |
AC_C_CONST |
| 44 |
|
|
AC_TYPE_SIZE_T |
| 45 |
|
|
|
| 46 |
|
|
dnl Checks for library functions. |
| 47 |
nigel |
43 |
|
| 48 |
nigel |
47 |
AC_CHECK_FUNCS(bcopy memmove strerror) |
| 49 |
nigel |
41 |
|
| 50 |
nigel |
49 |
dnl Handle --enable-utf8 |
| 51 |
|
|
|
| 52 |
|
|
AC_ARG_ENABLE(utf8, |
| 53 |
|
|
[ --enable-utf8 enable UTF8 support (incomplete)], |
| 54 |
|
|
if test "$enableval" = "yes"; then |
| 55 |
|
|
UTF8=-DSUPPORT_UTF8 |
| 56 |
|
|
fi |
| 57 |
|
|
) |
| 58 |
|
|
|
| 59 |
nigel |
53 |
dnl Handle --enable-newline-is-cr |
| 60 |
|
|
|
| 61 |
|
|
AC_ARG_ENABLE(newline-is-cr, |
| 62 |
|
|
[ --enable-newline-is-cr use CR as the newline character], |
| 63 |
|
|
if test "$enableval" = "yes"; then |
| 64 |
|
|
NEWLINE=-DNEWLINE=13 |
| 65 |
|
|
fi |
| 66 |
|
|
) |
| 67 |
|
|
|
| 68 |
|
|
dnl Handle --enable-newline-is-lf |
| 69 |
|
|
|
| 70 |
|
|
AC_ARG_ENABLE(newline-is-lf, |
| 71 |
|
|
[ --enable-newline-is-lf use LF as the newline character], |
| 72 |
|
|
if test "$enableval" = "yes"; then |
| 73 |
|
|
NEWLINE=-DNEWLINE=10 |
| 74 |
|
|
fi |
| 75 |
|
|
) |
| 76 |
|
|
|
| 77 |
|
|
dnl Now arrange to build libtool |
| 78 |
|
|
|
| 79 |
|
|
AC_PROG_LIBTOOL |
| 80 |
|
|
|
| 81 |
nigel |
43 |
dnl "Export" these variables |
| 82 |
|
|
|
| 83 |
|
|
AC_SUBST(HAVE_MEMMOVE) |
| 84 |
|
|
AC_SUBST(HAVE_STRERROR) |
| 85 |
nigel |
53 |
AC_SUBST(NEWLINE) |
| 86 |
nigel |
49 |
AC_SUBST(UTF8) |
| 87 |
nigel |
43 |
AC_SUBST(PCRE_MAJOR) |
| 88 |
|
|
AC_SUBST(PCRE_MINOR) |
| 89 |
|
|
AC_SUBST(PCRE_DATE) |
| 90 |
|
|
AC_SUBST(PCRE_VERSION) |
| 91 |
|
|
AC_SUBST(PCRE_LIB_VERSION) |
| 92 |
|
|
AC_SUBST(PCRE_POSIXLIB_VERSION) |
| 93 |
nigel |
41 |
|
| 94 |
nigel |
53 |
dnl This must be last; it determines what files are written as well as config.h |
| 95 |
nigel |
49 |
AC_OUTPUT(Makefile pcre.h:pcre.in pcre-config:pcre-config.in RunTest:RunTest.in,[chmod a+x RunTest pcre-config]) |