Ensure package passes distcheck
[panda.git] / configure.ac
blob105912f94cdd2bb86b4ad4925be85d0b99fd8f12
2 AC_PREREQ([2.52])
4 m4_define(panda_major_version, 0)
5 m4_define(panda_minor_version, 0)
6 m4_define(panda_micro_version, 54)
7 m4_define(panda_version, panda_major_version.panda_minor_version.panda_micro_version)
9 AC_INIT([Panda], [panda_version],
10         [https://bugs.launchpad.net/panda-smalltalk/+filebug],
11         [panda])
13 AC_CONFIG_HEADERS([config.h])
14 AC_CONFIG_SRCDIR([src/st-lexer.c])
16 AM_INIT_AUTOMAKE([1.10 foreign -Wall subdir-objects])
18 AC_CANONICAL_HOST
20 AC_PROG_CC
21 AC_PROG_CC_C99
22 AM_PROG_CC_C_O
23 if test "x$ac_cv_prog_cc_c99" = "xno"; then
24    AC_MSG_ERROR([cannot find a C99-conforming compiler])
27 AC_PROG_INSTALL
28 AC_PROG_MAKE_SET
29 AM_PROG_LIBTOOL
31 # platform checks
32 AC_CHECK_SIZEOF([void *])
33 AC_CHECK_SIZEOF([int])
34 AC_CHECK_SIZEOF([long])
35 AC_CHECK_SIZEOF([long long int])
36 AC_CHECK_ALIGNOF([void *])
37 debug_default=yes
38 AC_ARG_ENABLE(debug,
39               AC_HELP_STRING([--enable-debug=@<:@no/yes@:>@],
40                              [turn on debugging support @<:@default=yes@:>@]),,
41               enable_debug=$debug_default)
42 if test "x$enable_debug" = "xyes"; then
43 AC_DEFINE([ST_DEBUG], [1], ["Debug support enabled"])
46 # recommended gcc optimization flags for libtommath
47 if test "x$GCC" = "xyes"; then
48     TOMMATH_CFLAGS="-O3 -funroll-loops -fomit-frame-pointer"
49     GDTOA_CFLAGS="-O2 -fPIC -funroll-loops -finline-functions"
51 AC_SUBST(TOMMATH_CFLAGS)
52 AC_SUBST(GDTOA_CFLAGS)
54 AC_DEFINE(PANDA_MAJOR_VERSION, panda_major_version, [Panda major version])
55 AC_SUBST(PANDA_MAJOR_VERSION, panda_major_version)
56 AC_DEFINE(PANDA_MINOR_VERSION, panda_minor_version, [Panda minor version])
57 AC_SUBST(PANDA_MINOR_VERSION, panda_minor_version)
58 AC_DEFINE(PANDA_MICRO_VERSION, panda_micro_version, [Panda micro version])
59 AC_SUBST(PANDA_MICRO_VERSION, panda_micro_version)
61 AC_SUBST([AM_CPPFLAGS])
62 AC_SUBST([AM_CFLAGS])
63 AC_SUBST([AM_CXXFLAGS])
64 AC_SUBST([AM_LDFLAGS])
66 AC_CONFIG_FILES([
67 Makefile
70 AC_OUTPUT