From: ian Date: Sat, 15 Oct 2005 15:22:08 +0000 (+0000) Subject: + * Add -Wno-pointer-sign if GCC has that option. X-Git-Tag: before-srv-2006-04-04~12 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=adns.git;a=commitdiff_plain;h=52888ec6fd5f8b3afbf59dfae2c269829f757149 + * Add -Wno-pointer-sign if GCC has that option. @@ -10,6 +10,7 @@ updated). + * Add -Wno-pointer-sign if GCC has that option. --- diff --git a/changelog b/changelog index e4ab024..04f2bce 100644 --- a/changelog +++ b/changelog @@ -10,6 +10,7 @@ adns (1.2); urgency=medium * New adnsheloex client courtesy of Tony Finch (and copyright notices updated). * Add documentation comment by definition of adns_r_ptr_raw type enum. + * Add -Wno-pointer-sign if GCC has that option. -- diff --git a/configure b/configure index e5d26ec..ff4675c 100755 --- a/configure +++ b/configure @@ -1507,22 +1507,70 @@ EOF + +if test "${GCC-no}" = yes; then + WARNS="-Wall -Wmissing-prototypes -Wwrite-strings -Wstrict-prototypes -Wcast-qual -Wpointer-arith" + saved_cflags="$CFLAGS" + CFLAGS="$CFLAGS -Wno-pointer-sign" + + echo $ac_n "checking -Wno-pointer-sign""... $ac_c" 1>&6 +echo "configure:1518: checking -Wno-pointer-sign" >&5 + if eval "test \"`echo '$''{'adns_cv_c_wnoptrsign'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + adns_cv_c_wnoptrsign=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + adns_cv_c_wnoptrsign=no +fi +rm -f conftest* + +fi + + if test "x$adns_cv_c_wnoptrsign" = xyes; then + true + echo "$ac_t""yes" 1>&6 + WARNS="$WARNS -Wno-pointer-sign" + else + true + echo "$ac_t""no" 1>&6 + fi + + CFLAGS="$saved_cflags" +else + WARNS= +fi + + echo $ac_n "checking __attribute__((,,))""... $ac_c" 1>&6 -echo "configure:1513: checking __attribute__((,,))" >&5 +echo "configure:1561: checking __attribute__((,,))" >&5 if eval "test \"`echo '$''{'adns_cv_c_attribute_supported'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1574: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* adns_cv_c_attribute_supported=yes else @@ -1544,20 +1592,20 @@ EOF echo $ac_n "checking __attribute__((noreturn))""... $ac_c" 1>&6 -echo "configure:1548: checking __attribute__((noreturn))" >&5 +echo "configure:1596: checking __attribute__((noreturn))" >&5 if eval "test \"`echo '$''{'adns_cv_c_attribute_noreturn'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1609: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* adns_cv_c_attribute_noreturn=yes else @@ -1584,20 +1632,20 @@ EOF echo $ac_n "checking __attribute__((const))""... $ac_c" 1>&6 -echo "configure:1588: checking __attribute__((const))" >&5 +echo "configure:1636: checking __attribute__((const))" >&5 if eval "test \"`echo '$''{'adns_cv_c_attribute_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1649: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* adns_cv_c_attribute_const=yes else @@ -1624,20 +1672,20 @@ EOF echo $ac_n "checking __attribute__((format...))""... $ac_c" 1>&6 -echo "configure:1628: checking __attribute__((format...))" >&5 +echo "configure:1676: checking __attribute__((format...))" >&5 if eval "test \"`echo '$''{'adns_cv_attribute_format'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1689: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* adns_cv_attribute_format=yes else @@ -1671,14 +1719,6 @@ EOF -if test "${GCC-no}" = yes; then - WARNS="-Wall -Wmissing-prototypes -Wwrite-strings -Wstrict-prototypes -Wcast-qual -Wpointer-arith" -else - WARNS= -fi - - - diff --git a/configure.in b/configure.in index b214040..882a4d7 100644 --- a/configure.in +++ b/configure.in @@ -112,16 +112,24 @@ DPKG_CACHED_TRY_COMPILE(inlines,dpkg_cv_c_inline,, AC_DEFINE(HAVE_INLINE), AC_MSG_RESULT(no)) -ADNS_C_GCCATTRIB - AC_SUBST(WARNS) if test "${GCC-no}" = yes; then WARNS="-Wall -Wmissing-prototypes -Wwrite-strings -Wstrict-prototypes -Wcast-qual -Wpointer-arith" + saved_cflags="$CFLAGS" + CFLAGS="$CFLAGS -Wno-pointer-sign" + DPKG_CACHED_TRY_COMPILE(-Wno-pointer-sign,adns_cv_c_wnoptrsign,, + [], + AC_MSG_RESULT(yes) + WARNS="$WARNS -Wno-pointer-sign", + AC_MSG_RESULT(no)) + CFLAGS="$saved_cflags" else WARNS= fi +ADNS_C_GCCATTRIB + AC_SUBST(SHLIBCC) AC_SUBST(MKSHLIB_1) AC_SUBST(MKSHLIB_2)