m4 - executing a shell command

Posted by ajwood on Stack Overflow See other posts from Stack Overflow or by ajwood
Published on 2011-01-07T16:42:53Z Indexed on 2011/01/07 16:54 UTC
Read the original article Hit count: 263

Filed under:
|
|

Hi,

I'm new to m4 and am trying to set up a macro which allows the user to specify the location of a library at configure-time ./configure --with-mylib=/path/to/lib.so.

In the m4 macro using AC_ARG_WITH, I'll check that the given file actually exists, and then store the path to said lib. MYLIB_PATH=esyscmd([dirname $withval]). This produces the error:

dirname: missing operand

The shell doesn't seem to know about $withval. How do I get it through to execute this command?

Thanks,

Andrew

© Stack Overflow or respective owner

Related posts about shell

Related posts about autoconf