]> granicus.if.org Git - onig/blob - configure.ac
add callout in look-behind-not
[onig] / configure.ac
1 dnl Process this file with autoconf to produce a configure script.
2 AC_INIT(onig, 6.7.1)
3
4 AC_CONFIG_MACRO_DIR([m4])
5
6 AM_INIT_AUTOMAKE([-Wno-portability 1.14])
7 AC_CONFIG_HEADER(src/config.h)
8
9
10 dnl default value for STATISTICS
11 STATISTICS=""
12 AC_ARG_WITH(statistics,
13         [  --with-statistics       take matching time statistical data], 
14         [ STATISTICS=-DONIG_DEBUG_STATISTICS ])
15 AC_SUBST(STATISTICS)
16
17 dnl check for COMBINATION_EXPLOSION
18 AC_ARG_ENABLE(combination-explosion-check,
19         [  --enable-combination-explosion-check   deprecated],
20         [comb_expl_check=$enableval])
21 if test "${comb_expl_check}" = yes; then
22   AC_DEFINE(USE_COMBINATION_EXPLOSION_CHECK,1,[Define if combination explosion check])
23 fi
24
25 dnl check for CRNL_AS_LINE_TERMINATOR
26 AC_ARG_ENABLE(crnl-as-line-terminator,
27         [  --enable-crnl-as-line-terminator   deprecated],
28         [crnl_as_line_terminator=$enableval])
29 if test "${crnl_as_line_terminator}" = yes; then
30   AC_DEFINE(USE_CRNL_AS_LINE_TERMINATOR,1,[Define if enable CR+NL as line terminator])
31 fi
32
33
34 dnl Checks for programs.
35 AC_PROG_CC
36 AM_PROG_LIBTOOL
37 LTVERSION="4:0:0"
38 AC_SUBST(LTVERSION)
39
40 AC_PROG_INSTALL
41 AC_PROG_MAKE_SET
42
43 dnl Checks for libraries.
44
45 dnl Checks for header files.
46 AC_HEADER_STDC
47 AC_CHECK_HEADERS(stdlib.h string.h strings.h limits.h sys/time.h unistd.h sys/times.h)
48
49 dnl Checks for typedefs, structures, and compiler characteristics.
50 AC_CHECK_SIZEOF(int, 4)
51 AC_CHECK_SIZEOF(short, 2)
52 AC_CHECK_SIZEOF(long, 4)
53 AC_C_CONST
54 AC_HEADER_TIME
55
56 dnl Checks for library functions.
57 AC_FUNC_ALLOCA
58 AC_FUNC_MEMCMP
59
60 AC_CACHE_CHECK(for prototypes, _cv_have_prototypes,
61   [AC_TRY_COMPILE([int foo(int x) { return 0; }], [return foo(10);],
62         _cv_have_prototypes=yes,
63         _cv_have_prototypes=no)])
64 if test "$_cv_have_prototypes" = yes; then
65   AC_DEFINE(HAVE_PROTOTYPES,1,[Define if compilerr supports prototypes])
66 fi
67
68 AC_CACHE_CHECK(for variable length prototypes and stdarg.h, _cv_stdarg,
69   [AC_TRY_COMPILE([
70 #include <stdarg.h>
71 int foo(int x, ...) {
72         va_list va;
73         va_start(va, x);
74         va_arg(va, int);
75         va_arg(va, char *);
76         va_arg(va, double);
77         return 0;
78 }
79 ], [return foo(10, "", 3.14);],
80         _cv_stdarg=yes,
81         _cv_stdarg=no)])
82 if test "$_cv_stdarg" = yes; then
83   AC_DEFINE(HAVE_STDARG_PROTOTYPES,1,[Define if compiler supports stdarg prototypes])
84 fi
85
86
87 AC_OUTPUT([Makefile src/Makefile test/Makefile sample/Makefile onig-config], [chmod +x onig-config])