Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
SUBDIRS = src

pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = tlcommon.pc

ACLOCAL_AMFLAGS = -I build/m4 -I build
56 changes: 11 additions & 45 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ AC_INIT([TuneL common library],
AC_CONFIG_SRCDIR([src/socket.c])
AC_CONFIG_AUX_DIR([build/aux])
AC_CONFIG_MACRO_DIR([build/m4])
AM_INIT_AUTOMAKE([1.11.1 -Wall -Werror foreign])
AM_INIT_AUTOMAKE([1.11.1 -Wall foreign])
AM_PROG_AR
AC_CONFIG_HEADERS([config.h])

Expand Down Expand Up @@ -42,13 +42,6 @@ AC_PROG_CXX
TL_COMMON_LTVERSION="0:0:0"
AC_SUBST([TL_COMMON_LTVERSION])

pkgconfigdir="$libdir/pkgconfig"
tl_includedir="$includedir/tunel"
tl_include_commondir="$tl_includedir/common"
AC_SUBST(pkgconfigdir)
AC_SUBST(tl_includedir)
AC_SUBST(tl_include_commondir)

# Checks for libraries.

# AX_REQUIRE_HEADER(HEADER, IF-PRESENT)
Expand Down Expand Up @@ -133,44 +126,18 @@ AC_CHECK_FUNCS([memset \

# Tuning
AC_ARG_ENABLE([debug],
AC_HELP_STRING([--enable-debug], [enable debugging [[default=yes]]]),
[AS_HELP_STRING([--enable-debug], [enable debugging [[default=yes]]])],
[enable_debug="$enableval"],
[enable_debug="yes"])
AC_MSG_CHECKING([[whether to enable debugging]])
if test "x$enable_debug" = "xyes"; then
AC_DEFINE([TL_DEBUG], [1], [is debugging enabled])
# FIXME: please only use TL_DEBUG, not DEBUG
DEBUG_CPPFLAGS="-DTL_DEBUG -DDEBUG"
CPPFLAGS="$CPPFLAGS $DEBUG_CPPFLAGS"
AC_MSG_RESULT([[yes]])
else
DEBUG_CFLAGS=
AC_MSG_RESULT([[no]])
fi
AC_SUBST([DEBUG_CFLAGS])

AC_ARG_ENABLE([paranoia],
AC_HELP_STRING([--enable-paranoia],
[enable excessively strict compiler options \
(works only with GCC and compatible) [[default=no]]]),
[enable_paranoia="$enableval"],
[enable_paranoia="no"])
AC_MSG_CHECKING([[whether to enable paranoiac compiler options]])
if test "x$enable_paranoia" = "xyes"; then
CFLAGS="$CFLAGS \
-Wall -W -Wchar-subscripts -Wcomment -Wformat=2 -Wimplicit-int \
-Werror-implicit-function-declaration -Wmain -Wparentheses -Wsequence-point \
-Wreturn-type -Wswitch -Wtrigraphs -Wunused -Wuninitialized -Wunknown-pragmas \
-Wfloat-equal -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast \
-Wwrite-strings -Wconversion -Wsign-compare -Waggregate-return \
-Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations \
-Wmissing-noreturn -Wformat -Wmissing-format-attribute \
-Wno-deprecated-declarations -Wpacked -Wredundant-decls -Wnested-externs \
-Winline -Wlong-long -Wunreachable-code -pedantic"
AC_MSG_RESULT([[yes]])
else
AC_MSG_RESULT([[no]])
fi
AC_MSG_CHECKING([whether to enable debugging])
AS_IF([test "x$enable_debug" = "xyes"],
[AC_DEFINE([TL_DEBUG], [1], [is debugging enabled])
# FIXME: please only use TL_DEBUG, not DEBUG
TL_DEBUG_CPPFLAGS="-DTL_DEBUG -DDEBUG"
AC_MSG_RESULT([yes])],
[TL_DEBUG_CPPFLAGS=
AC_MSG_RESULT([no])])
AC_SUBST([TL_DEBUG_CPPFLAGS])

#TL_CHECK_PHY_DEBUG

Expand All @@ -185,7 +152,6 @@ AC_OUTPUT
echo "------------------------------------------"
echo "Configuration choices:"
echo "* Debugging enabled : $enable_debug"
echo "* Paranoiac compiler options : $enable_paranoia"
echo "* Base installation directory : $prefix"
echo ""
echo "Now type 'make' to build $PACKAGE_NAME"
4 changes: 3 additions & 1 deletion src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ lib_LTLIBRARIES = libtlcommon.la

#libtlcommon_la_CPPFLAGS = @TL_PHY_DEBUG_CPPFLAGS_EXPORT@
libtlcommon_la_CFLAGS = @TL_COMMON_CFLAGS@
libtlcommon_la_CPPFLAGS = @TL_DEBUG_CPPFLAGS@
libtlcommon_la_CXXFLAGS = @TL_COMMON_CXXFLAGS@
libtlcommon_la_LDFLAGS = -version-info @TL_COMMON_LTVERSION@
libtlcommon_la_LIBADD = @TL_COMMON_LIBS@
Expand All @@ -18,7 +19,8 @@ libtlcommon_la_SOURCES = socket.c \
treegenerator.c


tl_include_common_HEADERS = socket.h \
tlcommon_includedir = $(includedir)/tunel/common
tlcommon_include_HEADERS = socket.h \
ptimer.h \
netclient.h \
netprotocol.h \
Expand Down
2 changes: 1 addition & 1 deletion tlcommon.pc.in
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ Version: @VERSION@
Requires: scecore
Libs: -L${libdir} -ltlcommon
Libs.private: -lpthread
Cflags: -I${includedir} @DEBUG_CFLAGS@
Cflags: -I${includedir} @TL_DEBUG_CPPFLAGS@