From 8210240eb94cfc438ef1041b2e537cbeb005f3a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Minisini?= Date: Fri, 4 Aug 2023 13:39:55 +0200 Subject: [PATCH] Support for e2k architecture. [CONFIGURATION] * NEW: Support for e2k architecture. [INTERPRETER] * NEW: Support for e2k architecture. --- acinclude.m4 | 55 +++++++++++++++++++++++++++++++++++++++++- main/configure.ac | 8 ++++++ main/share/gb_common.h | 8 ++++++ 3 files changed, 70 insertions(+), 1 deletion(-) diff --git a/acinclude.m4 b/acinclude.m4 index 7b5fe0500..bf300a9e3 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -285,7 +285,15 @@ AC_DEFUN([GB_INIT], dnl ---- Check for inotify library GB_INOTIFY() - + + dnl ---- Check for internationalization library + + GB_INTL() + + dnl ---- Check for charset conversion library + + GB_ICONV() + dnl ---- Check for monotonic clock GB_MONOTONIC() @@ -713,6 +721,11 @@ AC_DEFUN([GB_SYSTEM], AC_DEFINE(ARCH_PPC, 1, [Target architecture is PowerPC]) AC_DEFINE(ARCHITECTURE, "powerpc", [Architecture]) ;; + e2k-*-* ) + ARCH=E2K + AC_DEFINE(ARCH_E2K, 1, [Target architecture is e2k]) + AC_DEFINE(ARCHITECTURE, "e2k", [Architecture]) + ;; *) ARCH=UNKNOWN AC_DEFINE(ARCHITECTURE, "unknown", [Architecture]) @@ -802,6 +815,46 @@ AC_DEFUN([GB_INOTIFY], ]) +## --------------------------------------------------------------------------- +## GB_INTL +## Detects if we must link to an external internationalization library +## --------------------------------------------------------------------------- + +AC_DEFUN([GB_INTL], +[ + AC_MSG_CHECKING(for external internationalization library) + + case "${host}" in + *) + GB_INTL_LIB= + ;; + esac + + AC_SUBST(GB_INTL_LIB) + AC_MSG_RESULT($GB_INTL_LIB) +]) + + +## --------------------------------------------------------------------------- +## GB_ICONV +## Detects if we must link to an external charset conversion library +## --------------------------------------------------------------------------- + +AC_DEFUN([GB_ICONV], +[ + AC_MSG_CHECKING(for external charset conversion library) + + case "${host}" in + *) + GB_ICONV_LIB= + ;; + esac + + AC_SUBST(GB_ICONV_LIB) + AC_MSG_RESULT($GB_ICONV_LIB) +]) + + ## --------------------------------------------------------------------------- ## GB_MONOTONIC ## Detect monotonic clock diff --git a/main/configure.ac b/main/configure.ac index 7af1c0bc9..a97890bab 100644 --- a/main/configure.ac +++ b/main/configure.ac @@ -21,6 +21,8 @@ fi dnl ---- Check for internationalization library +if test "x$INTL_LIB" != x; then + GB_COMPONENT( intl, INTL, libintl, [], [GB_FIND(libintl.h, /opt/local /usr/local /usr, include)], @@ -29,12 +31,16 @@ GB_COMPONENT( [], [Cannot find 'libintl' library. It may be located inside the system C library, so you can ignore that warning...]) +fi + dnl ---- Remove DISABLED file that could have been generated before rm -f FAILED DISABLED DISABLED.* dnl ---- Check for charset conversion library +if test "x$ICONV_LIB" != x; then + GB_COMPONENT( conv, CONV, libiconv, [], [GB_FIND(iconv.h, /opt/local /usr/local /usr, include)], @@ -43,6 +49,8 @@ GB_COMPONENT( [], [Cannot find 'libiconv' library. It may be merged inside the system C library, so you can ignore that warning...]) +fi + dnl ---- Remove DISABLED file that could have been generated before rm -f FAILED DISABLED DISABLED.* diff --git a/main/share/gb_common.h b/main/share/gb_common.h index 6e132472d..93f3d7ae5 100644 --- a/main/share/gb_common.h +++ b/main/share/gb_common.h @@ -116,6 +116,14 @@ #endif +#ifdef ARCH_E2K // According to AltLinux Sisyphus RPM packages patchs + +#ifdef __cplusplus +#include +#endif + +#endif + #ifndef FALSE enum {