Commit 1e4272b4 authored by Tim-Philipp Müller's avatar Tim-Philipp Müller 🐠 Committed by Olivier Crête

Remove autotools build

Remove dist check on the CI, since it doesn't really
add anything in the Meson case (tarball is based
on files checked into git and srcdir != builddir).
parent 7581462a
Pipeline #150461 passed with stages
in 4 minutes and 33 seconds
......@@ -3,63 +3,6 @@ stages:
- test
- deploy
build autotools:
stage: build
image: registry.freedesktop.org/libnice/libnice/centos7/autotools-build
except:
- schedules
script:
- ifconfig
- export BUILD_ID="libnice-$CI_JOB_NAME_$CI_COMMIT_SHA-$CI_JOB_ID"
- export PREFIX="$(pwd)/prefix-$BUILD_ID"
- export MAKEFLAGS="-j4"
- mkdir "$PREFIX"
- ./autogen.sh --prefix="$PREFIX" --enable-compile-warnings=error --enable-gtk-doc --enable-introspection
- make
- make install
artifacts:
untracked: true
test autotools:
stage: test
image: registry.freedesktop.org/libnice/libnice/centos7/autotools-build
except:
- schedules
needs:
- build autotools
script:
- ifconfig
- make check
artifacts:
when: always
paths:
- config.log
- nice/test-suite.log
- random/test-suite.log
- tests/test-suite.log
- stun/tests/test-suite.log
- docs/reference/libnice/test-suite.log
test autotools valgrind:
extends: test autotools
script:
- ifconfig
- make check-valgrind
distcheck autotools:
stage: test
image: registry.freedesktop.org/libnice/libnice/centos7/autotools-build
except:
- schedules
needs:
- build autotools
script:
- ifconfig
- make distcheck
artifacts:
paths:
- libnice-*.tar.gz
build meson:
stage: build
image: registry.freedesktop.org/libnice/libnice/centos7/meson-build
......@@ -240,8 +183,7 @@ submit-to-coverity:
- tar czvf libnice.tgz cov-int
- curl --form token=$COVERITY_TOKEN --form email=olivier.crete@ocrete.ca --form file=@libnice.tgz --form version="${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHA}" --form description="CI weekly run" https://scan.coverity.com/builds?project=libnice
documentation:
pages:
stage: deploy
dependencies:
- doc-and-install meson
......
#
# Makefile.am for the Nice Glib ICE library
#
# (C) 2006, 2007 Collabora Ltd.
# (C) 2006, 2007 Nokia Corporation. All rights reserved.
#
# Licensed under MPL 1.1/LGPL 2.1. See file COPYING.
include common.mk
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
SUBDIRS = \
stun \
socket \
random \
agent \
nice \
gst \
tests \
docs \
examples
DISTCHECK_CONFIGURE_FLAGS = --disable-assert -enable-gtk-doc --enable-introspection
EXTRA_DIST = \
COPYING.LGPL \
COPYING.MPL \
autogen.sh \
common.mk \
scripts/lcov.mk \
scripts/lcov.sh \
scripts/valgrind-test-driver \
m4/introspection.m4 \
meson.build \
meson_options.txt
MAINTAINERCLEANFILES = ar-lib
dist_check_SCRIPTS = \
scripts/check-symbols.sh \
scripts/make-symbol-list.sh
lcov:
find -name '*.gcda' -delete
$(MAKE) $(AM_MAKEFLAGS) check
find -type d -name '.libs' | while read d ; do \
mv -fv $$d/*.gc* $$d/.. 2>/dev/null || true ; \
done
$(MAKE) lcov-report
lcov-report:
mkdir -p lcov
lcov -d . -c > lcov/lcov.info
lcov -l lcov/lcov.info 2>/dev/null | \
egrep '(^/usr|/test.*\.c)' | \
cut -d: -f1 > lcov/lcov.remove
lcov -r lcov/lcov.info `cat lcov/lcov.remove` 2>/dev/null > lcov/lcov.info.clean
genhtml -o lcov lcov/lcov.info.clean
clean-local:
rm -rf doc
.PHONY: doc lcov-report lcov
......@@ -20,14 +20,23 @@ Requirements
pkg-config
gnutls >= 2.12.0 or OpenSSL
gupnp-igd >= 0.1.2 (optional)
gstreamer-0.10 >= 0.10.0 (optional)
gstreamer-0.10 (optional)
gstreamer-1.0 (optional)
Build instructions
------------------
To build, you need Python 3 and Meson. Then need to do:
meson build && ninja -C build && sudo ninja -C build install
libnice uses the Meson Build System: https://mesonbuild.com
To build on Linux and Mac, you only need to type the usual commands :
meson builddir
ninja -C builddir
ninja -C builddir test (or "meson test -C builddir" for more control)
sudo ninja -C builddir install
See https://mesonbuild.com/Quick-guide.html#compiling-a-meson-project
for more details and how to install the Meson build system.
Structure
---------
......
#
# Makefile.am for the Nice Glib ICE library
#
# (C) 2006, 2007 Collabora Ltd.
# (C) 2006, 2007 Nokia Corporation. All rights reserved.
#
# Licensed under MPL 1.1/LGPL 2.1. See file COPYING.
include $(top_srcdir)/common.mk
AM_CFLAGS = \
-DG_LOG_DOMAIN=\"libnice\" \
$(LIBNICE_CFLAGS) \
$(GLIB_CFLAGS) \
$(GUPNP_CFLAGS) \
-I $(top_srcdir) \
-I $(top_srcdir)/random \
-I $(top_srcdir)/socket \
-I $(top_srcdir)/stun
if WINDOWS
AM_CFLAGS += -DWINVER=0x0501 # _WIN32_WINNT_WINXP
endif
BUILT_SOURCES = \
agent-enum-types.h \
agent-enum-types.c
CLEANFILES += $(BUILT_SOURCES)
noinst_LTLIBRARIES = libagent.la
pkginclude_HEADERS = \
agent.h \
candidate.h \
debug.h \
address.h \
interfaces.h \
pseudotcp.h \
$(NULL)
libagent_la_SOURCES = \
address.h \
address.c \
debug.h \
debug.c \
candidate.h \
candidate.c \
component.h \
component.c \
agent.h \
agent-priv.h \
agent.c \
stream.h \
stream.c \
conncheck.c \
conncheck.h \
discovery.c \
discovery.h \
interfaces.c \
interfaces.h \
pseudotcp.h \
pseudotcp.c \
iostream.h \
iostream.c \
inputstream.h \
inputstream.c \
outputstream.h \
outputstream.c \
$(BUILT_SOURCES)
agent-enum-types.h: $(pkginclude_HEADERS) Makefile
$(AM_V_GEN)$(GLIB_MKENUMS) \
--fhead "#ifndef __AGENT_ENUM_TYPES_H__\n#define __AGENT_ENUM_TYPES_H__ 1\n\n#include <glib-object.h>\n\nG_BEGIN_DECLS\n" \
--fprod "/* enumerations from \"@filename@\" */\n" \
--vhead "GType @enum_name@_get_type (void) G_GNUC_CONST;\n#define NICE_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n" \
--ftail "G_END_DECLS\n\n#endif /* !AGENT_ENUM_TYPES_H */" \
$(addprefix $(srcdir)/,$(pkginclude_HEADERS)) > $@
agent-enum-types.c: $(pkginclude_HEADERS) Makefile agent-enum-types.h
$(AM_V_GEN)$(GLIB_MKENUMS) \
--fhead "#include <config.h>\n#include <glib-object.h>\n#include \"agent.h\"\n#include \"pseudotcp.h\"\n#include \"agent-enum-types.h\"" \
--fprod "\n/* enumerations from \"@filename@\" */" \
--vhead "GType\n@enum_name@_get_type (void)\n{\n static GType type = 0;\n if (!type) {\n static const G@Type@Value values[] = {" \
--vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
--vtail " { 0, NULL, NULL }\n };\n type = g_@type@_register_static (\"@EnumName@\", values);\n }\n return type;\n}\n\n" \
$(addprefix $(srcdir)/,$(pkginclude_HEADERS)) > $@
libagent_la_LIBADD = \
$(top_builddir)/random/libnice-random.la \
$(top_builddir)/socket/libsocket.la \
$(top_builddir)/stun/libstun.la \
$(GLIB_LIBS) \
$(GUPNP_LIBS) \
$(NULL)
libagent_la_DEPENDENCIES = \
$(top_builddir)/random/libnice-random.la \
$(top_builddir)/socket/libsocket.la \
$(top_builddir)/stun/libstun.la
if WINDOWS
libagent_la_LIBADD += -liphlpapi -lws2_32
endif
#
# GObject introspection
#
# We need --accept-unprefixed because of PseudoTcp and TurnServer.
#
-include $(INTROSPECTION_MAKEFILE)
INTROSPECTION_GIRS =
INTROSPECTION_SCANNER_ARGS = --add-include-path=$(srcdir) --warn-all --accept-unprefixed
INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir)
if HAVE_INTROSPECTION
introspection_sources = $(pkginclude_HEADERS)
Nice-0.1.gir: libagent.la
Nice_0_1_gir_INCLUDES = GObject-2.0 Gio-2.0
Nice_0_1_gir_EXPORT_PACKAGES = nice
Nice_0_1_gir_CFLAGS = $(AM_CFLAGS)
Nice_0_1_gir_LIBS = libagent.la
Nice_0_1_gir_FILES = $(introspection_sources)
INTROSPECTION_GIRS += Nice-0.1.gir
girdir = $(datadir)/gir-1.0
gir_DATA = $(INTROSPECTION_GIRS)
typelibdir = $(libdir)/girepository-1.0
typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
CLEANFILES += $(gir_DATA) $(typelib_DATA)
endif
EXTRA_DIST = meson.build
#!/bin/sh
# Run this to generate all the initial makefiles, etc.
test -n "$srcdir" || srcdir=$(dirname "$0")
test -n "$srcdir" || srcdir=.
olddir=$(pwd)
cd $srcdir
(test -f configure.ac) || {
echo "*** ERROR: Directory '$srcdir' does not look like the top-level project directory ***"
exit 1
}
# shellcheck disable=SC2016
PKG_NAME=$(autoconf --trace 'AC_INIT:$1' configure.ac)
if [ "$#" = 0 -a "x$NOCONFIGURE" = "x" ]; then
echo "*** WARNING: I am going to run 'configure' with no arguments." >&2
echo "*** If you wish to pass any to it, please specify them on the" >&2
echo "*** '$0' command line." >&2
echo "" >&2
fi
aclocal --install || exit 1
gtkdocize --copy || exit 1
autoreconf --verbose --force --install || exit 1
cd "$olddir"
if [ "$NOCONFIGURE" = "" ]; then
$srcdir/configure "$@" || exit 1
if [ "$1" = "--help" ]; then exit 0 else
echo "Now type 'make' to compile $PKG_NAME" || exit 1
fi
else
echo "Skipping configure process."
fi
CLEANFILES = *.gcno *.gcda
pkgincludedir = $(includedir)/nice
check-valgrind:
$(MAKE) TESTS_ENVIRONMENT="USE_VALGRIND=1 " check
LOG_DRIVER=$(top_srcdir)/scripts/valgrind-test-driver
.PHONY: check-valgrind
This diff is collapsed.
SUBDIRS = reference
EXTRA_DIST = design.txt
## Process this file with automake to produce Makefile.in
# We require automake 1.6 at least.
AUTOMAKE_OPTIONS = 1.6
# The name of the module, e.g. 'glib'.
DOC_MODULE=libnice
# The top-level SGML file. You can change this if you want to.
DOC_MAIN_SGML_FILE=$(DOC_MODULE)-docs.xml
# The directory containing the source code. Relative to $(srcdir).
# gtk-doc will search all .c & .h files beneath here for inline comments
# documenting the functions and macros.
# e.g. DOC_SOURCE_DIR=../../../gtk
DOC_SOURCE_DIR=$(top_srcdir)/agent $(top_srcdir)/stun
# Extra options to pass to gtkdoc-scangobj. Not normally needed.
SCANGOBJ_OPTIONS=
# Extra options to supply to gtkdoc-scan.
# e.g. SCAN_OPTIONS=--deprecated-guards="GTK_DISABLE_DEPRECATED"
SCAN_OPTIONS=--rebuild-types
# Extra options to supply to gtkdoc-mkdb.
# e.g. MKDB_OPTIONS=--sgml-mode --output-format=xml
MKDB_OPTIONS=--xml-mode --output-format=xml --name-space=Nice
# Extra options to supply to gtkdoc-mktmpl
# e.g. MKTMPL_OPTIONS=--only-section-tmpl
MKTMPL_OPTIONS=
# Extra options to supply to gtkdoc-fixref. Not normally needed.
# e.g. FIXXREF_OPTIONS=--extra-dir=../gdk-pixbuf/html --extra-dir=../gdk/html
FIXXREF_OPTIONS=
# Used for dependencies. The docs will be rebuilt if any of these change.
# e.g. HFILE_GLOB=$(top_srcdir)/gtk/*.h
# e.g. CFILE_GLOB=$(top_srcdir)/gtk/*.c
HFILE_GLOB=$(top_srcdir)/agent/agent.h $(top_srcdir)/agent/address.h \
$(top_srcdir)/agent/debug.h $(top_srcdir)/agent/candidate.h \
$(top_srcdir)/agent/interfaces.h \
$(top_srcdir)/agent/pseudotcp.h \
$(top_srcdir)/stun/stunagent.h \
$(top_srcdir)/stun/stunmessage.h \
$(top_srcdir)/stun/debug.h \
$(top_srcdir)/stun/usages/bind.h \
$(top_srcdir)/stun/usages/ice.h \
$(top_srcdir)/stun/usages/timer.h \
$(top_srcdir)/stun/usages/turn.h
CFILE_GLOB=$(top_srcdir)/agent/agent.c \
$(top_srcdir)/agent/pseudotcp.c
# Header files to ignore when scanning.
# e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h
IGNORE_HFILES= conncheck.h discovery.h stream.h component.h agent-priv.h \
iostream.h inputstream.h outputstream.h \
gstnice.h gstnicesrc.h gstnicesink.h \
md5.h sha1.h stunhmac.h utils.h rand.h stun5389.h stuncrc32.h \
stund.h agent-signals-marshal.h win32_common.h
# Images to copy into HTML directory.
# e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png
HTML_IMAGES = states.png
# Extra SGML files that are included by $(DOC_MAIN_SGML_FILE).
# e.g. content_files=running.sgml building.sgml changes-2.0.sgml
content_files=
# SGML files where gtk-doc abbrevations (#GtkWidget) are expanded
# These files must be listed here *and* in content_files
# e.g. expand_content_files=running.sgml
expand_content_files=
# CFLAGS and LDFLAGS for compiling gtkdoc-scangobj with your library.
# Only needed if you are using gtkdoc-scangobj to dynamically query widget
# signals and properties.
# e.g. INCLUDES=-I$(top_srcdir) -I$(top_builddir) $(GTK_DEBUG_FLAGS)
# e.g. GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib)
AM_CFLAGS = $(LIBNICE_CFLAGS) \
$(GLIB_CFLAGS) \
-I $(top_srcdir) \
-I $(top_srcdir)/random \
-I $(top_srcdir)/socket \
-I $(top_srcdir)/stun
GTKDOC_LIBS= $(top_builddir)/agent/libagent.la $(GLIB_LIBS) $(top_builddir)/stun/libstun.la \
$(GUPNP_LIBS)
# This includes the standard gtk-doc make rules, copied by gtkdocize.
include $(top_srcdir)/gtk-doc.make
# Other files to distribute
# e.g. EXTRA_DIST += version.xml.in
EXTRA_DIST += states.gv
EXTRA_DIST += meson.build
# Files not to distribute
# for --rebuild-types in $(SCAN_OPTIONS), e.g. $(DOC_MODULE).types
# for --rebuild-sections in $(SCAN_OPTIONS) e.g. $(DOC_MODULE)-sections.txt
#DISTCLEANFILES +=
# If we ever need to regenerate this diagram.
# Since it’s not expected to change much, let’s not depend on GraphViz to
# build the docs.
states.png: states.gv
dot -Tpng -Gsize=9.6,2.9\! -Gdpi=200 $^ > $@
if ENABLE_GTK_DOC
TESTS_ENVIRONMENT = \
DOC_MODULE=$(DOC_MODULE) DOC_MAIN_SGML_FILE=$(DOC_MAIN_SGML_FILE) \
SRCDIR=$(abs_srcdir) BUILDDIR=$(abs_builddir)
TESTS = $(GTKDOC_CHECK)
endif
#
# Makefile.am for the Nice Glib ICE library
#
# (C) 2006, 2007 Collabora Ltd.
# (C) 2006, 2007 Nokia Corporation. All rights reserved.
#
# Licensed under MPL 1.1/LGPL 2.1. See file COPYING.
include $(top_srcdir)/common.mk
AM_CFLAGS = \
-I $(top_srcdir) \
-I $(top_srcdir)/agent \
-I $(top_srcdir)/random \
-I $(top_srcdir)/socket \
-I $(top_srcdir)/stun \
$(LIBNICE_CFLAGS) \
$(GLIB_CFLAGS) \
$(GUPNP_CFLAGS)
noinst_PROGRAMS = simple-example threaded-example sdp-example
simple_example_SOURCES = simple-example.c
simple_example_LDADD = $(top_builddir)/agent/libagent.la \
$(GLIB_LIBS) $(GUPNP_LIBS)
threaded_example_SOURCES = threaded-example.c
threaded_example_LDADD = $(top_builddir)/agent/libagent.la \
$(GLIB_LIBS) $(GUPNP_LIBS)
sdp_example_SOURCES = sdp-example.c
sdp_example_LDADD = $(top_builddir)/agent/libagent.la \
$(GLIB_LIBS) $(GUPNP_LIBS)
EXTRA_DIST = meson.build
#
# Makefile.am for the Nice Glib ICE library
#
# (C) 2006, 2007 Collabora Ltd.
# (C) 2006, 2007 Nokia Corporation. All rights reserved.
#
# Licensed under MPL 1.1/LGPL 2.1. See file COPYING.
AM_CFLAGS = $(LIBNICE_CFLAGS) \
-I $(top_srcdir) \
-I $(top_srcdir)/socket \
-I $(top_srcdir)/agent \
-I $(top_srcdir)/random \
-I $(top_srcdir)/stun
COMMON_LIBADD = \
$(top_builddir)/nice/libnice.la
# libgstnice
if WITH_GSTREAMER
gstplugin_LTLIBRARIES = libgstnice.la
libgstnice_la_CFLAGS = $(AM_CFLAGS) $(GST_CFLAGS) -DGST_USE_UNSTABLE_API
libgstnice_la_SOURCES = \
gstnicesrc.h \
gstnicesrc.c \
gstnicesink.h \
gstnicesink.c \
gstnice.h \
gstnice.c
libgstnice_la_LIBADD = $(COMMON_LIBADD) $(GST_LIBS)
libgstnice_la_LDFLAGS = -module -avoid-version -no-undefined
endif
if WITH_GSTREAMER010
gstplugin010_LTLIBRARIES = libgstnice010.la
libgstnice010_la_CFLAGS = $(AM_CFLAGS) $(GST010_CFLAGS)
libgstnice010_la_SOURCES = \
gstnicesrc.h \
gstnicesrc.c \
gstnicesink.h \
gstnicesink.c \
gstnice.h \
gstnice.c
libgstnice010_la_LIBADD = $(COMMON_LIBADD) $(GST010_LIBS)
libgstnice010_la_LDFLAGS = -module -avoid-version -no-undefined
endif
EXTRA_DIST = meson.build
dnl as-compiler-flag.m4 0.1.0
dnl autostars m4 macro for detection of compiler flags
dnl David Schleef <ds@schleef.org>
dnl Tim-Philipp Müller <tim centricular net>
dnl AS_COMPILER_FLAG(CFLAGS, ACTION-IF-ACCEPTED, [ACTION-IF-NOT-ACCEPTED])
dnl Tries to compile with the given CFLAGS.
dnl Runs ACTION-IF-ACCEPTED if the compiler can compile with the flags,
dnl and ACTION-IF-NOT-ACCEPTED otherwise.
AC_DEFUN([AS_COMPILER_FLAG],
[
AC_MSG_CHECKING([to see if compiler understands $1])
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $1"
AC_TRY_COMPILE([ ], [], [flag_ok=yes], [flag_ok=no])
CFLAGS="$save_CFLAGS"
if test "X$flag_ok" = Xyes ; then
$2
true
else
$3
true
fi
AC_MSG_RESULT([$flag_ok])
])
dnl AS_CXX_COMPILER_FLAG(CPPFLAGS, ACTION-IF-ACCEPTED, [ACTION-IF-NOT-ACCEPTED])
dnl Tries to compile with the given CPPFLAGS.
dnl Runs ACTION-IF-ACCEPTED if the compiler can compile with the flags,
dnl and ACTION-IF-NOT-ACCEPTED otherwise.
AC_DEFUN([AS_CXX_COMPILER_FLAG],
[
AC_REQUIRE([AC_PROG_CXX])
AC_MSG_CHECKING([to see if c++ compiler understands $1])
save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $1"
AC_LANG_PUSH(C++)
AC_TRY_COMPILE([ ], [], [flag_ok=yes], [flag_ok=no])
CPPFLAGS="$save_CPPFLAGS"
if test "X$flag_ok" = Xyes ; then
$2
true
else
$3
true
fi
AC_LANG_POP(C++)
AC_MSG_RESULT([$flag_ok])
])
# ===========================================================================
# https://www.gnu.org/software/autoconf-archive/ax_check_openssl.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_CHECK_OPENSSL([action-if-found[, action-if-not-found]])
#
# DESCRIPTION
#
# Look for OpenSSL in a number of default spots, or in a user-selected
# spot (via --with-openssl). Sets
#
# OPENSSL_INCLUDES to the include directives required
# OPENSSL_LIBS to the -l directives required
# OPENSSL_LDFLAGS to the -L or -R flags required
#
# and calls ACTION-IF-FOUND or ACTION-IF-NOT-FOUND appropriately
#
# This macro sets OPENSSL_INCLUDES such that source files should use the
# openssl/ directory in include directives:
#
# #include <openssl/hmac.h>
#
# LICENSE
#
# Copyright (c) 2009,2010 Zmanda Inc. <http://www.zmanda.com/>
# Copyright (c) 2009,2010 Dustin J. Mitchell <dustin@zmanda.com>
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice
# and this notice are preserved. This file is offered as-is, without any
# warranty.
#serial 10
AU_ALIAS([CHECK_SSL], [AX_CHECK_OPENSSL])
AC_DEFUN([AX_CHECK_OPENSSL], [
found=false
AC_ARG_WITH([openssl],
[AS_HELP_STRING([--with-openssl=DIR],
[root of the OpenSSL directory])],
[
case "$withval" in
"" | y | ye | yes | n | no)
AC_MSG_ERROR([Invalid --with-openssl value])
;;
*) ssldirs="$withval"
;;
esac
], [
# if pkg-config is installed and openssl has installed a .pc file,
# then use that information and don't search ssldirs
AC_CHECK_TOOL([PKG_CONFIG], [pkg-config])
if test x"$PKG_CONFIG" != x""; then
OPENSSL_LDFLAGS=`$PKG_CONFIG openssl --libs-only-L 2>/dev/null`
if test $? = 0; then
OPENSSL_LIBS=`$PKG_CONFIG openssl --libs-only-l 2>/dev/null`
OPENSSL_INCLUDES=`$PKG_CONFIG openssl --cflags-only-I 2>/dev/null`
found=true
fi
fi
# no such luck; use some default ssldirs