]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
stdbuf: port configure-time checking to HP-UX aCC
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 14 May 2019 16:20:56 +0000 (09:20 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 14 May 2019 16:21:33 +0000 (09:21 -0700)
Problem reported by Michael Osipov (Bug#35650).
* configure.ac: Use AC_LANG_WERROR to pay attention to compiler
and linker warnings when testing whether stdbuf will work.

configure.ac

index 0ee01b2cd83438d138ed3820e8048b72d813312f..f97ff862eb6546186f5487dd279708f7e22d2dae 100644 (file)
@@ -476,6 +476,8 @@ fi
 # Build stdbuf only if supported
 ac_save_CFLAGS=$CFLAGS
 ac_save_LDFLAGS=$LDFLAGS
+cu_save_c_werror_flag=$ac_c_werror_flag
+AC_LANG_WERROR
 # Detect warnings about ignored "constructor" attributes.
 gl_WARN_ADD([-Werror], [CFLAGS])
 gl_WARN_ADD([-errwarn], [CFLAGS])
@@ -504,6 +506,7 @@ if test "$stdbuf_supported" = "yes" && test -z "$EXEEXT"; then
 fi
 CFLAGS=$ac_save_CFLAGS
 LDFLAGS=$ac_save_LDFLAGS
+ac_c_werror_flag=$cu_save_c_werror_flag
 
 # Detect when using xlc to determine whether to use -qinclude=
 AC_CACHE_CHECK([whether the system supports xlc include], [utils_cv_xlc],