Imported Upstream version 2.6.7
[platform/upstream/harfbuzz.git] / configure.ac
index 1fb8a10..3af266b 100644 (file)
@@ -1,6 +1,6 @@
 AC_PREREQ([2.64])
 AC_INIT([HarfBuzz],
-        [1.7.6],
+        [2.6.7],
         [https://github.com/harfbuzz/harfbuzz/issues/new],
         [harfbuzz],
         [http://harfbuzz.org/])
@@ -9,7 +9,7 @@ AC_CONFIG_MACRO_DIR([m4])
 AC_CONFIG_SRCDIR([src/harfbuzz.pc.in])
 AC_CONFIG_HEADERS([config.h])
 
-AM_INIT_AUTOMAKE([1.13.0 gnits tar-ustar dist-bzip2 no-dist-gzip -Wall no-define color-tests -Wno-portability])
+AM_INIT_AUTOMAKE([1.13.0 gnits tar-ustar dist-xz no-dist-gzip -Wall no-define color-tests -Wno-portability])
 AM_SILENT_RULES([yes])
 AX_CODE_COVERAGE
 
@@ -19,12 +19,11 @@ LT_PREREQ([2.2])
 LT_INIT([disable-static])
 
 # Check for programs
-AC_USE_SYSTEM_EXTENSIONS
 AC_PROG_CC
 AC_PROG_CC_C99
 AM_PROG_CC_C_O
 AC_PROG_CXX
-dnl AX_CXX_COMPILE_STDCXX(11, noext, optional)
+AX_CXX_COMPILE_STDCXX(11)
 AC_SYS_LARGEFILE
 PKG_PROG_PKG_CONFIG([0.20])
 AM_MISSING_PROG([RAGEL], [ragel])
@@ -77,9 +76,9 @@ GTK_DOC_CHECK([1.15],[--flavour no-tmpl])
        AM_CONDITIONAL([ENABLE_GTK_DOC], false)
 ])
 
-# Functions, and headers
-AC_CHECK_FUNCS(atexit mprotect sysconf getpagesize mmap isatty newlocale strtod_l setlinebuf)
-AC_CHECK_HEADERS(unistd.h sys/mman.h xlocale.h)
+# Functions and headers
+AC_CHECK_FUNCS(atexit mprotect sysconf getpagesize mmap isatty roundf)
+AC_CHECK_HEADERS(unistd.h sys/mman.h stdbool.h)
 
 # Compiler flags
 AC_CANONICAL_HOST
@@ -87,10 +86,15 @@ AC_CHECK_ALIGNOF([struct{char;}])
 if test "x$GCC" = "xyes"; then
 
        # Make symbols link locally
-       LDFLAGS="$LDFLAGS -Bsymbolic-functions"
+       AX_CHECK_LINK_FLAG([[-Bsymbolic-functions]], [LDFLAGS="$LDFLAGS -Bsymbolic-functions"])
 
-       # Assorted warnings
-       CXXFLAGS="$CXXFLAGS -Wcast-align"
+       # Make it possible to not link to libstdc++
+       # No threadsafe statics in C++ as we do it ourselves.
+       # We don't use these features, so it's safe to disable them
+       # even in the cases where we DO link to libstdc++.
+       # Put -fno-rtti before $CXXFLAGS such that users can re-enable it
+       # by overriding CXXFLAGS.
+       CXXFLAGS="-fno-rtti $CXXFLAGS -fno-exceptions -fno-threadsafe-statics"
 
        case "$host" in
                *-*-mingw*)
@@ -124,9 +128,7 @@ AC_MSG_RESULT([$hb_os_win32])
 AM_CONDITIONAL(OS_WIN32, test "$hb_os_win32" = "yes")
 
 have_pthread=false
-if test "$hb_os_win32" = no; then
-       AX_PTHREAD([have_pthread=true])
-fi
+AX_PTHREAD([have_pthread=true])
 if $have_pthread; then
        AC_DEFINE(HAVE_PTHREAD, 1, [Have POSIX threads])
 fi
@@ -134,20 +136,6 @@ AM_CONDITIONAL(HAVE_PTHREAD, $have_pthread)
 
 dnl ==========================================================================
 
-have_ot=true
-if $have_ot; then
-       AC_DEFINE(HAVE_OT, 1, [Have native OpenType Layout backend])
-fi
-AM_CONDITIONAL(HAVE_OT, $have_ot)
-
-have_fallback=true
-if $have_fallback; then
-       AC_DEFINE(HAVE_FALLBACK, 1, [Have simple TrueType Layout backend])
-fi
-AM_CONDITIONAL(HAVE_FALLBACK, $have_fallback)
-
-dnl ===========================================================================
-
 AC_ARG_WITH(glib,
        [AS_HELP_STRING([--with-glib=@<:@yes/no/auto@:>@],
                        [Use glib @<:@default=auto@:>@])],,
@@ -296,27 +284,12 @@ AM_CONDITIONAL(HAVE_ICU_BUILTIN, $have_icu && test "x$with_icu" = "xbuiltin")
 
 dnl ===========================================================================
 
-AC_ARG_WITH(ucdn,
-       [AS_HELP_STRING([--with-ucdn=@<:@yes/no@:>@],
-                       [Use builtin UCDN library @<:@default=yes@:>@])],,
-       [with_ucdn=yes])
-have_ucdn=false
-if test "x$with_ucdn" = "xyes"; then
-       have_ucdn=true
-fi
-if $have_ucdn; then
-       AC_DEFINE(HAVE_UCDN, 1, [Have UCDN Unicode functions])
-fi
-AM_CONDITIONAL(HAVE_UCDN, $have_ucdn)
-
-dnl ==========================================================================
-
 AC_ARG_WITH(graphite2,
        [AS_HELP_STRING([--with-graphite2=@<:@yes/no/auto@:>@],
                        [Use the graphite2 library @<:@default=no@:>@])],,
        [with_graphite2=no])
 have_graphite2=false
-GRAPHITE2_DEPS="graphite2"
+GRAPHITE2_DEPS="graphite2 >= 1.2.0"
 AC_SUBST(GRAPHITE2_DEPS)
 if test "x$with_graphite2" = "xyes" -o "x$with_graphite2" = "xauto"; then
        PKG_CHECK_MODULES(GRAPHITE2, $GRAPHITE2_DEPS, have_graphite2=true, :)
@@ -388,6 +361,28 @@ AM_CONDITIONAL(HAVE_UNISCRIBE, $have_uniscribe)
 
 dnl ===========================================================================
 
+AC_ARG_WITH(gdi,
+       [AS_HELP_STRING([--with-gdi=@<:@yes/no/auto@:>@],
+                       [Provide GDI integration helpers @<:@default=no@:>@])],,
+       [with_gdi=no])
+have_gdi=false
+if test "x$with_gdi" = "xyes" -o "x$with_gdi" = "xauto"; then
+       AC_CHECK_HEADERS(windows.h, have_gdi=true)
+fi
+if test "x$with_gdi" = "xyes" -a "x$have_gdi" != "xtrue"; then
+       AC_MSG_ERROR([gdi support requested but not found])
+fi
+if $have_gdi; then
+       GDI_CFLAGS=
+       GDI_LIBS="-lgdi32"
+       AC_SUBST(GDI_CFLAGS)
+       AC_SUBST(GDI_LIBS)
+       AC_DEFINE(HAVE_GDI, 1, [Have GDI library])
+fi
+AM_CONDITIONAL(HAVE_GDI, $have_gdi)
+
+dnl ===========================================================================
+
 AC_ARG_WITH(directwrite,
        [AS_HELP_STRING([--with-directwrite=@<:@yes/no/auto@:>@],
                        [Use the DirectWrite library (experimental) @<:@default=no@:>@])],,
@@ -403,7 +398,7 @@ if test "x$with_directwrite" = "xyes" -a "x$have_directwrite" != "xtrue"; then
 fi
 if $have_directwrite; then
        DIRECTWRITE_CXXFLAGS=
-       DIRECTWRITE_LIBS="-ldwrite"
+       DIRECTWRITE_LIBS=
        AC_SUBST(DIRECTWRITE_CXXFLAGS)
        AC_SUBST(DIRECTWRITE_LIBS)
        AC_DEFINE(HAVE_DIRECTWRITE, 1, [Have DirectWrite library])
@@ -492,15 +487,14 @@ dnl ===========================================================================
 AC_CONFIG_FILES([
 Makefile
 src/Makefile
-src/hb-version.h
 src/harfbuzz-config.cmake
-src/hb-ucdn/Makefile
 util/Makefile
 test/Makefile
 test/api/Makefile
 test/fuzzing/Makefile
 test/shaping/Makefile
 test/shaping/data/Makefile
+test/shaping/data/aots/Makefile
 test/shaping/data/in-house/Makefile
 test/shaping/data/text-rendering-tests/Makefile
 test/subset/Makefile
@@ -511,12 +505,17 @@ docs/version.xml
 
 AC_OUTPUT
 
+echo
+echo "C++ compiler version:"
+$CXX --version
+echo
+
 AC_MSG_NOTICE([
 
 Build configuration:
 
 Unicode callbacks (you want at least one):
-       Builtin (UCDN):         ${have_ucdn}
+       Builtin                 true
        Glib:                   ${have_glib}
        ICU:                    ${have_icu}
 
@@ -532,8 +531,9 @@ Additional shapers (the more the merrier):
 
 Platform shapers (not normally needed):
        CoreText:               ${have_coretext}
-       Uniscribe:              ${have_uniscribe}
        DirectWrite:            ${have_directwrite}
+       GDI:                    ${have_gdi}
+       Uniscribe:              ${have_uniscribe}
 
 Other features:
        Documentation:          ${enable_gtk_doc}