From f4d98ff1b2d1e86221639fd7cd8fbca35efded63 Mon Sep 17 00:00:00 2001 From: Brent Cook Date: Sun, 20 Jul 2014 14:45:26 -0500 Subject: conditionally disable -Wpointer-sign where supported ok beck@ --- configure.ac.tpl | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/configure.ac.tpl b/configure.ac.tpl index cbd62a0..99c2f6f 100644 --- a/configure.ac.tpl +++ b/configure.ac.tpl @@ -44,6 +44,16 @@ AC_PROG_LIBTOOL AC_PROG_CC_STDC AM_PROG_CC_C_O +save_cflags="$CFLAGS" +CFLAGS=-Wno-pointer-sign +AC_MSG_CHECKING([whether CC supports -Wno-pointer-sign]) +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])], + [AC_MSG_RESULT([yes])] + [AM_CFLAGS=-Wno-pointer-sign], + [AC_MSG_RESULT([no])] +) +CFLAGS="$save_cflags $AM_CFLAGS" + AC_CHECK_FUNC(strlcpy,[AC_SEARCH_LIBS(strlcpy,, [NO_STRLCPY=], [NO_STRLCPY=yes])], [NO_STRLCPY=yes]) AC_SUBST(NO_STRLCPY) -- cgit v1.2.3-55-g6feb