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
1 mu 1 mu
2 mu-setup.c 2 mu-setup.c
3 mu-setup.h 3 mu-setup.h
4 mailutils-config
......
...@@ -16,7 +16,15 @@ ...@@ -16,7 +16,15 @@
16 ## along with GNU Mailutils. If not, see <http://www.gnu.org/licenses/>. 16 ## along with GNU Mailutils. If not, see <http://www.gnu.org/licenses/>.
17 17
18 bin_PROGRAMS = mu 18 bin_PROGRAMS = mu
19 dist_bin_SCRIPTS = mailutils-config 19 bin_SCRIPTS = mailutils-config
20
21 CLEANFILES=mailutils-config
22 mailutils-config: $(top_srcdir)/mu/mailutils-config.in
23 $(AM_V_GEN)muname=`echo mu | \
24 sed -e 's/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
25 sed 'N;N;N;s,\n, ,g'`; \
26 sed 's/MUNAME/'$$muname'/g' $(top_srcdir)/mu/mailutils-config.in > mailutils-config
27
20 28
21 IDLE_MODULES= 29 IDLE_MODULES=
22 30
...@@ -101,7 +109,7 @@ AM_CPPFLAGS = \ ...@@ -101,7 +109,7 @@ AM_CPPFLAGS = \
101 -DDBMLIBS="\"$(DBMLIBS)\"" 109 -DDBMLIBS="\"$(DBMLIBS)\""
102 110
103 BUILT_SOURCES=mu-setup.c mu-setup.h 111 BUILT_SOURCES=mu-setup.c mu-setup.h
104 EXTRA_DIST=mu-setup.awk mu-setup.c mu-setup.h template.c 112 EXTRA_DIST=mu-setup.awk mu-setup.c mu-setup.h template.c mailutils-config.in
105 113
106 mu-setup.h: Makefile.am $(MODULES) $(IDLE_MODULES) 114 mu-setup.h: Makefile.am $(MODULES) $(IDLE_MODULES)
107 $(AM_V_GEN)$(AWK) -f $(top_srcdir)/mu/mu-setup.awk -v mode=h \ 115 $(AM_V_GEN)$(AWK) -f $(top_srcdir)/mu/mu-setup.awk -v mode=h \
......
...@@ -15,6 +15,11 @@ ...@@ -15,6 +15,11 @@
15 # You should have received a copy of the GNU General Public License 15 # You should have received a copy of the GNU General Public License
16 # along with GNU Mailutils. If not, see <http://www.gnu.org/licenses/>. 16 # along with GNU Mailutils. If not, see <http://www.gnu.org/licenses/>.
17 17
18 # Despite being deprecated, this script is retained as an intermediate
19 # layer between mu and the AM_GNU_MAILUTILS macro. This is important,
20 # because some distros prefer to rename mu when installing. Using this
21 # script allows AM_GNU_MAILUTILS to find mu even if it was renamed.
22
18 mode= 23 mode=
19 file= 24 file=
20 dir=`expr "$0" : '\(.*\)/.*'` 25 dir=`expr "$0" : '\(.*\)/.*'`
...@@ -29,13 +34,13 @@ alternatives instead: ...@@ -29,13 +34,13 @@ alternatives instead:
29 34
30 Traditional usage | Use instead 35 Traditional usage | Use instead
31 ------------------------------+------------------- 36 ------------------------------+-------------------
32 mailutils-config --compile | mu cflags 37 mailutils-config --compile | MUNAME cflags
33 mailutils-config --link | mu ldflags 38 mailutils-config --link | MUNAME ldflags
34 mailutils-config --info | mu info 39 mailutils-config --info | MUNAME info
35 mailutils-config --query | mu query 40 mailutils-config --query | MUNAME query
36 mailutils-config --query=FILE | mu query -f FILE 41 mailutils-config --query=FILE | MUNAME query -f FILE
37 42
38 For more information, try \`mu --help'. 43 For more information, try \`MUNAME --help'.
39 44
40 EOT 45 EOT
41 exit 0 46 exit 0
...@@ -88,7 +93,7 @@ do ...@@ -88,7 +93,7 @@ do
88 usage 93 usage
89 ;; 94 ;;
90 -V|--version|--versio|--versi|--vers|--ver|--ve|--v) 95 -V|--version|--versio|--versi|--vers|--ver|--ve|--v)
91 mu --version | sed -n '1{s/^mu/mailutils-config/;s/(\(GNU Mailutils\)) \([0-9][0-9.]*\).*/(\1 \2)/;p}' 96 MUNAME --version | sed -n '1{s/^MUNAME/mailutils-config/;s/(\(GNU Mailutils\)) \([0-9][0-9.]*\).*/(\1 \2)/;p}'
92 exit 0 97 exit 0
93 ;; 98 ;;
94 *) 99 *)
...@@ -106,4 +111,4 @@ if test -n "$file"; then ...@@ -106,4 +111,4 @@ if test -n "$file"; then
106 set -- -f"$file" $* 111 set -- -f"$file" $*
107 fi 112 fi
108 113
109 mu $mode $* 114 MUNAME $mode $*
......