diff options
-rw-r--r-- | Makefile.am | 4 | ||||
-rw-r--r-- | configure.ac | 6 | ||||
-rw-r--r-- | psplash.c | 6 |
3 files changed, 11 insertions, 5 deletions
diff --git a/Makefile.am b/Makefile.am index 2374fe3..7e0b23e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,11 +1,11 @@ bin_PROGRAMS=psplash psplash-write -AM_CFLAGS = $(GCC_FLAGS) -D_GNU_SOURCE +AM_CFLAGS = $(GCC_FLAGS) -D_GNU_SOURCE -DFONT_HEADER=\"$(FONT_NAME)-font.h\" -DFONT_DEF=$(FONT_NAME)_font psplash_SOURCES = psplash.c psplash.h psplash-fb.c psplash-fb.h \ psplash-console.c psplash-console.h \ psplash-colors.h psplash-config.h \ - psplash-poky-img.h psplash-bar-img.h radeon-font.h + psplash-poky-img.h psplash-bar-img.h $(FONT_NAME)-font.h psplash_write_SOURCES = psplash-write.c psplash.h diff --git a/configure.ac b/configure.ac index 107b182..c2807f7 100644 --- a/configure.ac +++ b/configure.ac @@ -23,6 +23,12 @@ AM_CONDITIONAL([HAVE_SYSTEMD], [test "x$with_systemd" = "xyes"]) AC_SUBST(GCC_FLAGS) +AC_ARG_WITH([font], + AS_HELP_STRING([--with-font], [Set font to use (default is 'radeon')]), + [FONT_NAME=$withval], + [FONT_NAME=radeon]) +AC_SUBST([FONT_NAME]) + AC_OUTPUT([ Makefile ]) @@ -15,7 +15,7 @@ #include "psplash-colors.h" #include "psplash-poky-img.h" #include "psplash-bar-img.h" -#include "radeon-font.h" +#include FONT_HEADER #define SPLIT_LINE_POS(fb) \ ( (fb)->height \ @@ -37,7 +37,7 @@ psplash_draw_msg (PSplashFB *fb, const char *msg) { int w, h; - psplash_fb_text_size (&w, &h, &radeon_font, msg); + psplash_fb_text_size (&w, &h, &FONT_DEF, msg); DBG("displaying '%s' %ix%i\n", msg, w, h); @@ -54,7 +54,7 @@ psplash_draw_msg (PSplashFB *fb, const char *msg) (fb->width-w)/2, SPLIT_LINE_POS(fb) - h, PSPLASH_TEXT_COLOR, - &radeon_font, + &FONT_DEF, msg); } |