MOHAMED
MOHAMED

Reputation: 43518

For automake: How to execute a command in the configure.ac?

In the automake

I want to assign to a Makefile variable a command execution result

How to do it in the configure.ac?

Upvotes: 1

Views: 2545

Answers (1)

William Pursell
William Pursell

Reputation: 212238

To assign the output of echo foo to the variable var (ie, var=foo), put this in configure.ac:

AC_SUBST([var],[$( echo foo )])  # use backticks for maximal portability

Or, assign var and then invoke AC_SUBST([var]) (with no second argument).

Upvotes: 6

Related Questions