From d6d16e47ef8fdca9ea71ae0e1c5eecaa36e49a87 Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Wed, 12 Mar 2003 00:10:23 +0000 Subject: [PATCH] * acinclude.m4 (MC_ASM_LABELS): New macro to work around a bug gettext. Define _INTL_REDIRECT_MACROS if needed. * configure.in: Use MC_ASM_LABELS. --- ChangeLog | 6 ++++++ acinclude.m4 | 28 ++++++++++++++++++++++++++++ configure.in | 1 + 3 files changed, 35 insertions(+) diff --git a/ChangeLog b/ChangeLog index 2ca3ec5bd..0779f5d9e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2003-03-11 Pavel Roskin + + * acinclude.m4 (MC_ASM_LABELS): New macro to work around a bug + gettext. Define _INTL_REDIRECT_MACROS if needed. + * configure.in: Use MC_ASM_LABELS. + 2003-03-07 Pavel Roskin * configure.in: Add --with-glib-static option. diff --git a/acinclude.m4 b/acinclude.m4 index 886206156..0df28efd5 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -891,3 +891,31 @@ if test "$mc_cv_g_module_supported" = yes; then [Define if gmodule functionality is supported]) fi ]) + + +dnl +dnl Check if it's possible to use asm labels to rename functions. +dnl This macro is necessary because gettext wrongly assumes that gcc +dnl can do it regardless of the OS. +dnl +AC_DEFUN([MC_ASM_LABELS], [ + AC_CACHE_CHECK([whether functions can be renamed by asm labels], + mc_cv_asm_labels, + [mc_cv_asm_labels=no + if test -n "$GCC"; then + AC_TRY_LINK(, [ +static int function1 (void) __asm__ ("function2"); +static int function1 (void) +{ + return 0; +} +return function2(); +], [mc_cv_asm_labels=yes]) + fi + ]) + +if test "$mc_cv_asm_labels" != yes; then + AC_DEFINE(_INTL_REDIRECT_MACROS, 1, + [Define if functions cannot be renamed by asm labels]) +fi +]) diff --git a/configure.in b/configure.in index 73593f3f6..f2c11b4d3 100644 --- a/configure.in +++ b/configure.in @@ -102,6 +102,7 @@ AC_FUNC_MMAP dnl dnl Internationalization dnl +MC_ASM_LABELS AM_GNU_GETTEXT AM_GNU_GETTEXT_VERSION(0.11.5)