+# 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" <<EOF
+clang
+-DHAVE_CONFIG_H
+-I.
+-I./include
+-I./lib
+-I./lib/assert
+-DSYSCONFDIR="${ac_frr_sysconfdir}"
+-DCONFDATE=${ac_frr_confdate}
+EOF
+ if test "$ac_abs_top_builddir" != "$ac_abs_top_srcdir"; then
+ echo "-I${ac_abs_top_builddir}" >> "${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" <<EOF
+%c $(echo ${FRR_ALL_CCLS_CFLAGS} | sed -e 's/ */\n%c /g')
+%c -Wno-unused-function
+EOF
+fi
+ ], [
+ FRR_ALL_CCLS_FLAGS="$(echo ${LIBYANG_CFLAGS} ${LUA_INCLUDE} ${SQLITE3_CFLAGS} | sed -e 's/ */ /g')"
+ FRR_ALL_CCLS_CFLAGS="$(echo ${CFLAGS} ${WERROR} ${AC_CFLAGS} ${SAN_FLAGS} | sed -e 's/ */ /g')"
+ ac_frr_confdate="${CONFDATE}"
+ ac_frr_sysconfdir="${sysconfdir}/"
+ ])
+])
+
+