summaryrefslogtreecommitdiff
path: root/configure.ac
blob: 53bd8af2aa44096676a6a72737ddfb4e937e66f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
dnl Process this file with autoconf to produce a configure script.
AC_INIT(onig, 6.9.1)

AC_CONFIG_MACRO_DIR([m4])

AM_INIT_AUTOMAKE([-Wno-portability 1.14])
AC_CONFIG_HEADERS([src/config.h])


dnl default value for STATISTICS
STATISTICS=""
AC_ARG_WITH(statistics,
	[  --with-statistics       take matching time statistical data],
	[ STATISTICS=-DONIG_DEBUG_STATISTICS ])
AC_SUBST(STATISTICS)


dnl check for POSIX API
AC_ARG_ENABLE(posix-api,
[  --enable-posix-api      turn on to include POSIX API [[default=yes]]],
[\
case "${enableval}" in
 yes) enable_posix_api=yes ;;
 no)  enable_posix_api=no ;;
 *)   AC_MSG_ERROR(bad value for --enable-posix-api) ;;
esac],
enable_posix_api=yes)
AM_CONDITIONAL(ENABLE_POSIX_API, test x"${enable_posix_api}" = xyes)


dnl check for CRNL_AS_LINE_TERMINATOR
AC_ARG_ENABLE(crnl-as-line-terminator,
	[  --enable-crnl-as-line-terminator   deprecated],
	[crnl_as_line_terminator=$enableval])
if test "${crnl_as_line_terminator}" = yes; then
  AC_DEFINE(USE_CRNL_AS_LINE_TERMINATOR,1,[Define if enable CR+NL as line terminator])
fi


dnl Checks for programs.
AC_PROG_CC
LT_INIT
LTVERSION="5:0:0"
AC_SUBST(LTVERSION)

AC_PROG_INSTALL
AC_PROG_MAKE_SET

dnl Checks for libraries.

dnl Checks for header files.
AC_CHECK_HEADERS(sys/time.h unistd.h sys/times.h)

dnl Checks for typedefs, structures, and compiler characteristics.
AC_CHECK_SIZEOF(int, 4)
AC_CHECK_SIZEOF(short, 2)
AC_CHECK_SIZEOF(long, 4)

dnl Checks for library functions.
AC_FUNC_ALLOCA

AC_CONFIG_FILES([Makefile src/Makefile test/Makefile sample/Makefile onig-config])
AC_CONFIG_COMMANDS([default],[chmod +x onig-config],[])
AC_OUTPUT