-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.in
124 lines (100 loc) · 2.82 KB
/
configure.in
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
# Process this file with autoconf to produce a configure script.
# $Id$
AC_INIT([openspeak], [0.2-git], [[email protected]])
AM_INIT_AUTOMAKE(openspeak, 0.2-git)
AM_CONFIG_HEADER(config.h)
AC_CONFIG_MACRO_DIR([m4])
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
AC_PROG_CC
AC_PROG_CXX
AC_LANG_C
AC_LANG_CPLUSPLUS
# check for C++ compiler explicitly and fail if none is found, do this check
# after AC_PROG_CXX has set the CXX environment variable
which $CXX >/dev/null 2>&1
if test "x$?" != "x0"; then
AC_MSG_ERROR([No C++ compiler not found. Please install a C++ compiler.])
fi
# Enable external gettext support
GETTEXT_PACKAGE=openspeak
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Gettext package.])
DATADIRNAME=share
AC_SUBST(DATADIRNAME)
AM_GNU_GETTEXT([external])
#AC_PROG_RANLIB
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
# for plugins
AC_DISABLE_STATIC
AM_PROG_LIBTOOL
LIBTOOL="$LIBTOOL --silent"
# Checks for header files.
AC_CHECK_HEADERS([string iostream fstream sstream map vector exception \
cstdlib cassert])
AC_CHECK_HEADERS([dirent.h limits.h sys/stat.h])
#TODO: Move this into an if platform == linux
AC_CHECK_HEADERS([linux/types.h])
# Checks for library functions.
AC_CHECK_FUNCS([mkdir opendir time])
# Checks for typedefs, structures, and compiler characteristics.
AC_STRUCT_TM
AC_C_CONST
AC_C_INLINE
AC_TYPE_SIZE_T
AC_TYPE_OFF_T
AC_HEADER_TIME
AC_STRUCT_TM
# Check for libraries
AX_BOOST_BASE([1.40.0])
AX_BOOST_SIGNALS2
AX_BOOST_THREAD
AC_CHECK_HEADERS([boost/format.hpp])
# Check what we should build
OS_BUILD_WHAT
# Check for client build dependecies
if test "$OS_WITH_CLIENT" = "yes"; then
PKG_PROG_PKG_CONFIG
# Check for Portaudio
PKG_CHECK_MODULES([PORTAUDIO], [portaudio-2.0],,AC_MSG_ERROR([
Portaudio couldn't be found.
Please install it before trying it again.
You can find Portaudio v19 at http://www.portaudio.com]))
AC_SUBST(PORTAUDIO_LIBS)
AC_SUBST(PORTAUDIO_CFLAGS)
fi
# Set ${datadir}
if test "x${datadir}" = 'x${prefix}/share' -o "x${datarootdir}" = 'x${prefix}/share'; then
if test "x${prefix}" = "xNONE"; then
prefix=${ac_default_prefix}
fi
fi
OS_DATA_DIR=`eval echo ${datarootdir}/openspeak`
OS_PREFIX=${prefix}
OS_CPPFLAGS="-ggdb3"
AC_SUBST(OS_DATA_DIR)
AC_SUBST(OS_PREFIX)
AC_SUBST(OS_CPPFLAGS)
AC_OUTPUT([ po/Makefile.in
Makefile
m4/Makefile
lib/Makefile
lib/src/Makefile
lib/include/Makefile
server/Makefile
server/src/Makefile
server/include/Makefile
clientlib/Makefile
clientlib/src/Makefile
clientlib/include/Makefile
client/Makefile
client/src/Makefile
client/include/Makefile
client/plugins/Makefile
])
echo "----------------------------------------"
echo "Install openSpeak in ${prefix}"
echo ""
echo "Configuration is done OK."
echo ""