1 dnl Process this file with autoconf to produce a configure script.
4 AC_CONFIG_MACRO_DIR([m4])
6 AM_INIT_AUTOMAKE([-Wno-portability])
7 AC_CONFIG_HEADERS([src/config.h])
10 dnl default value for STATISTICS
12 AC_ARG_WITH([statistics],
13 [AS_HELP_STRING([--with-statistics],
14 [take matching time statistical data])],
15 [STATISTICS=-DONIG_DEBUG_STATISTICS])
19 dnl check for POSIX API
20 AC_ARG_ENABLE([posix-api],
21 [AS_HELP_STRING([--enable-posix-api],
22 [turn on to include POSIX API [default=yes]])],
24 case "${enableval}" in
25 yes) enable_posix_api=yes ;;
26 no) enable_posix_api=no ;;
27 *) AC_MSG_ERROR(bad value for --enable-posix-api) ;;
30 AM_CONDITIONAL(ENABLE_POSIX_API, test x"${enable_posix_api}" = xyes)
33 dnl check for CRNL_AS_LINE_TERMINATOR
34 AC_ARG_ENABLE([crnl-as-line-terminator],
35 [AS_HELP_STRING([--enable-crnl-as-line-terminator],
37 [crnl_as_line_terminator=$enableval])
38 if test "${crnl_as_line_terminator}" = yes; then
39 AC_DEFINE(USE_CRNL_AS_LINE_TERMINATOR,1,[Define if enable CR+NL as line terminator])
43 dnl Checks for programs.
52 dnl Checks for libraries.
54 dnl Checks for header files.
55 AC_CHECK_HEADERS(sys/time.h unistd.h sys/times.h)
57 dnl Checks for typedefs, structures, and compiler characteristics.
58 AC_CHECK_SIZEOF([int])
59 AC_CHECK_SIZEOF([long])
61 dnl Checks for library functions.
64 AC_CONFIG_FILES([Makefile src/Makefile test/Makefile sample/Makefile onig-config])
65 AC_CONFIG_COMMANDS([default],[chmod +x onig-config],[])