diff mbox series

[bug#38107,1/1] configure.ac: Warn about etc/indent-code.el when Emacs is absent.

Message ID 20191107182725.9919-1-zimon.toutoune@gmail.com
State Accepted
Headers show
Series Warn about etc/indent-code.el when Emacs is absent. | expand

Commit Message

Simon Tournier Nov. 7, 2019, 6:27 p.m. UTC
---
 configure.ac | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

Comments

Ludovic Courtès Nov. 8, 2019, 10:56 p.m. UTC | #1
zimoun <zimon.toutoune@gmail.com> skribis:

> ---
>  configure.ac | 11 ++++++++---
>  1 file changed, 8 insertions(+), 3 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index 689b28d984..599addfe59 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -280,9 +280,14 @@ dnl Documentation translation.
>  AM_MISSING_PROG([PO4A_TRANSLATE], [po4a-translate])
>  AM_MISSING_PROG([PO4A_UPDATEPO], [po4a-updatepo])
>  
> -dnl Emacs (optional), for 'etc/indent-package.el'.
> -AC_PATH_PROG([EMACS], [emacs], [/usr/bin/emacs])
> -AC_SUBST([EMACS])
> +dnl Emacs (optional), for 'etc/indent-code.el'.
> +AC_PATH_PROG([EMACS], [emacs])
> +if test "x$EMACS" = x; then
> +    AC_MSG_WARN([Install GNU Emacs to use etc/indent-code.el])
> +else
> +    AC_SUBST([EMACS])
> +    AC_CONFIG_FILES([etc/indent-code.el], [chmod +x etc/indent-code.el])
> +fi

I removed the redundant ‘AC_CONFIG_FILES’ from the bottom, adjusted the
commit log, and applied.

Thanks!

Ludo’.
diff mbox series

Patch

diff --git a/configure.ac b/configure.ac
index 689b28d984..599addfe59 100644
--- a/configure.ac
+++ b/configure.ac
@@ -280,9 +280,14 @@  dnl Documentation translation.
 AM_MISSING_PROG([PO4A_TRANSLATE], [po4a-translate])
 AM_MISSING_PROG([PO4A_UPDATEPO], [po4a-updatepo])
 
-dnl Emacs (optional), for 'etc/indent-package.el'.
-AC_PATH_PROG([EMACS], [emacs], [/usr/bin/emacs])
-AC_SUBST([EMACS])
+dnl Emacs (optional), for 'etc/indent-code.el'.
+AC_PATH_PROG([EMACS], [emacs])
+if test "x$EMACS" = x; then
+    AC_MSG_WARN([Install GNU Emacs to use etc/indent-code.el])
+else
+    AC_SUBST([EMACS])
+    AC_CONFIG_FILES([etc/indent-code.el], [chmod +x etc/indent-code.el])
+fi
 
 case "$storedir" in
   /gnu/store)