From e1301ed2f2dcc8aa10fea69ed34c7c9f5108f3bc Mon Sep 17 00:00:00 2001 From: yanmorin Date: Mon, 1 May 2006 16:37:36 +0000 Subject: [PATCH] Remove libexosip2 Add --disable-sflphoneqt to compile without X --- CHANGES | 4 +++- config.h.in | 44 ++++--------------------------------------- configure.ac | 33 +++++++++++++++++++++++++------- libs/Makefile.am | 8 +++++++- m4/exosip.m4 | 46 +++++++++++++++++++++++++++++++++++++++++++++ m4/osip.m4 | 2 +- src/gui/Makefile.am | 9 ++++++++- 7 files changed, 95 insertions(+), 51 deletions(-) diff --git a/CHANGES b/CHANGES index 8a28d30fe..0ffb7a4d0 100644 --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,6 @@ -SFLphoned (0.7.0) / 2005-..-.. +SFLphoned (0.7.0) / 2006-..-.. + * add --disable-sflphoneqt (to be tested without) 2006-05-01 + * remove libexosip2 internally, it's in debian unstable 2005-01-01 * add iax support - in development * add account support * remove callid string/int diff --git a/config.h.in b/config.h.in index 0d152b84f..7d9c98a4b 100644 --- a/config.h.in +++ b/config.h.in @@ -1,8 +1,5 @@ /* config.h.in. Generated from configure.ac by autoheader. */ -/* Define to 1 if you have the header file. */ -#undef HAVE_ASSERT_H - /* Define to 1 if you have the header file. */ #undef HAVE_CARBON_CARBON_H @@ -15,21 +12,18 @@ /* Defines if your system has the crypt function */ #undef HAVE_CRYPT -/* Define to 1 if you have the header file. */ -#undef HAVE_CTYPE_H - /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H /* Define if dns-sd is available */ #undef HAVE_DNSSD -/* Define to 1 if you have the header file. */ -#undef HAVE_FCNTL_H - /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H +/* Define to 1 if you have the `eXosip2' library (-leXosip2). */ +#undef HAVE_LIBEXOSIP2 + /* Define if you have libjpeg */ #undef HAVE_LIBJPEG @@ -39,7 +33,7 @@ /* Define if you have libpng */ #undef HAVE_LIBPNG -/* Define to 1 if you have the `pthread' library (-lpthread). */ +/* Define if you have a working libpthread (will enable threaded code) */ #undef HAVE_LIBPTHREAD /* Define to 1 if you have a fully functional readline library. */ @@ -48,9 +42,6 @@ /* Define if you have libz */ #undef HAVE_LIBZ -/* Define to 1 if you have the header file. */ -#undef HAVE_MALLOC_H - /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H @@ -69,24 +60,12 @@ /* Define if you have the res_init prototype */ #undef HAVE_RES_INIT_PROTO -/* Define to 1 if you have the header file. */ -#undef HAVE_SEMAPHORE_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SIGNAL_H - /* Define to 1 if you have the `snprintf' function. */ #undef HAVE_SNPRINTF -/* Define to 1 if you have the header file. */ -#undef HAVE_STDARG_H - /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H -/* Define to 1 if you have the header file. */ -#undef HAVE_STDIO_H - /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H @@ -111,30 +90,15 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_BITYPES_H -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_SELECT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_SEM_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_SIGNAL_H - /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_TIME_H - /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H -/* Define to 1 if you have the header file. */ -#undef HAVE_VARARGS_H - /* Define to 1 if you have the `vsnprintf' function. */ #undef HAVE_VSNPRINTF diff --git a/configure.ac b/configure.ac index 7e2cb58f5..591941b35 100644 --- a/configure.ac +++ b/configure.ac @@ -42,9 +42,6 @@ if test "x$kde_use_debug_code" != "xno"; then CXXFLAGS="$CXXFLAGS -DDEBUG" fi -# Setting QT Path -AC_PATH_QT -AC_SUBST(LIBQT) AC_CANONICAL_SYSTEM @@ -58,8 +55,11 @@ PORTAUDIO_SETUP dnl check for osip2 LP_CHECK_OSIP2 +dnl check for exosip2 +LP_CHECK_EXOSIP2 + dnl setup flags for embedded exosip library -LP_SETUP_EXOSIP +dnl LP_SETUP_EXOSIP dnl check for if no is undefined dnl check also for samplerate for $host ~= *darwin* (mac) only @@ -129,6 +129,7 @@ if test "x$with_speex" = "xyes" ; then ) fi AM_CONDITIONAL(USE_SPEEX, test "x$with_speex" = "xyes" ) + AC_ARG_ENABLE(iax2, AC_HELP_STRING( [--enable-iax2], @@ -200,7 +201,7 @@ AC_ARG_ENABLE(maintener, [with_maintener=$enableval], [with_maintener=no] ) -AM_CONDITIONAL(MAINTENER_CODE, test x$maintener = xyes) +AM_CONDITIONAL(MAINTENER_CODE, test "x$with_maintener" = "xyes") if test "x$maintener" = "xyes"; then AC_MSG_RESULT(yes) CXXFLAGS="$CXXFLAGS -DENABLE_MAINTENER" @@ -208,8 +209,27 @@ else AC_MSG_RESULT(no) fi +AC_MSG_CHECKING([whether to enable sflphoneqt]) +AC_ARG_ENABLE(sflphoneqt, + AC_HELP_STRING( + [--disable-sflphoneqt], + [disable sflphone-qt compilation @<:@default=no@:>@] + ), + [with_sflphoneqt=$enableval], + [with_sflphoneqt=yes] +) + +AM_CONDITIONAL(WITH_QT, test "x$with_sflphoneqt" = "xyes") +AM_CONDITIONAL(include_x11, test x$with_sflphoneqt = "xyes") +if test "x$with_sflphoneqt" = "xno"; then + AC_MSG_RESULT(no) +else + AC_MSG_RESULT(yes) +dnl Setting QT Path + AC_PATH_QT dnl QT substitution? -AC_SUBST(LIB_QT) + AC_SUBST(LIB_QT) +fi dnl AC_CONFIG_FILES( AC_OUTPUT( @@ -219,7 +239,6 @@ Makefile \ m4/Makefile \ libs/taxidermy/Makefile \ libs/Makefile \ -libs/eXosip2/Makefile \ libs/portaudio/Makefile \ libs/stund/Makefile \ libs/utilspp/Makefile \ diff --git a/libs/Makefile.am b/libs/Makefile.am index ed6d4692c..08425993f 100644 --- a/libs/Makefile.am +++ b/libs/Makefile.am @@ -1 +1,7 @@ -SUBDIRS = eXosip2 portaudio stund taxidermy utilspp \ No newline at end of file +if WITH_QT +qtdir = taxidermy +else +qtdir = +endif + +SUBDIRS = portaudio stund $(qtdir) utilspp diff --git a/m4/exosip.m4 b/m4/exosip.m4 index c074386b0..76b7a4d46 100644 --- a/m4/exosip.m4 +++ b/m4/exosip.m4 @@ -1,3 +1,49 @@ +AC_DEFUN([LP_CHECK_EXOSIP2],[ +AC_REQUIRE([LP_CHECK_OSIP2]) + +AC_ARG_WITH( exosip, + [ --with-exosip Set prefix where libexosip can be found (ex:/usr or /usr/local)@<:@default=/usr@:>@ ], + [ exosip_prefix=${withval}],[ exosip_prefix=/usr ]) +AC_SUBST(exosip_prefix) + + +EXOSIP_CFLAGS="-I$exosip_prefix/include" +EXOSIP_LIBS="-L$exosip_prefix/lib" + +dnl support for linux-thread or posix thread (pthread.h) +AC_ARG_ENABLE(pthread, +[ --enable-pthread enable support for POSIX threads. (autodetect)], +enable_pthread=$enableval,enable_pthread="no") + +dnl compile with mt support +if test "x$enable_pthread" = "xyes"; then + EXOSIP_CFLAGS="$EXOSIP_CFLAGS -DHAVE_PTHREAD" + EXOSIP_LIBS="$EXOSIP_LIBS -lpthread" +else + ACX_PTHREAD() +fi + +dnl check exosip2 headers +CPPFLAGS_save=$CPPFLAGS +CPPFLAGS=$EXOSIP_CFLAGS +AC_CHECK_HEADER([eXosip2/eXosip.h], ,AC_MSG_ERROR([Could not find libexosip2 headers !])) +CPPFLAGS=$CPPFLAGS_save + +dnl check for exosip2 libs +LDFLAGS_save=$LDFLAGS +LDFLAGS=$OSIP_LIBS +LIBS_save=$LIBS +AC_CHECK_LIB(eXosip2,eXosip_init, , AC_MSG_ERROR([Could not find osip2 libraries !])) +LDFLAGS=$LDFLAGS_save +LIBS=$LIBS_save + +EXOSIP_LIBS="$EXOSIP_LIBS -leXosip2" + +AC_SUBST(EXOSIP_CFLAGS) +AC_SUBST(EXOSIP_LIBS) + +]) + AC_DEFUN([LP_SETUP_EXOSIP],[ AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([LP_CHECK_OSIP2]) diff --git a/m4/osip.m4 b/m4/osip.m4 index 6812524d8..f8f81d0f2 100644 --- a/m4/osip.m4 +++ b/m4/osip.m4 @@ -1,7 +1,7 @@ AC_DEFUN([LP_CHECK_OSIP2],[ AC_ARG_WITH( osip, - [ --with-osip Set prefix where osip can be found (ex:/usr or /usr/local)[default=/usr/local] ], + [ --with-osip Set prefix where osip can be found (ex:/usr or /usr/local)@<:@default=/usr@:>@ ], [ osip_prefix=${withval}],[ osip_prefix=/usr ]) AC_SUBST(osip_prefix) diff --git a/src/gui/Makefile.am b/src/gui/Makefile.am index 6f2331a6d..846fa28d4 100644 --- a/src/gui/Makefile.am +++ b/src/gui/Makefile.am @@ -1,12 +1,19 @@ serverdir = server serverlib = server/libsflphoneguiserver.la +if WITH_QT +qtdir = qt +else +qtdir = +endif + #libexec_PROGRAMS = qt/sflphone-qt #qt/sflphone-qt: # cd qt && make -SUBDIRS = $(serverdir) qt cli + +SUBDIRS = $(serverdir) $(qtdir) cli noinst_LTLIBRARIES = libguiframework.la