aboutsummaryrefslogtreecommitdiffhomepage
path: root/configure.ac
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2017-03-03 15:13:30 +0100
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2017-03-03 15:32:57 +0100
commit0ad317ec16fa836321617c10a8c6ba5c70f156b8 (patch)
treeca820f937a238f9c278b96c236f87934edc07c01 /configure.ac
parentf90b197ab83dd59b230ffca21af2aa76a91d0320 (diff)
downloadsciteco-0ad317ec16fa836321617c10a8c6ba5c70f156b8.tar.gz
build system portability fixes
* especially to improve building on FreeBSD 11 * We need GNU Make, yet alone because Scintilla/Scinterm needs it. We now document that dependency and added an Autoconf check from the autoconf-archive. We make sure that the build process is invoked with GNU make by generating only GNUmakefiles. The Makefile.am files have not been renamed, so this change can be rolled back easily. * Some GNU-Make-specific autoreconf warnings have still been resolved. But not all of them, as this would have been unelegant and we need GNU Make anyway. * Declare ACLOCAL_AMFLAGS to appease autoreconf * Added an explicit check for C++11 from the autoconf-archives. In general we should support building with every C++11 compiler that is sufficiently GNU-like. * Do not use `sed` for inplace editing, as different sed-implementations have mutually incompatible syntax for this. Instead of declaring and checking a dependency on GNU sed, we simply use SciTECO for the editing task. This improves code portability on BSDs. * Similarily, BSD/POSIX `cmp` is supported now. This fixes the test suite on BSD without declaring a dependency on the GNU coreutils. * Simplified sciteco-wrapper generation.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac26
1 files changed, 20 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac
index c8dab97..928749b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -53,12 +53,24 @@ canonicalize() {
# Checks for programs.
LT_INIT
AC_PROG_CXX
+AX_CXX_COMPILE_STDCXX(11, noext, mandatory)
AC_PROG_CC
AC_PROG_CC_C99
-AC_PROG_GREP
AC_PROG_SED
AC_PROG_INSTALL
+# Mainly because of Scintilla, which depends on
+# GNU Make.
+# The main build system could be made POSIX-Make
+# compliant, but that would complicate it and
+# seems unnecessary.
+# We prevent the main build system from being
+# invoked with another Make by generating GNUmakefiles.
+AX_CHECK_GNU_MAKE
+if [[ x$ax_cv_gnu_make_command = x ]]; then
+ AC_MSG_ERROR([GNU Make required!])
+fi
+
# Additionally required by the Scintilla build process:
AC_CHECK_TOOL(AR, ar)
AC_PROG_RANLIB
@@ -352,9 +364,11 @@ AC_ARG_ENABLE(static-executables,
[static_executables=$enableval], [static_executables=no])
AM_CONDITIONAL(STATIC_EXECUTABLES, [test x$static_executables = xyes])
-AC_CONFIG_FILES([Makefile distribute.mk])
-AC_CONFIG_FILES([src/Makefile src/interface-gtk/Makefile src/interface-curses/Makefile])
-AC_CONFIG_FILES([lib/Makefile])
-AC_CONFIG_FILES([doc/Makefile doc/Doxyfile])
-AC_CONFIG_FILES([tests/Makefile tests/atlocal])
+AC_CONFIG_FILES([GNUmakefile:Makefile.in src/GNUmakefile:src/Makefile.in]
+ [src/interface-gtk/GNUmakefile:src/interface-gtk/Makefile.in]
+ [src/interface-curses/GNUmakefile:src/interface-curses/Makefile.in]
+ [lib/GNUmakefile:lib/Makefile.in]
+ [doc/GNUmakefile:doc/Makefile.in doc/Doxyfile]
+ [tests/GNUmakefile:tests/Makefile.in tests/atlocal])
+AC_CONFIG_FILES([distribute.mk], [chmod +x distribute.mk])
AC_OUTPUT