]> granicus.if.org Git - sudo/commitdiff
Only try to use +DAportable for non-GCC on hppa
authorTodd C. Miller <Todd.Miller@courtesan.com>
Wed, 28 Jul 2010 17:54:15 +0000 (13:54 -0400)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Wed, 28 Jul 2010 17:54:15 +0000 (13:54 -0400)
Check the value of $pic_flag insteaf of whether the compiler is ANSI C
when detecting the HP-UX bundled C compiler.

--HG--
branch : 1.7

configure
configure.in

index 2ba1bdbc93141d524a1adb2f6a69d2b0693b45e5..879bb8599747d6dbaf0e3cf6c565b9307d1666b5 100755 (executable)
--- a/configure
+++ b/configure
@@ -12670,15 +12670,18 @@ done
                : ${mansectsu='1m'}
                : ${mansectform='4'}
 
-               # HP-UX bundled compiler can't generate shared objects
-               if test "x$ac_cv_prog_cc_c89" = "xno"; then
-                   with_noexec=no
-               fi
+               if test -z "$GCC"; then
+                   # HP-UX bundled compiler can't generate shared objects
+                   if -z "$pic_flag"; then
+                       with_noexec=no
+                   fi
 
-               # 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
+                   # 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
@@ -12707,8 +12710,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
index deb22cda616146b4c2a13f3b5975d6e1b31e4d0a..2182e98c68927857c02a90c7f64c72634b327c27 100644 (file)
@@ -1454,25 +1454,31 @@ case "$host" in
                : ${mansectsu='1m'}
                : ${mansectform='4'}
 
-               # HP-UX bundled compiler can't generate shared objects
-               if test "x$ac_cv_prog_cc_c89" = "xno"; then
-                   with_noexec=no
-               fi
+               if test -z "$GCC"; then
+                   # HP-UX bundled compiler can't generate shared objects
+                   if -z "$pic_flag"; then
+                       with_noexec=no
+                   fi
 
-               # 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]
+                   # 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