Commit 6719a69a authored by Regis Merlino's avatar Regis Merlino

[Init] Add initial source files

Signed-off-by: default avatarRegis Merlino <regis.merlino@intel.com>
parent 99aa98ae
*.o
*.lo
*~
*.la
*.pc
*.tgz
*.gz
.dirstamp
Makefile
Makefile.in
aclocal.m4
autom4te.cache/
compile
config.guess
config.h
config.h.in
config.log
config.status
config.sub
configure
depcomp
install-sh
libtool
ltmain.sh
missing
.deps/
.libs/
stamp-h1
INSTALL
m4/libtool.m4
m4/ltoptions.m4
m4/ltsugar.m4
m4/ltversion.m4
m4/lt~obsolete.m4
This diff is collapsed.
version 0.0.1
- Initial version of dleyna-connector-dbus
connectordir = $(libdir)/dleyna-1.0/connectors
AM_CFLAGS = $(GLIB_CFLAGS) \
$(GIO_CFLAGS) \
$(DLEYNA_CORE_CFLAGS) \
-include config.h
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
connector_LTLIBRARIES = libdleyna-connector-dbus.la
libdleyna_connector_dbus_la_LDFLAGS = -avoid-version \
-no-undefined \
-module
libdleyna_connector_dbus_la_SOURCES = src/connector-dbus.c
libdleyna_connector_dbus_la_LIBADD = $(GLIB_LIBS) \
$(GIO_LIBS) \
$(DLEYNA_CORE_LIBS)
MAINTAINERCLEANFILES = Makefile.in \
aclocal.m4 \
configure \
config.h.in \
config.h.in~ \
build-aux/depcomp \
build-aux/compile \
build-aux/missing \
build-aux/install-sh
maintainer-clean-local:
rm -rf build-aux
Introduction:
-------------
TODO
Compilation
------------
TODO
Working with the source code repository
---------------------------------------
dleyna-connector-dbus can be downloaded, compiled and installed as
follows:
Clone repository
# git clone git://github.com/01org/dleyna-ipc-dbus.git
# cd dleyna-connector-dbus
Configure and build
# ./autoreconf -i
# ./configure
# make
Final installation
# sudo make install
These instructions are suitable for users who simply want to install
dleyna-connector-dbus. However, developers wishing to contribute
to the project should follow a separate "Configure and build" step.
Configure and build
# ./bootstrap-configure
# make
The script "bootstrap-configure" cleans the repository, calls
autreconf and then invokes configure with proper settings for
development. These settings include the enabling of
maintainer mode and debugging.
Developers can remove autogenerated files with the following command
# make maintainer-clean
Configure Options:
------------------
--enable-werror
This option is disabled by default. To enable use --enable-werror.
When enabled, all warnings are treated as errors during compilation.
Should be enabled during development to ensure that errors do not
creep into the code base. This option is enabled by
bootstrap-configure.
--enable-debug
This option is disabled by default. To enable use
--enable-debug. When enabled, the make files produce debug builds.
This option is enabled by bootstrap-configure.
--enable-optimization
This option is enabled by default. To disable use
--disable-optimization. When enabled it turns on compiler
optimizations. Disable = -O0, enable = -O2.
--with-log-level
See logging.txt for more information about logging.
#!/bin/sh
if [ -f config.status ]; then
make maintainer-clean
fi
autoreconf -if && \
./configure --enable-maintainer-mode \
--enable-silent-rules \
--disable-optimization \
--enable-debug \
--with-log-level=8 $*
\ No newline at end of file
AC_PREREQ([2.66])
AC_INIT([dleyna-connector-dbus],
[0.0.1],
[https://github.com/01org/dleyna-ipc-dbus/issues/new],
,
[https://01.org/dleyna/])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_SRCDIR([src/connector-dbus.c])
AC_PREFIX_DEFAULT(/usr/local)
AM_INIT_AUTOMAKE([subdir-objects])
AM_MAINTAINER_MODE
AM_SILENT_RULES([yes])
DLEYNA_CONNECTOR_DBUS_COMPILER_FLAGS
# Checks for languages.
AC_LANG_C
# Checks for programs.
AC_PROG_CC
AM_PROG_CC_C_O
AC_PROG_MKDIR_P
# Initialize libtool
# Disable generation of static libraries
LT_PREREQ([2.2.6])
LT_INIT([dlopen disable-static])
LT_LANG([C])
# Checks for libraries.
PKG_PROG_PKG_CONFIG(0.16)
PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.28])
PKG_CHECK_MODULES([GIO], [gio-2.0 >= 2.28])
PKG_CHECK_MODULES([DBUS], [dbus-1])
PKG_CHECK_MODULES([DLEYNA_CORE], [dleyna-core-1.0 >= 0.0.1])
# Checks for header files.
AC_CHECK_HEADERS([stdlib.h string.h syslog.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_UINT8_T
AC_HEADER_STDBOOL
AC_TYPE_SIZE_T
# Checks for library functions.
AC_FUNC_MALLOC
AC_FUNC_REALLOC
AC_CHECK_FUNCS([memset strchr strrchr strstr])
# Define Log Level values
LOG_LEVEL_0=0x00
LOG_LEVEL_1=0x01
LOG_LEVEL_2=0x02
LOG_LEVEL_3=0x04
LOG_LEVEL_4=0x08
LOG_LEVEL_5=0x10
LOG_LEVEL_6=0x20
LOG_LEVEL_7=0x13
LOG_LEVEL_8=0x3F
AC_DEFINE_UNQUOTED([DLEYNA_LOG_LEVEL_DISABLED], [${LOG_LEVEL_0}], [Log level flag for disabled messages])
AC_DEFINE_UNQUOTED([DLEYNA_LOG_LEVEL_ERROR], [${LOG_LEVEL_1}], [Log level flag for errors])
AC_DEFINE_UNQUOTED([DLEYNA_LOG_LEVEL_CRITICAL], [${LOG_LEVEL_2}], [Log level flag for critical messages])
AC_DEFINE_UNQUOTED([DLEYNA_LOG_LEVEL_WARNING], [${LOG_LEVEL_3}], [Log level flag for warnings])
AC_DEFINE_UNQUOTED([DLEYNA_LOG_LEVEL_MESSAGE], [${LOG_LEVEL_4}], [Log level flag for messages])
AC_DEFINE_UNQUOTED([DLEYNA_LOG_LEVEL_INFO], [${LOG_LEVEL_5}], [Log level flag for informational messages])
AC_DEFINE_UNQUOTED([DLEYNA_LOG_LEVEL_DEBUG], [${LOG_LEVEL_6}], [Log level flag for debug messages])
AC_DEFINE_UNQUOTED([DLEYNA_LOG_LEVEL_DEFAULT], [${LOG_LEVEL_7}], [Log level flag to display default level messages])
AC_DEFINE_UNQUOTED([DLEYNA_LOG_LEVEL_ALL], [${LOG_LEVEL_8}], [Log level flag for all messages])
AC_ARG_ENABLE(debug,
AS_HELP_STRING(
[--enable-debug],
[enable compiling with debugging information]),
[],
[enable_debug=no])
AS_CASE("${enable_debug}",
[yes], [CFLAGS="$CFLAGS -g";
AC_DEFINE_UNQUOTED([DLEYNA_DEBUG_ENABLED],[1], [Compiling with debugging information enabled])
],
[no], [],
[AC_MSG_ERROR([bad value ${enable_debug} for --enable-debug])])
AC_ARG_ENABLE(werror,
AS_HELP_STRING(
[--enable-werror],
[warnings are treated as errors]),
[],
[enable_werror=no])
AS_CASE("${enable_werror}",
[yes], [CFLAGS="$CFLAGS -Werror"],
[no], [],
[AC_MSG_ERROR([bad value ${enable_werror} for --enable-werror])])
AC_ARG_ENABLE(optimization,
AS_HELP_STRING(
[--disable-optimization],
[disable code optimization through compiler]),
[],
[enable_optimization=yes])
AS_CASE("${enable_optimization}",
[yes], [disable_optimization=no],
[no], [CFLAGS="$CFLAGS -O0"; disable_optimization=yes],
[AC_MSG_ERROR([bad value ${enable_optimization} for --enable-werror])])
AC_ARG_WITH(log-level,
AS_HELP_STRING(
[--with-log-level],
[enable logging information (0,1..6,7,8)\
0=disabled \
7=default (=1,2,5) \
8=all (=1,2,3,4,5,6) \
1,..,6=a comma separated list of log level\
]),
[],
[with_log_level=7])
DLEYNA_LOG_LEVEL_CHECK([${with_log_level}])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
AS_ECHO(["-------------------------------------------------
${PACKAGE_NAME} Version ${PACKAGE_VERSION}
Prefix : '${prefix}'
Compiler : '${CC}'
CFLAGS : '${CFLAGS}'
-Package features:
- enable-werror : ${enable_werror}
- enable-debug : ${enable_debug}
- disable-optimization: ${disable_optimization}
- with-log-level : ${with_log_level}
--------------------------------------------------"])
dnl
dnl dleyna-connector-dbus
dnl
dnl Copyright (C) 2013 Intel Corporation. All rights reserved.
dnl
dnl This program is free software; you can redistribute it and/or modify it
dnl under the terms and conditions of the GNU Lesser General Public License,
dnl version 2.1, as published by the Free Software Foundation.
dnl
dnl This program is distributed in the hope it will be useful, but WITHOUT
dnl ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
dnl FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
dnl for more details.
dnl
dnl You should have received a copy of the GNU Lesser General Public License
dnl along with this program; if not, write to the Free Software Foundation, Inc.,
dnl 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
dnl
dnl Regis Merlino <regis.merlino@intel.com>
dnl
AC_DEFUN_ONCE([DLEYNA_CONNECTOR_DBUS_COMPILER_FLAGS], [
if (test x"${CFLAGS}" = x""); then
CFLAGS="-Wall"
CFLAGS+=" -O2"
CFLAGS+=" -D_FORTIFY_SOURCE=2"
fi
if (test x"$USE_MAINTAINER_MODE" = x"yes"); then
CFLAGS+=" -Wextra"
CFLAGS+=" -Wno-unused-parameter"
CFLAGS+=" -Wno-missing-field-initializers"
CFLAGS+=" -Wdeclaration-after-statement"
CFLAGS+=" -Wmissing-declarations"
CFLAGS+=" -Wredundant-decls"
CFLAGS+=" -Wcast-align"
CFLAGS+=" -Wstrict-prototypes"
CFLAGS+=" -Wmissing-prototypes"
CFLAGS+=" -Wnested-externs"
CFLAGS+=" -Wshadow"
CFLAGS+=" -Wformat=2"
CFLAGS+=" -Winit-self"
CFLAGS+=" -std=gnu99"
CFLAGS+=" -pedantic"
CFLAGS+=" -Wno-overlength-strings"
CFLAGS+=" -DG_DISABLE_DEPRECATED"
CFLAGS+=" -DGLIB_DISABLE_DEPRECATION_WARNINGS"
fi
CFLAGS+=" -Wno-format-extra-args"
])
dnl
dnl dLeyna
dnl
dnl Copyright (C) 2012-2013 Intel Corporation. All rights reserved.
dnl
dnl This program is free software; you can redistribute it and/or modify it
dnl under the terms and conditions of the GNU Lesser General Public License,
dnl version 2.1, as published by the Free Software Foundation.
dnl
dnl This program is distributed in the hope it will be useful, but WITHOUT
dnl ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
dnl FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
dnl for more details.
dnl
dnl You should have received a copy of the GNU Lesser General Public License
dnl along with this program; if not, write to the Free Software Foundation, Inc.,
dnl 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
dnl
dnl Ludovic Ferrandis <ludovic.ferrandis@intel.com>
dnl
AC_DEFUN([_DLEYNA_LOG_LEVEL_CHECK_VALUE],
[
AS_CASE($1,
[[[1-6]]], [AS_IF([test ${log_array[[${log_level}]]} -ne 0],
[
AC_MSG_ERROR(["$1 should be set once"], 1)
],
[test "x${log_single}" = xyes],
[
AC_MSG_ERROR(["Unique value element already set"], 1)
])
],
[0|7|8], [AS_IF([test ${log_level_count} -ne 0],
[
AC_MSG_ERROR(["$1 should be a unique value element"], 1)
])
log_single=yes
],
[AC_MSG_ERROR(["$1 is not a valid value"], 1)]
)
log_name=LOG_LEVEL_${log_level}
eval log_value=\$${log_name}
let "LOG_LEVEL |= ${log_value}"
]
)
AC_DEFUN([DLEYNA_LOG_LEVEL_CHECK],
[
AC_MSG_CHECKING([for --with-log-level=$1])
old_IFS=${IFS}
IFS=","
log_ok=yes
log_single=no
log_level_count=0
LOG_LEVEL=0
log_array=(0 0 0 0 0 0 0 0 0)
for log_level in $1
do
IFS=${old_IFS}
_DLEYNA_LOG_LEVEL_CHECK_VALUE([$log_level])
IFS=","
let log_level_count++
let log_array[[${log_level}]]++
done
IFS=${old_IFS}
AC_DEFINE_UNQUOTED([DLEYNA_LOG_LEVEL], [${LOG_LEVEL}], [Log level flag for debug messages])
AC_MSG_RESULT([ok])
]
)
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment