(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 ()
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
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; }
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] )
----
(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))
)
)
### 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' \
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
(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 ()