]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
Pass font config to config.h and not by TARGET_CFLAGS as adding
authorVladimir Serbinenko <phcoder@gmail.com>
Wed, 4 Dec 2013 09:25:53 +0000 (10:25 +0100)
committerVladimir Serbinenko <phcoder@gmail.com>
Wed, 4 Dec 2013 09:25:53 +0000 (10:25 +0100)
arguments doesn't work if TARGET_CFLAGS is specified on command
line.

ChangeLog
config.h.in
configure.ac
grub-core/Makefile.am
grub-core/Makefile.core.def
grub-core/font/font.c
grub-core/normal/charset.c
include/grub/term.h

index 97b03decf5f07ce474140921aa551108d84eea4c..acff45e79af41db9208eba1292d84b3c6c2f1096 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2013-12-04  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       Pass font config to config.h and not by TARGET_CFLAGS as adding
+       arguments doesn't work if TARGET_CFLAGS is specified on command
+       line.
+
 2013-12-04  Vladimir Serbinenko  <phcoder@gmail.com>
 
        * configure.ac: Add -Wvla if compiler supports it.
index 436512f2baa2f88771e893f6ff0a5b2bc3d2dbaa..33a3a24876da286c14cd194ca2ce3b052b864c76 100644 (file)
@@ -28,6 +28,7 @@
 #elif defined (GRUB_UTIL) || !defined (GRUB_MACHINE)
 #include <config-util.h>
 #else
+#define HAVE_FONT_SOURCE @HAVE_FONT_SOURCE@
 /* Define if C symbols get an underscore after compilation. */
 #define HAVE_ASM_USCORE @HAVE_ASM_USCORE@
 /* Define it to \"addr32\" or \"addr32;\" to make GAS happy.  */
index 888d477d5d83b96d86f1e80cb2f1640df2860240..69be355c42f3d55b568b1ca6efc83a408512462c 100644 (file)
@@ -1555,6 +1555,12 @@ AM_CONDITIONAL([COND_GRUB_EMU_PCI], [test x$enable_grub_emu_pci = xyes])
 AM_CONDITIONAL([COND_GRUB_MKFONT], [test x$enable_grub_mkfont = xyes])
 AM_CONDITIONAL([COND_GRUB_MOUNT], [test x$enable_grub_mount = xyes])
 AM_CONDITIONAL([COND_HAVE_FONT_SOURCE], [test x$FONT_SOURCE != x])
+if test x$FONT_SOURCE != x ; then
+   HAVE_FONT_SOURCE=1
+else
+   HAVE_FONT_SOURCE=0
+fi
+AC_SUBST(HAVE_FONT_SOURCE)
 AM_CONDITIONAL([COND_APPLE_LINKER], [test x$TARGET_APPLE_LINKER = x1])
 AM_CONDITIONAL([COND_ENABLE_EFIEMU], [test x$enable_efiemu = xyes])
 AM_CONDITIONAL([COND_ENABLE_CACHE_STATS], [test x$DISK_CACHE_STATS = x1])
index 9bc68f77baf8b605b0419cf1c81b59a04e4e68a7..f69da18c381e55b25f758365a75b7697bb0bba8c 100644 (file)
@@ -10,10 +10,6 @@ CCAS=$(TARGET_CC)
 RANLIB=$(TARGET_RANLIB)
 STRIP=$(TARGET_STRIP)
 
-if COND_HAVE_FONT_SOURCE
-TARGET_CFLAGS += -DUSE_ASCII_FALLBACK=1 -DHAVE_UNIFONT_WIDTHSPEC=1
-endif
-
 MACHO2IMG=$(top_builddir)/grub-macho2img
 
 AM_CFLAGS = $(TARGET_CFLAGS)
index c2b01d4371c2e8c2fe303a87092120bb85e6dc50..57abb491004c5fa3890914f3802e829e32df95f2 100644 (file)
@@ -88,7 +88,6 @@ kernel = {
   mips_qemu_mips_ldflags    = '-Wl,-Ttext,0x80200000';
 
   mips_arc_cppflags = '-DGRUB_DECOMPRESSOR_LINK_ADDR=$(TARGET_DECOMPRESSOR_LINK_ADDR)';
-  mips_loongson_cppflags = '-DUSE_ASCII_FALLBACK';
   i386_qemu_cppflags     = '-DGRUB_BOOT_MACHINE_LINK_ADDR=$(GRUB_BOOT_MACHINE_LINK_ADDR)';
   emu_cflags = '$(CFLAGS_GNULIB)';
   emu_cppflags = '$(CPPFLAGS_GNULIB)';
index d603dbe0448dea2b71d5320182888077369dbe70..14b93e172512c14f03c5eb9c8df2b01d93c7c1ea 100644 (file)
@@ -33,7 +33,7 @@
 
 GRUB_MOD_LICENSE ("GPLv3+");
 
-#ifdef USE_ASCII_FALLBACK
+#if HAVE_FONT_SOURCE
 #include "ascii.h"
 #endif
 
@@ -110,14 +110,14 @@ static struct grub_font null_font;
 /* Flag to ensure module is initialized only once.  */
 static grub_uint8_t font_loader_initialized;
 
-#ifdef USE_ASCII_FALLBACK
+#if HAVE_FONT_SOURCE
 static struct grub_font_glyph *ascii_font_glyph[0x80];
 #endif
 
 static struct grub_font_glyph *
 ascii_glyph_lookup (grub_uint32_t code)
 {
-#ifdef USE_ASCII_FALLBACK
+#if HAVE_FONT_SOURCE
   static int ascii_failback_initialized = 0;
 
   if (code >= 0x80)
index 439dc8ea441fbf2949b05f8d4a1cd4540eff5bf6..05e42e6c7d1d01670216dd7665b0fe8f157bb531 100644 (file)
@@ -49,7 +49,7 @@
 #include <grub/term.h>
 #include <grub/normal.h>
 
-#ifdef HAVE_UNIFONT_WIDTHSPEC
+#if HAVE_FONT_SOURCE
 #include "widthspec.h"
 #endif
 
@@ -387,7 +387,7 @@ grub_unicode_get_comb_type (grub_uint32_t c)
   return GRUB_UNICODE_COMB_NONE;
 }
 
-#ifdef HAVE_UNIFONT_WIDTHSPEC
+#if HAVE_FONT_SOURCE
 
 grub_size_t
 grub_unicode_estimate_width (const struct grub_unicode_glyph *c)
index 17cf071c1ba3f4a6c59e738dbefd2f02e95832bc..528c530082903f8410fe173666dd8981bd386aa7 100644 (file)
@@ -398,7 +398,7 @@ grub_term_cls (struct grub_term_output *term)
     }
 }
 
-#ifdef HAVE_UNIFONT_WIDTHSPEC
+#if HAVE_FONT_SOURCE
 
 grub_size_t
 grub_unicode_estimate_width (const struct grub_unicode_glyph *c);