# -*- 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