diff --git a/libs/sofia-sip/configure.ac b/libs/sofia-sip/configure.ac index 45e2a88b7d..fef489e9a6 100644 --- a/libs/sofia-sip/configure.ac +++ b/libs/sofia-sip/configure.ac @@ -95,80 +95,6 @@ if test "x${ax_cv_c_compiler_vendor}" = "xsun" ; then fi fi -### checks for libraries -### -------------------- - -SAC_SOFIA_SU -SAC_OPENSSL -SAC_TPORT - -dnl Check is used for testing -PKG_CHECK_MODULES(CHECK, check >= 0.9.4, have_check="yes", have_check="no") -AM_CONDITIONAL(HAVE_CHECK, test x"$have_check" = "xyes") -if test x"$have_check" = "xyes"; then - AC_DEFINE([HAVE_CHECK], 1, [Define to 1 if check library is available]) -fi -AC_CHECK_HEADERS([fnmatch.h]) - -dnl dl is currently used only in testing -AC_CHECK_LIB([dl], [dlopen], [ - dnl Note: -ldl is not added to LIBS - AC_DEFINE([HAVE_LIBDL], 1, [Define to 1 if dl library is available]) -]) - -### internal modules -### ---------------- -AC_DEFINE([HAVE_SOFIA_SIP], 1, [Define to 1 always]) -AC_DEFINE([HAVE_SOFIA_SRESOLV], 1, [Define to 1 if we use DNS library]) -AC_DEFINE([HAVE_SOFIA_SMIME], 0, [Define to 1 if we use S/MIME library]) - -AC_ARG_ENABLE(stun, -[ --disable-stun disable stun module (enabled)], - , enable_stun=yes) - -if test x$enable_stun = xno ; then - AC_MSG_WARN([** STUN support disabled **]) -elif test x${HAVE_OPENSSL} != x1 ; then - dnl compile STUN only if OPENSSL is available - AC_MSG_WARN([** TLS support for STUN disabled as OpenSSL headers and/or libraries were not found **]) - AC_DEFINE([HAVE_SOFIA_STUN], 1, [Define to 1 if we use STUN library]) -else - AC_DEFINE([HAVE_SOFIA_STUN], 1, [Define to 1 if we use STUN library]) -fi -AM_CONDITIONAL([HAVE_STUN], [test "x$enable_stun" = xyes]) - -AC_ARG_ENABLE(nth, -[ --disable-nth disable HTTP-related modules nth and http (enabled)], - , enable_nth=yes) -AM_CONDITIONAL([HAVE_NTH], [test "x$enable_nth" = xyes]) -if test x$enable_nth = xyes ; then - AC_DEFINE([HAVE_SOFIA_NTH], 1, [Define to 1 if we use NTH library]) - AC_DEFINE([HAVE_SOFIA_HTTP], 1, [Define to 1 if we use HTTP parser library]) -fi - -dnl Disable NTLM support by default -AC_ARG_ENABLE(ntlm, -[ --enable-ntlm enable NTLM support [[disabled]]], - , enable_ntlm=no) - -if test x$enable_ntlm = xyes ; then - AC_DEFINE([HAVE_SOFIA_NTLM], 1, [Define to 1 if we use NTLM library]) -fi -AM_CONDITIONAL([HAVE_NTLM], [test "x$enable_ntlm" = xyes]) - - -AC_DEFINE([HAVE_SRTP], 0, [Define to 1 if we use SRTP]) -AC_DEFINE([HAVE_UPNP], 0, [Define to 1 if we use UPnP]) - - -AC_ARG_ENABLE(memleak_log, -[ --enable-memleak-log enable logging of possible memory leaks [[disabled]]], - , enable_memleak_log=no) - -if test x$enable_memleak_log = xyes ; then - AC_DEFINE([HAVE_MEMLEAK_LOG], 1, [Define to 1 for memory-leak-related logging]) -fi - ### checks for header files ### ----------------------- AC_HEADER_STDC @@ -296,6 +222,80 @@ AC_SYS_SA_LEN AC_DEV_URANDOM +### checks for libraries +### -------------------- + +SAC_SOFIA_SU +SAC_OPENSSL +SAC_TPORT + +dnl Check is used for testing +PKG_CHECK_MODULES(CHECK, check >= 0.9.4, have_check="yes", have_check="no") +AM_CONDITIONAL(HAVE_CHECK, test x"$have_check" = "xyes") +if test x"$have_check" = "xyes"; then + AC_DEFINE([HAVE_CHECK], 1, [Define to 1 if check library is available]) +fi +AC_CHECK_HEADERS([fnmatch.h]) + +dnl dl is currently used only in testing +AC_CHECK_LIB([dl], [dlopen], [ + dnl Note: -ldl is not added to LIBS + AC_DEFINE([HAVE_LIBDL], 1, [Define to 1 if dl library is available]) +]) + +### internal modules +### ---------------- +AC_DEFINE([HAVE_SOFIA_SIP], 1, [Define to 1 always]) +AC_DEFINE([HAVE_SOFIA_SRESOLV], 1, [Define to 1 if we use DNS library]) +AC_DEFINE([HAVE_SOFIA_SMIME], 0, [Define to 1 if we use S/MIME library]) + +AC_ARG_ENABLE(stun, +[ --disable-stun disable stun module (enabled)], + , enable_stun=yes) + +if test x$enable_stun = xno ; then + AC_MSG_WARN([** STUN support disabled **]) +elif test x${HAVE_OPENSSL} != x1 ; then + dnl compile STUN only if OPENSSL is available + AC_MSG_WARN([** TLS support for STUN disabled as OpenSSL headers and/or libraries were not found **]) + AC_DEFINE([HAVE_SOFIA_STUN], 1, [Define to 1 if we use STUN library]) +else + AC_DEFINE([HAVE_SOFIA_STUN], 1, [Define to 1 if we use STUN library]) +fi +AM_CONDITIONAL([HAVE_STUN], [test "x$enable_stun" = xyes]) + +AC_ARG_ENABLE(nth, +[ --disable-nth disable HTTP-related modules nth and http (enabled)], + , enable_nth=yes) +AM_CONDITIONAL([HAVE_NTH], [test "x$enable_nth" = xyes]) +if test x$enable_nth = xyes ; then + AC_DEFINE([HAVE_SOFIA_NTH], 1, [Define to 1 if we use NTH library]) + AC_DEFINE([HAVE_SOFIA_HTTP], 1, [Define to 1 if we use HTTP parser library]) +fi + +dnl Disable NTLM support by default +AC_ARG_ENABLE(ntlm, +[ --enable-ntlm enable NTLM support [[disabled]]], + , enable_ntlm=no) + +if test x$enable_ntlm = xyes ; then + AC_DEFINE([HAVE_SOFIA_NTLM], 1, [Define to 1 if we use NTLM library]) +fi +AM_CONDITIONAL([HAVE_NTLM], [test "x$enable_ntlm" = xyes]) + + +AC_DEFINE([HAVE_SRTP], 0, [Define to 1 if we use SRTP]) +AC_DEFINE([HAVE_UPNP], 0, [Define to 1 if we use UPnP]) + + +AC_ARG_ENABLE(memleak_log, +[ --enable-memleak-log enable logging of possible memory leaks [[disabled]]], + , enable_memleak_log=no) + +if test x$enable_memleak_log = xyes ; then + AC_DEFINE([HAVE_MEMLEAK_LOG], 1, [Define to 1 for memory-leak-related logging]) +fi + ### output ### ------