made TLS transport and debug messages configurable

git-svn-id: http://svn.berlios.de/svnroot/repos/sipsak/trunk@431 75b5f7c7-cfd4-0310-b54c-e118b2c5249a
(cherry picked from commit 16c95652739ca387a3f1453a611caddc70ffbd1c)
changes/49/4849/1
nils-ohlmeier 18 years ago committed by Victor Seva
parent dfc065c74f
commit 80d24b3707

@ -48,6 +48,32 @@ AC_DEFUN([SIPSAK_OLD_FQDN],
])
])
AC_DEFUN([SIPSAK_TLS],
[
AC_MSG_CHECKING([disable TLS])
AC_ARG_ENABLE([tls],
AC_HELP_STRING([--disable-tls], [compile without TLS transport]),
[
AC_MSG_RESULT([yes])
AC_DEFINE([SIPSAK_NO_TLS], [1], [Skip TLS transport])
],
[ AC_MSG_RESULT([not requested])
])
])
AC_DEFUN([SIPSAK_DBG_PRINT],
[
AC_MSG_CHECKING([enable debug messages])
AC_ARG_ENABLE([debug],
AC_HELP_STRING([--enable-debug], [compile extra debug messages]),
[
AC_MSG_RESULT([yes])
AC_DEFINE([SIPSAK_PRINT_DBG], [1], [Enable debug messages])
],
[ AC_MSG_RESULT([not requested])
])
])
dnl AM_PATH_CHECK([MINIMUM-VERSION])
dnl Test for check, and define CHECK_CFLAGS, CHECK_LIBS and HAVE_CHECK_H
dnl

@ -232,6 +232,12 @@
/* Define to the type of arg 5 for `select'. */
#undef SELECT_TYPE_ARG5
/* Skip TLS transport */
#undef SIPSAK_NO_TLS
/* Enable debug messages */
#undef SIPSAK_PRINT_DBG
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS

44
configure vendored

@ -1533,6 +1533,8 @@ Optional Features:
--enable-distcc compile in parallel with distcc
--enable-timeout=SEC SIP timer T1 in SEC milliseconds (default 500)
--disbale-ips compile with oldstyle --numeric behavior
--disable-tls compile without TLS transport
--enable-debug compile extra debug messages
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@ -7932,6 +7934,48 @@ cat >>confdefs.h <<\_ACEOF
_ACEOF
else
{ echo "$as_me:$LINENO: result: not requested" >&5
echo "${ECHO_T}not requested" >&6; }
fi
{ echo "$as_me:$LINENO: checking disable TLS" >&5
echo $ECHO_N "checking disable TLS... $ECHO_C" >&6; }
# Check whether --enable-tls was given.
if test "${enable_tls+set}" = set; then
enableval=$enable_tls;
{ echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
cat >>confdefs.h <<\_ACEOF
#define SIPSAK_NO_TLS 1
_ACEOF
else
{ echo "$as_me:$LINENO: result: not requested" >&5
echo "${ECHO_T}not requested" >&6; }
fi
{ echo "$as_me:$LINENO: checking enable debug messages" >&5
echo $ECHO_N "checking enable debug messages... $ECHO_C" >&6; }
# Check whether --enable-debug was given.
if test "${enable_debug+set}" = set; then
enableval=$enable_debug;
{ echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6; }
cat >>confdefs.h <<\_ACEOF
#define SIPSAK_PRINT_DBG 1
_ACEOF
else
{ echo "$as_me:$LINENO: result: not requested" >&5
echo "${ECHO_T}not requested" >&6; }

@ -90,6 +90,8 @@ fi
SIPSAK_TIMER
SIPSAK_OLD_FQDN
SIPSAK_TLS
SIPSAK_DBG_PRINT
AC_CONFIG_FILES([Makefile
tests/Makefile])

@ -74,6 +74,9 @@
#ifdef HAVE_GNUTLS
# define HAVE_EXTERNAL_MD5
# define USE_GNUTLS
# ifndef SIPSAK_NO_TLS
# define WITH_TLS_TRANSP 1
# endif
# include <gnutls/gnutls.h>
#else
# ifdef HAVE_OPENSSL_MD5_H
@ -92,6 +95,10 @@
# endif
#endif
#ifdef SIPSAK_PRINT_DBG
# define DEBUG 1
#endif
#ifndef REG_NOERROR
# define REG_NOERROR 0
#endif
@ -128,8 +135,6 @@
#define REQ_FLOOD 6
#define REQ_RAND 7
#undef WITH_TLS_TRANSP
#define SIP_TLS_TRANSPORT 1
#define SIP_TCP_TRANSPORT 2
#define SIP_UDP_TRANSPORT 3
@ -299,10 +304,6 @@
#endif
#define SIPSAK_HASHHEXLEN 2 * SIPSAK_HASHLEN
// FIXME: this has to replaced with a real evaluation
#define WITH_TLS_TRANSP 1
#define DEBUG 1
#ifdef WITH_TLS_TRANSP
char *cert_file, *ca_file;
# ifdef USE_GNUTLS

Loading…
Cancel
Save