summaryrefslogtreecommitdiff
path: root/acinclude.m4
diff options
context:
space:
mode:
authorMikko Koppanen <mkoppanen@php.net>2010-11-15 17:02:36 +0100
committerMartin Sustrik <sustrik@250bpm.com>2010-11-15 17:02:36 +0100
commitda3327cf8780ea4d454e0aa8904b5aab3c446b23 (patch)
tree6b6aad52b65f4652b9559fb86049a4fa296e3cb8 /acinclude.m4
parentf77c8ca47ff77af44eab7b4b8538ed49ec428eda (diff)
Build refactoring
Signed-off-by: Mikko Koppanen <mkoppanen@php.net>
Diffstat (limited to 'acinclude.m4')
-rw-r--r--acinclude.m453
1 files changed, 53 insertions, 0 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index be5d149..e2cef30 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -15,3 +15,56 @@ AC_DEFUN([AC_CHECK_LANG_ICC],
[is_icc=no])
ac_cv_[]_AC_LANG_ABBREV[]_intel_compiler=$is_icc
])])
+
+dnl ##############################################################################
+dnl # AC_CHECK_LANG_SUN_STUDIO #
+dnl # Check if the current language is compiled using Sun Studio #
+dnl ##############################################################################
+AC_DEFUN([AC_CHECK_LANG_SUN_STUDIO],
+ [AC_CACHE_CHECK([whether we are using Sun Studio _AC_LANG compiler],
+ [ac_cv_[]_AC_LANG_ABBREV[]_sun_studio_compiler],
+ [_AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],
+[[#if !defined(__SUNPRO_CC) && !defined(__SUNPRO_C)
+ error if not sun studio
+#endif
+]])],
+ [is_sun_studio=yes],
+ [is_sun_studio=no])
+ac_cv_[]_AC_LANG_ABBREV[]_sun_studio_compiler=$is_sun_studio
+])])
+
+dnl ##############################################################################
+dnl # AC_CHECK_DOC_BUILD #
+dnl # Check whether to build documentation and install man-pages #
+dnl ##############################################################################
+AC_DEFUN([AC_CHECK_DOC_BUILD], [{
+ # Determine whether or not documentation should be built and installed.
+ build_doc="yes"
+ install_man="yes"
+ # Check for asciidoc and xmlto and don't build the docs if these are not installed.
+ AC_CHECK_PROG(have_asciidoc, asciidoc, yes, no)
+ AC_CHECK_PROG(have_xmlto, xmlto, yes, no)
+ if test "x$have_asciidoc" = "xno" -o "x$have_xmlto" = "xno"; then
+ build_doc="no"
+ # Tarballs built with 'make dist' ship with prebuilt documentation.
+ if ! test -f doc/zmq.7; then
+ install_man="no"
+ AC_MSG_WARN([You are building an unreleased version of 0MQ and asciidoc or xmlto are not installed.])
+ AC_MSG_WARN([Documentation will not be built and manual pages will not be installed.])
+ fi
+ fi
+
+ # Do not install man pages if on mingw
+ if test "x$on_mingw32" = "xyes"; then
+ install_man="no"
+ fi
+
+ AC_MSG_CHECKING([whether to build documentation])
+ AC_MSG_RESULT([$build_doc])
+
+ AC_MSG_CHECKING([whether to install manpages])
+ AC_MSG_RESULT([$install_man])
+
+ AM_CONDITIONAL(BUILD_DOC, test "x$build_doc" = "xyes")
+ AM_CONDITIONAL(INSTALL_MAN, test "x$install_man" = "xyes")
+}])