diff options
author | Brent Cook <bcook@openbsd.org> | 2014-07-20 14:45:26 -0500 |
---|---|---|
committer | Brent Cook <bcook@openbsd.org> | 2014-07-20 16:30:56 -0500 |
commit | f4d98ff1b2d1e86221639fd7cd8fbca35efded63 (patch) | |
tree | ab7e71c428ee0a4e9d14b847c404a35d76012ee8 | |
parent | 136ddd7a9bcec800f12520c4a08e642477ddabda (diff) | |
download | portable-f4d98ff1b2d1e86221639fd7cd8fbca35efded63.tar.gz portable-f4d98ff1b2d1e86221639fd7cd8fbca35efded63.tar.bz2 portable-f4d98ff1b2d1e86221639fd7cd8fbca35efded63.zip |
conditionally disable -Wpointer-sign where supported
ok beck@
-rw-r--r-- | configure.ac.tpl | 10 |
1 files changed, 10 insertions, 0 deletions
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 | |||
44 | AC_PROG_CC_STDC | 44 | AC_PROG_CC_STDC |
45 | AM_PROG_CC_C_O | 45 | AM_PROG_CC_C_O |
46 | 46 | ||
47 | save_cflags="$CFLAGS" | ||
48 | CFLAGS=-Wno-pointer-sign | ||
49 | AC_MSG_CHECKING([whether CC supports -Wno-pointer-sign]) | ||
50 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])], | ||
51 | [AC_MSG_RESULT([yes])] | ||
52 | [AM_CFLAGS=-Wno-pointer-sign], | ||
53 | [AC_MSG_RESULT([no])] | ||
54 | ) | ||
55 | CFLAGS="$save_cflags $AM_CFLAGS" | ||
56 | |||
47 | AC_CHECK_FUNC(strlcpy,[AC_SEARCH_LIBS(strlcpy,, [NO_STRLCPY=], | 57 | AC_CHECK_FUNC(strlcpy,[AC_SEARCH_LIBS(strlcpy,, [NO_STRLCPY=], |
48 | [NO_STRLCPY=yes])], [NO_STRLCPY=yes]) | 58 | [NO_STRLCPY=yes])], [NO_STRLCPY=yes]) |
49 | AC_SUBST(NO_STRLCPY) | 59 | AC_SUBST(NO_STRLCPY) |