Autoconf check for program and fail if not found

后端 未结 6 1871
小鲜肉
小鲜肉 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:26

    I found this to be the shortest approach.

    AC_CHECK_PROG(FFMPEG_CHECK,ffmpeg,yes)
    AS_IF([test x"$FFMPEG_CHECK" != x"yes"], [AC_MSG_ERROR([Please install ffmpeg before configuring.])])
    

提交回复
热议问题