aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrent Cook <bcook@openbsd.org>2014-07-20 14:45:26 -0500
committerBrent Cook <bcook@openbsd.org>2014-07-20 16:30:56 -0500
commitf4d98ff1b2d1e86221639fd7cd8fbca35efded63 (patch)
treeab7e71c428ee0a4e9d14b847c404a35d76012ee8
parent136ddd7a9bcec800f12520c4a08e642477ddabda (diff)
downloadportable-f4d98ff1b2d1e86221639fd7cd8fbca35efded63.tar.gz
portable-f4d98ff1b2d1e86221639fd7cd8fbca35efded63.tar.bz2
portable-f4d98ff1b2d1e86221639fd7cd8fbca35efded63.zip
conditionally disable -Wpointer-sign where supported
ok beck@
-rw-r--r--configure.ac.tpl10
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
44AC_PROG_CC_STDC 44AC_PROG_CC_STDC
45AM_PROG_CC_C_O 45AM_PROG_CC_C_O
46 46
47save_cflags="$CFLAGS"
48CFLAGS=-Wno-pointer-sign
49AC_MSG_CHECKING([whether CC supports -Wno-pointer-sign])
50AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
51 [AC_MSG_RESULT([yes])]
52 [AM_CFLAGS=-Wno-pointer-sign],
53 [AC_MSG_RESULT([no])]
54)
55CFLAGS="$save_cflags $AM_CFLAGS"
56
47AC_CHECK_FUNC(strlcpy,[AC_SEARCH_LIBS(strlcpy,, [NO_STRLCPY=], 57AC_CHECK_FUNC(strlcpy,[AC_SEARCH_LIBS(strlcpy,, [NO_STRLCPY=],
48 [NO_STRLCPY=yes])], [NO_STRLCPY=yes]) 58 [NO_STRLCPY=yes])], [NO_STRLCPY=yes])
49AC_SUBST(NO_STRLCPY) 59AC_SUBST(NO_STRLCPY)