通过便携式的config.h访问SYSCONFDIR [英] Portable access to sysconfdir via config.h

查看:118
本文介绍了通过便携式的config.h访问SYSCONFDIR的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想我的应用程序有便携式访问期间安装配置文件,使安装(dist_sysconf_DATA)。是否有可能访问 $(SYSCONFDIR)通过config.h中?

I'd like my application to have portable access to the configuration files installed during make install (dist_sysconf_DATA). Is it possible to access $(sysconfdir) via config.h?

推荐答案

有,但你不应该根据官方的声音(如,我不是要去搜索手册现在)这样做,以便继续支持它覆盖特定对象要建。

It is, but you should not do this according to official voices (as in, I am not gonna search the manual for it now) so as to continue supporting overriding it for specific objects to be built.

make CPPFLAGS="-USYSCONFDIR -DSYSCONFDIR=/blah" thisoneobject.o

因此​​,是应该做的事情之一:

Hence, what one is supposed to do:

AM_CPPFLAGS = -DSYSCONFDIR=\"${sysconfdir}\"

这篇关于通过便携式的config.h访问SYSCONFDIR的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆