Commit e98cf56b authored by Kai Vehmanen's avatar Kai Vehmanen

Moved glib stuff from libsofia-sip-ua to libsofia-sip-ua-glib.

darcs-hash:20060309144945-7659e-f01f6fdb6b72fdad3b56778b47826f4d7caed60b.gz
parent e39c5634
......@@ -24,7 +24,7 @@
/**
* @file su_source.c
* @brief Wrapper for GSource.
* @brief Wrapper for glib GSource.
*
* @author Pekka Pessi <Pekka.Pessi@nokia.com>.
*
......@@ -32,7 +32,9 @@
*
*/
#if HAVE_CONFIG_H
#include "config.h"
#endif
/* Use Posix stuff */
#define _XOPEN_SOURCE (500)
......
......@@ -32,7 +32,6 @@ libsofia_sip_ua_la_LIBADD = bnf/libbnf.la \
tport/libtport.la \
url/liburl.la
if ENABLE_COVERAGE
COVERAGE_RECURSIVE = coverage-recursive
coverage: $(COVERAGE_RECURSIVE)
......
#
# Makefile.am @template@ for su module
#
# Copyright (C) 2006 Nokia Corporation
# Contact: Pekka Pessi <pekka.pessi@nokia.com>
# Licensed under LGPL. See file COPYING.
#
# ----------------------------------------------------------------------
# Headers
INCLUDES = $(GLIB_CFLAGS)
# ----------------------------------------------------------------------
# Build targets
......@@ -34,11 +36,6 @@ TESTS = su_torture torture_su_port \
# ----------------------------------------------------------------------
# Rules for building the targets
if HAVE_GLIB
GHEADERS = sofia-sip/su_source.h
GSOURCES = su_source.c
endif
BUILT_SOURCES = su_tag_ref.c
nobase_include_sofia_HEADERS = \
......@@ -55,12 +52,12 @@ nobase_include_sofia_HEADERS = \
sofia-sip/su_log.h \
sofia-sip/su_config.h sofia-sip/su_md5.h \
sofia-sip/su_uniqueid.h sofia-sip/su_bm.h \
sofia-sip/tstdef.h $(GHEADERS)
sofia-sip/tstdef.h
nobase_nodist_include_sofia_HEADERS = sofia-sip/su_configure.h
libsu_la_SOURCES = \
su.c su_errno.c su_addrinfo.c $(GSOURCES) \
su.c su_errno.c su_addrinfo.c \
su_alloc.c su_alloc_lock.c su_strdup.c su_sprintf.c \
su_strlst.c su_vector.c \
su_time.c su_time0.c \
......@@ -81,7 +78,7 @@ libsu_la_DEPENDENCIES = $(REPLACE_LIBADD)
COVERAGE_INPUT = $(libsu_la_SOURCES) $(include_sofia_HEADERS)
LDADD = libsu.la $(GLIB_LIBS)
LDADD = libsu.la
if NDEBUG
AM_CFLAGS = -DNDEBUG
......
......@@ -55,8 +55,6 @@
#undef SU_HAVE_POLL
/** Define as 1 if you have IPv6 structures, macros and constants */
#undef SU_HAVE_IN6
/** Define as 1 if you have >= glib-2.0 */
#undef SU_HAVE_GLIB
/** Define as 1 if you have sa_len field in struct sockaddr */
#undef SU_HAVE_SOCKADDR_SA_LEN
......
......@@ -54,10 +54,6 @@ typedef struct test_ep_s test_ep_t;
#include <sofia-sip/su_wait.h>
#include <sofia-sip/su_alloc.h>
#if SU_HAVE_GLIB
#include <sofia-sip/su_source.h>
#endif
typedef struct test_ep_s {
int i;
int s;
......
......@@ -52,10 +52,6 @@ struct pinger;
#include "sofia-sip/su_wait.h"
#include "sofia-sip/su_log.h"
#if SU_HAVE_GLIB
#include "sofia-sip/su_source.h"
#endif
struct pinger {
enum { PINGER = 1, PONGER = 2 } const sort;
char const * name;
......@@ -469,20 +465,8 @@ int main(int argc, char *argv[])
time_test();
#if SU_HAVE_GLIB
if (opt_glib) {
root = su_root_source_create(NULL);
if (!root) perror("su_root_glib_create"), exit(1);
if (!g_source_attach(su_root_gsource(root), NULL))
perror("g_source_attach"), exit(1);
} else
#endif
{
root = su_root_create(NULL);
if (!root) perror("su_root_create"), exit(1);
}
root = su_root_create(NULL);
if (!root) perror("su_root_create"), exit(1);
su_root_threading(root, 0 && !opt_singlethread);
......
......@@ -268,11 +268,12 @@ AC_ARG_WITH(glib-dir,
if test "$with_glib" = no || test "$with_glib_dir" = "no" ; then
: # No glib
: # No glib (also disable gobject)
elif test "$with_glib_dir" = "pkg-config" ; then
PKG_CHECK_MODULES(GLIB, glib-$with_glib, [HAVE_GLIB=yes])
PKG_CHECK_MODULES(GOBJECT, gobject-$with_glib, [HAVE_GOBJECT=yes])
else # GLib path is explicitly defined
......@@ -280,6 +281,9 @@ else # GLib path is explicitly defined
GLIB_VERSION="$with_glib"
GLIBXXX=glib-$with_glib
# XXX: add non-pkgconfig checks for gobject
HAVE_GOBJECT=no
if test "$gprefix" = "yes" ; then
for gprefix in /usr /usr/local /opt/$GLIBXXX
do
......@@ -310,14 +314,14 @@ else # GLib path is explicitly defined
fi # GLib path is explicitly defined
if test x$HAVE_GLIB != x; then
SAC_SU_DEFINE([SU_HAVE_GLIB], 1, [Define as 1 if you have >= glib-2.0])
fi
AM_CONDITIONAL([HAVE_GLIB], [test "x$HAVE_GLIB" != x])
AM_CONDITIONAL([HAVE_GOBJECT], [test "x$HAVE_GOBJECT" != x])
AC_SUBST(GLIB_LIBS)
AC_SUBST(GLIB_CFLAGS)
AC_SUBST(GLIB_VERSION)
AC_SUBST(GOBJECT_LIBS)
AC_SUBST(GOBJECT_CFLAGS)
AC_SUBST(GOBJECT_VERSION)
# ===========================================================================
# Checks for library functions.
......
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