Commit 537a440a authored by Simon Morlat's avatar Simon Morlat
Browse files

fix configure script. -I /usr/include must never be added to CFLAGS on an unix...

fix configure script. -I /usr/include must never be added to CFLAGS on an unix platform, it breaks cross compilation.
This is a system header path, it is necessary part of the compiler path anyway.
parent 034131e3
......@@ -1091,31 +1091,31 @@ AM_CONDITIONAL(LIBBZRTP,test x$zrtp != xfalse)
dnl Polarssl lib is requested for DTLS
AC_ARG_WITH( polarssl,
[ --with-polarssl Set prefix where polarssl can be found (ex:/usr, /usr/local)[default=PREFIX] ],
[ polarssl_prefix=${withval}],[ polarssl_prefix=${prefix} ])
[ polarssl_prefix=${withval}],[ polarssl_prefix=$prefix ])
found_polarssl=no
if test "$polarssl_prefix" != "NONE" ; then
if test "$polarssl_prefix" != "NONE" && test "$polarssl_prefix" != "/usr/include" ; then
POLARSSL_CFLAGS="-I${polarssl_prefix}/include"
POLARSSL_LIBS="-L${polarssl_prefix}/lib -lpolarssl"
CPPFLAGS_save=$CPPFLAGS
LIBS_save=$LIBS
CPPFLAGS="$CPPFLAGS $POLARSSL_CFLAGS"
LIBS="$LIBS $POLARSSL_LIBS"
AC_CHECK_HEADERS(polarssl/ssl.h, [
AC_CHECK_LIB(polarssl,sha1_hmac,
[found_polarssl=yes; AC_MSG_NOTICE([polarssl usable])],
[POLARSSL_CFLAGS=""
POLARSSL_LIBS=""
AC_MSG_WARN([polarssl not usable])])
],[POLARSSL_CFLAGS=""
POLARSSL_LIBS=""])
CPPFLAGS=$CPPFLAGS_save
LIBS=$LIBS_save
fi
CPPFLAGS_save=$CPPFLAGS
LIBS_save=$LIBS
CPPFLAGS="$CPPFLAGS $POLARSSL_CFLAGS"
LIBS="$LIBS $POLARSSL_LIBS"
AC_CHECK_HEADERS(polarssl/ssl.h, [
AC_CHECK_LIB(polarssl,sha1_hmac,
[found_polarssl=yes; AC_MSG_NOTICE([polarssl usable])],
[POLARSSL_CFLAGS=""
POLARSSL_LIBS=""
AC_MSG_WARN([polarssl not usable])])
],[POLARSSL_CFLAGS=""
POLARSSL_LIBS=""])
CPPFLAGS=$CPPFLAGS_save
LIBS=$LIBS_save
dnl check for DTLS-SRTP support, need polarssl version >= 1.4
AC_ARG_ENABLE(dtls,
......@@ -1145,10 +1145,9 @@ if test "$dtls" = "true" ; then
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#include <polarssl/ssl.h>
]],
[[ssl_set_dtls_srtp_protection_profiles(0,0,0)]])]
,[AC_DEFINE(HAVE_DTLS, 1, [Defined when dtls support is compiled])
AC_MSG_NOTICE([polarssl usable for DTLS-SRTP])]
,[AC_MSG_ERROR([polarssl not usable for DTLS-SRTP])])
[[ssl_set_dtls_srtp_protection_profiles(0,0,0)]])],
[AC_DEFINE(HAVE_DTLS, 1, [Defined when dtls support is compiled])
AC_MSG_NOTICE([polarssl usable for DTLS-SRTP])],[AC_MSG_ERROR([polarssl not usable for DTLS-SRTP])])
CPPFLAGS=$CPPFLAGS_save
LIBS=$LIBS_save
......
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