2 # Process this file with autoconf to produce a configure script.
6 #todo Update with appropriate license after open-source approval.
8 Copyright 2012, 2013 Intel Corporation All Rights Reserved.
10 This library is free software; you can redistribute it and/or
11 modify it under the terms of the GNU Lesser General Public
12 License as published by the Free Software Foundation;
13 version 2.1 of the License.
15 This library is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 Lesser General Public License for more details.
20 You should have received a copy of the GNU Lesser General Public
21 License along with this library; if not, write to the Free Software
22 Foundation, Inc., 51 Franklin Street, Fifth Floor,
23 Boston, MA 02110-1301 USA
26 AC_INIT([settingsd], [0.2], [ossama.othman@intel.com])
27 AM_INIT_AUTOMAKE([1.11.1 foreign -Wall -Werror -Wno-portability silent-rules])
28 LT_INIT([disable-static dlopen])
30 AC_CONFIG_SRCDIR([src/daemon.cpp])
31 AC_CONFIG_HEADERS([lib/config.hpp])
33 AC_CONFIG_MACRO_DIR([m4])
39 * @brief Tizen IVI Settings Daemon configuration header.
42 * Copyright 2013 Intel Corporation All Rights Reserved.
44 * This library is free software; you can redistribute it and/or
45 * modify it under the terms of the GNU Lesser General Public
46 * License as published by the Free Software Foundation;
47 * version 2.1 of the License.
49 * This library is distributed in the hope that it will be useful,
50 * but WITHOUT ANY WARRANTY; without even the implied warranty of
51 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
52 * Lesser General Public License for more details.
54 * You should have received a copy of the GNU Lesser General Public
55 * License along with this library; if not, write to the Free Software
56 * Foundation, Inc., 51 Franklin Street, Fifth Floor,
57 * Boston, MA 02110-1301 USA
61 # Checks for programs.
68 DX_DOXYGEN_FEATURE(ON)
78 DX_INIT_DOXYGEN([settingsd], [Doxyfile], [doc/doxygen])
83 # Checks for libraries.
84 # Check for Boost libraries used by settingsd.
85 AX_BOOST_BASE([1.51.0])
87 AX_BOOST_PROGRAM_OPTIONS
89 PKG_CHECK_MODULES([GIO], [gio-unix-2.0])
91 AC_SUBST([GIO_CFLAGS])
93 PKG_CHECK_MODULES([JSON_GLIB], [json-glib-1.0])
94 AC_SUBST([JSON_GLIB_LIBS])
95 AC_SUBST([JSON_GLIB_CFLAGS])
97 PKG_CHECK_MODULES([LIBWEBSOCKETS], [libwebsockets])
98 AC_SUBST([LIBWEBSOCKETS_LIBS])
99 AC_SUBST([LIBWEBSOCKETS_CFLAGS])
101 # Checks for header files.
103 # Checks for typedefs, structures, and compiler characteristics.
104 # Check for C++11 support. (macro from autoconf-archive package)
105 AX_CXX_COMPILE_STDCXX_11([noext],[mandatory])
107 # Enable gcc symbol visibility support.
109 AC_CACHE_CHECK([for g++ symbol visibility support],
110 [settingsd_cv_prog_gcc_symbol_visibility],
114 #define FOO_EXPORT __attribute__ ((visibility ("default")))
115 #define FOO_LOCAL __attribute__ ((visibility ("hidden")))
121 int baz() { return bar(); }
123 FOO_LOCAL int bar() { x += 10; return x; }
128 extern "C" FOO_EXPORT int snafu() { foo tmp; return tmp.baz(); }
131 [settingsd_cv_prog_gcc_symbol_visibility=yes],
132 [settingsd_cv_prog_gcc_symbol_visibility=no])
136 AM_CONDITIONAL([SETTINGS_USE_GCC_SYMBOL_VISIBILITY],
137 [test "x$settingsd_cv_prog_gcc_symbol_visibility" = "xyes"])
140 # Checks for library functions.
142 # Rather than check dlopen() again, just leverage values cached during
143 # LT_INIT(). This isn't a bit brittle since the cache variable name
144 # could potentially change.
145 AC_SUBST([IVI_SETTINGS_DLOPEN_LIBS],[$lt_cv_dlopen_libs])
147 # Do not use old Boost.filesystem features and functions.
148 AC_DEFINE([BOOST_FILESYSTEM_NO_DEPRECATED],
150 [Do not use old Boost.filesystem features and functions.])
152 # IVI settingsd D-Bus name
153 IVI_SETTINGS_DBUS_NAME="org.tizen.$PACKAGE"
154 AC_SUBST([IVI_SETTINGS_DBUS_NAME],[$IVI_SETTINGS_DBUS_NAME])
155 AC_DEFINE_UNQUOTED([IVI_SETTINGS_DBUS_NAME],
156 ["$IVI_SETTINGS_DBUS_NAME"],
157 [The IVI settingsd D-Bus name.])
159 # Default IVI settingsd web socket server port
160 IVI_SETTINGS_DEFAULT_WEBSOCKET_PORT=16000
161 AC_SUBST([websocketport],
162 [$IVI_SETTINGS_DEFAULT_WEBSOCKET_PORT])
163 AC_DEFINE_UNQUOTED([IVI_SETTINGS_DEFAULT_WEBSOCKET_PORT],
164 [$IVI_SETTINGS_DEFAULT_WEBSOCKET_PORT],
165 [The default TCP/IP port on which the web socket
166 server should listen.])
168 # Enable C++ compiler warnings if we're using gcc. We do this after
169 # all autoconf tests have been run since not all autoconf macros are
171 IVI_SETTINGS_WARNING_FLAGS="-Wextra -Wall -Werror -Wformat=2 -pedantic"
172 AS_IF([test "x$GCC" = "xyes"],
173 [CXXFLAGS="$IVI_SETTINGS_WARNING_FLAGS $CXXFLAGS"],
176 # Specify which files are to be generated by the `configure' script.
182 include/settingsd/Makefile
185 plugins/connman/Makefile