Commit 2cda1e3f authored by Pekka Pessi's avatar Pekka Pessi

pessi-darcs-0

darcs-hash:20050907200052-65a35-f31775554518776b4e5f4d5729ef9f99eae648dc.gz
parents
This diff is collapsed.
2005-07-20 Pekka Pessi <Pekka.Pessi@nokia.com>
* Makefile.am: Added doxygen target.
AUTOMAKE_OPTIONS = foreign
SUBDIRS = libsofia-sip-ua utils
PACKAGE = @PACKAGE@
VERSION = @VERSION@
EXTRA_DIST = COPYING sofia-sip.spec sofia-sip.spec.in sofia-sip-ua.pc.in
ACLOCAL_AMFLAGS = -I m4
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = sofia-sip-ua.pc
doxygen:
@$(MAKE) $(AM_MAKEFLAGS) -C libsofia-sip-ua doxygen
===============================================================
README / Sofia-SIP - a RFC3261 compliant SIP User-Agent library
===============================================================
Introduction
------------
This package is a work-in-progress version of the Sofia-SIP
User-Agent library.
Quick start
-----------
Sofia-SIP uses the GNU autotools, so building procedure
is the usual:
sh> ./autogen.sh (if building from CVS)
sh> ./configure
sh> make
sh> make install
See the "options-client-example" module in Sofia-SIP CVS-tree
for an example of a small app that is utilizing Sofia-SIP,
and specifically the libsofia-sip-ua library component.
There are also multiple example clients under
the "sofia-sip/utils" directory:
- nua_cli, console mode test application for Sofia-SIP
- options, query SIP OPTIONS
- sip_date, SIP date printer/parser
References
----------
Project website:
http://www.sourceforge.net/projects/sofia-sip
Mailing list:
http://sourceforge.net/mail/?group_id=143636
CVS repository:
http://sourceforge.net/cvs/?group_id=143636
Licensing
---------
Sofia-SIP is licensed under terms of the GNU LGPL.
See the file "COPYING" for more infromation.
#!/bin/sh
set -x
aclocal -I m4 && \
autoheader && \
libtoolize --force && \
automake --add-missing --copy --include-deps --force --foreign && \
autoconf
dnl
dnl ref: http://www.gnu.org/software/autoconf/manual/autoconf.info.gz
dnl
AC_PREREQ(2.57)
dnl information on the package
dnl ---------------------------
AC_INIT([sofia-sip], [1.10.0])
AC_CONFIG_SRCDIR([libsofia-sip-ua/sip/sip.h])
# dnl calls AC_CANONICAL_ macros that are required by AM_INIT_AUTOMAKE
AX_PROG_RANLIB
AM_INIT_AUTOMAKE
AM_MAINTAINER_MODE
AM_CONFIG_HEADER(config.h)
SAC_ENABLE_NDEBUG
dnl checks for programs
dnl -------------------
AX_TOOL_CC
AC_PROG_INSTALL
AC_PROG_CPP
AC_CHECK_PROG(ETAGS, etags, etags, echo)
AC_CHECK_TOOL(AR, ar, ar)
AC_CHECK_TOOL(LD, ld, ld)
AC_PROG_LIBTOOL
dnl checks for libraries
dnl --------------------
AC_CHECK_LIB(pthread, pthread_create)
PKG_CHECK_MODULES(GLIB, glib-2.0)
AC_SUBST(GLIB_LIBS)
AC_SUBST(GLIB_CFLAGS)
AC_SUBST(GLIB_VERSION)
SAC_GNU_SOURCE
SAC_SOFIA_SU
SAC_OPENSSL
SAC_TPORT
SAC_SU
dnl internal modules
dnl ----------------
AC_DEFINE([HAVE_SOFIA_SIP], 1, [Define as 1 always])
AC_DEFINE([HAVE_SOFIA_STUN], 1, [Define as 1 if we use STUN library])
AC_DEFINE([HAVE_SOFIA_SRESOLV], 1, [Define as 1 if we use DNS library])
AC_DEFINE([HAVE_SOFIA_SMIME], 0, [Define as 1 if we use S/MIME library])
AC_DEFINE([HAVE_SRTP], 0, [Define as 1 if we use SRTP])
AC_DEFINE([HAVE_UPNP], 0, [Define as 1 if we use UPnP])
dnl checks for header files
dnl -----------------------
dnl XXX
dnl checks for types
dnl ----------------
dnl XXX
dnl checks for structures
dnl ---------------------
AC_HEADER_STDC
AC_CHECK_HEADERS(pthread.h)
AC_CHECK_HEADERS(stdint.h)
AC_CHECK_HEADERS(inttypes.h)
dnl checks for typedefs, structures, and compiler characteristics.
dnl --------------------------------------------------------------
AC_C_CONST
AC_C_INLINE
AC_C_INLINE_DEFINE
AC_C_BIGENDIAN
AC_C_VAR_FUNC
AC_C_MACRO_FUNCTION
AC_C_KEYWORD_STRUCT
AC_HEADER_TIME
AC_TYPE_SIZE_T
AC_STRUCT_SIN6
AC_SYS_SA_LEN
dnl checks for library functions
dnl ----------------------------
AC_SEARCH_LIBS(gethostbyname, xnet nsl)
AC_SEARCH_LIBS(getipnodebyname, xnet socket nsl)
AC_SEARCH_LIBS(getaddrinfo, xnet socket nsl)
AC_SEARCH_LIBS(socket, xnet socket)
AC_SEARCH_LIBS(inet_ntop, socket nsl)
AC_SEARCH_LIBS(inet_pton, socket nsl)
dnl checks for system services
dnl --------------------------
dnl XXX
dnl output
dnl ------
AC_CONFIG_FILES([
Makefile
sofia-sip.spec
libsofia-sip-ua/Makefile
libsofia-sip-ua/bnf/Makefile
libsofia-sip-ua/docs/Makefile
libsofia-sip-ua/docs/pictures/Makefile
libsofia-sip-ua/docs/Doxyfile.version
libsofia-sip-ua/docs/sofia-footer.html
libsofia-sip-ua/http/Makefile
libsofia-sip-ua/ipt/Makefile
libsofia-sip-ua/iptsec/Makefile
libsofia-sip-ua/msg/Makefile
libsofia-sip-ua/nea/Makefile
libsofia-sip-ua/nta/Makefile
libsofia-sip-ua/nth/Makefile
libsofia-sip-ua/nua/Makefile
libsofia-sip-ua/sdp/Makefile
libsofia-sip-ua/sdp/tests/Makefile
libsofia-sip-ua/soa/Makefile
libsofia-sip-ua/sip/Makefile
libsofia-sip-ua/sip/images/Makefile
libsofia-sip-ua/sip/tests/Makefile
libsofia-sip-ua/sresolv/Makefile
libsofia-sip-ua/stun/Makefile
libsofia-sip-ua/su/Makefile
libsofia-sip-ua/tport/Makefile
libsofia-sip-ua/url/Makefile
utils/Makefile
sofia-sip-ua.pc
])
AC_OUTPUT
=============================
Sofia-SIP build system README
=============================
:Author: Kai Vehmanen <kai -dot vehmanen -at- nokia -dot- com>
:Version: 20050722-4
:Formatting: reStructuredText, http://docutils.sourceforge.net/rst.html
------------
Introduction
------------
The Sofia-SIP build system practices are documented in this
file. The instructions are aimed at developers.
-----------
Quick start
-----------
To build Sofia-IP::
sh> ``./autogen.sh`` (if building from a fresh CVS checkout)
sh> ``./configure``
sh> ``make``
--------------
Autotool notes
--------------
Macros
------
Sofia-SIP specific macros are prefixed with "``SAC\_``" and are
defined in files under the toplevel "m4/" directory.
Makefile target notes
---------------------
- all optionally compiled source files should be listed
separately in ``DIST_SOURCES`` variable (otherwise ``make dist``
will fail)
Maintainer mode
---------------
Sofia-SIP tree is by default configured with automake
maintainer mode disable. In other words, Makefiles do not
contain rules for recreating or updating configure, Makefiles
or other autotool-generated files. To update these files,
you need to run top-level autogen.sh script.
Those developers who need to often modify configure.ac, Makefile.am
and macro files, can enable maintainer mode with configure
option '--enable-maintainer-mode'.
----------------
Code-tree layout
----------------
Most of the code resides in the libsofia-sip-ua directory.
The main library, libsofia-sip-ua.so, is created by
collecting object files (for example bnf/bnf_objs.o) from
individual modules.
There are some portability issues with the way the
shared library is currently built, and we are looking
for ways to improve the situation.
---------------
Making releases
---------------
Checklist
---------
- check contents of configure.ac (especially the version number)
- ``make distchek``
- upload the resulting tar.gz file to Source forge and make an
announcement on the sofia-sip-devel@lists.sourceforge.net mailing list
-----------------------
Developer documentation
-----------------------
Generating reference documentation from source code
---------------------------------------------------
The libsofia-sip-ua library has a top-level make target
"doxygen" for generating the HTML reference documentation.
The pages will be created to libsofia-sip-ua/docs
subdirectory.
This special target is primarily meant for use by
the Sofia-SIP website admins, but can be used by anyone
with the proper set of tools:
- Doxygen, http://www.stack.nl/~dimitri/doxygen/
- Dot graph tool, http://www.research.att.com/sw/tools/graphviz/
2005-08-25 Kai Vehmanen <kai.vehmanen@nokia.com>
* Makefile.am: soa depends on ipt and sip, so has to
be after them in SUBDIRS.
2005-08-17 Pekka Pessi <Pekka.Pessi@nokia.com>
* Fixed BEGIN()/END() pairs in test programs.
2005-08-04 Pekka Pessi <Pekka.Pessi@nokia.com>
* Added soa module.
2005-07-18 Kai Vehmanen <kai.vehmanen@nokia.com>
* libsofia-sip-ua created.
# ref: http://www.gnu.org/software/automake/manual/automake.html
AUTOMAKE_OPTIONS = foreign
# note: order does matter in the subdir list
SUBDIRS = docs su bnf sresolv sdp url msg sip stun ipt soa tport http nea nta iptsec nth nua
EXTRA_DIST = sofia.am
lib_LTLIBRARIES = libsofia-sip-ua.la
libsofia_sip_ua_la_SOURCES =
libsofia_sip_ua_la_LIBADD = bnf/bnf_objs.o \
ipt/ipt_objs.o \
iptsec/iptsec_objs.o \
msg/msg_objs.o \
nea/nea_objs.o \
nta/nta_objs.o \
nth/nth_objs.o \
nua/nua_objs.o \
http/http_objs.o \
sdp/sdp_objs.o \
sip/sip_objs.o \
soa/soa_objs.o \
sresolv/sresolv_objs.o \
su/su_objs.o \
tport/tport_objs.o \
stun/stun_objs.o \
url/url_objs.o
# XXX: does not work with automake-1.9
RECURSIVE_TARGETS =
RECURSIVE_TARGETS += built-sources-recursive
built-sources: built-sources-recursive
built-sources-am:
empty-doxytags:
@echo Generating empty doxytags ; \
cd ${srcdir}; \
for d in $(DIST_SUBDIRS); do \
test -r $$d/Doxyfile || continue ; \
test -d docs/$$d || mkdir docs/$$d ; \
test -r $$d/docs/doxytags || \
echo '<?xml version="1.0"?>\
<tagfile />' >> docs/$$d/doxytags ; \
done
doxygen: built-sources empty-doxytags
@cd ${srcdir} ;\
for d in $(DIST_SUBDIRS); do \
test -r ${srcdir}/$$d/Doxyfile \
&& pushd $$d > /dev/null \
&& echo running doxygen in $$d \
&& doxygen \
&& popd > /dev/null ; \
done ; \
cd ${srcdir}/docs/html && ../hide_emails.sh
.PHONY: built-sources built-sources-am empty-doxytags doxygen
2005-07-18 Kai Vehmanen <kai.vehmanen@nokia.com>
* Initial import of the module to Sofia-SIP tree.
PROJECT_NAME = "bnf"
OUTPUT_DIRECTORY = ../docs/html/bnf
INPUT = bnf.docs .
@INCLUDE = ../docs/Doxyfile.conf
TAGFILES += ../docs/su/doxytags=../su
GENERATE_TAGFILE = ../docs/bnf/doxytags
PREDEFINED += "static="
MAX_INITIALIZER_LINES = 2
#
# Makefile.am for bnf module
#
# ----------------------------------------------------------------------
# Header paths
INCLUDES = -I$(srcdir)/../su
# ----------------------------------------------------------------------
# Build targets
noinst_LIBRARIES = libbnf.a
noinst_PROGRAMS = bnf_objs.o
check_PROGRAMS = torture_bnf
# ----------------------------------------------------------------------
# Rules for building the targets
include_HEADERS = bnf.h
libbnf_a_SOURCES = bnf.c
bnf_objs_o_SOURCES = $(libbnf_a_SOURCES)
bnf_objs_o_LDADD =
LDADD = libbnf.a
torture_bnf_SOURCES = torture_bnf.c
# ----------------------------------------------------------------------
# Install and distribution rules
EXTRA_DIST = Doxyfile bnf.docs
# ----------------------------------------------------------------------
# Tests
TESTS = torture_bnf
# ----------------------------------------------------------------------
# Sofia specific rules
include ../sofia.am
/*
* This file is part of the Sofia-SIP package
*
* Copyright (C) 2005 Nokia Corporation.
*
* Contact: Pekka Pessi <pekka.pessi@nokia.com>
*
* * 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; either version 2.1 of
* the License, or (at your option) any later version.
*
* 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 St, Fifth Floor, Boston, MA
* 02110-1301 USA
*
*/
/**@CFILE bnf.c
* @brief Character syntax table for HTTP-like protocols.
*
* @author Pekka Pessi <Pekka.Pessi@nokia.com>
*
* @date Created: Thu Jun 8 19:28:55 2000 ppessi
* $Date: 2005/07/20 20:34:54 $
*/
#include "config.h"
const char bnf_c_id[] =
"$Id: bnf.c,v 1.1.1.1 2005/07/20 20:34:54 kaiv Exp $";
#include <string.h>
/* include bodies of inline functions */
#if !HAVE_INLINE
#define BNF_INLINE
#endif
#include "bnf.h"