Commit 02417322 authored by Rafaël Carré's avatar Rafaël Carré

* #6601 : fix configure.ac tests

use AC_DEFINE_UNQUOTED to perform shell expansion
Do not use USE_IAX in code, it's makefile only
Always define HAVE_IAX to 0 or 1 (1 if enabled)
parent 1091b3e8
......@@ -329,7 +329,7 @@ AS_IF([test "x$with_gsm" != xno],
]
)
AC_DEFINE([HAVE_GSM], test "x$with_gsm" = "xyes", [Define if you have libgsm])
AC_DEFINE_UNQUOTED([HAVE_GSM], `if test "x$with_gsm" = "xyes"; then echo 1; else echo 0; fi`, [Define if you have libgsm])
AM_CONDITIONAL(BUILD_GSM, test "x$with_gsm" = "xyes" )
dnl Check for libspeex
......@@ -385,7 +385,7 @@ AC_ARG_WITH([iax2],
[],
[with_iax2=yes])
AC_DEFINE([HAVE_IAX], test "x$with_iax2" = "xyes", [Define if you have libiax2])
AC_DEFINE_UNQUOTED([HAVE_IAX], `if test "x$with_iax2" = "xyes"; then echo 1; else echo 0;fi`, [Define if you have libiax2])
AM_CONDITIONAL(USE_IAX, test "x$with_iax2" = "xyes" )
dnl Check for network-manager
......
......@@ -31,7 +31,7 @@
#include "accountcreator.h"
#include "sip/sipaccount.h"
#ifdef USE_IAX
#if HAVE_IAX
#include "iax/iaxaccount.h"
#endif
......@@ -59,7 +59,7 @@ AccountCreator::createAccount (AccountType type, std::string accountID)
return new SIPAccount (IP2IP_PROFILE);
break;
}
#ifdef USE_IAX
#if HAVE_IAX
case IAX_ACCOUNT: {
_debug ("AccountCreator: create account %s", accountID.c_str());
......
......@@ -103,12 +103,6 @@ static const SOUND_FORMAT INT32 = 0x8;
#define SFL_PCM_CAPTURE 0x0023 /** To open capture device only */
#define SFL_PCM_RINGTONE 0x0024
#ifdef USE_IAX
#define IAX2_ENABLED true /** IAX2 support */
#else
#define IAX2_ENABLED false /** IAX2 support */
#endif
#define GSM_STRING_DESCRIPTION "gsm" /** GSM codec string description */
#define SPEEX_STRING_DESCRIPTION "speex" /** SPEEX codec string description */
#define ILBC_STRING_DESCRIPTION "ilbc" /** Ilbc codec string description */
......
......@@ -201,7 +201,7 @@ void
IAXAccount::loadConfig()
{
// If IAX is not supported, do not register this account
#ifndef USE_IAX
#if !HAVE_IAX
_enabled = false;
#endif
}
......@@ -33,6 +33,8 @@
* as that of the covered work.
*/
#include "config.h"
#include "managerimpl.h"
#include "account.h"
......@@ -2864,11 +2866,7 @@ std::vector<std::string> ManagerImpl::getCurrentAudioDevicesIndex ()
int ManagerImpl::isIax2Enabled (void)
{
#ifdef USE_IAX
return true;
#else
return false;
#endif
return HAVE_IAX;
}
int ManagerImpl::isRingtoneEnabled (const std::string& id)
......
[1827389202]
accountid=
confid=
id=Account:1239059899
name=Emmanuel Milou
number=136
recordfile=
timeadded=
timestamp_start=747638685
timestamp_stop=747638765
type=2
[264770330]
[1688219219]
accountid=empty
confid=
id=
......@@ -22,7 +10,7 @@ timestamp_start=144562000
timestamp_stop=144562458
type=0
[37710036]
[1828895003]
accountid=
confid=
id=Account:43789459478
......@@ -34,3 +22,15 @@ timestamp_start=775354456
timestamp_stop=775354987
type=1
[2049190489]
accountid=
confid=
id=Account:1239059899
name=Emmanuel Milou
number=136
recordfile=
timeadded=
timestamp_start=747638685
timestamp_stop=747638765
type=2
......@@ -55,7 +55,7 @@ preferences:
historyMaxCalls: 20
md5Hash: false
notifyMails: false
order: Account:1312398082/Account:1312398066/Account:1309188361/Account:1309187807/Account:1309187723/Account:1309187670/Account:1309187609/Account:1309187081/Account:1308839853/Account:1308839662/Account:1308839447/Account:1308839359/Account:1308839335/Account:1308838875/Account:1308838713/Account:1308838236/Account:1307975440/Account:1307975347/Account:1307974800/Account:1307974672/Account:1307974527/Account:1303487773/Account:1303247743/Account:1302895321/Account:1302892836/Account:1302891834/Account:1302882519/Account:1302207377/Account:1302207262/Account:1302204136/Account:1302204108/Account:1294850905/Account:1294850775/Account:1294850618/Account:1294849651/Account:1294849602/Account:1294849310/Account:1288964768/Account:1288964603/Account:1288964434/Account:1288964141/Account:1288964134/
order: Account:1312584532/Account:1312398082/Account:1312398066/Account:1309188361/Account:1309187807/Account:1309187723/Account:1309187670/Account:1309187609/Account:1309187081/Account:1308839853/Account:1308839662/Account:1308839447/Account:1308839359/Account:1308839335/Account:1308838875/Account:1308838713/Account:1308838236/Account:1307975440/Account:1307975347/Account:1307974800/Account:1307974672/Account:1307974527/Account:1303487773/Account:1303247743/Account:1302895321/Account:1302892836/Account:1302891834/Account:1302882519/Account:1302207377/Account:1302207262/Account:1302204136/Account:1302204108/Account:1294850905/Account:1294850775/Account:1294850618/Account:1294849651/Account:1294849602/Account:1294849310/Account:1288964768/Account:1288964603/Account:1288964434/Account:1288964141/Account:1288964134/
portNum: 5060
registrationExpire: 180
searchBarDisplay: true
......
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