summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@neko.keithp.com>2006-09-01 12:36:31 -0700
committerKeith Packard <keithp@neko.keithp.com>2006-09-01 12:36:31 -0700
commit5b8e43a48ea1a5fb4e54dd12fe965439df2bf95d (patch)
tree07330cd2f40933d85881da661e8b2fd887981382
parentab2cb932b25af20896c08f4641dfa696ed651418 (diff)
Avoid #warning directives on non-GCC compilers. (bug 7683)
Detect GCC and use #warning only on GCC systems.
-rw-r--r--configure.in4
-rw-r--r--src/fcfreetype.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/configure.in b/configure.in
index 7875831..17a3c99 100644
--- a/configure.in
+++ b/configure.in
@@ -78,14 +78,16 @@ fi
AM_CONDITIONAL(MS_LIB_AVAILABLE, test x$ms_librarian = xyes)
WARN_CFLAGS=""
-
if test "x$GCC" = "xyes"; then
WARN_CFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes \
-Wmissing-prototypes -Wmissing-declarations \
-Wnested-externs -fno-strict-aliasing"
+ AC_DEFINE_UNQUOTED(HAVE_WARNING_CPP_DIRECTIVE,1,
+ [Can use #warning in C files])
fi
AC_SUBST(WARN_CFLAGS)
+
dnl ==========================================================================
AM_CONDITIONAL(CROSS_COMPILING, test $cross_compiling = yes)
diff --git a/src/fcfreetype.c b/src/fcfreetype.c
index 2cab48a..f85e2f8 100644
--- a/src/fcfreetype.c
+++ b/src/fcfreetype.c
@@ -64,6 +64,7 @@
#include "ftglue.h"
+#if HAVE_WARNING_CPP_DIRECTIVE
#if !HAVE_FT_GET_BDF_PROPERTY
#warning "No FT_Get_BDF_Property: Please install freetype 2.1.4 or later"
#endif
@@ -71,6 +72,7 @@
#if !HAVE_FT_GET_PS_FONT_INFO
#warning "No FT_Get_PS_Font_Info: Please install freetype 2.1.1 or later"
#endif
+#endif
/*
* Keep Han languages separated by eliminating languages