Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Build on HP-UX fixed

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
  • Loading branch information...
commit cc9c20d63da2c0d2f4be3335c62af31ea965eb29 1 parent f7cc1a2
Andre Jonsson authored sustrik committed
Showing with 32 additions and 11 deletions.
  1. +31 −10 configure.ac
  2. +1 −1  m4/ax_pthread.m4
View
41 configure.ac
@@ -63,7 +63,7 @@ AM_PROG_CC_C_O
################################################################################
# Check whether GCC compiler is used. #
################################################################################
-AS_IF([test x"$GCC"=xyes],
+AS_IF([test x"$GCC" = xyes],
[AC_DEFINE([NN_HAVE_GCC])]
)
@@ -81,7 +81,7 @@ AC_CACHE_CHECK([whether we are using ICC compiler],
[ac_icc_compiler=yes],
[ac_icc_compiler=no])
ac_cv_icc_compiler=$ac_icc_compiler])
-AS_IF([test x"$ac_cv_icc_compiler"=xyes],
+AS_IF([test x"$ac_cv_icc_compiler" = xyes],
[AC_DEFINE([NN_HAVE_ICC])]
)
@@ -99,7 +99,7 @@ AC_CACHE_CHECK([whether we are using Sun Studio compiler],
[ac_sun_studio_compiler=yes],
[ac_sun_studio_compiler=no])
ac_cv_sun_studio_compiler=$ac_sun_studio_compiler])
-AS_IF([test x"$ac_cv_sun_studio_compiler"=xyes],
+AS_IF([test x"$ac_cv_sun_studio_compiler" = xyes],
[AC_DEFINE([NN_HAVE_SUN_STUDIO])]
)
@@ -117,11 +117,29 @@ AC_CACHE_CHECK([whether we are using clang compiler],
[ac_clang_compiler=yes],
[ac_clang_compiler=no])
ac_cv_clang_compiler=$ac_clang_compiler])
-AS_IF([test x"$ac_cv_clang_compiler"=xyes],
+AS_IF([test x"$ac_cv_clang_compiler" = xyes],
[AC_DEFINE([NN_HAVE_CLANG])]
)
################################################################################
+# Check whether HP aCC compiler is used. #
+################################################################################
+AC_CACHE_CHECK([whether we are using HP aCC compiler],
+ [ac_cv_hpacc_compiler],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([], [[
+ #ifndef __HP_cc
+ #error
+ #endif
+ ]])],
+ [ac_hpacc_compiler=yes],
+ [ac_hpacc_compiler=no])
+ ac_cv_hpacc_compiler=$ac_hpacc_compiler])
+AS_IF([test x"$ac_cv_hpacc_compiler" = xyes],
+ [AC_DEFINE([NN_HAVE_HPACC])]
+)
+
+################################################################################
# If --enable-debug is specified set appropriate compiler options. #
################################################################################
@@ -135,6 +153,8 @@ if test "x$enable_debug" = "xyes"; then
CFLAGS="-g -O0 "
elif test "x$ac_cv_sun_studio_compiler" = "xyes"; then
CFLAGS="-g0 "
+ elif test "x$ac_cv_hpacc_compiler" = "xyes"; then
+ CFLAGS="-g +O0 "
fi
ORIG_CFLAGS="${CFLAGS:-none}"
if test "x$ORIG_CFLAGS" != "xnone"; then
@@ -151,13 +171,13 @@ AC_ARG_ENABLE([doc],
AS_HELP_STRING([--enable-doc], [Build documentation [default=no]])
)
-AS_IF([test x"$enable_doc" == "xyes"], [
+AS_IF([test x"$enable_doc" = "xyes"], [
AC_CHECK_PROGS([ASCIIDOC], [asciidoc])
- AS_IF([test x"$ASCIIDOC" == "x"],[
+ AS_IF([test x"$ASCIIDOC" = "x"],[
AC_MSG_ERROR([Please install asciidoc to build the documentation])
])
AC_CHECK_PROGS([XMLTO], [xmlto])
- AS_IF([test x"$XMLTO" == "x"], [
+ AS_IF([test x"$XMLTO" = "x"], [
AC_MSG_ERROR([Please install xmlto to build the documentation])
])
])
@@ -192,6 +212,7 @@ AS_CASE([${host_os}],
[*freebsd*], [AC_DEFINE([NN_HAVE_FREEBSD])],
[*netbsd*], [AC_DEFINE([NN_HAVE_NETBSD])],
[*openbsd*], [AC_DEFINE([NN_HAVE_OPENBSD])],
+ [*hpux*], [AC_DEFINE([NN_HAVE_HPUX])],
[*solaris*], [
AC_DEFINE([NN_HAVE_SOLARIS])
AC_CHECK_LIB([socket], [socket])
@@ -278,11 +299,11 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
[[uint32_t value; atomic_cas_32 (&value, 0, 0); return 0;]])],[
AC_DEFINE([NN_HAVE_ATOMIC_SOLARIS])],[])
-AS_IF([test x"$ac_cv_func_eventfd"=xyes], [
+AS_IF([test x"$ac_cv_func_eventfd" = xyes], [
AC_DEFINE([NN_USE_EVENTFD])], [
- AS_IF([test x"$ac_cv_func_pipe"=xyes], [
+ AS_IF([test x"$ac_cv_func_pipe" = xyes], [
AC_DEFINE([NN_USE_PIPE])], [
- AS_IF([test x"$ac_cv_func_socketpair"=xyes], [
+ AS_IF([test x"$ac_cv_func_socketpair" = xyes], [
AC_DEFINE([NN_USE_SOCKETPAIR])], [
AC_MSG_ERROR([No signaling supported])
])
View
2  m4/ax_pthread.m4
@@ -123,7 +123,7 @@ fi
# which indicates that we try without any flags at all, and "pthread-config"
# which is a program returning the flags for the Pth emulation library.
-ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
+ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mt -mthreads pthread --thread-safe -mt pthread-config"
# The ordering *is* (sometimes) important. Some notes on the
# individual items follow:
Please sign in to comment.
Something went wrong with that request. Please try again.