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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
|
dnl Process this file with autoconf to produce a configure script.
AC_INIT(sid.h)
dnl Use Automake
AM_INIT_AUTOMAKE(resid, 0.13)
LTVERSION=2:1:0
dnl Use C++ for tests.
AC_LANG_CPLUSPLUS
dnl Enable inlining.
AC_ARG_ENABLE(inline,
[ --enable-inline enable inlining of functions [default=yes]])
if test "$enable_inline" != no; then
RESID_INLINING=1
RESID_INLINE=inline
else
RESID_INLINING=0
RESID_INLINE=
fi
AC_SUBST(RESID_INLINING)
AC_SUBST(RESID_INLINE)
dnl Checks for programs.
AC_PROG_CXX
dnl Set CXXFLAGS for G++. Use -fno-exceptions if supported.
if test "$GXX" = yes; then
if test "$ac_test_CXXFLAGS" != set; then
CXXFLAGS="-g -Wall -O2 -funroll-loops -fomit-frame-pointer -fno-exceptions"
AC_MSG_CHECKING([whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works])
AC_TRY_COMPILE([],
[int test;],
[ AC_MSG_RESULT(yes) ],
[ AC_MSG_RESULT(no)
CXXFLAGS="-g -Wall -O2 -funroll-loops -fomit-frame-pointer"
])
fi
fi
AC_PATH_PROG(PERL, perl)
dnl Checks for libraries.
dnl Checks for header files.
dnl Checks for typedefs, structures, and compiler characteristics.
AC_CHECK_SIZEOF(int, 4)
if test $ac_cv_sizeof_int -lt 4; then
AC_MSG_ERROR([only 32 bit or better CPUs are supported])
fi
AC_CACHE_CHECK([for working bool], ac_cv_cxx_bool,
[AC_TRY_COMPILE(,
[
bool flag;
],
ac_cv_cxx_bool=yes, ac_cv_cxx_bool=no)])
if test $ac_cv_cxx_bool = no; then
RESID_HAVE_BOOL=0
else
RESID_HAVE_BOOL=1
fi
AC_SUBST(RESID_HAVE_BOOL)
dnl Checks for library functions.
dnl Libtool
AC_DISABLE_SHARED
AM_PROG_LIBTOOL
AC_SUBST(LIBTOOL_DEPS)
AC_SUBST(LTVERSION)
AC_ARG_ENABLE(resid-install,
[ --disable-resid-install do not install libresid])
AM_CONDITIONAL(INSTALL_RESID, test x"${enable_resid_install+set}" != xset)
dnl Namespace support
RESID_NAMESPACE=""
AC_ARG_WITH(namespace,
[ --with-namespace=NAMESPACE
resid namespace [default=$RESID_NAMESPACE]],
[RESID_NAMESPACE="$withval"]
)
AC_MSG_CHECKING([for ReSID namespace])
AC_MSG_RESULT($RESID_NAMESPACE)
if test "$RESID_NAMESPACE" != ""; then
RESID_NAMESPACE="#define RESID_NAMESPACE $RESID_NAMESPACE"
fi
AC_SUBST(RESID_NAMESPACE)
AC_OUTPUT(Makefile siddefs.h)
|