Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
liblinphone
Commits
e6bc7276
Commit
e6bc7276
authored
Apr 17, 2017
by
Simon Morlat
Browse files
allow compilation without bzrtp (with automake)
parent
5ff61484
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
17 deletions
+39
-17
CMakeLists.txt
CMakeLists.txt
+1
-0
configure.ac
configure.ac
+26
-9
coreapi/linphonecore.c
coreapi/linphonecore.c
+12
-8
No files found.
CMakeLists.txt
View file @
e6bc7276
...
...
@@ -178,6 +178,7 @@ if(ENABLE_LIME)
find_package
(
BZRTP
)
endif
()
set
(
HAVE_LIME 1
)
set
(
HAVE_BZRTP 1
)
endif
()
if
(
ENABLE_CXX_WRAPPER
)
find_package
(
PythonInterp REQUIRED
)
...
...
configure.ac
View file @
e6bc7276
...
...
@@ -630,7 +630,7 @@ AC_ARG_ENABLE(alsa,
[alsa=true]
)
dnl this options are just for passing to mediastreamer2 subproject
AC_ARG_ENABLE(zrtp,
[AS_HELP_STRING([--enable-zrtp], [Turn on zrtp support])],
[case "${enableval}" in
...
...
@@ -638,9 +638,22 @@ AC_ARG_ENABLE(zrtp,
no) zrtp=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-zrtp) ;;
esac],
[zrtp=
false
]
[zrtp=
auto
]
)
if test "$zrtp" != "false" ; then
PKG_CHECK_MODULES(LIBBZRTP, libbzrtp >= 1.0.0, found_zrtp=true, found_zrtp=false)
if test "$zrtp$found_zrtp" = "truefalse" ; then
AC_MSG_ERROR("Cound not find bZRTP library.")
fi
if test "$found_zrtp" = "true" ; then
zrtp=true
AC_DEFINE(HAVE_BZRTP, 1, [Defined if bzrtp is available])
else
zrtp=false
fi
fi
dnl this options are just for passing to mediastreamer2 subproject
AC_ARG_ENABLE(dtls,
[AS_HELP_STRING([--enable-dtls], [Turn on srtp-dtls support - requires polarssl > 1.4])],
...
...
@@ -701,18 +714,21 @@ AC_ARG_ENABLE(lime,
no) lime=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-lime) ;;
esac],
[lime=
false
]
[lime=
auto
]
)
if test "$lime" = "true" ; then
if test "$zrtp" = "false" ; then
AC_MSG_ERROR([LIME requires zrtp])
fi
fi
if test "$lime" != "false" ; then
if test "x$found_polarssl" != "xyes" ; then
if test "$lime" = "true" ; then
AC_MSG_ERROR("LIME requires POLARSSL in version >= 1.3")
fi
lime=false
else
if test "$found_zrtp" = "true" ; then
AC_DEFINE(HAVE_LIME, 1, [Defined when LIME support is compiled])
lime=true
else
lime = false
fi
fi
...
...
@@ -1091,6 +1107,7 @@ printf "* %-30s %s\n" "Console interface" $console_ui
printf "* %-30s %s\n" "Tools" $build_tools
printf "* %-30s %s\n" "Sqlite storage" $enable_sqlite_storage
printf "* %-30s %s\n" "VCard support" $enable_vcard
printf "* %-30s %s\n" "ZRTP" $zrtp
printf "* %-30s %s\n" "IM encryption" $lime
printf "* %-30s %s\n" "uPnP support" $build_upnp
printf "* %-30s %s\n" "LDAP support" $enable_ldap
...
...
coreapi/linphonecore.c
View file @
e6bc7276
...
...
@@ -28,7 +28,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#ifdef SQLITE_STORAGE_ENABLED
#include "sqlite3_bctbx_vfs.h"
#include "bzrtp/bzrtp.h"
# ifdef HAVE_BZRTP
# include "bzrtp/bzrtp.h"
# endif
#endif
#include <math.h>
...
...
@@ -106,7 +108,7 @@ static void set_media_network_reachable(LinphoneCore* lc,bool_t isReachable);
static
void
linphone_core_run_hooks
(
LinphoneCore
*
lc
);
static
void
linphone_core_uninit
(
LinphoneCore
*
lc
);
static
void
linphone_core_zrtp_cache_close
(
LinphoneCore
*
lc
);
static
void
linphone_core_zrtp_cache_db_init
(
LinphoneCore
*
lc
,
const
char
*
fileName
);
void
linphone_core_zrtp_cache_db_init
(
LinphoneCore
*
lc
,
const
char
*
fileName
);
#include "enum.h"
#include "contact_providers_priv.h"
...
...
@@ -6206,6 +6208,7 @@ void linphone_core_remove_iterate_hook(LinphoneCore *lc, LinphoneCoreIterateHook
}
#ifdef HAVE_BZRTP
void
linphone_core_set_zrtp_secrets_file
(
LinphoneCore
*
lc
,
const
char
*
file
){
/* shall we perform cache migration ? */
if
(
!
lp_config_get_int
(
lc
->
config
,
"sip"
,
"zrtp_cache_migration_done"
,
FALSE
))
{
...
...
@@ -6252,6 +6255,11 @@ void linphone_core_set_zrtp_secrets_file(LinphoneCore *lc, const char* file){
linphone_core_zrtp_cache_db_init
(
lc
,
file
);
}
}
#else
void
linphone_core_set_zrtp_secrets_file
(
LinphoneCore
*
lc
,
const
char
*
file
){
ms_error
(
"linphone_core_set_zrtp_secrets_file(): no zrtp support in this build."
);
}
#endif
void
*
linphone_core_get_zrtp_cache_db
(
LinphoneCore
*
lc
){
#ifdef SQLITE_STORAGE_ENABLED
...
...
@@ -6270,9 +6278,9 @@ static void linphone_core_zrtp_cache_close(LinphoneCore *lc) {
#endif
/* SQLITE_STORAGE_ENABLED */
}
#ifdef
SQLITE_STORAGE_ENABLED
#if
def
ined(
SQLITE_STORAGE_ENABLED
) && defined (HAVE_BZRTP)
static
void
linphone_core_zrtp_cache_db_init
(
LinphoneCore
*
lc
,
const
char
*
fileName
)
{
void
linphone_core_zrtp_cache_db_init
(
LinphoneCore
*
lc
,
const
char
*
fileName
)
{
int
ret
;
const
char
*
errmsg
;
sqlite3
*
db
;
...
...
@@ -6298,10 +6306,6 @@ static void linphone_core_zrtp_cache_db_init(LinphoneCore *lc, const char *fileN
lc
->
zrtp_cache_db
=
db
;
}
#else
/* SQLITE_STORAGE_ENABLED */
static
void
linphone_core_zrtp_cache_db_init
(
LinphoneCore
*
lc
,
const
char
*
fileName
)
{
ms_warning
(
"Tried to open %s as zrtp_cache_db_file, but SQLITE_STORAGE is not enabled"
,
lc
->
zrtp_cache_db_file
);
}
#endif
/* SQLITE_STORAGE_ENABLED */
void
linphone_core_set_user_certificates_path
(
LinphoneCore
*
lc
,
const
char
*
path
){
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment