move library checks to the end to keep from incorrect -lz added to LIBS from pkg-config to openssl on 64 bit when only 32 bit zlib-devel is installed. This was causing other checks to fail.

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12779 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris 2009-03-25 16:44:16 +00:00
parent dd19c3c2ec
commit ca02dec1c7
1 changed files with 74 additions and 74 deletions

View File

@ -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
### ------