configuring autoconf to have --with options to customise build

这一生的挚爱 提交于 2019-12-06 09:10:14

You'll want to use AC_ARG_WITH, for example:

AC_ARG_WITH(editres,
[  --without-editres                do not use editres])
if test "x${with_editres}" != "xno"; then
    AC_CHECK_LIB(Xmu, _XEditResCheckMessages,
        EDITRES_LIBS="-lXmu"
        AC_DEFINE(HAVE_EDITRES, 1), AC_DEFINE(HAVE_EDITRES, 0),
        ${X_PRE_LIBS} ${XEXT_LIBS} ${XT_LIBS} ${XEXT_LIBS} ${X11_LIBS})
else
    AC_DEFINE(HAVE_EDITRES, 0)
fi
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!