X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=configure.ac;h=0120c517c64a4564ffbb3d16c87f3973896b9978;hb=HEAD;hp=b9af7686419325d5076039abda5cda5d16ef1299;hpb=da57946b0e9fdb24133860df931a53dbd6646f84;p=mirror_frr.git diff --git a/configure.ac b/configure.ac index b9af76864..0120c517c 100644 --- a/configure.ac +++ b/configure.ac @@ -794,6 +794,9 @@ if test "$ac_cv_lib_json_c_json_object_get" = "no"; then fi ]) +AC_ARG_ENABLE([ccls], +AS_HELP_STRING([--enable-ccls], [Write .ccls config for this build])) + AC_ARG_ENABLE([dev_build], AS_HELP_STRING([--enable-dev-build], [build for development])) @@ -2820,6 +2823,42 @@ AC_CONFIG_FILES([tools/frrcommon.sh]) AC_CONFIG_FILES([tools/frr.service]) AC_CONFIG_FILES([tools/frr@.service]) +# dnl write out a ccls file with our compile configuration +# dnl have to add -Wno-unused-function otherwise foobar_cmd_magic causes +# dnl all DEFPY(), et al., macros to flag as errors. +AS_IF([test "$enable_ccls" = "yes"], [ + AC_CONFIG_COMMANDS([gen-dot-ccls], [ + cat > "${srcdir}/.ccls" <> "${srcdir}/.ccls" + fi + if test -n "$FRR_ALL_CCLS_FLAGS"; then + echo ${FRR_ALL_CCLS_FLAGS} | tr ' ' '\n' >> "${srcdir}/.ccls" + fi + if test -n "$FRR_ALL_CCLS_CFLAGS"; then + cat >> "${srcdir}/.ccls" <