From: Todd C. Miller Date: Wed, 28 Jul 2010 20:27:45 +0000 (-0400) Subject: Only try to use +DAportable for non-GCC on hppa X-Git-Tag: SUDO_1_8_0~309 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=036a9d81bdc37a9cd9366b01ddc68594cd2e0748;p=sudo Only try to use +DAportable for non-GCC on hppa --- diff --git a/configure b/configure index dc75431f4..905edf23c 100755 --- a/configure +++ b/configure @@ -12661,10 +12661,13 @@ done : ${mansectsu='1m'} : ${mansectform='4'} - # Use the +DAportable flag if it is supported - _CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS +DAportable" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands +DAportable" >&5 + if test -z "$GCC"; then + # Use the +DAportable flag on hppa if it is supported + case "$host_cpu" in + hppa*) + _CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS +DAportable" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands +DAportable" >&5 $as_echo_n "checking whether $CC understands +DAportable... " >&6; } if test "${sudo_cv_var_daportable+set}" = set; then : $as_echo_n "(cached) " >&6 @@ -12693,8 +12696,11 @@ rm -f core conftest.err conftest.$ac_objext \ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $sudo_cv_var_daportable" >&5 $as_echo "$sudo_cv_var_daportable" >&6; } - if test X"$sudo_cv_var_daportable" != X"yes"; then - CFLAGS="$_CFLAGS" + if test X"$sudo_cv_var_daportable" != X"yes"; then + CFLAGS="$_CFLAGS" + fi + ;; + esac fi case "$host" in diff --git a/configure.in b/configure.in index c8ec4ac9b..f258265ee 100644 --- a/configure.in +++ b/configure.in @@ -1473,20 +1473,26 @@ case "$host" in : ${mansectsu='1m'} : ${mansectform='4'} - # Use the +DAportable flag if it is supported - _CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS +DAportable" - AC_CACHE_CHECK([whether $CC understands +DAportable], - [sudo_cv_var_daportable], - [AC_LINK_IFELSE( - [AC_LANG_PROGRAM([[]], [[]])], - [sudo_cv_var_daportable=yes], - [sudo_cv_var_daportable=no] + if test -z "$GCC"; then + # Use the +DAportable flag on hppa if it is supported + case "$host_cpu" in + hppa*) + _CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS +DAportable" + AC_CACHE_CHECK([whether $CC understands +DAportable], + [sudo_cv_var_daportable], + [AC_LINK_IFELSE( + [AC_LANG_PROGRAM([[]], [[]])], + [sudo_cv_var_daportable=yes], + [sudo_cv_var_daportable=no] + ) + ] ) - ] - ) - if test X"$sudo_cv_var_daportable" != X"yes"; then - CFLAGS="$_CFLAGS" + if test X"$sudo_cv_var_daportable" != X"yes"; then + CFLAGS="$_CFLAGS" + fi + ;; + esac fi case "$host" in