--- m4/curl-compilers.m4.orig	2015-05-22 11:18:30.124939800 +0300
+++ m4/curl-compilers.m4	2015-05-22 11:20:20.511942319 +0300
@@ -175,7 +175,9 @@
 AC_DEFUN([CURL_CHECK_COMPILER_HPUX_C], [
   AC_MSG_CHECKING([if compiler is HP-UX C])
   CURL_CHECK_DEF([__HP_cc], [], [silent])
-  if test "$curl_cv_have_def___HP_cc" = "yes"; then
+  CURL_CHECK_DEF([__hpux], [], [silent])
+  if test "$curl_cv_have_def___HP_cc" = "yes" ||
+    test "$curl_cv_have_def___hpux" = "yes"; then
     AC_MSG_RESULT([yes])
     compiler_id="HP_UX_C"
     flags_dbg_all="-g -s"
