autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Proposal for AC_PROG_PERL


From: Pavel Roskin
Subject: Proposal for AC_PROG_PERL
Date: Mon, 19 Feb 2001 11:14:16 -0500 (EST)

Hello!

We have two types of macros for searching for programs - the first of them
always return path (AC_PATH_PROG), the other one doesn't normally add
path (AC_CHECK_PROG).

Sometimes we need both. For example, one may want to hardcode AWK with
full path into the first line of AWK scripts. On the other hand, shell
scripts don't normally need to use the full path, but they should still
use the AWK found by configure.

Autoconf doesn't have any conventions regarding what variables can be used
in what macros. The same variable AWK can have a different meaning
dependent on how it's calculated. But we cannot have both in the same
configure,in:

AC_CHECK_PROGS(AWK, mawk gawk nawk awk, )
AC_PATH_PROGS(AWK, mawk gawk nawk awk, )

In fact, Autoconf provides a macro AC_PROG_AWK that does the former, but
not the later. It cannot be used to find AWK with the full path. Now we
are facing a similar problem with AC_PROG_PERL, except that it's now
Autoconf itself that will suffer from its own tradition.

My proposal is:

Whenever the first argument to AC_CHECK_PROGS begins with "PATH_" it
should work as AC_PATH_PROGS. The same for AC_CHECK_PROG and
AC_PATH_PROG.

Special macros for certain programs that don't currently have an argument
(AC_PROG_AWK, AC_PROG_RANLIB etc) should take an argument - the variables
to be defined. The variables beginning with "PROG_" will get the full
path.

This means, that

AC_PROG_PERL([PERL PATH_PERL])

will define PERL to "perl" and PATH_PERL to e.g. "/usr/bin/perl"

I suggest that we implement AC_PROG_PERL in the new form. Everything else
can be adjusted later.

Regards,
Pavel Roskin




reply via email to

[Prev in Thread] Current Thread [Next in Thread]