-
Notifications
You must be signed in to change notification settings - Fork 7
/
configure.ac
152 lines (123 loc) · 3.9 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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
# This file is part of Urbi SDK.
# Copyright (C) 2006-2012, Gostai S.A.S.
#
# This software is provided "as is" without warranty of any kind,
# either expressed or implied, including but not limited to the
# implied warranties of fitness for a particular purpose.
#
# See the LICENSE file for more information.
# For comments, bug reports and feedback: http://www.urbiforge.org
#
## ------------- ##
## Package setup ##
## ------------- ##
AC_INIT([Libport], [UNDEFINED], [[email protected]])
URBI_PACKAGE_VERSION
URBI_PACKAGE_COPYRIGHT([Gostai S.A.S.], [2005-2012])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([build-aux])
URBI_DISTCHECK_CONFIGURE_FLAGS
URBI_PACKAGE_KIND([sdk])
AM_INIT_AUTOMAKE([1.11 foreign -Wall nostdinc silent-rules subdir-objects])
AM_SILENT_RULES([yes])
## -------------------- ##
## Tool/Compilers setup ##
## -------------------- ##
URBI_COMPILATION_MODE
# Look for a C++ compiler.
URBI_PROG_CXX
AC_LANG([C++])
# Does it support "restrict" in one way or another?
AC_C_RESTRICT
URBI_DIRS([libport])
# We have some assembly for coroutine support.
AM_PROG_AS
URBI_WIN32
URBI_SOCKETS
URBI_LIBTOOL
URBI_SHLIBEXT
# Name of the subdirectory that contains libltdl sources.
LT_CONFIG_LTDL_DIR([libltdl])
LTDL_INIT([convenience nonrecursive])
# We want the debug messages.
AC_DEFINE([LT_DEBUG_LOADERS], [1],
[Define to have libltdl support log messages.])
AC_CONFIG_HEADERS([include/config.h])
# Basically, the following lines states we install in prefix.
URBI_PACKAGE_KIND([sdk])
URBI_BOOST_REQUIRE([1.38])
URBI_BOOST([FILESYSTEM])
URBI_BOOST([SIGNALS])
URBI_BOOST([SYSTEM])
URBI_BOOST([TEST])
URBI_BOOST([THREADS])
URBI_LIBPORT
## --------- ##
## Libport. ##
## --------- ##
# libport/asio.
URBI_ARG_ENABLE([enable-ssl], [enable SSL in Libport.Asio],
[yes|no], [no])
if test x$enable_ssl = xyes; then
AC_DEFINE([ENABLE_SSL], [1],
[Define to 1 to enable SLL support.])
# -lssl suffices on GNU/Linux, OS X wants -lcrypto explicitly.
AC_SUBST([SSL_LIBS], ['-lssl -lcrypto'])
fi
# libport/backtrace.
AC_CHECK_HEADERS([execinfo.h])
# libport/semaphore.
AC_CHECK_LIB([rt], [clock_gettime],
[AC_SUBST([CLOCK_LIBS], [-lrt])])
# libport/sys/prctl.h
AC_CHECK_HEADERS([sys/prctl.h])
# libport/sys/utsname
AC_CHECK_HEADERS([sys/utsname.h])
# libport/sys/wait.h
AC_CHECK_HEADERS([sys/wait.h])
# libport/tr1/type_traits.
AC_CHECK_HEADERS([tr1/type_traits])
# libport/valgrind.
AC_CHECK_HEADERS([valgrind/valgrind.h])
# libport/xlocale.
AC_CHECK_HEADERS([xlocale.h])
## ---------- ##
## Libsched. ##
## ---------- ##
# For some reason, coroutine don't work properly on OSX PPC. The test
# suite seems ok though, so maybe we could make it work. Meanwhile,
# let's work with threads.
case $host in
(powerpc-apple-darwin*)
SCHED_CORO_OSTHREAD=true
AC_DEFINE([SCHED_CORO_OSTHREAD], [1]);;
(*) SCHED_CORO_OSTHREAD=false;;
esac
AM_CONDITIONAL([SCHED_CORO_OSTHREAD], [$SCHED_CORO_OSTHREAD])
URBI_PTHREAD_SOURCES
# AutoTroll with Qt.
# AT_WITH_QT
# AC_CONFIG_FILES([gui/Makefile])
URBI_ARG_ENABLE([enable-boost-serialization],
[enable boost::serialization support],
[yes|no], [no])
AM_CONDITIONAL([WITH_BOOST_SERIALIZATION],
[test x$enable_boost_serialization = xyes])
if test x$enable_boost_serialization = xyes; then
AC_DEFINE([WITH_BOOST_SERIALIZATION], [1],
[Define to enable boost::serialization support.])
URBI_BOOST([SERIALIZATION])
fi
# Multithread support in sched
URBI_ARG_ENABLE([enable-sched-multithread],
[enable multithread support in libsched],
[yes|no], [no])
if test x$enable_sched_multithread = xyes; then
AC_DEFINE([LIBPORT_SCHED_MULTITHREAD], [1],
[Define to 1 to enable multithread support in libsched.])
fi
WITH_XENOMAI
URBI_LIB_SUFFIX
AC_CONFIG_FILES([Makefile share/pkgconfig/libport.pc])
URBI_CONFIG_SCRIPTS([doc/doxygen.sh])
AC_OUTPUT