[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: AC_PROG_PERL (macro, docs, used in configure.in)
From: |
Akim Demaille |
Subject: |
Re: AC_PROG_PERL (macro, docs, used in configure.in) |
Date: |
24 Jan 2001 09:13:38 +0100 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.1 (Crater Lake) |
Index: acspecific.m4
===================================================================
RCS file: /cvs/autoconf/acspecific.m4,v
retrieving revision 1.331
diff -u -r1.331 acspecific.m4
--- acspecific.m4 2001/01/23 17:04:36 1.331
+++ acspecific.m4 2001/01/23 20:54:54
@@ -297,6 +297,39 @@
])# AC_PROG_LN_S
+# AC_PROG_PERL([MIN-VERSION])
+# ---------------------------
+AC_DEFUN(AC_PROG_PERL,
Please, *always* quote arguments, included here.
+[# find perl binary
+AC_MSG_CHECKING([for perl])
+AC_CACHE_VAL(ac_cv_prog_PERL,
+[ifelse([$1],,,
+ [echo "configure:__oline__: ...version $1 required"
>&AS_MESSAGE_LOG_FD])
+ # allow user to override
+ if test -n "$PERL"; then
+ ac_try="$PERL"
+ else
+ ac_try="perl perl5"
+ fi
+
+ for ac_prog in $ac_try; do
+ echo "configure:__oline__: trying $ac_prog" >&AS_MESSAGE_LOG_FD
+ if ($ac_prog -e 'printf "found version %g\n",$[@:>@];' ifelse([$1],,,
Quotation of the quadrigraph is overkill here, but not wrong.
Globally, that's one place that would enjoy using AC_TRY_COMMAND or
so. Can be done later, just thinking aloud.
+ [-e 'require $1;'])) 1>&AS_MESSAGE_LOG_FD 2>&1; then
+ ac_cv_prog_PERL=$ac_prog
+ break
+ fi
+ done])dnl
+PERL="$ac_cv_prog_PERL"
+if test -n "$PERL"; then
+ AC_MSG_RESULT($PERL)
+else
+ AC_MSG_RESULT(no)
+fi
+AC_SUBST(PERL)dnl
+])# AC_PROG_PERL
+
+
# AC_RSH
# ------
# I don't know what it used to do, but it no longer does.
Index: doc/autoconf.texi
===================================================================
RCS file: /cvs/autoconf/doc/autoconf.texi,v
retrieving revision 1.421
diff -u -r1.421 autoconf.texi
--- doc/autoconf.texi 2001/01/22 19:21:58 1.421
+++ doc/autoconf.texi 2001/01/23 20:55:06
@@ -2811,6 +2811,35 @@
@end example
@end defmac
address@hidden AC_PROG_PERL
address@hidden PROG_PERL
address@hidden PERL
+If @code{perl} is found, set output variable @code{PERL} to the name of its
+executable. Otherwise, leave it empty.
+By default, @code{perl} and @code{perl5} are tried, but you can use the
address@hidden variable to override the list of executables to check.
+
+The optional argument to this macro specifies a minimum version to find;
Arguments, including optional args, should be given in the signature
of the macro:
@defmac AC_PROG_PERL @ovar{version}
address@hidden will not be set if too old a perl is found. Make sure you use
+perl's version numbering conventions though: '5.6' is seen as version 5,
+subversion 600 (not 6); you need to use 5.006 to require perl 5.6.0.
:) :) :) Gosh!
I'll fix this myself, thanks!
- AC_PROG_PERL (macro, docs, used in configure.in), Tim Van Holder, 2001/01/23
- Re: AC_PROG_PERL (macro, docs, used in configure.in), Alexandre Oliva, 2001/01/23
- Re: AC_PROG_PERL (macro, docs, used in configure.in),
Akim Demaille <=
- Re: AC_PROG_PERL (macro, docs, used in configure.in), Akim Demaille, 2001/01/24
- Re: AC_PROG_PERL (macro, docs, used in configure.in), Akim Demaille, 2001/01/24
- Re: AC_PROG_PERL (macro, docs, used in configure.in), Akim Demaille, 2001/01/24
- Re: AC_PROG_PERL (macro, docs, used in configure.in), Pavel Roskin, 2001/01/26
- Re: AC_PROG_PERL (macro, docs, used in configure.in), Akim Demaille, 2001/01/27
- Re: AC_PROG_PERL (macro, docs, used in configure.in), Pavel Roskin, 2001/01/29
- Re: AC_PROG_PERL (macro, docs, used in configure.in), Akim Demaille, 2001/01/30
- Re: AC_PROG_PERL (macro, docs, used in configure.in), Pavel Roskin, 2001/01/30
- Re: AC_PROG_PERL (macro, docs, used in configure.in), Russ Allbery, 2001/01/24