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.1], [ossama.othman@intel.com])
27 AM_INIT_AUTOMAKE([1.11.1 foreign -Wall -Werror 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_0X
106 AS_IF([test "x$ax_cv_cxx_compile_cxx0x_cxx" = "xyes"],
107 [CXXFLAGS="-std=c++0x $CXXFLAGS"],
108 [AS_IF([test "x$ax_cv_cxx_compile_cxx0x_gxx" = "xyes"],
109 [CXXFLAGS="-std=gnu++0x $CXXFLAGS"],
110 [AC_MSG_FAILURE([Required C++11 support is not available.])
114 # Enable gcc symbol visibility support.
116 AC_CACHE_CHECK([for g++ symbol visibility support],
117 [settingsd_cv_prog_gcc_symbol_visibility],
121 #define FOO_EXPORT __attribute__ ((visibility ("default")))
122 #define FOO_LOCAL __attribute__ ((visibility ("hidden")))
128 int baz() { return bar(); }
130 FOO_LOCAL int bar() { x += 10; return x; }
135 extern "C" FOO_EXPORT int snafu() { foo tmp; return tmp.baz(); }
138 [settingsd_cv_prog_gcc_symbol_visibility=yes],
139 [settingsd_cv_prog_gcc_symbol_visibility=no])
143 AM_CONDITIONAL([SETTINGS_USE_GCC_SYMBOL_VISIBILITY],
144 [test "x$settingsd_cv_prog_gcc_symbol_visibility" = "xyes"])
147 # Checks for library functions.
149 # Rather than check dlopen() again, just leverage values cached during
150 # LT_INIT(). This isn't a bit brittle since the cache variable name
151 # could potentially change.
152 AC_SUBST([IVI_SETTINGS_DLOPEN_LIBS],[$lt_cv_dlopen_libs])
154 # Do not use old Boost.filesystem features and functions.
155 AC_DEFINE([BOOST_FILESYSTEM_NO_DEPRECATED],
157 [Do not use old Boost.filesystem features and functions.])
159 # IVI settingsd D-Bus name
160 IVI_SETTINGS_DBUS_NAME="org.tizen.$PACKAGE"
161 AC_SUBST([IVI_SETTINGS_DBUS_NAME],[$IVI_SETTINGS_DBUS_NAME])
162 AC_DEFINE_UNQUOTED([IVI_SETTINGS_DBUS_NAME],
163 ["$IVI_SETTINGS_DBUS_NAME"],
164 [The IVI settingsd D-Bus name.])
166 # Default IVI settingsd web socket server port
167 IVI_SETTINGS_DEFAULT_WEBSOCKET_PORT=16000
168 AC_SUBST([websocketport],
169 [$IVI_SETTINGS_DEFAULT_WEBSOCKET_PORT])
170 AC_DEFINE_UNQUOTED([IVI_SETTINGS_DEFAULT_WEBSOCKET_PORT],
171 [$IVI_SETTINGS_DEFAULT_WEBSOCKET_PORT],
172 [The default TCP/IP port on which the web socket
173 server should listen.])
175 # Enable C++ compiler warnings if we're using gcc. We do this after
176 # all autoconf tests have been run since not all autoconf macros are
178 IVI_SETTINGS_WARNING_FLAGS="-Wextra -Wall -Werror -Wformat=2 -pedantic"
179 AS_IF([test "x$GCC" = "xyes"],
180 [CXXFLAGS="$IVI_SETTINGS_WARNING_FLAGS $CXXFLAGS"],
183 # Specify which files are to be generated by the `configure' script.
189 include/settingsd/Makefile
192 plugins/connman/Makefile