How to include .m4 files in Autoconf?

前端 未结 5 876
孤街浪徒
孤街浪徒 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条回答
  •  闹比i
    闹比i (楼主)
    2021-02-05 05:29

    You may want to add AC_CONFIG_MACRO_DIR to configure.ac to the directory where the macro is:

    AC_CONFIG_MACRO_DIR([path/to/macros])
    

    You'll need to invoke the macro somewhere in this file also.

    and in Makefile.am you'll probably need to set up ACLOCAL_AMFLAGS (if you are using automake):

    ACLOCAL_AMFLAGS         = -I path/to/macros
    

    Then invoke autoreconf -fvi and you should be set.

提交回复
热议问题