From 9cf55131d1b135da98590f9bc8cf5ddcae5a5a76 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Wed, 7 Apr 2021 17:31:57 -0700
Subject: [PATCH] Regenerated autotool files with Harfbuzz support
---
Makefile.in | 3 +-
aclocal.m4 | 2 +-
configure | 196 ++++++++++++++++++++++++++++++++++++++--------------
3 files changed, 148 insertions(+), 53 deletions(-)
diff --git a/Makefile.in b/Makefile.in
index 728e562..cdb6636 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -281,6 +281,8 @@ FT2_CONFIG = @FT2_CONFIG@
FT2_LIBS = @FT2_LIBS@
GL_LIBS = @GL_LIBS@
GREP = @GREP@
+HB_CFLAGS = @HB_CFLAGS@
+HB_LIBS = @HB_LIBS@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
@@ -382,7 +384,6 @@ pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
-runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
diff --git a/aclocal.m4 b/aclocal.m4
index 4ba010e..3db3af8 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -464,7 +464,7 @@ m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
[_AM_SET_OPTIONS([$1])dnl
dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
m4_if(
- m4_ifset([AC_PACKAGE_NAME], [ok]):m4_ifset([AC_PACKAGE_VERSION], [ok]),
+ m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
[ok:ok],,
[m4_fatal([AC_INIT should be called with package and version arguments])])dnl
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
diff --git a/configure b/configure
index 6f9b56a..a67464f 100755
--- a/configure
+++ b/configure
@@ -783,6 +783,8 @@ SDL2_CONFIG
SDL_LIBS
SDL_CFLAGS
SDL_VERSION
+HB_LIBS
+HB_CFLAGS
FT2_CONFIG
FT2_LIBS
FT2_CFLAGS
@@ -928,6 +930,7 @@ enable_silent_rules
with_ft_prefix
with_ft_exec_prefix
enable_freetypetest
+enable_harfbuzz
with_sdl_prefix
with_sdl_exec_prefix
enable_sdltest
@@ -947,6 +950,8 @@ PKG_CONFIG_PATH
PKG_CONFIG_LIBDIR
FT2_CFLAGS
FT2_LIBS
+HB_CFLAGS
+HB_LIBS
SDL_CFLAGS
SDL_LIBS
XMKMF'
@@ -1583,6 +1588,7 @@ Optional Features:
--disable-silent-rules verbose build output (undo: "make V=0")
--disable-freetypetest Do not try to compile and run a test FreeType
program
+ --enable-harfbuzz Enable HarfBuzz [default=yes]
--disable-sdltest Do not try to compile and run a test SDL program
Optional Packages:
@@ -1614,6 +1620,8 @@ Some influential environment variables:
path overriding pkg-config's built-in search path
FT2_CFLAGS C compiler flags for FT2, overriding pkg-config
FT2_LIBS linker flags for FT2, overriding pkg-config
+ HB_CFLAGS C compiler flags for HB, overriding pkg-config
+ HB_LIBS linker flags for HB, overriding pkg-config
SDL_CFLAGS C compiler flags for SDL, overriding pkg-config
SDL_LIBS linker flags for SDL, overriding pkg-config
XMKMF Path to xmkmf, Makefile generator for X Window System
@@ -3951,13 +3959,13 @@ if ${lt_cv_nm_interface+:} false; then :
else
lt_cv_nm_interface="BSD nm"
echo "int some_variable = 0;" > conftest.$ac_ext
- (eval echo "\"\$as_me:3954: $ac_compile\"" >&5)
+ (eval echo "\"\$as_me:3962: $ac_compile\"" >&5)
(eval "$ac_compile" 2>conftest.err)
cat conftest.err >&5
- (eval echo "\"\$as_me:3957: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+ (eval echo "\"\$as_me:3965: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
(eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
cat conftest.err >&5
- (eval echo "\"\$as_me:3960: output\"" >&5)
+ (eval echo "\"\$as_me:3968: output\"" >&5)
cat conftest.out >&5
if $GREP 'External.*some_variable' conftest.out > /dev/null; then
lt_cv_nm_interface="MS dumpbin"
@@ -5168,7 +5176,7 @@ ia64-*-hpux*)
;;
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 5171 "configure"' > conftest.$ac_ext
+ echo '#line 5179 "configure"' > conftest.$ac_ext
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -6998,11 +7006,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:7001: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:7009: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:7005: \$? = $ac_status" >&5
+ echo "$as_me:7013: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -7337,11 +7345,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:7340: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:7348: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:7344: \$? = $ac_status" >&5
+ echo "$as_me:7352: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -7442,11 +7450,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:7445: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:7453: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:7449: \$? = $ac_status" >&5
+ echo "$as_me:7457: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -7497,11 +7505,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:7500: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:7508: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:7504: \$? = $ac_status" >&5
+ echo "$as_me:7512: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -9867,7 +9875,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 9870 "configure"
+#line 9878 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -9963,7 +9971,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 9966 "configure"
+#line 9974 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11878,6 +11886,9 @@ else
fi
+SUMMARY="\n\nSDL2_ttf Configure Summary:\n"
+
+
@@ -12686,6 +12697,112 @@ fi
CFLAGS="$CFLAGS $FT2_CFLAGS"
LIBS="$LIBS $FT2_LIBS"
+CheckHarfBuzz()
+{
+ # Check whether --enable-harfbuzz was given.
+if test "${enable_harfbuzz+set}" = set; then :
+ enableval=$enable_harfbuzz;
+else
+ enable_harfbuzz=yes
+fi
+
+
+ if test x$enable_harfbuzz != xyes; then
+
+$as_echo "#define TTF_USE_HARFBUZZ 0" >>confdefs.h
+
+ SUMMARY="${SUMMARY} harfbuzz: disabled"
+ else
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for harfbuzz >= 2.3.1" >&5
+$as_echo_n "checking for harfbuzz >= 2.3.1... " >&6; }
+
+if test -n "$HB_CFLAGS"; then
+ pkg_cv_HB_CFLAGS="$HB_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"harfbuzz >= 2.3.1\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "harfbuzz >= 2.3.1") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_HB_CFLAGS=`$PKG_CONFIG --cflags "harfbuzz >= 2.3.1" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+if test -n "$HB_LIBS"; then
+ pkg_cv_HB_LIBS="$HB_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"harfbuzz >= 2.3.1\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "harfbuzz >= 2.3.1") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_HB_LIBS=`$PKG_CONFIG --libs "harfbuzz >= 2.3.1" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ HB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "harfbuzz >= 2.3.1" 2>&1`
+ else
+ HB_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "harfbuzz >= 2.3.1" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$HB_PKG_ERRORS" >&5
+
+ harfbuzz=no
+elif test $pkg_failed = untried; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ harfbuzz=no
+else
+ HB_CFLAGS=$pkg_cv_HB_CFLAGS
+ HB_LIBS=$pkg_cv_HB_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ harfbuzz=yes
+fi
+
+ if test x$harfbuzz = xyes; then
+
+$as_echo "#define TTF_USE_HARFBUZZ 1" >>confdefs.h
+
+ CFLAGS="$CFLAGS $HB_CFLAGS"
+ LIBS="$LIBS $HB_LIBS"
+ SUMMARY="${SUMMARY} harfbuzz: enabled"
+ else
+
+$as_echo "#define TTF_USE_HARFBUZZ 0" >>confdefs.h
+
+ SUMMARY="${SUMMARY} harfbuzz: not found"
+ fi
+ fi
+}
+
+CheckHarfBuzz
+
SDL_VERSION=2.0.12
@@ -13051,34 +13168,8 @@ else
$as_echo_n "(cached) " >&6
else
# One or both of the vars are not set, and there is no cached value.
-ac_x_includes=no
-ac_x_libraries=no
-# Do we need to do anything special at all?
-ac_save_LIBS=$LIBS
-LIBS="-lX11 $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <X11/Xlib.h>
-int
-main ()
-{
-XrmInitialize ()
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- # We can compile and link X programs with no special options.
- ac_x_includes=
- ac_x_libraries=
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS="$ac_save_LIBS"
-# If that didn't work, only try xmkmf and filesystem searches
-# for native compilation.
-if test x"$ac_x_includes" = xno && test "$cross_compiling" = no; then :
- rm -f -r conftest.dir
+ac_x_includes=no ac_x_libraries=no
+rm -f -r conftest.dir
if mkdir conftest.dir; then
cd conftest.dir
cat >Imakefile <<'_ACEOF'
@@ -13117,7 +13208,7 @@ _ACEOF
rm -f -r conftest.dir
fi
- # Standard set of common directories for X headers.
+# Standard set of common directories for X headers.
# Check X11 before X11Rn because it is often a symlink to the current release.
ac_x_header_dirs='
/usr/X11/include
@@ -13144,8 +13235,6 @@ ac_x_header_dirs='
/usr/local/include/X11R5
/usr/local/include/X11R4
-/opt/X11/include
-
/usr/X386/include
/usr/x386/include
/usr/XFree86/include/X11
@@ -13219,17 +13308,15 @@ rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
fi # $ac_x_libraries = no
-fi
-# Record the results.
case $ac_x_includes,$ac_x_libraries in #(
- no,* | *,no | *\'*) :
+ no,* | *,no | *\'*)
# Didn't find X, or a directory has "'" in its name.
- ac_cv_have_x="have_x=no" ;; #(
- *) :
+ ac_cv_have_x="have_x=no";; #(
+ *)
# Record where we found X for the cache.
ac_cv_have_x="have_x=yes\
ac_x_includes='$ac_x_includes'\
- ac_x_libraries='$ac_x_libraries'" ;;
+ ac_x_libraries='$ac_x_libraries'"
esac
fi
;; #(
@@ -13795,6 +13882,10 @@ fi
# Finally create all the generated files
ac_config_files="$ac_config_files Makefile SDL2_ttf.spec SDL2_ttf.pc"
+
+ac_config_commands="$ac_config_commands summary"
+
+
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
@@ -14787,6 +14878,7 @@ fi
AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"
+SUMMARY="$SUMMARY"
_ACEOF
@@ -14801,6 +14893,7 @@ do
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
"SDL2_ttf.spec") CONFIG_FILES="$CONFIG_FILES SDL2_ttf.spec" ;;
"SDL2_ttf.pc") CONFIG_FILES="$CONFIG_FILES SDL2_ttf.pc" ;;
+ "summary") CONFIG_COMMANDS="$CONFIG_COMMANDS summary" ;;
*) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
esac
@@ -15967,6 +16060,7 @@ See \`config.log' for more details" "$LINENO" 5; }
rm -f conftest-deps.mk
}
;;
+ "summary":C) printf "$SUMMARY" ;;
esac
done # for ac_tag