summaryrefslogtreecommitdiff
path: root/configure.in
blob: faa352e6c0f28da8b465062c29f0265f5ce24209 (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
65
66
AC_PREREQ([2.57])
AC_INIT(re2c, 0.13.5, re2c-general@lists.sourceforge.net)
AM_INIT_AUTOMAKE(re2c, $PACKAGE_VERSION)
AC_CONFIG_SRCDIR(actions.cc)
AM_CONFIG_HEADER(config.h)

AC_SUBST(PACKAGE_DATE, `date +'%d %b %Y'`)
AC_SUBST(PACKAGE_VERSION)
AC_SUBST(PACKAGE_NAME)
AC_SUBST(PACKAGE_TARNAME)
AC_SUBST(PACKAGE_RELEASE, ${PACKAGE_RELEASE:-1})
AC_SUBST(WINBUILDDIR, Release-2005)

# Checks for programs.
AC_PROG_YACC
AC_PROG_CXX
AC_PROG_CC
AC_PROG_INSTALL

if test "$GCC" = "yes"; then
  AC_MSG_CHECKING([Testing GCC version])
  GCCVERSION=`$CXX -dumpversion 2>/dev/null`
  if test -z "$GCCVERSION"; then
    AC_MSG_ERROR([GCC version 3 or above required])
  fi
  AC_MSG_RESULT([found version $GCCVERSION])
fi

# Checks for libraries.

# Checks for header files.
AC_HEADER_STDC

# We only rely on standard C/C++ headers.  If we ever have a pressing need
# for something non-standard, we should add a check for it here.
# AC_CHECK_HEADERS([stddef.h stdlib.h string.h])

# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
AC_C_CONST
AC_C_INLINE
AC_TYPE_SIZE_T
AC_C_VOLATILE

# Checks for library functions.
AC_FUNC_MEMCMP
AC_FUNC_MMAP
AC_CHECK_FUNCS([memset munmap strdup strndup])

AC_CHECK_SIZEOF([char])
AC_CHECK_SIZEOF([short])
AC_CHECK_SIZEOF([int])
AC_CHECK_SIZEOF([long])

AC_CONFIG_FILES([\
Makefile \
README \
makerpm \
re2c.1 \
re2c.spec \
run_tests.sh \
config_w32.h \
htdocs/manual.html \
])
AC_OUTPUT_COMMANDS([chmod +x makerpm run_tests.sh])
AC_OUTPUT