diff options
author | Hans Ulrich Niedermann <hun@n-dimensional.de> | 2022-05-13 23:33:40 +0200 |
---|---|---|
committer | Hans Ulrich Niedermann <hun@n-dimensional.de> | 2022-05-19 22:48:45 +0200 |
commit | 26eb876839eb70d7e74d600bc584d4e407053c00 (patch) | |
tree | 580fe1208aa8cc3bdd1dad9e381f5f82ea792ace /libgphoto2_port/gphoto-m4/gp-check-doxygen.m4 | |
parent | c7c5d4cc808844a4114b1ee664da4b5402c0d66d (diff) | |
download | libgphoto2-26eb876839eb70d7e74d600bc584d4e407053c00.tar.gz |
Allow overriding build tools from configure command line
Introduce GP_CHECK_PROG macro to allow users to override
the autodetection of tools, instead of the autodetection
overriding the user's explicit wish.
GP_CHECK_PROG([SORT, [sort], [text line sorting tool])
will now allow calling
./configure SORT="mysort"
and have subsequent builds use that given value without
checking PATH. When calling `configure` without SORT=,
AC_PATH_PROG will look for `sort` in `PATH` and set
`SORT` to the value it has found.
For comparison, here is the old buggy method:
AC_ARG_VAR([SORT], [sort], [text line sorting tool])
AC_PATH_PROG([SORT], [sort], [no])
When called as `configure SORT="mysort"`, the expanded
AC_PATH_PROG will just look in `PATH` for `sort` and
set `SORT` to the `sort` it found, completely ignoring
the SORT= value given on the `configure` command line.
Diffstat (limited to 'libgphoto2_port/gphoto-m4/gp-check-doxygen.m4')
-rw-r--r-- | libgphoto2_port/gphoto-m4/gp-check-doxygen.m4 | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/libgphoto2_port/gphoto-m4/gp-check-doxygen.m4 b/libgphoto2_port/gphoto-m4/gp-check-doxygen.m4 index fe4075d06..3f336750e 100644 --- a/libgphoto2_port/gphoto-m4/gp-check-doxygen.m4 +++ b/libgphoto2_port/gphoto-m4/gp-check-doxygen.m4 @@ -1,5 +1,5 @@ # gp-check-doxygen.m4 - check for doxygen tool -*- Autoconf -*- -# serial 13 +# serial 14 dnl | Increment the above serial number every time you edit this file. dnl | When it finds multiple m4 files with the same name, dnl | aclocal will use the one with the highest serial. @@ -12,13 +12,30 @@ dnl #################################################################### dnl AC_DEFUN([GP_CHECK_DOXYGEN], [dnl dnl -AC_ARG_VAR([DOT], [graphviz dot directed graph drawing command]) -AC_PATH_PROG([DOT], [dot], [no]) +GP_CHECK_PROG([DOT], [dot], [graphviz directed graph drawing command]) +dnl AM_CONDITIONAL([HAVE_DOT], [test "x$DOT" != xno]) +AC_MSG_CHECKING([HAVE_DOT]) +AM_COND_IF([HAVE_DOT], [dnl + gp_config_msg_dot=", using dot (${DOT})" + AC_MSG_RESULT([yes ($DOT)]) +], [dnl + gp_config_msg_dot=", not using dot" + AC_MSG_RESULT([no]) +]) +dnl +dnl +GP_CHECK_PROG([DOXYGEN], [doxygen], [software documentation generator command]) dnl -AC_ARG_VAR([DOXYGEN], [software documentation generator command]) -AC_PATH_PROG([DOXYGEN], [doxygen], [no]) AM_CONDITIONAL([HAVE_DOXYGEN], [test "x$DOXYGEN" != xno]) +AC_MSG_CHECKING([HAVE_DOXYGEN]) +AM_COND_IF([HAVE_DOXYGEN], [dnl + AC_MSG_RESULT([yes ($DOXYGEN)${gp_config_msg_dot})]) + GP_CONFIG_MSG([build doxygen docs], [yes]) +], [dnl + AC_MSG_RESULT([no]) + GP_CONFIG_MSG([build doxygen docs], [no]) +]) dnl dnl Substitutions for Doxyfile.in AM_COND_IF([HAVE_DOT], |