Contents of /code/trunk/configure.ac

Applied Bob and Daniel's patches to convert the build system to automake. Added
the maintain directory, containing files that are used for maintenance, but are
not distributed. This is an intermediate step.

1

dnl Process this file with autoconf to produce a configure script.

2

3

m4_define(pcre_major, [7])

4

m4_define(pcre_minor, [1])

5

m4_define(pcre_prerelease, [-RC0])

6

m4_define(pcre_date, [2006-12-18])

7

8

# Libtool shared library interface versions (current:revision:age)

9

m4_define(libpcre_version, [0:1:0])

10

m4_define(libpcreposix_version, [0:0:0])

11

m4_define(libpcrecpp_version, [0:0:0])

12

13

AC_PREREQ(2.57)

14

AC_INIT(PCRE, pcre_major.pcre_minor[]pcre_prerelease, , pcre)

15

AC_CONFIG_SRCDIR([pcre.h.in])

16

AM_INIT_AUTOMAKE([dist-bzip2 dist-zip])

17

AC_CONFIG_HEADERS(config.h)

18

AC_PROG_CC

19

AC_PROG_CXX

20

AC_PROG_INSTALL

21

AC_LIBTOOL_WIN32_DLL

22

AC_PROG_LIBTOOL

23

24

PCRE_MAJOR="pcre_major"

25

PCRE_MINOR="pcre_minor"

26

PCRE_PRERELEASE="pcre_prerelease"

27

PCRE_DATE="pcre_date"

28

29

AC_SUBST(PCRE_MAJOR)

30

AC_SUBST(PCRE_MINOR)

31

AC_SUBST(PCRE_PRERELEASE)

32

AC_SUBST(PCRE_DATE)

33

34

# Set a more sensible default value for $(htmldir).

35

if test "x$htmldir" = 'x${docdir}'

36

then

37

htmldir='${docdir}/html'

38

fi

39

40

# Handle --disable-cpp

41

AC_ARG_ENABLE(cpp,

42

AS_HELP_STRING([--disable-cpp],

43

[disable C++ support]),

44

, enable_cpp=yes)

45

46

# Handle --enable-utf8 (disabled by default)

47

AC_ARG_ENABLE(utf8,

48

AS_HELP_STRING([--enable-utf8],

49

[enable UTF-8 support]),

50

, enable_utf8=unset)

51

52

# Handle --enable-unicode-properties

53

AC_ARG_ENABLE(unicode-properties,

54

AS_HELP_STRING([--enable-unicode-properties],

55

[enable Unicode properties support (implies --enable-utf8)]),

56

, enable_unicode_properties=no)

57

58

# Handle --enable-newline=NL

59

dnl AC_ARG_ENABLE(newline,

60

dnl AS_HELP_STRING([--enable-newline=NL],

61

dnl [use NL as newline (lf, cr, crlf, any; default=lf)]),

62

dnl , enable_newline=lf)

63

64

# Separate newline options

65

ac_pcre_newline=lf

66

AC_ARG_ENABLE(newline-is-cr,

67

AS_HELP_STRING([--enable-newline-is-cr],

68

[use CR as newline character]),

69

ac_pcre_newline=cr)

70

AC_ARG_ENABLE(newline-is-lf,

71

AS_HELP_STRING([--enable-newline-is-lf],

72

[use LF as newline character (default)]),

73

ac_pcre_newline=lf)

74

AC_ARG_ENABLE(newline-is-crlf,

75

AS_HELP_STRING([--enable-newline-is-crlf],

76

[use CRLF as newline sequence]),

77

ac_pcre_newline=crlf)

78

AC_ARG_ENABLE(newline-is-any,

79

AS_HELP_STRING([--enable-newline-is-any],

80

[use any valid Unicode newline sequence]),

81

ac_pcre_newline=any)

82

enable_newline="$ac_pcre_newline"

83

84

# Handle --enable-ebcdic

85

AC_ARG_ENABLE(ebcdic,

86

AS_HELP_STRING([--enable-ebcdic],

87

[assume EBCDIC coding rather than ASCII]),

88

, enable_ebcdic=no)

89

90

# Handle --disable-stack-for-recursion

91

AC_ARG_ENABLE(stack-for-recursion,

92

AS_HELP_STRING([--disable-stack-for-recursion],

93

[don't use stack recursion when matching]),

94

, enable_stack_for_recursion=yes)

95

96

# Handle --with-posix-malloc-threshold=NBYTES

97

AC_ARG_WITH(posix-malloc-threshold,

98

AS_HELP_STRING([--with-posix-malloc-threshold=NBYTES],

99

[threshold for POSIX malloc usage (default=10)]),

100

, with_posix_malloc_threshold=10)

101

102

# Handle --with-link-size=N

103

AC_ARG_WITH(link-size,

104

AS_HELP_STRING([--with-link-size=N],

105

[internal link size (2, 3, or 4 allowed; default=2)]),

106

, with_link_size=2)

107

108

# Handle --with-match-limit=N

109

AC_ARG_WITH(match-limit,

110

AS_HELP_STRING([--with-match-limit=N],

111

[default limit on internal looping (default=10000000)]),

112

, with_match_limit=10000000)

113

114

# Handle --with-match-limit_recursion=N

115

#

116

# Note: In config.h, the default is to define MATCH_LIMIT_RECURSION

117

# symbolically as MATCH_LIMIT, which in turn is defined to be some numeric

118

# value (e.g. 10000000). MATCH_LIMIT_RECURSION can otherwise be set to some

119

# different numeric value (or even the same numeric value as MATCH_LIMIT,

120

# though no longer defined in terms of the latter).

121

#

122

AC_ARG_WITH(match-limit-recursion,

123

AS_HELP_STRING([--with-match-limit-recursion=N],

124

[default limit on internal recursion (default=MATCH_LIMIT)]),

125

, with_match_limit_recursion=MATCH_LIMIT)

126

127

# Make sure that if enable_unicode_properties was set, that UTF-8 support