Long story short, m4/libcurl.m4 exports LIBCURL_CFLAGS but configure.ac imports LIBCURL_CPPFLAGS. If no other component adds -I compiler flag with a path where libcurl headers are installed (by accident) Zabbix compilation will fail.
Not a regression from
ZBX-4148 this time
Seems like it's a very old bug, running (in 2.0 branch)
reveals that LIBCURL_CPPFLAGS was renamed to LIBCURL_CFLAGS in m4 script but configure script wasn't synced.