forked from jsventek/ADTs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
45 lines (37 loc) · 1.24 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
##########################################################################################
# Auto configure initialization
AC_INIT(cache, cache-0.0)
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([foreign])
AC_CONFIG_HEADERS([config.h])
# LibTool configure
LT_INIT([shared static])
# Identify host platform
AC_CANONICAL_HOST
##########################################################################################
# Tests
# Check for pthreads
AX_PTHREAD([have_pthreads="yes"],[have_pthreads="no"])
LIBS="$PTHREAD_LIBS $LIBS"
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
CC="$PTHREAD_CC"
# Check for the math library
AC_SEARCH_LIBS([floor],[m],[have_m="yes"],[have_m="no"])
case $host_os in
darwin* )
have_darwin="yes"
AC_DEFINE(HAVE_SOCKADDR_LEN, 1, "socket definition for Darwin based OSes")
;;
* )
have_darwin="no"
;;
esac
##########################################################################################
# End of configure summary output
DE_STAT("pthreads found", $have_pthreads)
DE_STAT("libmath found", $have_m)
DE_STAT("Apple sockets", $have_darwin)
##########################################################################################
# Generate files
AC_CONFIG_FILES([Makefile src/Makefile])
AC_OUTPUT