summaryrefslogtreecommitdiffstats
path: root/configure.ac
blob: deea2b8f7035d3e5d5b6a7b83bda1e8251ff967f (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
dnl Copyright (C) 2008 Tavian Barnes <tavianator@gmail.com>
dnl
dnl This file is part of The Sandglass Library.
dnl
dnl The Sandglass Library is free software; you can redistribute it
dnl and/or modify it under the terms of the GNU Lesser General Public
dnl License as published by the Free Software Foundation; either version
dnl 3 of the License, or (at your option) any later version.
dnl
dnl The Sandglass Library is distributed in the hope that it will be
dnl useful, but WITHOUT ANY WARRANTY; without even the implied warranty
dnl of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
dnl Lesser General Public License for more details.
dnl
dnl You should have received a copy of the GNU Lesser General Public
dnl License along with this program.  If not, see
dnl <http://www.gnu.org/licenses/>.

AC_PREREQ(2.63)
AC_INIT(The Sandglass Library, 0.0, tavianator@gmail.com, libsandglass)
AM_INIT_AUTOMAKE(libsandglass, 0.0)

dnl Programs
AC_PROG_CC
AC_PROG_CXX
AM_PROG_CC_C_O
AM_PROG_AS
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
AC_PROG_LIBTOOL

dnl Checks for header files.
AC_CHECK_HEADERS([stddef.h stdlib.h time.h unistd.h])

dnl Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_SIZE_T

dnl Find out which assembly files to compile
AC_CANONICAL_HOST

if echo $host_cpu | grep '86$' 2>&1 >/dev/null
then
  arch_x86="true"
  AC_DEFINE([SANDGLASS_TSC])
fi

if echo $host_cpu | grep 'x86_64$' 2>&1 >/dev/null
then
  arch_x86_64="true"
  AC_DEFINE([SANDGLASS_TSC])
fi

AM_CONDITIONAL([X86], [test "$arch_x86"])
AM_CONDITIONAL([X86_64], [test "$arch_x86_64"])

dnl Generate Makefiles
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_FILES([Makefile
                 src/Makefile
                 tests/Makefile])
AC_OUTPUT