diff --git a/.gitignore b/.gitignore index 42a0b24..5eae1fc 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,5 @@ include/bard_version.h main/bard_main.o .time-stamp FileList +/autom4te.cache +*~ diff --git a/config/config.in b/config/config.in index f1f3bbe..82e0e81 100644 --- a/config/config.in +++ b/config/config.in @@ -14,6 +14,7 @@ CPPFLAGS = @CPPFLAGS@ SHFLAGS = @SHFLAGS@ LDFLAGS = @LDFLAGS@ PLATFORM_DEFS = @PLATFORM_DEFS@ +SDK = @SDK@ AR = @AR@ RANLIB = @RANLIB@ @@ -32,7 +33,7 @@ EPUBDEFS = @EPUBDEFS@ HBINCS = @HBINCS@ HBLIBS = @HBLIBS@ HBDEFS = @HBDEFS@ -SDLINCLUDES = -I/usr/include/SDL ${EPUBDEFS} ${HBINCS} ${HBDEFS} +SDLINCLUDES = $(shell ${SDK}/usr/bin/pkg-config --cflags-only-I sdl) ${EPUBDEFS} ${HBINCS} ${HBDEFS} SDLLIBS = @SDLLIBS@ ${EPUBLIBS} ${HBLIBS} DEFAULTFONT = @DEFAULTFONT@ diff --git a/configure b/configure index 7dff5af..0c03ded 100755 --- a/configure +++ b/configure @@ -632,6 +632,7 @@ HBDEFS EPUBDEFS EPUBLIBS SDLLIBS +FLITELIBSDIR FLITEDIR PLATFORM_DEFS AUDIOLIBS @@ -643,6 +644,7 @@ SHFLAGS OTHERLIBS HOST_CPU HOST_OS +SDK VOXDEFS LEXDEFS NM @@ -700,7 +702,6 @@ infodir docdir oldincludedir includedir -runstatedir localstatedir sharedstatedir sysconfdir @@ -740,7 +741,8 @@ CFLAGS LDFLAGS LIBS CPPFLAGS -CPP' +CPP +SDK' # Initialize some variables set by options. @@ -779,7 +781,6 @@ datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' -runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE}' @@ -1032,15 +1033,6 @@ do | -silent | --silent | --silen | --sile | --sil) silent=yes ;; - -runstatedir | --runstatedir | --runstatedi | --runstated \ - | --runstate | --runstat | --runsta | --runst | --runs \ - | --run | --ru | --r) - ac_prev=runstatedir ;; - -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ - | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ - | --run=* | --ru=* | --r=*) - runstatedir=$ac_optarg ;; - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ @@ -1178,7 +1170,7 @@ fi for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir runstatedir + libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. @@ -1331,7 +1323,6 @@ Fine tuning of the installation directories: --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] @@ -1386,6 +1377,7 @@ Some influential environment variables: CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor + SDK path to your SDK directory for cross-compilation Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. @@ -2167,6 +2159,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu + ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do if test -f "$ac_dir/install-sh"; then @@ -2306,7 +2299,6 @@ test -n "$target_alias" && test "$program_prefix$program_suffix$program_transform_name" = \ NONENONEs,x,x, && program_prefix=${target_alias}- - ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -4020,6 +4012,7 @@ case "$target_cpu" in ;; esac TARGET_OS=$target_os +TARGET_PLATFORM=$target_cpu-$target_os M68KCC= M68KCLAGS= @@ -4149,6 +4142,7 @@ esac + case "$host_cpu" in i386|i486|i586|i686) HOST_CPU=i386 @@ -4398,7 +4392,7 @@ fi PLATFORM_DEFS= -if test "x$FLITEDIR" = x; then +if test "x$FLITEDIR" = x && test "$build_os" = "$target_os"; then if test -f /usr/include/flite.h; then FLITEDIR=/usr fi @@ -4409,11 +4403,26 @@ if test "x$FLITEDIR" = x; then fi fi if test "x$FLITEDIR" = x; then - as_fn_error $? "\"Cannot locate CMU Flite specify FLITEDIR explicitly.\"" "$LINENO" 5 + if test -f "$PWD/flite/include/flite.h"; then + FLITEDIR="$PWD/flite" + fi +fi +if test "x$FLITEDIR" = x; then + as_fn_error $? "Cannot locate CMU Flite specify FLITEDIR explicitly." "$LINENO" 5 fi echo CMU Flite found in $FLITEDIR +if test -f /usr/local/lib/libflite.a && test "$build_os" = "$target_os"; then + FLITELIBSDIR="/usr/local/lib" +elif test -f $FLITEDIR/build/$TARGET_PLATFORM/lib/libflite.a; then + FLITELIBSDIR="$FLITEDIR/build/$TARGET_PLATFORM/lib" +else + as_fn_error $? "Cannot locate CMU Flite libraries, please configure and build flite pkg dependency." "$LINENO" 5 +fi +echo CMU Flite libraries found in $FLITELIBSDIR + + ac_fn_c_check_header_mongrel "$LINENO" "zip.h" "ac_cv_header_zip_h" "$ac_includes_default" if test "x$ac_cv_header_zip_h" = xyes; then : EPUBDEFS=-DBARD_EPUB @@ -4424,7 +4433,7 @@ fi ac_fn_c_check_header_mongrel "$LINENO" "harfbuzz/hb.h" "ac_cv_header_harfbuzz_hb_h" "$ac_includes_default" if test "x$ac_cv_header_harfbuzz_hb_h" = xyes; then : HBDEFS=-DBARD_HARFBUZZ - HBINCS="-I/usr/include/freetype2" + HBINCS="$($SDK/usr/bin/pkg-config --cflags-only-I freetype2)" HBLIBS="-lfreetype -lcairo" fi @@ -4466,62 +4475,133 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_harfbuzz_hb_icu_get_unicode_funcs" >&5 $as_echo "$ac_cv_lib_harfbuzz_hb_icu_get_unicode_funcs" >&6; } if test "x$ac_cv_lib_harfbuzz_hb_icu_get_unicode_funcs" = xyes; then : - HBLIBS+=" -lharfbuzz" + HBDEFS+=" -DBARD_HARFBUZZ_ICU" + HBLIBS+=" -lharfbuzz" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hb_icu_get_unicode_funcs in -lharfbuzz-icu" >&5 +$as_echo_n "checking for hb_icu_get_unicode_funcs in -lharfbuzz-icu... " >&6; } +if ${ac_cv_lib_harfbuzz_icu_hb_icu_get_unicode_funcs+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lharfbuzz-icu $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char hb_icu_get_unicode_funcs (); +int +main () +{ +return hb_icu_get_unicode_funcs (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_harfbuzz_icu_hb_icu_get_unicode_funcs=yes else - HBLIBS+=" -lharfbuzz -lharfbuzz-icu" + ac_cv_lib_harfbuzz_icu_hb_icu_get_unicode_funcs=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_harfbuzz_icu_hb_icu_get_unicode_funcs" >&5 +$as_echo "$ac_cv_lib_harfbuzz_icu_hb_icu_get_unicode_funcs" >&6; } +if test "x$ac_cv_lib_harfbuzz_icu_hb_icu_get_unicode_funcs" = xyes; then : + HBDEFS+=" -DBARD_HARFBUZZ_ICU" + HBLIBS+=" -lharfbuzz -lharfbuzz-icu" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: no ICU support found in harfbuzz" >&5 +$as_echo "$as_me: no ICU support found in harfbuzz" >&6;} + HBLIBS+=" -lharfbuzz" +fi + fi -if ! test -f /usr/include/SDL/SDL.h; then - as_fn_error $? "\"Cannot locate /usr/include/SDL/SDL.h.\"" "$LINENO" 5 +ac_fn_c_check_header_mongrel "$LINENO" "SDL/SDL.h" "ac_cv_header_SDL_SDL_h" "$ac_includes_default" +if test "x$ac_cv_header_SDL_SDL_h" = xyes; then : + +else + as_fn_error $? "Cannot locate SDL/SDL.h" "$LINENO" 5 fi + + SDLLIBS="-lSDL_mixer -lSDL" -if ! test -f /usr/include/SDL/SDL_ttf.h; then - as_fn_error $? "\"Cannot locate /usr/include/SDL/SDL_ttf.h.\"" "$LINENO" 5 +ac_fn_c_check_header_mongrel "$LINENO" "SDL/SDL.h" "ac_cv_header_SDL_SDL_h" "$ac_includes_default" +if test "x$ac_cv_header_SDL_SDL_h" = xyes; then : + +else + as_fn_error $? "Cannot locate SDL/SDL_ttf.h" "$LINENO" 5 fi + + + SDLLIBS="-lSDL_ttf $SDLLIBS" if ! test "x$EPUBDEFS" = x; then - if test -f /usr/include/SDL/SDL_image.h -a -f /usr/include/SDL/SDL_rotozoom.h - then - echo "EPUB (with SDL images) support found" - SDLLIBS="-lSDL_gfx -lSDL_image $SDLLIBS" - EPUBDEFS="-DBARD_EPUB_IMAGES $EPUBDEFS" - else - echo "EPUB (without SDL images) support found" - fi + for ac_header in SDL/SDL_image.h SDL/SDL_rotozoom.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + { $as_echo "$as_me:${as_lineno-$LINENO}: EPUB (with SDL images) support found" >&5 +$as_echo "$as_me: EPUB (with SDL images) support found" >&6;} + SDLLIBS="-lSDL_gfx -lSDL_image $SDLLIBS" + EPUBDEFS="-DBARD_EPUB_IMAGES $EPUBDEFS" else - echo "No EPUB support found (missing libzip)" + { $as_echo "$as_me:${as_lineno-$LINENO}: EPUB (without SDL images) support found" >&5 +$as_echo "$as_me: EPUB (without SDL images) support found" >&6;} fi +done +else + { $as_echo "$as_me:${as_lineno-$LINENO}: No EPUB support found (missing libzip)" >&5 +$as_echo "$as_me: No EPUB support found (missing libzip)" >&6;} +fi -if test "x$DEFAULTFONT" = "x" -then - DEFAULTFONT=`find /usr/share/fonts -name LiberationSerif-Regular.ttf | head -1` -fi -if test "x$DEFAULTFONT" = "x" -then - DEFAULTFONT=`find /usr/share/fonts -name DejaVuSerif.ttf | head -1` -fi -if test "x$DEFAULTFONT" = "x" -then - DEFAULTFONT=`find /usr/share/fonts -name DroidSerif.ttf | head -1` -fi -if test "x$DEFAULTFONT" = "x" -then - DEFAULTFONT=`find /system/fonts -name DroidSerif.ttf | head -1` -fi -if test "x$DEFAULTFONT" = "x" + + +if test "$build_os" = "$target_os" then - DEFAULTFONT=`find /usr/share/fonts -name NtmRR4nh.ttf | head -1` + if test "x$DEFAULTFONT" = "x" + then + DEFAULTFONT=`find /usr/share/fonts -name LiberationSerif-Regular.ttf | head -1` + fi + if test "x$DEFAULTFONT" = "x" + then + DEFAULTFONT=`find /usr/share/fonts -name DejaVuSerif.ttf | head -1` + fi + if test "x$DEFAULTFONT" = "x" + then + DEFAULTFONT=`find /usr/share/fonts -name DroidSerif.ttf | head -1` + fi + if test "x$DEFAULTFONT" = "x" + then + DEFAULTFONT=`find /system/fonts -name DroidSerif.ttf | head -1` + fi + if test "x$DEFAULTFONT" = "x" + then + DEFAULTFONT=`find /usr/share/fonts -name NtmRR4nh.ttf | head -1` + fi fi if test "x$DEFAULTFONT" = "x"; then echo No installed font found @@ -4573,6 +4653,8 @@ fi + + ac_config_files="$ac_config_files config/config config/system.mak" cat >confcache <<\_ACEOF @@ -5175,7 +5257,7 @@ config.status configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" -Copyright (C) 2012 Free Software Foundation, Inc. +Copyright (C) Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." diff --git a/configure.in b/configure.in index 7c33a46..21d17f1 100644 --- a/configure.in +++ b/configure.in @@ -30,9 +30,10 @@ dnl ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ## dnl THIS SOFTWARE. ## dnl ## dnl######################################################################## -AC_INIT(include/bard.h) +AC_INIT +AC_CONFIG_SRCDIR([include/bard.h]) -AC_CANONICAL_SYSTEM +AC_CANONICAL_TARGET AC_PROG_CC AC_PROG_RANLIB AC_PROG_INSTALL @@ -60,6 +61,7 @@ case "$target_cpu" in ;; esac TARGET_OS=$target_os +TARGET_PLATFORM=$target_cpu-$target_os M68KCC= M68KCLAGS= @@ -197,6 +199,7 @@ AC_SUBST(DLLWRAP) AC_SUBST(NM) AC_SUBST(LEXDEFS) AC_SUBST(VOXDEFS) +AC_SUBST(SDK) case "$host_cpu" in i386|i486|i586|i686) @@ -278,11 +281,8 @@ fi dnl dnl Does this compiler support initialization of unions dnl -AC_TRY_COMPILE([#include ], - [ struct a { union { float b; int c; } d; }; - const struct a e = { .d={ .b=3.14 } }; ], - [unioninit=yes], - [unioninit=no]) +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[ struct a { union { float b; int c; } d; }; + const struct a e = { .d={ .b=3.14 } }; ]])],[unioninit=yes],[unioninit=no]) if test "$unioninit" = no; then AC_DEFINE(NO_UNION_INITIALIZATION) fi @@ -431,7 +431,7 @@ AC_SUBST(PLATFORM_DEFS) dnl dnl Flite support dnl -if test "x$FLITEDIR" = x; then +if test "x$FLITEDIR" = x && test "$build_os" = "$target_os"; then if test -f /usr/include/flite.h; then FLITEDIR=/usr fi @@ -442,11 +442,26 @@ if test "x$FLITEDIR" = x; then fi fi if test "x$FLITEDIR" = x; then - AC_MSG_ERROR("Cannot locate CMU Flite specify FLITEDIR explicitly.") + if test -f "$PWD/flite/include/flite.h"; then + FLITEDIR="$PWD/flite" + fi +fi +if test "x$FLITEDIR" = x; then + AC_MSG_ERROR([Cannot locate CMU Flite specify FLITEDIR explicitly.]) fi echo CMU Flite found in $FLITEDIR AC_SUBST(FLITEDIR) +if test -f /usr/local/lib/libflite.a && test "$build_os" = "$target_os"; then + FLITELIBSDIR="/usr/local/lib" +elif test -f $FLITEDIR/build/$TARGET_PLATFORM/lib/libflite.a; then + FLITELIBSDIR="$FLITEDIR/build/$TARGET_PLATFORM/lib" +else + AC_MSG_ERROR([Cannot locate CMU Flite libraries, please configure and build flite pkg dependency.]) +fi +echo CMU Flite libraries found in $FLITELIBSDIR +AC_SUBST(FLITELIBSDIR) + dnl dnl EPUB support dnl @@ -458,42 +473,39 @@ dnl harfbuzz support dnl AC_CHECK_HEADER(harfbuzz/hb.h, [HBDEFS=-DBARD_HARFBUZZ - HBINCS="-I/usr/include/freetype2" + HBINCS="$($SDK/usr/bin/pkg-config --cflags-only-I freetype2)" HBLIBS="-lfreetype -lcairo"]) -dnl Some versions don't have harfbuzz-icu +dnl Some versions don't have harfbuzz-icu or even ICU support at all AC_CHECK_LIB(harfbuzz, hb_icu_get_unicode_funcs, - [HBLIBS+=" -lharfbuzz"], - [HBLIBS+=" -lharfbuzz -lharfbuzz-icu"]) + [HBDEFS+=" -DBARD_HARFBUZZ_ICU" + HBLIBS+=" -lharfbuzz"], + [AC_CHECK_LIB(harfbuzz-icu, + hb_icu_get_unicode_funcs, + [HBDEFS+=" -DBARD_HARFBUZZ_ICU" + HBLIBS+=" -lharfbuzz -lharfbuzz-icu"], + [AC_MSG_NOTICE([no ICU support found in harfbuzz]) + HBLIBS+=" -lharfbuzz"])]) dnl dnl SDL support dnl -dnl AC_CHECK_HEADER(SDL/SDL.h,,[AC_MSG_ERROR([Cannot locate SDL/SDL.h])]) -if ! test -f /usr/include/SDL/SDL.h; then - AC_MSG_ERROR("Cannot locate /usr/include/SDL/SDL.h.") -fi +AC_CHECK_HEADER(SDL/SDL.h,,[AC_MSG_ERROR([Cannot locate SDL/SDL.h])]) SDLLIBS="-lSDL_mixer -lSDL" -dnl Fix this .... -if ! test -f /usr/include/SDL/SDL_ttf.h; then - AC_MSG_ERROR("Cannot locate /usr/include/SDL/SDL_ttf.h.") -fi +AC_CHECK_HEADER(SDL/SDL.h,,[AC_MSG_ERROR([Cannot locate SDL/SDL_ttf.h])]) + SDLLIBS="-lSDL_ttf $SDLLIBS" -dnl AC_CHECK_HEADER(SDL/SDL_ttf.h,,[AC_MSG_ERROR([Cannot locate SDL/SDL_ttf.h])]) if ! test "x$EPUBDEFS" = x; then - if test -f /usr/include/SDL/SDL_image.h -a -f /usr/include/SDL/SDL_rotozoom.h - then - echo "EPUB (with SDL images) support found" - SDLLIBS="-lSDL_gfx -lSDL_image $SDLLIBS" - EPUBDEFS="-DBARD_EPUB_IMAGES $EPUBDEFS" - else - echo "EPUB (without SDL images) support found" - fi + AC_CHECK_HEADERS(SDL/SDL_image.h SDL/SDL_rotozoom.h, + [AC_MSG_NOTICE([EPUB (with SDL images) support found]) + SDLLIBS="-lSDL_gfx -lSDL_image $SDLLIBS" + EPUBDEFS="-DBARD_EPUB_IMAGES $EPUBDEFS"], + [AC_MSG_NOTICE([EPUB (without SDL images) support found])]) else - echo "No EPUB support found (missing libzip)" + AC_MSG_NOTICE([No EPUB support found (missing libzip)]) fi AC_SUBST(SDLLIBS) @@ -506,27 +518,30 @@ AC_SUBST(HBLIBS) dnl dnl Find a font. dnl -if test "x$DEFAULTFONT" = "x" -then - DEFAULTFONT=`find /usr/share/fonts -name LiberationSerif-Regular.ttf | head -1` -fi -if test "x$DEFAULTFONT" = "x" -then - DEFAULTFONT=`find /usr/share/fonts -name DejaVuSerif.ttf | head -1` -fi -if test "x$DEFAULTFONT" = "x" +if test "$build_os" = "$target_os" then - DEFAULTFONT=`find /usr/share/fonts -name DroidSerif.ttf | head -1` -fi -dnl Android, but your probably not running configure on the device -if test "x$DEFAULTFONT" = "x" -then - DEFAULTFONT=`find /system/fonts -name DroidSerif.ttf | head -1` -fi -dnl N900 -if test "x$DEFAULTFONT" = "x" -then - DEFAULTFONT=`find /usr/share/fonts -name NtmRR4nh.ttf | head -1` + if test "x$DEFAULTFONT" = "x" + then + DEFAULTFONT=`find /usr/share/fonts -name LiberationSerif-Regular.ttf | head -1` + fi + if test "x$DEFAULTFONT" = "x" + then + DEFAULTFONT=`find /usr/share/fonts -name DejaVuSerif.ttf | head -1` + fi + if test "x$DEFAULTFONT" = "x" + then + DEFAULTFONT=`find /usr/share/fonts -name DroidSerif.ttf | head -1` + fi + dnl Android, but your probably not running configure on the device + if test "x$DEFAULTFONT" = "x" + then + DEFAULTFONT=`find /system/fonts -name DroidSerif.ttf | head -1` + fi + dnl N900 + if test "x$DEFAULTFONT" = "x" + then + DEFAULTFONT=`find /usr/share/fonts -name NtmRR4nh.ttf | head -1` + fi fi if test "x$DEFAULTFONT" = "x"; then echo No installed font found @@ -566,4 +581,10 @@ AC_ARG_WITH( langvox, FL_LANGVOX=$with_langvox ) AC_SUBST(FL_LANGVOX) -AC_OUTPUT(config/config config/system.mak) +dnl +dnl extra env variables +dnl +AC_ARG_VAR([SDK],[path to your SDK directory for cross-compilation]) + +AC_CONFIG_FILES([config/config config/system.mak]) +AC_OUTPUT diff --git a/include/bard_render.h b/include/bard_render.h index dd36eec..94f0911 100644 --- a/include/bard_render.h +++ b/include/bard_render.h @@ -53,7 +53,9 @@ #include #include #include +#ifdef BARD_HARFBUZZ_ICU #include +#endif #include #include #endif diff --git a/src/render.c b/src/render.c index 15e30b6..f17481f 100644 --- a/src/render.c +++ b/src/render.c @@ -349,7 +349,9 @@ bard_surface *bard_render_text(bard_font *bf,char *text,SDL_Color c) /* Set up the harfbuzz buffer for the characters */ b = hb_buffer_create(); /* Its going to be unicode */ +#ifdef BARD_HARFBUZZ_ICU hb_buffer_set_unicode_funcs(b,hb_icu_get_unicode_funcs()); +#endif /* or -- which might avoid icu4c dependency */ /* hb_buffer_set_unicode_funcs(b,hb_glib_get_unicode_funcs()); */ /* Copy in the font/language parameters */