Fix use of FontConfig on non linux platforms (FreeBSD, etc.)
just define USE_FC in the Makefile to have text.c compiled with Fontconfig support
This commit is contained in:
parent
c65dc04194
commit
589a84fd3d
@ -257,6 +257,7 @@ endif
|
|||||||
LOPT = $(shell sdl-config --libs) -lSDL_image $(TTFLOPT) -lpng $(LUALOPT) -lm
|
LOPT = $(shell sdl-config --libs) -lSDL_image $(TTFLOPT) -lpng $(LUALOPT) -lm
|
||||||
OBJDIR = ../obj/unix
|
OBJDIR = ../obj/unix
|
||||||
FCLOPT = -lfontconfig
|
FCLOPT = -lfontconfig
|
||||||
|
COPT += -DUSE_FC
|
||||||
CC = gcc
|
CC = gcc
|
||||||
else
|
else
|
||||||
ifeq ($(PLATFORM),FreeMiNT) #10
|
ifeq ($(PLATFORM),FreeMiNT) #10
|
||||||
@ -397,6 +398,7 @@ endif
|
|||||||
CC = gcc
|
CC = gcc
|
||||||
OBJDIR = ../obj/unix
|
OBJDIR = ../obj/unix
|
||||||
FCLOPT = -lfontconfig
|
FCLOPT = -lfontconfig
|
||||||
|
COPT += -DUSE_FC
|
||||||
|
|
||||||
# enable UTF8 filename translation
|
# enable UTF8 filename translation
|
||||||
# For Linux (GLibc), iconv is built into the C library so no LOPT needed.
|
# For Linux (GLibc), iconv is built into the C library so no LOPT needed.
|
||||||
|
|||||||
@ -40,7 +40,7 @@
|
|||||||
|
|
||||||
#if defined(__CAANOO__) || defined(__WIZ__) || defined(__GP2X__)
|
#if defined(__CAANOO__) || defined(__WIZ__) || defined(__GP2X__)
|
||||||
// No fontconfig
|
// No fontconfig
|
||||||
#elif defined(__linux__)
|
#elif defined(USE_FC) && !defined(NOTTF)
|
||||||
#include <fontconfig/fontconfig.h>
|
#include <fontconfig/fontconfig.h>
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
@ -327,11 +327,8 @@ void Init_text(void)
|
|||||||
|
|
||||||
#elif defined(__CAANOO__) || defined(__WIZ__) || defined(__GP2X__)
|
#elif defined(__CAANOO__) || defined(__WIZ__) || defined(__GP2X__)
|
||||||
// No fontconfig : Only use fonts from Grafx2
|
// No fontconfig : Only use fonts from Grafx2
|
||||||
#elif defined(__linux__)
|
#elif defined(USE_FC)
|
||||||
#ifndef NOTTF
|
#ifndef NOTTF
|
||||||
#define USE_FC
|
|
||||||
|
|
||||||
#ifdef USE_FC
|
|
||||||
{
|
{
|
||||||
FcStrList* dirs;
|
FcStrList* dirs;
|
||||||
FcChar8 * fdir;
|
FcChar8 * fdir;
|
||||||
@ -345,7 +342,6 @@ void Init_text(void)
|
|||||||
|
|
||||||
FcStrListDone(dirs);
|
FcStrListDone(dirs);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
#elif defined(__amigaos4__) || defined(__amigaos__)
|
#elif defined(__amigaos4__) || defined(__amigaos__)
|
||||||
#ifndef NOTTF
|
#ifndef NOTTF
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user