diff options
author | David Lamparter <equinox@opensourcerouting.org> | 2021-09-02 12:19:59 +0200 |
---|---|---|
committer | David Lamparter <equinox@opensourcerouting.org> | 2021-09-02 13:00:35 +0200 |
commit | 2554d1265c11257a79bfa541c5f0efcfdf097312 (patch) | |
tree | 0d4a13d867d14fa8af465514342ea6c2481dc809 /configure.ac | |
parent | doc/developer: add warning pointers (diff) | |
download | frr-2554d1265c11257a79bfa541c5f0efcfdf097312.tar.xz frr-2554d1265c11257a79bfa541c5f0efcfdf097312.zip |
build: make `sed` calls portable
The `-i` option on sed isn't standard, and e.g. FreeBSD sed behaves
different regarding the parameter. Avoid it.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac index cf1c1e499..917e79118 100644 --- a/configure.ac +++ b/configure.ac @@ -487,9 +487,12 @@ LT_INIT _LT_CONFIG_LIBTOOL([ patch -N -i "${srcdir}/m4/libtool-whole-archive.patch" libtool >&AS_MESSAGE_LOG_FD || \ AC_MSG_WARN([Could not patch libtool for static linking support. Loading modules into a statically linked daemon will fail.]) - sed -e 's%func_warning "relinking%true #\0%' -i libtool || true - sed -e 's%func_warning "remember to run%true #\0%' -i libtool || true - sed -e 's%func_warning ".*has not been installed in%true #\0%' -i libtool || true +dnl the -i option is not POSIX sed and the BSDs implement it differently +dnl cat'ing the output back instead of mv/cp keeps permissions on libtool intact + sed -e 's%func_warning "relinking%true #\0%' libtool > libtool.sed && cat libtool.sed > libtool + sed -e 's%func_warning "remember to run%true #\0%' libtool > libtool.sed && cat libtool.sed > libtool + sed -e 's%func_warning ".*has not been installed in%true #\0%' libtool > libtool.sed && cat libtool.sed > libtool + test -f libtool.sed && rm libtool.sed ]) if test "$enable_static_bin" = "yes"; then AC_LDFLAGS_EXEC="-static" @@ -2659,8 +2662,9 @@ if test "$enable_rpath" = "yes" ; then true else # See https://old-en.opensuse.org/openSUSE:Packaging_Guidelines#Removing_Rpath - sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool - sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool + sed -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool > libtool.sed && cat libtool.sed > libtool + sed -e 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool > libtool.sed && cat libtool.sed > libtool + test -f libtool.sed && rm libtool.sed fi echo " |