autoconf
[Top][All Lists]
Advanced

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

Unexpected behaviour/bug whilst using AC_CHECK_PROG


From: Pontus Sköld
Subject: Unexpected behaviour/bug whilst using AC_CHECK_PROG
Date: 20 Apr 2001 15:14:14 +0200
User-agent: Gnus/5.0807 (Gnus v5.8.7) Emacs/20.7

(verified this for version 2.13 and a version claiming to be 2.14.1,
version 2.49-d from alpha.gnu.org seems to behave similarly when I
look at the code in acgeneral.m4).

        Hi,

whilst configuring ratpoison (a very nice window manager), I ran into
problems with the following piece from configure.in

AC_ARG_WITH(xterm, [ --with-xterm=PROG        set the x terminal emulator used 
by ratpoison ],
term_prog=$withval, term_prog="xterm")
AC_DEFINE_UNQUOTED(TERM_PROG,"$term_prog")

dnl check for an x terminal emulator
AC_CHECK_PROG(TERM_PROG,$term_prog,yes,no)
if test x$TERM_PROG = xno; then
   AC_MSG_WARN([*** Can't find x terminal emulator \`$term_prog'])
fi

I can do ./configure --with-xterm=rxvt. However, when I try
./configure --with-xterm=/dis/sw/X11/bin/rxvt (where the one I want to
use is), it tells me "not found". 

Looking at how it works, that seems only natural (with AC_CHECK_PROG
checks for $term_prog in every directory in $PATH, but as my PATH
doesn't include /, it doesn't find $PATH/dis/sw/X11/bin/rxvt. Changing
the AC_CHECK_PROG line to

AC_CHECK_PROG(TERM_PROG,$term_prog,yes,no,/:$PATH)

let's me do what I think should be allowed by default (when the path
is unspecified) - I feel I should be allowed to specify the full path
to the program, at least unless someone has given an explicit PATH.

AC_PATH_PROG behaves similarly.

cheers

        /Pontus

-- 

Pontus Sköld   | Department of Information Sciences, Uppsala Universitet
+46-18-4711143 | Box 513, SE-751 20  UPPSALA, Sweden




reply via email to

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