diff options
Diffstat (limited to 'libgphoto2_port/gphoto-m4')
-rw-r--r-- | libgphoto2_port/gphoto-m4/gp-check-doxygen.m4 | 27 | ||||
-rw-r--r-- | libgphoto2_port/gphoto-m4/gp-check-prog.m4 | 32 | ||||
-rw-r--r-- | libgphoto2_port/gphoto-m4/gp-progs.m4 | 32 |
3 files changed, 64 insertions, 27 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], diff --git a/libgphoto2_port/gphoto-m4/gp-check-prog.m4 b/libgphoto2_port/gphoto-m4/gp-check-prog.m4 new file mode 100644 index 000000000..8ad4241b5 --- /dev/null +++ b/libgphoto2_port/gphoto-m4/gp-check-prog.m4 @@ -0,0 +1,32 @@ +# gp-check-prog.m4 - use user given or look for tool -*- Autoconf -*- +# serial 1 +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. +dnl +dnl #################################################################### +dnl GP_CHECK_PROG([TOOLVAR], [tool], [description]) +dnl +dnl Allow users to define TOOLVAR on the `configure` command line +dnl overriding all automatic checks. Otherwise, look for `tool` in +dnl `PATH` and set `TOOLVAR` to that value. +dnl +dnl Example: +dnl GP_CHECK_PROG([SORT], [sort], [text file line sorting command])dnl +dnl +dnl ./configure SORT="busybox sort" +dnl #################################################################### +dnl +AC_DEFUN([GP_CHECK_PROG], [dnl +AC_ARG_VAR([$1], [$2][ ][$3])dnl +AS_VAR_IF([$1], [], [dnl +AC_PATH_PROG([$1], [$2], [no])dnl +]) +])dnl +dnl +dnl +dnl #################################################################### +dnl +dnl Local Variables: +dnl mode: autoconf +dnl End: diff --git a/libgphoto2_port/gphoto-m4/gp-progs.m4 b/libgphoto2_port/gphoto-m4/gp-progs.m4 index 6bf530616..e7d09f4f9 100644 --- a/libgphoto2_port/gphoto-m4/gp-progs.m4 +++ b/libgphoto2_port/gphoto-m4/gp-progs.m4 @@ -1,5 +1,5 @@ # gp-progs.m4 - look for certain well-known tools -*- Autoconf -*- -# serial 14 +# serial 15 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. @@ -15,8 +15,7 @@ dnl dnl #################################################################### m4_pattern_forbid([GP_PROG_CMP])dnl AC_DEFUN_ONCE([GP_PROG_CMP],[dnl -AC_ARG_VAR([CMP], [cmp file comparison command])dnl -AC_PATH_PROG([CMP], [cmp])dnl +GP_CHECK_PROG([CMP], [cmp], [file comparison command])dnl ])dnl dnl dnl @@ -25,8 +24,7 @@ dnl dnl #################################################################### m4_pattern_forbid([GP_PROG_COMM])dnl AC_DEFUN_ONCE([GP_PROG_COMM],[dnl -AC_ARG_VAR([COMM], [comm line by line comparison command])dnl -AC_PATH_PROG([COMM], [comm])dnl +GP_CHECK_PROG([COMM], [comm], [line by line comparison command])dnl ])dnl dnl dnl @@ -35,8 +33,7 @@ dnl dnl #################################################################### m4_pattern_forbid([GP_PROG_DIFF])dnl AC_DEFUN_ONCE([GP_PROG_DIFF],[dnl -AC_ARG_VAR([DIFF], [diff file comparison command])dnl -AC_PATH_PROG([DIFF], [diff])dnl +GP_CHECK_PROG([DIFF], [diff], [file comparison command])dnl dnl dnl DIFF_MAYBE_U only contains -u for readability, so if diff does not dnl support -u, we can still just run DIFF without -u. @@ -60,8 +57,7 @@ dnl dnl #################################################################### m4_pattern_forbid([GP_PROG_EXPR])dnl AC_DEFUN_ONCE([GP_PROG_EXPR],[dnl -AC_ARG_VAR([EXPR], [expr expression evaluation command])dnl -AC_PATH_PROG([EXPR], [expr])dnl +GP_CHECK_PROG([EXPR], [expr], [expression evaluation command])dnl ])dnl dnl dnl @@ -70,14 +66,9 @@ dnl dnl #################################################################### m4_pattern_forbid([GP_PROG_SLEEP])dnl AC_DEFUN_ONCE([GP_PROG_SLEEP],[dnl -AC_ARG_VAR([SLEEP], [sleep delay command])dnl +GP_CHECK_PROG([SLEEP], [sleep], [delay command])dnl AC_MSG_CHECKING([for sleep]) -AS_VAR_IF([SLEEP], [no], [dnl - AC_MSG_RESULT([no]) -], [dnl - AC_MSG_RESULT([yes]) - AC_PATH_PROG([SLEEP], [sleep])dnl -])dnl +AC_MSG_RESULT([${SLEEP}]) ])dnl dnl dnl @@ -86,8 +77,7 @@ dnl dnl #################################################################### m4_pattern_forbid([GP_PROG_SORT])dnl AC_DEFUN_ONCE([GP_PROG_SORT],[dnl -AC_ARG_VAR([SORT], [sort text file line sorting command])dnl -AC_PATH_PROG([SORT], [sort])dnl +GP_CHECK_PROG([SORT], [sort], [text file line sorting command])dnl ])dnl dnl dnl @@ -97,8 +87,7 @@ dnl #################################################################### m4_pattern_forbid([^GP_PROG_TR\(])dnl m4_pattern_forbid([^GP_PROG_TR$])dnl AC_DEFUN_ONCE([GP_PROG_TR],[dnl -AC_ARG_VAR([TR], [tr string character translation command])dnl -AC_PATH_PROG([TR], [tr])dnl +GP_CHECK_PROG([TR], [tr], [string character translation command])dnl ])dnl dnl dnl @@ -108,8 +97,7 @@ dnl #################################################################### m4_pattern_forbid([^GP_PROG_UNIQ\(])dnl m4_pattern_forbid([^GP_PROG_UNIQ$])dnl AC_DEFUN_ONCE([GP_PROG_UNIQ],[dnl -AC_ARG_VAR([UNIQ], [uniq sorted file uniquification command])dnl -AC_PATH_PROG([UNIQ], [uniq])dnl +GP_CHECK_PROG([UNIQ], [uniq], [sorted file unification command])dnl ])dnl dnl dnl |