Autoconf check for program and fail if not found

后端 未结 6 2084
小鲜肉
小鲜肉 2021-02-19 03:52

I\'m creating a project and using GNU Autoconf tools to do the configuring and making. I\'ve set up all my library checking and header file checking but can\'t seem to figure ou

6条回答
  •  春和景丽
    2021-02-19 04:11

    Similar to the above, but has the advantage of also being able to interact with automake by exporting the condition variable

    AC_CHECK_PROG([ffmpeg],[ffmpeg],[yes],[no])
    AM_CONDITIONAL([FOUND_FFMPEG], [test "x$ffmpeg" = xyes])
    AM_COND_IF([FOUND_FFMPEG],,[AC_MSG_ERROR([required program 'ffmpeg' not found.])])
    

提交回复
热议问题