Autoconf: How to get installation paths into config.h

前端 未结 4 597
囚心锁ツ
囚心锁ツ 2021-02-04 08:00

My program needs to load some files at run time, which will be installed into whatever folder is given to ./configure --datadir=/somewhere

As my program nee

4条回答
  •  悲&欢浪女
    2021-02-04 08:10

    AC_DEFINE_UNQUOTED([DATA_PATH], ["$pkgdatadir"])
    

    Although modifying the compiler flags is really the more usual way to do it.

提交回复
热议问题