diff --git a/configure.ac b/configure.ac index 4b68a30f..d2c41f26 100644 --- a/configure.ac +++ b/configure.ac @@ -46,7 +46,7 @@ AC_CANONICAL_HOST # define target, target_cpu, target_vendor, target_os AC_CANONICAL_TARGET -AM_INIT_AUTOMAKE([-Wall foreign std-options 1.9.6]) +AM_INIT_AUTOMAKE([-Wall -Wno-portability foreign std-options subdir-objects 1.9.6]) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) AM_MAINTAINER_MODE AC_CONFIG_SRCDIR([src/main.cxx]) diff --git a/doc/Makefile.am b/doc/Makefile.am index 57983238..4507414f 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -25,7 +25,7 @@ MOSTLYCLEANFILES = *.xml DISTCLEANFILES = $(ASCIIDOC_HTML) MAINTAINERCLEANFILES = $(ASCIIDOC_MAN_INST) -A2X_ARGS = --format=manpage --destination-dir=$(builddir)/../doc +A2X_ARGS = --format=manpage if HAVE_ASCIIDOC_NO_XMLLINT A2X_ARGS += --no-xmllint endif @@ -49,8 +49,11 @@ endif # The rest of the Makefile is enabled only if we have asciidoc if HAVE_ASCIIDOC - -ASCIIDOC_ICONS_DIR ?= /usr/share/asciidoc/images/icons +# Try to discover the correct iconsdir. Use the first one that +# contains an entry matching `tip.*'. +ASCIIDOC_ICONS_DIRS := /etc/asciidoc/icons /etc/asciidoc/images /etc/asciidoc/images/icons /etc/asciidoc/images/../icons \ + /usr/share/asciidoc/icons /usr/share/asciidoc/images /usr/share/asciidoc/images/icons +ASCIIDOC_ICONS_DIR ?= $(dir $(firstword $(strip $(foreach f,$(addsuffix /tip*,$(ASCIIDOC_ICONS_DIRS)),$(wildcard $(f)))))) # Additional attributes are defined in guide.conf ASCIIDOC_ARGS = --unsafe -a toc -a data-uri -a badges -a icons -a iconsdir=$(ASCIIDOC_ICONS_DIR) diff --git a/m4/intl/po.m4 b/m4/intl/po.m4 index 0734762a..f7c9c067 100644 --- a/m4/intl/po.m4 +++ b/m4/intl/po.m4 @@ -24,7 +24,7 @@ AC_DEFUN([AM_PO_SUBDIRS], [ AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl - AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake + AC_REQUIRE([AC_PROG_MKDIR_P])dnl AC_REQUIRE([AM_NLS])dnl dnl Release version of the gettext macros. This is used to ensure that diff --git a/m4/tls.m4 b/m4/tls.m4 index 5d8a34f5..986bed42 100644 --- a/m4/tls.m4 +++ b/m4/tls.m4 @@ -3,7 +3,7 @@ AC_DEFUN([CHECK_TLS], [ AC_MSG_CHECKING([for TLS support]) AC_LANG_PUSH(C++) - AC_RUN_IFELSE([__thread int a; int b; int main() { return a = b; }], + AC_RUN_IFELSE([AC_LANG_SOURCE([__thread int a; int b; int main() { return a = b; }])], [chktls_save_CXXFLAGS="$CXXFLAGS" thread_CXXFLAGS=failed for flag in "" "-pthread" "-lpthread"; do @@ -44,7 +44,7 @@ AC_DEFUN([CHECK_TLS], [ CXXFLAGS="$chktls_save_CXXFLAGS" fi], [ac_cv_tls=no], - [AC_LINK_IFELSE([__thread int a; int b; int main() { return a = b; }], + [AC_LINK_IFELSE([AC_LANG_SOURCE([__thread int a; int b; int main() { return a = b; }])], [ac_cv_tls=yes], [ac_cv_tls=no])] )