From 35114c9e629c53546c8e95edd6def7b3e1692c7a Mon Sep 17 00:00:00 2001 From: Michael Marshall <43034299+mmphys@users.noreply.github.com> Date: Wed, 17 Feb 2021 13:24:15 +0000 Subject: [PATCH] Mac OS (Darwin) sed -i flag for in-place editing differs from posix / gnu --- configure.ac | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 7d95e4e2..702ce826 100644 --- a/configure.ac +++ b/configure.ac @@ -7,7 +7,12 @@ AM_INIT_AUTOMAKE([subdir-objects 1.13]) AM_EXTRA_RECURSIVE_TARGETS([tests bench]) AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_SRCDIR([Grid/Grid.h]) -AC_CONFIG_HEADERS([Grid/Config.h],[[sed -i '' -e 's|PACKAGE_|GRID_|' -e 's|[[:space:]]PACKAGE[[:space:]]| GRID_PACKAGE |' -e 's|[[:space:]]VERSION[[:space:]]| GRID_PACKAGE_VERSION |' Grid/Config.h]]) +AC_CONFIG_HEADERS([Grid/Config.h],[[$SED_INPLACE -e 's|PACKAGE_|GRID_|' -e 's|[[:space:]]PACKAGE[[:space:]]| GRID_PACKAGE |' -e 's|[[:space:]]VERSION[[:space:]]| GRID_PACKAGE_VERSION |' Grid/Config.h]], + [if test x"$host_os" == x"${host_os#darwin}" ; then] + [SED_INPLACE="sed -i"] + [else] + [SED_INPLACE="sed -i .bak"] + [fi]) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) ################ Get git info