Commit 48a92df5 authored by Kai Vehmanen's avatar Kai Vehmanen

Top-level makefile update: checks for more system headers, C99 compiler check....

Top-level makefile update: checks for more system headers, C99 compiler check. Added definition of dummy NICEAPI_EXPORT.

darcs-hash:20070619081134-77cd4-7deeaa78d59feca05595dd4f7cbd19d94f2e6ccd.gz
parent f9852c9d
......@@ -8,7 +8,7 @@
include common.mk
SUBDIRS = \
ALWAYS_SUBDIRS = \
address \
local \
stun \
......@@ -17,14 +17,25 @@ SUBDIRS = \
random \
agent \
nice
SUBDIRS = $(ALWAYS_SUBDIRS)
if WITH_GSTREAMER
SUBDIRS += gst
endif
DIST_SUBDIRS = $(SUBDIRS) gst
DIST_SUBDIRS = $(ALWAYS_SUBDIRS) gst
DISTCHECK_CONFIGURE_FLAGS = --disable-assert --without-gstreamer
EXTRA_DIST = scripts common.mk
EXTRA_DIST = \
common.mk \
Doxyfile.in \
scripts/lcov.mk \
scripts/lcov.sh \
scripts/valgrind.sh
dist_check_SCRIPTS = \
scripts/check-symbols.sh \
scripts/make-symbol-list.sh
lcov:
find -name '*.gcda' -delete
......@@ -43,4 +54,15 @@ lcov-report:
lcov -r lcov/lcov.info `cat lcov/lcov.remove` 2>/dev/null > lcov/lcov.info.clean
genhtml -o lcov lcov/lcov.info.clean
.PHONY: lcov-report lcov
Doxyfile: Doxyfile.in config.status
$(SHELL) ./config.status --file=$@
doc: Doxyfile
$(DOXYGEN) $<
CLEANFILES += Doxyfile
clean-local:
rm -rf doc
.PHONY: doc lcov-report lcov
AC_PREREQ(2.60)
AC_PREREQ(2.59c)
AC_INIT(nice, 0.0.1)
AC_CONFIG_SRCDIR([agent/agent.c])
AC_CONFIG_HEADER([config.h])
......@@ -22,19 +22,23 @@ AC_CONFIG_FILES([
# Checks for programs.
AC_PROG_CC
AC_PROG_CC_C99
dnl AC_PROG_CC_C99
AC_USE_SYSTEM_EXTENSIONS
AC_PROG_LIBTOOL
# Checks for compiler features
AC_C_RESTRICT
AC_C_VARARRAYS
AC_HEADER_ASSERT
AC_HEADER_STDBOOL
AC_DEFINE([_FORTIFY_SOURCE], [2], [Define to `2' to get GNU/libc warnings.])
AC_DEFINE([NICEAPI_EXPORT], [ ], [Public library function implementation])
AC_CHECK_HEADERS([arpa/inet.h net/in.h ifaddrs.h])
# Checks for libraries.
AC_CHECK_LIB(rt, clock_gettime, [LIBRT="-lrt"], [LIBRT=""])
AC_CHECK_FUNCS([poll])
AC_SUBST(LIBRT)
PKG_CHECK_MODULES(OPENSSL, [openssl])
......@@ -49,22 +53,39 @@ AC_ARG_WITH(gstreamer,
[with_gstreamer=${withval}],
[with_gstreamer=auto])
if test "$with_gstreamer" != no; then
AS_IF([test "$with_gstreamer" != no], [
PKG_CHECK_MODULES(GST, [
gstreamer-0.10 >= 0.10.0
gstreamer-base-0.10 >= 0.10.0
],
[with_gstreamer=yes],
[
if test "$with_gstreamer" = yes; then
AS_IF([test "$with_gstreamer" = yes], [
AC_MSG_ERROR([GStreamer support was requested but GStreamer libraries are not available])
fi
])
with_gstreamer=no
])
fi
])
AM_CONDITIONAL(WITH_GSTREAMER, test "$with_gstreamer" = yes)
dnl Doxygen
AC_PATH_PROG([DOXYGEN], [doxygen], [false])
AC_ARG_VAR([DOXYGEN], [Doxygen documentation system])
dnl Test coverage
AC_ARG_ENABLE([coverage],
[AS_HELP_STRING([--enable-coverage],
[build for test coverage (default disabled)])],,
[enable_coverage="no"])
AS_IF([test "${enable_coverage}" != "no"], [
CFLAGS="${CFLAGS} -g -O0 -fprofile-arcs -ftest-coverage"
LDFLAGS="-lgcov"
CCACHE_DISABLE=1
])
AC_SUBST(CCACHE_DISABLE)
AC_OUTPUT
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