How to include .m4 files in Autoconf?

前端 未结 5 873
孤街浪徒
孤街浪徒 2021-02-05 04:46

I have downloaded a macro from Autoconf Archive, and I want to use it. What do I have to put in my configure.ac file to make use this macro?

5条回答
  •  一生所求
    2021-02-05 05:14

    As an alternative to Idav1s' solution (which is absolutely correct), you can install the macro in a location where aclocal will find it (use aclocal --print to see where aclocal is looking for .m4 files). Each approach has pros and cons. If you install the .m4 files in $(aclocal --print), you can use the macro in all of your projects without doing anything else. The primary drawback is that each developer who works on the project will have to install the macro on their box, and that requires each developer to have a reasonable understanding of the autotools.

提交回复
热议问题