aboutsummaryrefslogtreecommitdiff
path: root/freetype/builds/unix/configure.raw
diff options
context:
space:
mode:
Diffstat (limited to 'freetype/builds/unix/configure.raw')
-rw-r--r--freetype/builds/unix/configure.raw69
1 files changed, 45 insertions, 24 deletions
diff --git a/freetype/builds/unix/configure.raw b/freetype/builds/unix/configure.raw
index 111dbabc9..666c243b9 100644
--- a/freetype/builds/unix/configure.raw
+++ b/freetype/builds/unix/configure.raw
@@ -17,7 +17,7 @@ AC_CONFIG_SRCDIR([ftconfig.in])
# Don't forget to update docs/VERSION.DLL!
-version_info='14:1:8'
+version_info='15:0:9'
AC_SUBST([version_info])
ft_version=`echo $version_info | tr : .`
AC_SUBST([ft_version])
@@ -67,28 +67,6 @@ AC_SUBST(EXEEXT_BUILD)
-# get compiler flags right
-
-if test "x$GCC" = xyes; then
- XX_CFLAGS="-Wall"
- XX_ANSIFLAGS="-pedantic -ansi"
-else
- case "$host" in
- *-dec-osf*)
- CFLAGS=
- XX_CFLAGS="-std1 -g3"
- XX_ANSIFLAGS=
- ;;
- *)
- XX_CFLAGS=
- XX_ANSIFLAGS=
- ;;
- esac
-fi
-AC_SUBST([XX_CFLAGS])
-AC_SUBST([XX_ANSIFLAGS])
-
-
# auxiliary programs
AC_CHECK_PROG([RMF], [rm], [rm -f])
@@ -180,7 +158,8 @@ case :${ft_use_autoconf_sizeof_types}:${enable_biarch_config}: in
esac
if test x"${ft_use_autoconf_sizeof_types}" = xyes; then
- AC_DEFINE([FT_USE_AUTOCONF_SIZEOF_TYPES])
+ AC_DEFINE([FT_USE_AUTOCONF_SIZEOF_TYPES], [],
+ [Define if autoconf sizeof types should be used.])
fi
CPPFLAGS="${orig_CPPFLAGS}"
@@ -222,6 +201,48 @@ AC_SUBST([FTSYS_SRC])
AC_CHECK_FUNCS([memcpy memmove])
+# get compiler flags right
+# we try to make the compiler work for C89-strict source.
+# even if C compiler is GCC and C89 flags are available,
+# some system headers (e.g. Android Bionic libc) is broken
+# in C89 mode. we have to check the compilation finishes
+# successfully.
+#
+if test "x$GCC" = xyes; then
+ XX_CFLAGS="-Wall"
+ XX_ANSIFLAGS=""
+ for a in -pedantic -ansi
+ do
+ AC_MSG_CHECKING([gcc compiler flag ${a} to assure ANSI C works correctly])
+ orig_CFLAGS="${CFLAGS}"
+ CFLAGS="${CFLAGS} ${XX_ANSIFLAGS} ${a}"
+ AC_COMPILE_IFELSE([
+ AC_LANG_PROGRAM([#include <stdio.h>],[{puts("");return 0;}])
+ ],[
+ AC_MSG_RESULT([ok, add it to XX_ANSIFLAGS])
+ XX_ANSIFLAGS="${XX_ANSIFLAGS} ${a}"
+ ],[
+ AC_MSG_RESULT([no])
+ ])
+ CFLAGS="${orig_CFLAGS}"
+ done
+else
+ case "$host" in
+ *-dec-osf*)
+ CFLAGS=
+ XX_CFLAGS="-std1 -g3"
+ XX_ANSIFLAGS=
+ ;;
+ *)
+ XX_CFLAGS=
+ XX_ANSIFLAGS=
+ ;;
+ esac
+fi
+AC_SUBST([XX_CFLAGS])
+AC_SUBST([XX_ANSIFLAGS])
+
+
# check for system zlib
# don't quote AS_HELP_STRING!