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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
|
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.68])
#todo Update with appropriate license after open-source approval.
AC_COPYRIGHT([
Copyright 2012, 2013 Intel Corporation All Rights Reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation;
version 2.1 of the License.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301 USA
])
AC_INIT([settingsd], [0.4.2], [ossama.othman@intel.com])
AM_INIT_AUTOMAKE([1.11.1 foreign -Wall -Werror -Wno-portability silent-rules])
LT_INIT([disable-static dlopen])
AC_CONFIG_SRCDIR([src/daemon.cpp])
AC_CONFIG_HEADERS([lib/config.hpp])
AC_CONFIG_MACRO_DIR([m4])
AH_TOP([
/**
* @file config.hpp
*
* @brief Tizen IVI Settings Daemon configuration header.
*
* @copyright @par
* Copyright 2013 Intel Corporation All Rights Reserved.
* @par
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation;
* version 2.1 of the License.
* @par
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
* @par
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA
*/
])
# Checks for programs.
AC_PROG_CXX
AC_PROG_CC
AM_PROG_CC_C_O
AM_PROG_AR
# Check for Doxygen
DX_DOXYGEN_FEATURE(ON)
DX_DOT_FEATURE(ON)
DX_HTML_FEATURE(ON)
DX_CHM_FEATURE(OFF)
DX_CHI_FEATURE(OFF)
DX_MAN_FEATURE(OFF)
DX_RTF_FEATURE(OFF)
DX_XML_FEATURE(OFF)
DX_PDF_FEATURE(OFF)
DX_PS_FEATURE(OFF)
DX_INIT_DOXYGEN([settingsd], [Doxyfile], [doc/doxygen])
# Enable pkg-config
PKG_PROG_PKG_CONFIG
# Checks for libraries.
# Check for Boost libraries used by settingsd.
AX_BOOST_BASE([1.51.0])
AX_BOOST_FILESYSTEM
AX_BOOST_PROGRAM_OPTIONS
PKG_CHECK_MODULES([GIO], [gio-unix-2.0])
AC_SUBST([GIO_LIBS])
AC_SUBST([GIO_CFLAGS])
PKG_CHECK_MODULES([JSON_GLIB], [json-glib-1.0])
AC_SUBST([JSON_GLIB_LIBS])
AC_SUBST([JSON_GLIB_CFLAGS])
PKG_CHECK_MODULES([LIBWEBSOCKETS], [libwebsockets])
AC_SUBST([LIBWEBSOCKETS_LIBS])
AC_SUBST([LIBWEBSOCKETS_CFLAGS])
# Checks for header files.
# Checks for typedefs, structures, and compiler characteristics.
# Check for C++11 support. (macro from autoconf-archive package)
AX_CXX_COMPILE_STDCXX_11([noext],[mandatory])
# Enable gcc symbol visibility support.
AC_LANG_PUSH([C++])
AC_CACHE_CHECK([for g++ symbol visibility support],
[settingsd_cv_prog_gcc_symbol_visibility],
[
AC_COMPILE_IFELSE([
AC_LANG_SOURCE([
#define FOO_EXPORT __attribute__ ((visibility ("default")))
#define FOO_LOCAL __attribute__ ((visibility ("hidden")))
class FOO_EXPORT foo
{
public:
foo() : x(0) {}
int baz() { return bar(); }
private:
FOO_LOCAL int bar() { x += 10; return x; }
private:
int x;
};
extern "C" FOO_EXPORT int snafu() { foo tmp; return tmp.baz(); }
])
],
[settingsd_cv_prog_gcc_symbol_visibility=yes],
[settingsd_cv_prog_gcc_symbol_visibility=no])
])
AC_LANG_POP([C++])
AM_CONDITIONAL([SETTINGS_USE_GCC_SYMBOL_VISIBILITY],
[test "x$settingsd_cv_prog_gcc_symbol_visibility" = "xyes"])
# Checks for library functions.
# Rather than check dlopen() again, just leverage values cached during
# LT_INIT(). This isn't a bit brittle since the cache variable name
# could potentially change.
AC_SUBST([IVI_SETTINGS_DLOPEN_LIBS],[$lt_cv_dlopen_libs])
# Do not use old Boost.filesystem features and functions.
AC_DEFINE([BOOST_FILESYSTEM_NO_DEPRECATED],
[],
[Do not use old Boost.filesystem features and functions.])
# IVI settingsd D-Bus name
IVI_SETTINGS_DBUS_NAME="org.tizen.$PACKAGE"
AC_SUBST([IVI_SETTINGS_DBUS_NAME],[$IVI_SETTINGS_DBUS_NAME])
AC_DEFINE_UNQUOTED([IVI_SETTINGS_DBUS_NAME],
["$IVI_SETTINGS_DBUS_NAME"],
[The IVI settingsd D-Bus name.])
# Default IVI settingsd web socket server port
IVI_SETTINGS_DEFAULT_WEBSOCKET_PORT=16000
AC_SUBST([websocketport],
[$IVI_SETTINGS_DEFAULT_WEBSOCKET_PORT])
AC_DEFINE_UNQUOTED([IVI_SETTINGS_DEFAULT_WEBSOCKET_PORT],
[$IVI_SETTINGS_DEFAULT_WEBSOCKET_PORT],
[The default TCP/IP port on which the web socket
server should listen.])
# Enable C++ compiler warnings if we're using gcc. We do this after
# all autoconf tests have been run since not all autoconf macros are
# warning free.
IVI_SETTINGS_WARNING_FLAGS="-Wextra -Wall -Werror -Wformat=2 -pedantic"
AS_IF([test "x$GCC" = "xyes"],
[CXXFLAGS="$IVI_SETTINGS_WARNING_FLAGS $CXXFLAGS"],
[])
# Specify which files are to be generated by the `configure' script.
AC_CONFIG_FILES([
Makefile
doc/Makefile
etc/Makefile
include/Makefile
include/settingsd/Makefile
lib/Makefile
plugins/Makefile
plugins/connman/Makefile
src/Makefile
tests/Makefile
])
AC_OUTPUT
|