1dnl Process this file with autoconf to produce a configure script.
2AC_INIT(onig, 6.9.4)
3
4AC_CONFIG_MACRO_DIR([m4])
5
6AM_INIT_AUTOMAKE([-Wno-portability])
7AC_CONFIG_HEADERS([src/config.h])
8
9
10dnl default value for STATISTICS
11STATISTICS=""
12AC_ARG_WITH([statistics],
13  [AS_HELP_STRING([--with-statistics],
14    [take matching time statistical data])],
15  [STATISTICS=-DONIG_DEBUG_STATISTICS])
16AC_SUBST(STATISTICS)
17
18
19dnl check for POSIX API
20AC_ARG_ENABLE([posix-api],
21  [AS_HELP_STRING([--enable-posix-api],
22    [turn on to include POSIX API [default=yes]])],
23[\
24case "${enableval}" in
25 yes) enable_posix_api=yes ;;
26 no)  enable_posix_api=no ;;
27 *)   AC_MSG_ERROR(bad value for --enable-posix-api) ;;
28esac],
29enable_posix_api=yes)
30AM_CONDITIONAL(ENABLE_POSIX_API, test x"${enable_posix_api}" = xyes)
31
32
33dnl check for CRNL_AS_LINE_TERMINATOR
34AC_ARG_ENABLE([crnl-as-line-terminator],
35  [AS_HELP_STRING([--enable-crnl-as-line-terminator],
36    [deprecated])],
37  [crnl_as_line_terminator=$enableval])
38if test "${crnl_as_line_terminator}" = yes; then
39  AC_DEFINE(USE_CRNL_AS_LINE_TERMINATOR,1,[Define if enable CR+NL as line terminator])
40fi
41
42
43dnl Checks for programs.
44AC_PROG_CC
45LT_INIT
46LTVERSION="5:0:0"
47AC_SUBST(LTVERSION)
48
49AC_PROG_INSTALL
50AC_PROG_MAKE_SET
51
52dnl Checks for libraries.
53
54dnl Checks for header files.
55AC_CHECK_HEADERS(sys/time.h unistd.h sys/times.h)
56
57dnl Checks for typedefs, structures, and compiler characteristics.
58AC_CHECK_SIZEOF([int])
59AC_CHECK_SIZEOF([long])
60AC_CHECK_SIZEOF([long long])
61AC_CHECK_SIZEOF([void*])
62
63dnl Checks for library functions.
64AC_FUNC_ALLOCA
65
66AC_CONFIG_FILES([Makefile src/Makefile test/Makefile sample/Makefile onig-config])
67AC_CONFIG_COMMANDS([default],[chmod +x onig-config],[])
68AC_OUTPUT
69