-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.ac
77 lines (58 loc) · 1.8 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
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.61)
AC_INIT([minautoproj], [1.0], [[email protected]])
AM_INIT_AUTOMAKE
AC_CONFIG_SRCDIR([hello.c])
AC_CONFIG_HEADERS([config.h])
# Checks for programs.
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_RANLIB
AM_PROG_CC_C_O
# Checks for headers.
AC_HEADER_STDC
AC_CHECK_HEADERS([stdlib.h])
# Checks for command line options
AC_ARG_ENABLE([async-exec], [ --disable-async-exec disable async exec], [async_exec=${enableval}], [async_exec=yes])
# Checks for libraries.
have_pthreads=no
if test "x${async_exec}" = xyes
then
AC_SEARCH_LIBS([pthread_create], [pthread], [have_pthreads=yes])
fi
if test "x${have_pthreads}" = xyes
then
AC_CHECK_HEADERS([pthread.h], [], [have_pthreads=no])
fi
if test "x${have_pthreads}" = xno
then
if test "x${async_exec}" = xyes
then
echo "------------------------------------------"
echo " Unable to find pthreads on this system. "
echo " Building a single-threaded version. "
echo "------------------------------------------"
fi
async_exec=no
fi
if test "x${async_exec}" = xyes; then
AC_DEFINE([ASYNC_EXEC], 1, [async exec enabled])
fi
# Checks for typedefs, structures, and compiler characteristics.
# Checks for library functions.
AC_CONFIG_FILES([Makefile
common/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
--------------------------------------------------"