diff --git a/CMakeLists.txt b/CMakeLists.txt index 1caf800d9..30642dcd8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -170,8 +170,7 @@ if(MSVC) include_directories(${MSVC_INCLUDE_DIR}) endif() if(INTL_FOUND) - set(HAVE_GETTEXT 1) - add_definitions("-DENABLE_NLS") + set(HAVE_INTL 1) include_directories(${INTL_INCLUDE_DIRECTORIES}) endif() diff --git a/build/android/config.h b/build/android/config.h index d57ed6264..d1532d47a 100644 --- a/build/android/config.h +++ b/build/android/config.h @@ -10,9 +10,6 @@ /* Define if wizard enabled */ /* #undef BUILD_WIZARD */ -/* Tells whether localisation is possible */ -/* #undef ENABLE_NLS */ - /* Defined when using gsm at nonstandard rates */ /* #undef ENABLE_NONSTANDARD_GSM */ @@ -60,7 +57,7 @@ /* #undef HAVE_GETIFADDRS */ /* Tells wheter localisation is possible */ -/* #undef HAVE_GETTEXT */ +/* #undef HAVE_INTL */ /* Define to 1 if you have the `get_current_dir_name' function. */ #define HAVE_GET_CURRENT_DIR_NAME 1 @@ -153,7 +150,7 @@ /* #undef LINPHONE_CONFIG_DIR */ /* path of liblinphone plugins, not mediastreamer2 plugins */ -/* #undef LINPHONE_PLUGINS_DIR */ +/* #undef LINPHONE_PLUGINS_DIR */ /* Linphone's version number */ /* #undef LINPHONE_VERSION */ @@ -205,7 +202,7 @@ /* #undef VERSION */ /* defined if video support is available */ -/* #undef VIDEO_ENABLED */ +/* #undef VIDEO_ENABLED */ /* Tell whether RSVP support should be compiled. */ /* #undef VINCENT_MAURY_RSVP */ diff --git a/config.h.cmake b/config.h.cmake index 0620f8e29..6c5a2da15 100644 --- a/config.h.cmake +++ b/config.h.cmake @@ -42,4 +42,4 @@ #cmakedefine HAVE_ZLIB 1 #cmakedefine HAVE_CU_GET_SUITE 1 #cmakedefine HAVE_CU_CURSES 1 -#cmakedefine HAVE_GETTEXT 1 +#cmakedefine HAVE_INTL 1 diff --git a/configure.ac b/configure.ac index 1e5d672b9..a401b4bb1 100644 --- a/configure.ac +++ b/configure.ac @@ -147,8 +147,7 @@ if test "$mingw_found" != "yes" ; then LIBS="$LIBS $LIBINTL" else if test "$USE_NLS" = "yes" ; then - AC_DEFINE(ENABLE_NLS,1,[Tells whether localisation is possible]) - AC_DEFINE(HAVE_GETTEXT,1,[Tells wheter localisation is possible]) + AC_DEFINE(HAVE_INTL,1,[Tells wheter localisation is possible]) LIBS="$LIBS -lintl" fi fi diff --git a/console/linphonec.c b/console/linphonec.c index fb3c9d1ba..718a3fd73 100644 --- a/console/linphonec.c +++ b/console/linphonec.c @@ -65,7 +65,7 @@ #endif /*_WIN32_WCE*/ -#ifdef HAVE_GETTEXT +#ifdef HAVE_INTL #include #ifndef _ #define _(String) gettext(String) @@ -714,7 +714,7 @@ linphonec_init(int argc, char **argv) default: break; } -#ifdef ENABLE_NLS +#ifdef HAVE_INTL if (NULL == bindtextdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR)) perror ("bindtextdomain failed"); #ifndef __ARM__ diff --git a/coreapi/misc.c b/coreapi/misc.c index 9f56d27b1..2ce6bd73b 100644 --- a/coreapi/misc.c +++ b/coreapi/misc.c @@ -96,7 +96,7 @@ void linphone_core_set_payload_type_number(LinphoneCore *lc, PayloadType *pt, in const char *linphone_core_get_payload_type_description(LinphoneCore *lc, PayloadType *pt){ if (ms_filter_codec_supported(pt->mime_type)){ MSFilterDesc *desc=ms_filter_get_encoder(pt->mime_type); -#ifdef ENABLE_NLS +#ifdef HAVE_INTL return dgettext("mediastreamer",desc->text); #else return desc->text; @@ -252,7 +252,7 @@ bool_t linphone_core_check_payload_type_usability(LinphoneCore *lc, const Payloa linphone_core_get_upload_bandwidth(lc)); bool_t ret=linphone_core_is_payload_type_usable_for_bandwidth(lc, pt, maxbw); if ((pt->type==PAYLOAD_AUDIO_CONTINUOUS || pt->type==PAYLOAD_AUDIO_PACKETIZED) - && lc->sound_conf.capt_sndcard + && lc->sound_conf.capt_sndcard && !(ms_snd_card_get_capabilities(lc->sound_conf.capt_sndcard) & MS_SND_CARD_CAP_BUILTIN_ECHO_CANCELLER) && linphone_core_echo_cancellation_enabled(lc) && (pt->clock_rate!=16000 && pt->clock_rate!=8000) @@ -715,7 +715,7 @@ void linphone_core_update_ice_state_in_call_stats(LinphoneCall *call) call->stats[LINPHONE_CALL_STATS_VIDEO].ice_state = LinphoneIceStateFailed; } } - ms_message("Call [%p] New ICE state: audio: [%s] video: [%s]", call, + ms_message("Call [%p] New ICE state: audio: [%s] video: [%s]", call, linphone_ice_state_to_string(call->stats[LINPHONE_CALL_STATS_AUDIO].ice_state), linphone_ice_state_to_string(call->stats[LINPHONE_CALL_STATS_VIDEO].ice_state)); } @@ -723,7 +723,7 @@ void linphone_call_stop_ice_for_inactive_streams(LinphoneCall *call) { int i; IceSession *session = call->ice_session; SalMediaDescription *desc = call->localdesc; - + if (session == NULL) return; if (ice_session_state(session) == IS_Completed) return; @@ -1628,7 +1628,7 @@ MsZrtpCryptoTypesCount linphone_core_get_zrtp_key_agreement_suites(LinphoneCore if (zrtpConfig == NULL) { return 0; } - + origPtr = strdup(zrtpConfig); zrtpConfig = origPtr; while ((entry = seperate_string_list(&zrtpConfig))) { @@ -1650,7 +1650,7 @@ MsZrtpCryptoTypesCount linphone_core_get_zrtp_cipher_suites(LinphoneCore *lc, MS if (zrtpConfig == NULL) { return 0; } - + origPtr = strdup(zrtpConfig); zrtpConfig = origPtr; while ((entry = seperate_string_list(&zrtpConfig))) { diff --git a/coreapi/private.h b/coreapi/private.h index 53c03c1bb..3a68e0fd4 100644 --- a/coreapi/private.h +++ b/coreapi/private.h @@ -65,7 +65,7 @@ extern "C" { #define PACKAGE_DATA_DIR "." #endif -#ifdef HAVE_GETTEXT +#ifdef HAVE_INTL #include #ifndef _ #define _(String) dgettext(GETTEXT_PACKAGE,String) @@ -81,7 +81,7 @@ extern "C" { #ifdef ANDROID #include #endif - + #ifndef _WIN32 #define WINAPI_FAMILY_PARTITION(x) 1 #endif diff --git a/gtk/linphone.h b/gtk/linphone.h index b4bbf02c2..44b17a8ed 100644 --- a/gtk/linphone.h +++ b/gtk/linphone.h @@ -30,7 +30,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "ldap/ldapprovider.h" -#ifdef ENABLE_NLS +#ifdef HAVE_INTL # include # undef _ # define _(String) dgettext (GETTEXT_PACKAGE,String) diff --git a/gtk/main.c b/gtk/main.c index fcdc42264..6d65c9c62 100644 --- a/gtk/main.c +++ b/gtk/main.c @@ -51,7 +51,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include #endif -#ifdef ENABLE_NLS +#ifdef HAVE_INTL #include #endif @@ -535,9 +535,9 @@ void linphone_gtk_show_about(void){ static const char *defcfg="defcfg"; about=linphone_gtk_create_window("about", the_ui); - + gtk_about_dialog_set_url_hook(about_url_clicked,NULL,NULL); - + memset(&filestat,0,sizeof(filestat)); if (stat(license_file,&filestat)!=0){ license_file="COPYING"; @@ -2102,7 +2102,7 @@ int main(int argc, char *argv[]){ g_setenv("LANGUAGE",lang,1); } -#ifdef ENABLE_NLS +#ifdef HAVE_INTL setlocale(LC_ALL, ""); bindtextdomain(GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR); bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); @@ -2152,7 +2152,7 @@ int main(int argc, char *argv[]){ } } -#if defined(__APPLE__) && defined(ENABLE_NLS) +#if defined(__APPLE__) && defined(HAVE_INTL) /*workaround for bundles. GTK is unable to find translations in the bundle (obscure bug again). So we help it:*/ { diff --git a/intl/libgettext.h b/intl/libgettext.h index c5be54a80..eb5912085 100644 --- a/intl/libgettext.h +++ b/intl/libgettext.h @@ -20,7 +20,7 @@ #define _LIBGETTEXT_H 1 /* NLS can be disabled through the configure --disable-nls option. */ -#if ENABLE_NLS +#if HAVE_INTL /* Get declarations of GNU message catalog functions. */ # include