Commit 7080a2ee 7080a2ee6d381f39b3cce24dbb6cef6d311dbec8 by Sergey Poznyakoff

mailutils-config: reflect eventual rename of mu, so that AM_GNU_MAILUTILS works.

* mu/.gitignore: Update.
* mu/Makefile.am: Build mailutils-config
* mu/mailutils-config.in: New file.
* mu/mailutils-config: Remove.
1 parent 1cbbd572
mu
mu-setup.c
mu-setup.h
mailutils-config
......
......@@ -16,7 +16,15 @@
## along with GNU Mailutils. If not, see <http://www.gnu.org/licenses/>.
bin_PROGRAMS = mu
dist_bin_SCRIPTS = mailutils-config
bin_SCRIPTS = mailutils-config
CLEANFILES=mailutils-config
mailutils-config: $(top_srcdir)/mu/mailutils-config.in
$(AM_V_GEN)muname=`echo mu | \
sed -e 's/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
sed 'N;N;N;s,\n, ,g'`; \
sed 's/MUNAME/'$$muname'/g' $(top_srcdir)/mu/mailutils-config.in > mailutils-config
IDLE_MODULES=
......@@ -101,7 +109,7 @@ AM_CPPFLAGS = \
-DDBMLIBS="\"$(DBMLIBS)\""
BUILT_SOURCES=mu-setup.c mu-setup.h
EXTRA_DIST=mu-setup.awk mu-setup.c mu-setup.h template.c
EXTRA_DIST=mu-setup.awk mu-setup.c mu-setup.h template.c mailutils-config.in
mu-setup.h: Makefile.am $(MODULES) $(IDLE_MODULES)
$(AM_V_GEN)$(AWK) -f $(top_srcdir)/mu/mu-setup.awk -v mode=h \
......
......@@ -15,6 +15,11 @@
# You should have received a copy of the GNU General Public License
# along with GNU Mailutils. If not, see <http://www.gnu.org/licenses/>.
# Despite being deprecated, this script is retained as an intermediate
# layer between mu and the AM_GNU_MAILUTILS macro. This is important,
# because some distros prefer to rename mu when installing. Using this
# script allows AM_GNU_MAILUTILS to find mu even if it was renamed.
mode=
file=
dir=`expr "$0" : '\(.*\)/.*'`
......@@ -29,13 +34,13 @@ alternatives instead:
Traditional usage | Use instead
------------------------------+-------------------
mailutils-config --compile | mu cflags
mailutils-config --link | mu ldflags
mailutils-config --info | mu info
mailutils-config --query | mu query
mailutils-config --query=FILE | mu query -f FILE
mailutils-config --compile | MUNAME cflags
mailutils-config --link | MUNAME ldflags
mailutils-config --info | MUNAME info
mailutils-config --query | MUNAME query
mailutils-config --query=FILE | MUNAME query -f FILE
For more information, try \`mu --help'.
For more information, try \`MUNAME --help'.
EOT
exit 0
......@@ -88,7 +93,7 @@ do
usage
;;
-V|--version|--versio|--versi|--vers|--ver|--ve|--v)
mu --version | sed -n '1{s/^mu/mailutils-config/;s/(\(GNU Mailutils\)) \([0-9][0-9.]*\).*/(\1 \2)/;p}'
MUNAME --version | sed -n '1{s/^MUNAME/mailutils-config/;s/(\(GNU Mailutils\)) \([0-9][0-9.]*\).*/(\1 \2)/;p}'
exit 0
;;
*)
......@@ -106,4 +111,4 @@ if test -n "$file"; then
set -- -f"$file" $*
fi
mu $mode $*
MUNAME $mode $*
......