autoconf
[Top][All Lists]
Advanced

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

Re: Running a shell command


From: David A. Wheeler
Subject: Re: Running a shell command
Date: Sat, 13 Oct 2012 16:35:12 -0400 (EDT)

Michael Talbot-Wilson:
> I'd like to do something like
> 
> AC_PATH_PROG([PGCONFIG],[pg_config]...
> 
> followed by employing the path PGCONFIG in a shell command and
> assigning the value returned.  If it was found, i.e. if there is a
> pg_config on the system.  Within configure.ac ...
...
> I thought it was possible to execute shell commands in configure.ac
> but a few hours searching the manual has got me nowhere.
> 
> Is such a thing possible?  How?

The "configure.ac" file *is* a (Bourne) shell script, so just insert the shell 
command in the configure.ac file, and it'll be run at that point.

If they're in a conditional, you should use AS_IF and AS_CASE, not if...fi and 
case...esac; the autoconf documentation describes those.

--- David A. Wheeler



reply via email to

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