diff --git a/README.txt b/README.txt index cd8f185..7960277 100644 --- a/README.txt +++ b/README.txt @@ -84,6 +84,8 @@ Project: Starfighter depends on the following libraries to build: * SDL2 * SDL2_image * SDL2_mixer +* SDL2_ttf +* utf8proc Once you have all dependencies installed, you can do the following from a terminal window: diff --git a/configure.ac b/configure.ac index c7e1f28..a7c97e3 100644 --- a/configure.ac +++ b/configure.ac @@ -21,12 +21,29 @@ STARFIGHTER_CFLAGS="-DVERSION=\\\"$PACKAGE_VERSION\\\"" # Checks for libraries. PKG_CHECK_EXISTS([SDL2_mixer], [ - PKG_CHECK_MODULES([SDL], [sdl2 SDL2_image SDL2_mixer]) + PKG_CHECK_EXISTS([SDL2_ttf], [ + PKG_CHECK_MODULES([SDL], [sdl2 SDL2_image SDL2_mixer SDL2_ttf]) + ], [ + PKG_CHECK_MODULES([SDL], [sdl2 SDL2_image SDL2_mixer]) + STARFIGHTER_CFLAGS="$STARFIGHTER_CFLAGS -DNOFONT" + echo "Note: SDL_ttf not found; Unicode will not be supported." + ]) ], [ - PKG_CHECK_MODULES([SDL], [sdl2 SDL2_image]) + PKG_CHECK_EXISTS([SDL2_ttf], [ + PKG_CHECK_MODULES([SDL], [sdl2 SDL2_image SDL2_ttf]) + ], [ + PKG_CHECK_MODULES([SDL], [sdl2 SDL2_image]) + STARFIGHTER_CFLAGS="$STARFIGHTER_CFLAGS -DNOFONT" + echo "Note: SDL_ttf not found; Unicode will not be supported." + ]) STARFIGHTER_CFLAGS="$STARFIGHTER_CFLAGS -DNOSOUND" echo "Note: SDL_mixer not found; audio will not be supported." ]) +PKG_CHECK_MODULES([UTF8PROC], [libutf8proc], [ +], [ + STARFIGHTER_CFLAGS="$STARFIGHTER_CFLAGS -DNOFONT" + echo "Note: utf8proc not found; Unicode will not be supported." +]) AC_ARG_VAR([SF_SCREEN_WIDTH], [The width of the game window in pixels]) AC_ARG_VAR([SF_SCREEN_HEIGHT], [The height of the game window in pixels]) diff --git a/src/Makefile.am b/src/Makefile.am index 7c1590d..fffb858 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -6,8 +6,8 @@ bin_PROGRAMS = starfighter starfighter_CPPFLAGS = $(STARFIGHTER_CFLAGS) -DDATADIR=\"$(pkgdatadir)\" -Wall -starfighter_CFLAGS = $(SDL_CFLAGS) -lm -starfighter_LDADD = $(SDL_LIBS) +starfighter_CFLAGS = $(SDL_CFLAGS) $(UTF8PROC_CFLAGS) -lm +starfighter_LDADD = $(SDL_LIBS) $(UTF8PROC_LIBS) starfighter_SOURCES = \ Starfighter.c \ diff --git a/src/gfx.c b/src/gfx.c index 88dbaea..490b4e1 100644 --- a/src/gfx.c +++ b/src/gfx.c @@ -17,9 +17,6 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -// Not ready yet -#define NOFONT - #include #include #include