git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] autoconf: Check autoconf version (ASCIIDOC8)
@ 2007-12-09 12:57 Jakub Narebski
  2007-12-11  3:11 ` Junio C Hamano
  0 siblings, 1 reply; 3+ messages in thread
From: Jakub Narebski @ 2007-12-09 12:57 UTC (permalink / raw)
  To: git; +Cc: Jakub Narebski

Check for asciidoc, and if it exists check asciidoc version, setting
ASCIIDOC8 when needed.  Currently it just runs asciidoc in asciidoc7
compatibility mode (see: Documentation/Makefile).

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
---
Hmmm... perhaps ASCIIDOC8 should be called ASCIIDOC7COMPATIBILITY?
We should revisit Makefiles and configure.ac when asciidoc 9 gets
released.

This should be "git portability" portable, even if it is not portable
according to "instanely autoconf-like portable" rules  ;-)

 config.mak.in |    2 ++
 configure.ac  |   21 +++++++++++++++++++++
 2 files changed, 23 insertions(+), 0 deletions(-)

diff --git a/config.mak.in b/config.mak.in
index 7d5df9b..759470a 100644
--- a/config.mak.in
+++ b/config.mak.in
@@ -7,6 +7,7 @@ AR = @AR@
 TAR = @TAR@
 #INSTALL = @INSTALL@		# needs install-sh or install.sh in sources
 TCLTK_PATH = @TCLTK_PATH@
+ASCIIDOC=@ASCIIDOC@
 
 prefix = @prefix@
 exec_prefix = @exec_prefix@
@@ -23,6 +24,7 @@ VPATH = @srcdir@
 export exec_prefix mandir
 export srcdir VPATH
 
+ASCIIDOC8=@ASCIIDOC8@
 NEEDS_SSL_WITH_CRYPTO=@NEEDS_SSL_WITH_CRYPTO@
 NO_OPENSSL=@NO_OPENSSL@
 NO_CURL=@NO_CURL@
diff --git a/configure.ac b/configure.ac
index dd4b4eb..6f641e3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -122,6 +122,27 @@ if test -z "$NO_TCLTK"; then
     AC_SUBST(TCLTK_PATH)
   fi
 fi
+AC_CHECK_PROGS(ASCIIDOC, [asciidoc])
+if test -n "$ASCIIDOC"; then
+	AC_MSG_CHECKING([for asciidoc version])
+	asciidoc_version=`$ASCIIDOC --version 2>&1`
+	case "${asciidoc_version}" in
+	asciidoc' '8*)
+		ASCIIDOC8=YesPlease
+		AC_MSG_RESULT([${asciidoc_version} > 7])
+		;;
+	asciidoc' '7*)
+		ASCIIDOC8=
+		AC_MSG_RESULT([${asciidoc_version}])
+		;;
+	*)
+		ASCIIDOC8=
+		AC_MSG_RESULT([${asciidoc_version} (unknown)])
+		;;
+	esac
+fi
+AC_SUBST(ASCIIDOC8)
+
 
 ## Checks for libraries.
 AC_MSG_NOTICE([CHECKS for libraries])
-- 
1.5.3.7

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] autoconf: Check autoconf version (ASCIIDOC8)
  2007-12-09 12:57 [PATCH] autoconf: Check autoconf version (ASCIIDOC8) Jakub Narebski
@ 2007-12-11  3:11 ` Junio C Hamano
  2007-12-11  8:34   ` Jakub Narebski
  0 siblings, 1 reply; 3+ messages in thread
From: Junio C Hamano @ 2007-12-11  3:11 UTC (permalink / raw)
  To: Jakub Narebski; +Cc: git

Jakub Narebski <jnareb@gmail.com> writes:

> Subject: Re: [PATCH] autoconf: Check autoconf version (ASCIIDOC8)

That's "Check asciidoc version".

> Check for asciidoc, and if it exists check asciidoc version, setting
> ASCIIDOC8 when needed.  Currently it just runs asciidoc in asciidoc7
> compatibility mode (see: Documentation/Makefile).
>
> Signed-off-by: Jakub Narebski <jnareb@gmail.com>
> ---
> diff --git a/config.mak.in b/config.mak.in
> index 7d5df9b..759470a 100644
> --- a/config.mak.in
> +++ b/config.mak.in
> @@ -7,6 +7,7 @@ AR = @AR@
>  TAR = @TAR@
>  #INSTALL = @INSTALL@		# needs install-sh or install.sh in sources
>  TCLTK_PATH = @TCLTK_PATH@
> +ASCIIDOC=@ASCIIDOC@

And this is "ASCIIDOC8=@ASCIIDOC8@", I think.

Will apply with the said fixups.

Thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] autoconf: Check autoconf version (ASCIIDOC8)
  2007-12-11  3:11 ` Junio C Hamano
@ 2007-12-11  8:34   ` Jakub Narebski
  0 siblings, 0 replies; 3+ messages in thread
From: Jakub Narebski @ 2007-12-11  8:34 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

Junio C Hamano wrote:
> Jakub Narebski <jnareb@gmail.com> writes:
> 
> > Subject: Re: [PATCH] autoconf: Check autoconf version (ASCIIDOC8)
> 
> That's "Check asciidoc version".

Yep. Sorry for mistake (autoconf <-> asciidoc).

> > Check for asciidoc, and if it exists check asciidoc version, setting
> > ASCIIDOC8 when needed.  Currently it just runs asciidoc in asciidoc7
> > compatibility mode (see: Documentation/Makefile).
> >
> > Signed-off-by: Jakub Narebski <jnareb@gmail.com>
> > ---
> > diff --git a/config.mak.in b/config.mak.in
> > index 7d5df9b..759470a 100644
> > --- a/config.mak.in
> > +++ b/config.mak.in
> > @@ -7,6 +7,7 @@ AR = @AR@
> >  TAR = @TAR@
> >  #INSTALL = @INSTALL@		# needs install-sh or install.sh in sources
> >  TCLTK_PATH = @TCLTK_PATH@
> > +ASCIIDOC=@ASCIIDOC@
> 
> And this is "ASCIIDOC8=@ASCIIDOC8@", I think.

Nope. ASCIIDOC8=@ASCIIDOC8@ is in chunk below, this is for [future]
detecting asciidoc binary (so you can drop this chunk).

-- 
Jakub Narebski
Poland

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-12-11  8:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-09 12:57 [PATCH] autoconf: Check autoconf version (ASCIIDOC8) Jakub Narebski
2007-12-11  3:11 ` Junio C Hamano
2007-12-11  8:34   ` Jakub Narebski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).