-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathconfigure.ac
72 lines (57 loc) · 1.96 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
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
#AC_PREREQ([2.69])
AC_INIT([kstack], [1.0], [[email protected]])
AM_INIT_AUTOMAKE([subdir-objects foreign]) #(silent-rules)
AC_CONFIG_SRCDIR([./src/])
AC_CONFIG_HEADERS([config.h])
# Checks for programs.
AC_PROG_CC # ([clang gcc])
AM_PROG_CC_C_O
AC_PROG_INSTALL
#AC_PROG_AWK
#AC_PROG_LEX
#AC_CHECK_PROG(MY_FOO, kphoo, STD_ON, STD_OFF, , [/usr/sbin/oofoo])
# Checks for libraries.
AC_ARG_ENABLE([async-exec],
[AS_HELP_STRING([--disable-async-exec],
[disable asynchronous execution @<:@default: no@:>@])],
[async_exec=${enableval}], [async_exec=yes]
)
have_pthreads=no
if test "x${async_exec}" = xyes; then
have_pthreads=no
AC_SEARCH_LIBS([pthread_create], [pthread], [have_pthreads=yes])
if test "x${have_pthreads}" = xyes; then
AC_CHECK_HEADERS([pthread.h], [], [have_pthreads=no])
fi
if test "x${have_pthreads}" = xno; then
AC_MSG_WARN([
-----------------------------------------
Unable to find pthreads on this system.
Building a single-threaded version.
-----------------------------------------])
async_exec=no
fi
fi
if test "x${async_exec}" = xyes; then
AC_DEFINE([ASYNC_EXEC], 1, [async execution enabled])
fi
# Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_UINT16_T
# Checks for library functions.
AC_CONFIG_FILES([Makefile
])
AC_OUTPUT
echo \
"-------------------------------------------------
${PACKAGE_NAME} Version ${PACKAGE_VERSION}
Prefix: '${prefix}'.
Compiler: '${CC} ${CFLAGS} ${CPPFLAGS}'
Package features:
Async Execution: ${async_exec}
Now type 'make @<:@<target>@:>@'
where the optional <target> is:
all - build all binaries
install - install everything
--------------------------------------------------"