#!/bin/sh -e
#
# Copyright (C) 2024 Mikulas Patocka
#
# This file is part of Ajla.
#
# Ajla is free software: you can redistribute it and/or modify it under the
# terms of the GNU General Public License as published by the Free Software
# Foundation, either version 3 of the License, or (at your option) any later
# version.
#
# Ajla is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with
# Ajla. If not, see <https://www.gnu.org/licenses/>.

if which ed >/dev/null 2>/dev/null && grep -q IFS=: configure && grep -q ac_tag configure; then
	ed configure <<EOF
/IFS=:
s/:/";"/
i
  ac_tag2="\`echo "\$ac_tag"|sed 's/:/;/g'\`"
.
+2
s/ac_tag/ac_tag2/g
w
q
EOF
fi
cat Makefile.in | sed 's/cp -fpR/cp -fR/g' | sed 's/cp -p /cp /g' >Makefile.inx
mv Makefile.inx Makefile.in
