-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.ac
93 lines (67 loc) · 2.1 KB
/
configure.ac
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
dnl -*- shell-script -*-
dnl
dnl Process this file with autoconf to produce a configure scripts.
dnl
AC_REVISION($Rev$)
AC_INIT([slick], [0.0.1], [[email protected]])
AC_PREREQ(2.59)
AC_CONFIG_HEADERS([config.h])
AC_CANONICAL_SYSTEM
AC_GNU_SOURCE
AM_INIT_AUTOMAKE
m4_pattern_allow([^AS_DEFS$])
dnl Checks for programs.
AC_LANG([C])
AC_PROG_CC
AM_PROG_AS
AC_PROG_RANLIB
AC_PROG_LN_S
AM_PROG_CC_STDC
AC_PROG_MAKE_SET
AC_CHECK_TOOL(AS,as)
AC_CHECK_TOOL(LD,ld)
dnl AC_CHECK_PROG(GPERF,gperf,gperf)
dnl Internationalization
AM_GNU_GETTEXT
dnl AM_C_PROTOTYPES
AC_HEADER_STDC
AC_CHECK_HEADERS(unistd.h stdlib.h string.h stdarg.h stdint.h sys/types.h fcntl.h malloc.h sys/mman.h time.h)
dnl Checks for libraries.
AC_CHECK_LIB(pthread, pthread_create, have_libpthread=yes, have_libpthread=no)
AC_ARG_ENABLE([debug], AS_HELP_STRING([--enable-debug], [enable debugging messages (default disabled)]), [enable_debug=$enableval], [enable_debug=no])
AC_MSG_CHECKING(whether to enable debugging messages)
AC_MSG_RESULT($enable_debug)
if test "$enable_debug" = yes; then
AC_DEFINE([SLICK_DEBUG],1,[define to enable debugging messages from the scheduler])
fi
AC_ARG_ENABLE([paranoid], AS_HELP_STRING([--enable-paranoid], [enable in-scheduler safety checks (default disabled)]), [enable_paranoid=$enableval], [enable_paranoid=no])
AC_MSG_CHECKING(whether to enable in-scheduler safety checks)
AC_MSG_RESULT($enable_paranoid)
if test "$enable_paranoid" = yes; then
AC_DEFINE([SLICK_PARANOID],1,[define to enable in-scheduler safety checks])
fi
dnl Borrowed from CCSP/Carl.
AC_MSG_CHECKING(support for thread-local-storage)
AC_TRY_RUN([
__thread int bar;
void foo (void)
{
bar = 42;
}
int main (void)
{
foo ();
return bar - 42;
}], [tls_supported=yes], [tls_supported=no], [tls_supported=no])
if test "$tls_supported" = no; then
AC_MSG_RESULT(no)
AC_MSG_ERROR([no TLS support])
else
AC_MSG_RESULT(yes)
fi
dnl Checks for header files.
dnl AC_PATH_XTRA
dnl Checks for typedefs, structures, and compiler characteristics.
dnl Checks for library functions.
AC_FUNC_VPRINTF
AC_OUTPUT([Makefile src/Makefile test/Makefile])