From fe1b34e78e39a9ce27da0519a3880bd5672a8086 Mon Sep 17 00:00:00 2001 From: Olaf Bergmann Date: Tue, 3 Mar 2015 16:33:36 +0100 Subject: [PATCH] Check if ctags supports option --c-kinds This option is used to extract function names from C header files but is not supported by all versions of ctags. In particular, the version included with GNU Emacs does not recognize it. This simple test checks if '--c-kinds=f' is recognized and emits a warning otherwise. --- configure.ac | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/configure.ac b/configure.ac index 66151149..7d37a691 100644 --- a/configure.ac +++ b/configure.ac @@ -221,6 +221,12 @@ if test "x$CTAGS_PROG" = "x"; then AC_MSG_WARN([==> Without ctags you will be unable to run the target 'update-map-file'!]) AC_MSG_WARN([==> This is no problem if you just want to build the library libcoap.]) fi +if ! "$CTAGS_PROG" --c-kinds=f /dev/null &>/dev/null; then + AC_MSG_NOTICE([==> Note: your ctags does not support '--c-kinds'!]) + AC_MSG_NOTICE([==> Most likely, you are using the GNU Emacs ctag and not exuberant ctag]) + AC_MSG_WARN([==> This option is required for target 'update-map-file']) + AC_MSG_WARN([==> which is not a problem if you just want to build the library libcoap.]) +fi # Checks for header files. AC_CHECK_HEADERS([assert.h arpa/inet.h limits.h netdb.h netinet/in.h \