mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-01-11 16:08:13 +00:00
Adjust better to Autoconf quoting style change
* admin/gitmerge.el (gitmerge-emacs-version): * admin/nt/dist-build/build-zips.sh (ACTUAL_VERSION): * admin/quick-install-emacs (VERSION): * lisp/cedet/ede/emacs.el (ede-emacs-version): Adjust to change in configure.ac’s Autoconf quoting style. * etc/srecode/ede-autoconf.srt: * test/lisp/progmodes/autoconf-tests.el: (autoconf-tests-current-defun-function-define) (autoconf-tests-current-defun-function-subst): Use better Autoconf quoting. * make-dist (version): Simplify.
This commit is contained in:
parent
e482379a65
commit
54e0b14a69
@ -124,7 +124,7 @@ If nil, the function `gitmerge-default-branch' guesses.")
|
||||
(let ((coding-system-for-read vc-git-log-output-coding-system))
|
||||
(call-process "git" nil t nil "show" (format "%s:configure.ac" branch)))
|
||||
(goto-char (point-min)))
|
||||
(re-search-forward "^AC_INIT([^,]+, \\([0-9]+\\)\\.")
|
||||
(re-search-forward "^AC_INIT([^,]+, \\[?\\([0-9]+\\)\\.")
|
||||
(string-to-number (match-string 1))))
|
||||
|
||||
(defun gitmerge-default-branch ()
|
||||
|
@ -148,7 +148,7 @@ done
|
||||
if [ -z $ACTUAL_VERSION ];
|
||||
then
|
||||
ACTUAL_VERSION=`
|
||||
sed -n 's/^AC_INIT(GNU Emacs,[ ]*\([^ ,)]*\).*/\1/p' < ../../../configure.ac
|
||||
sed -n 's/^AC_INIT(\[*GNU Emacs]*,[ ]*\[*\([^] ,)]*\).*/\1/p' < ../../../configure.ac
|
||||
`
|
||||
fi
|
||||
|
||||
|
@ -172,10 +172,10 @@ test x"$prefix" = x && { prefix="`get_config_var prefix`" || exit 4 ; }
|
||||
test x"$ARCH" = x && { ARCH="`get_config_var host`" || exit 4 ; }
|
||||
|
||||
VERSION=`
|
||||
sed -n 's/^AC_INIT([ ]*emacs[ ]*,[ ]*\([^ ),]*\).*/\1/p' <$SRC/configure.ac
|
||||
sed -n 's/^AC_INIT([ ]*\[*emacs]*[ ]*,[ ]*\[*\([^] ),]*\).*/\1/p' <$SRC/configure.ac
|
||||
` || exit 4
|
||||
test -n "$VERSION" || VERSION=`
|
||||
sed -n 's/^AC_INIT([ ]*GNU Emacs[ ]*,[ ]*\([^ ),]*\).*/\1/p' <$SRC/configure.ac
|
||||
sed -n 's/^AC_INIT([ ]*\[*GNU Emacs]*[ ]*,[ ]*\[*\([^] ),]*\).*/\1/p' <$SRC/configure.ac
|
||||
` || exit 4
|
||||
test -n "$VERSION" || { printf '%s\n' >&2 "$me: no version in configure.ac"; exit 4; }
|
||||
|
||||
|
@ -44,10 +44,10 @@ template ede-empty :project
|
||||
|
||||
AC_INIT({{PROJECT_NAME}}, {{PROJECT_VERSION}})
|
||||
AM_INIT_AUTOMAKE([{{PROGRAM}}], 0)
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
AM_CONFIG_HEADER([config.h])
|
||||
|
||||
{{comment_prefix}} End the configure script.
|
||||
AC_OUTPUT(Makefile, [date > stamp-h] )
|
||||
AC_OUTPUT([Makefile], [date > stamp-h] )
|
||||
----
|
||||
|
||||
|
||||
|
@ -59,7 +59,7 @@ Return a tuple of ( EMACSNAME . VERSION )."
|
||||
(file-exists-p (setq configure_ac "configure.in")))
|
||||
(insert-file-contents configure_ac)
|
||||
(goto-char (point-min))
|
||||
(re-search-forward "AC_INIT(\\(?:GNU \\)?[eE]macs,\\s-*\\([0-9.]+\\)\\s-*[,)]")
|
||||
(re-search-forward "AC_INIT(\\[?\\(?:GNU \\)?[eE]macs]?,\\s-*\\[?\\([0-9.]+\\)]?\\s-*[,)]")
|
||||
(setq ver (match-string 1))
|
||||
)
|
||||
)
|
||||
|
@ -174,7 +174,7 @@ fi
|
||||
|
||||
### Find out which version of Emacs this is.
|
||||
version=`
|
||||
sed -n 's/^AC_INIT(\[GNU Emacs],[ ]*\[\([^ ,)]*\)].*/\1/p' <configure.ac
|
||||
sed -n 's/^AC_INIT(\[GNU Emacs],[ ]*\[\([^]]*\).*/\1/p' <configure.ac
|
||||
` || version=
|
||||
if [ ! "${version}" ]; then
|
||||
printf '%s\n' \
|
||||
|
11
src/xterm.c
11
src/xterm.c
@ -233,18 +233,19 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */
|
||||
EMACS_CHECK_MODULES([XFIXES], [$XFIXES_MODULES])
|
||||
if test $HAVE_XFIXES = no; then
|
||||
# Test old way in case pkg-config doesn't have it (older machines).
|
||||
AC_CHECK_HEADER(X11/extensions/Xfixes.h,
|
||||
[AC_CHECK_LIB(Xfixes, XFixesHideCursor, HAVE_XFIXES=yes)])
|
||||
AC_CHECK_HEADER([X11/extensions/Xfixes.h],
|
||||
[AC_CHECK_LIB([Xfixes], [XFixesHideCursor], [HAVE_XFIXES=yes])])
|
||||
if test $HAVE_XFIXES = yes; then
|
||||
XFIXES_LIBS=-lXfixes
|
||||
fi
|
||||
fi
|
||||
if test $HAVE_XFIXES = yes; then
|
||||
AC_DEFINE(HAVE_XFIXES, 1, [Define to 1 if you have the Xfixes extension.])
|
||||
AC_DEFINE([HAVE_XFIXES], [1],
|
||||
[Define to 1 if you have the Xfixes extension.])
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(XFIXES_CFLAGS)
|
||||
AC_SUBST(XFIXES_LIBS)
|
||||
AC_SUBST([XFIXES_CFLAGS])
|
||||
AC_SUBST([XFIXES_LIBS])
|
||||
|
||||
Then, make sure to adjust CFLAGS and LIBES in src/Makefile.in and
|
||||
add the new XFIXES_CFLAGS and XFIXES_LIBS variables to
|
||||
|
@ -31,18 +31,18 @@
|
||||
|
||||
(ert-deftest autoconf-tests-current-defun-function-define ()
|
||||
(with-temp-buffer
|
||||
(insert "AC_DEFINE(HAVE_RSVG, 1, [Define to 1 if using librsvg.])")
|
||||
(insert "AC_DEFINE([HAVE_RSVG], [1], [Define to 1 if using librsvg.])")
|
||||
(goto-char (point-min))
|
||||
(should-not (autoconf-current-defun-function))
|
||||
(forward-char 10)
|
||||
(forward-char 11)
|
||||
(should (equal (autoconf-current-defun-function) "HAVE_RSVG"))))
|
||||
|
||||
(ert-deftest autoconf-tests-current-defun-function-subst ()
|
||||
(with-temp-buffer
|
||||
(insert "AC_SUBST(srcdir)")
|
||||
(insert "AC_SUBST([srcdir])")
|
||||
(goto-char (point-min))
|
||||
(should-not (autoconf-current-defun-function))
|
||||
(forward-char 9)
|
||||
(forward-char 10)
|
||||
(should (equal (autoconf-current-defun-function) "srcdir"))))
|
||||
|
||||
(ert-deftest autoconf-tests-autoconf-mode-comment-syntax ()
|
||||
|
Loading…
Reference in New Issue
Block a user