Autoconf check for program and fail if not found

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

    Try this which is what I just lifted from a project of mine, it looks for something called quantlib-config in the path:

    # borrowed from a check for gnome in GNU gretl: def. a check for quantlib-config
    AC_DEFUN(AC_PROG_QUANTLIB, [AC_CHECK_PROG(QUANTLIB,quantlib-config,yes)])
    AC_PROG_QUANTLIB
    if test x"${QUANTLIB}" == x"yes" ; then
        # use quantlib-config for QL settings
        [.... more stuff omitted here ...]
    else
        AC_MSG_ERROR([Please install QuantLib before trying to build RQuantLib.])
    fi
    

提交回复
热议问题