summaryrefslogtreecommitdiff
path: root/Build/source/libs/harfbuzz/configure.ac
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-02-25 19:22:25 +0000
committerKarl Berry <karl@freefriends.org>2021-02-25 19:22:25 +0000
commitad547a6b5986815fda458221149728d9d9ab1d87 (patch)
tree16296910eb3eca724371474ea9aea3994dc69614 /Build/source/libs/harfbuzz/configure.ac
parent947b43de3dd21d58ccc2ffadefc4441ea1c2a813 (diff)
restore Build,TODO from r57911
git-svn-id: svn://tug.org/texlive/trunk@57915 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/harfbuzz/configure.ac')
-rw-r--r--Build/source/libs/harfbuzz/configure.ac110
1 files changed, 110 insertions, 0 deletions
diff --git a/Build/source/libs/harfbuzz/configure.ac b/Build/source/libs/harfbuzz/configure.ac
new file mode 100644
index 00000000000..30c4a28a5ff
--- /dev/null
+++ b/Build/source/libs/harfbuzz/configure.ac
@@ -0,0 +1,110 @@
+dnl $Id$
+dnl Process this file with autoconf to produce a configure script.
+dnl
+dnl Copyright 2016-2017 Karl Berry <tex-live@tug.org>
+dnl Copyright 2012-2015 Peter Breitenlohner <tex-live@tug.org>
+dnl
+dnl This file is free software; the copyright holder
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+dnl
+m4_include([version.ac])[] dnl define harfbuzz_version
+AC_INIT([harfbuzz (TeX Live)], harfbuzz_version, [tex-k@tug.org])
+AC_PREREQ([2.65])
+AC_CONFIG_SRCDIR([harfbuzz-src/src/harfbuzz.pc.in])
+AC_CONFIG_AUX_DIR([../../build-aux])
+AC_CONFIG_MACRO_DIR([../../m4])
+
+KPSE_BASIC([harfbuzz], no-define)
+
+KPSE_LIB_VERSION([harfbuzz])[]dnl
+AC_SUBST([HB_VERSION_MAJOR], [harfbuzz_major])[]dnl
+AC_SUBST([HB_VERSION_MINOR], [harfbuzz_minor])[]dnl
+AC_SUBST([HB_VERSION_MICRO], [harfbuzz_micro])[]dnl
+AC_SUBST([HB_VERSION], [harfbuzz_version])[]dnl
+
+AC_PROG_CC
+AC_PROG_CXX
+AC_PROG_RANLIB
+AC_PROG_LN_S
+
+# Theoretically harfbuzz does not require C++11?
+AX_CXX_COMPILE_STDCXX([11],,[optional])
+
+KPSE_COMPILER_VISIBILITY
+
+KPSE_GRAPHITE2_FLAGS
+
+# Functions and headers
+AC_CHECK_FUNCS(atexit mprotect sysconf getpagesize mmap isatty newlocale strtod_l posix_memalign)
+
+save_libs="$LIBS"
+LIBS="$LIBS -lm"
+AC_CHECK_FUNCS([round], ,[AC_CHECK_DECLS([round], , ,[#include <math.h>])])
+LIBS="$save_libs"
+
+AC_CHECK_HEADERS(unistd.h sys/mman.h xlocale.h stdbool.h)
+
+# Compiler flags
+AC_CANONICAL_HOST
+AC_CHECK_ALIGNOF([struct{char;}])
+if test "x$GCC" = "xyes"; then
+
+ # Make symbols link locally
+ LDFLAGS="$LDFLAGS -Bsymbolic-functions"
+
+ # Make sure we don't link to libstdc++
+ CXXFLAGS="$CXXFLAGS -fno-rtti -fno-exceptions"
+
+ # Assorted warnings
+ CXXFLAGS="$CXXFLAGS -Wcast-align"
+
+ case "$host" in
+ arm-*-*)
+ if test "x$ac_cv_alignof_struct_char__" != x1; then
+ # Request byte alignment
+ CXXFLAGS="$CXXFLAGS -mstructure-size-boundary=8"
+ fi
+ ;;
+ esac
+fi
+AM_CONDITIONAL(HAVE_GCC, test "x$GCC" = "xyes")
+
+AC_SUBST([AM_CXXFLAGS])
+
+AC_CONFIG_HEADERS([config.h])
+
+AM_CONDITIONAL([build], [test "x$enable_build" != xno])
+
+if test "x$enable_build" != xno || test -f config.force; then
+
+echo timestamp >config.force
+fi
+
+if :; then
+ AC_DEFINE([HAVE_OT], 1, [Use native OpenType Layout backend])
+ AC_DEFINE([HAVE_GRAPHITE2], 1, [Use Graphite library])
+else
+dnl add all these to config.h.in but do not define them in config.h
+ AC_DEFINE([HAVE_PTHREAD], 1, [Use POSIX threads])
+ AC_DEFINE([HAVE_GLIB], 1, [Use glib2 library])
+ AC_DEFINE([HAVE_GTHREAD], 1, [Use gthread2 library])
+ AC_DEFINE([HAVE_GOBJECT], 1, [Use gobject2 library])
+ AC_DEFINE([HAVE_CAIRO], 1, [Use cairo graphics library])
+ AC_DEFINE([HAVE_CAIRO_FT], 1, [Use cairo-ft support in cairo graphics library])
+ AC_DEFINE([HAVE_UNISCRIBE], 1, [Use Uniscribe backend])
+ AC_DEFINE([HAVE_CORETEXT], 1, [Use Core Text backend])
+ AC_DEFINE([HAVE_INTEL_ATOMIC_PRIMITIVES], 1, [Use Intel __sync_* atomic primitives])
+fi
+
+AC_SUBST([HARFBUZZ_TREE], [harfbuzz-src])
+
+if test -f $srcdir/$HARFBUZZ_TREE/src/hb-version.h; then
+ AC_MSG_ERROR([Sorry, you must remove the file $HARFBUZZ_TREE/src/hb-version.h])
+fi
+
+AC_CONFIG_FILES([Makefile
+ include/Makefile
+ hb-version.h:harfbuzz-src/src/hb-version.h.in])
+
+AC_OUTPUT