| 1 |
dnl Process this file with autoconf to produce a configure script. |
| 2 |
AC_INIT(onigmo, 6.1.1) |
| 3 |
|
| 4 |
AC_CONFIG_MACRO_DIR([m4]) |
| 5 |
|
| 6 |
AM_INIT_AUTOMAKE(foreign) |
| 7 |
AC_CONFIG_HEADER(config.h) |
| 8 |
|
| 9 |
|
| 10 |
dnl default value for RUBYDIR |
| 11 |
RUBYDIR=".." |
| 12 |
AC_ARG_WITH(rubydir, |
| 13 |
[ --with-rubydir=RUBYDIR specify value for RUBYDIR (default ..)], |
| 14 |
[ RUBYDIR=$withval ]) |
| 15 |
AC_SUBST(RUBYDIR) |
| 16 |
|
| 17 |
dnl default value for STATISTICS |
| 18 |
STATISTICS="" |
| 19 |
AC_ARG_WITH(statistics, |
| 20 |
[ --with-statistics take matching time statistical data], |
| 21 |
[ STATISTICS=-DONIG_DEBUG_STATISTICS ]) |
| 22 |
AC_SUBST(STATISTICS) |
| 23 |
|
| 24 |
dnl check for COMBINATION_EXPLOSION |
| 25 |
AC_ARG_ENABLE(combination-explosion-check, |
| 26 |
[ --enable-combination-explosion-check enable combination explosion check], |
| 27 |
[comb_expl_check=$enableval]) |
| 28 |
if test "${comb_expl_check}" = yes; then |
| 29 |
AC_DEFINE(USE_COMBINATION_EXPLOSION_CHECK,1,[Define if combination explosion check]) |
| 30 |
fi |
| 31 |
|
| 32 |
dnl check for CRNL_AS_LINE_TERMINATOR |
| 33 |
AC_ARG_ENABLE(crnl-as-line-terminator, |
| 34 |
[ --enable-crnl-as-line-terminator enable CR+NL as line terminator], |
| 35 |
[crnl_as_line_terminator=$enableval]) |
| 36 |
if test "${crnl_as_line_terminator}" = yes; then |
| 37 |
AC_DEFINE(USE_CRNL_AS_LINE_TERMINATOR,1,[Define if enable CR+NL as line terminator]) |
| 38 |
fi |
| 39 |
|
| 40 |
|
| 41 |
dnl Checks for programs. |
| 42 |
AC_PROG_CC |
| 43 |
AC_PROG_LIBTOOL |
| 44 |
AM_PROG_CC_C_O |
| 45 |
LTVERSION="6:2:0" |
| 46 |
AC_SUBST(LTVERSION) |
| 47 |
|
| 48 |
AC_PROG_INSTALL |
| 49 |
AC_PROG_MAKE_SET |
| 50 |
|
| 51 |
AC_CHECK_PROGS(python_prog, python3 python python2) |
| 52 |
|
| 53 |
dnl Checks for libraries. |
| 54 |
|
| 55 |
dnl Checks for header files. |
| 56 |
AC_HEADER_STDC |
| 57 |
AC_CHECK_HEADERS(sys/time.h unistd.h sys/times.h stdint.h) |
| 58 |
|
| 59 |
dnl Checks for typedefs, structures, and compiler characteristics. |
| 60 |
AC_CHECK_SIZEOF(int, 4) |
| 61 |
AC_CHECK_SIZEOF(short, 2) |
| 62 |
AC_CHECK_SIZEOF(long, 4) |
| 63 |
AC_CHECK_SIZEOF([void*]) |
| 64 |
AC_CHECK_SIZEOF([long long]) |
| 65 |
AC_C_CONST |
| 66 |
AC_HEADER_TIME |
| 67 |
|
| 68 |
dnl Checks for library functions. |
| 69 |
AC_FUNC_ALLOCA |
| 70 |
AC_FUNC_MEMCMP |
| 71 |
|
| 72 |
|
| 73 |
AC_OUTPUT([Makefile onigmo-config sample/Makefile], [chmod +x onigmo-config]) |