Imported Upstream version 1.8.1
[platform/upstream/harfbuzz.git] / configure.ac
index 1fb8a10..13cd1ce 100644 (file)
@@ -1,6 +1,6 @@
 AC_PREREQ([2.64])
 AC_INIT([HarfBuzz],
-        [1.7.6],
+        [1.8.1],
         [https://github.com/harfbuzz/harfbuzz/issues/new],
         [harfbuzz],
         [http://harfbuzz.org/])
@@ -77,9 +77,15 @@ 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 newlocale strtod_l)
+
+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
@@ -87,7 +93,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"])
+
+       # 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"
 
        # Assorted warnings
        CXXFLAGS="$CXXFLAGS -Wcast-align"
@@ -492,7 +506,6 @@ dnl ===========================================================================
 AC_CONFIG_FILES([
 Makefile
 src/Makefile
-src/hb-version.h
 src/harfbuzz-config.cmake
 src/hb-ucdn/Makefile
 util/Makefile
@@ -532,8 +545,8 @@ Additional shapers (the more the merrier):
 
 Platform shapers (not normally needed):
        CoreText:               ${have_coretext}
-       Uniscribe:              ${have_uniscribe}
        DirectWrite:            ${have_directwrite}
+       Uniscribe:              ${have_uniscribe}
 
 Other features:
        Documentation:          ${enable_gtk_doc}