That's the common way, a potential problem is that the binaries are in /sbin and not all users may be able to run them.
I checked a couple of projects that were likely candidate to use (parts of) e2fsprogs, like gparted - at best they really only care about the presence of libuuid and don't have any autoconf detection of e2fsprogs, or its version.
The libext2fs library exports the function ext2fs_get_library_version(), so to do this robustly:
/* gcc -lext2fs -o gete2ver gete2ver.c */
#include <stdio.h>
#include <ext2fs/ext2fs.h>
int main(int argc, char *argv[])
{
const char *e2ver, *e2date;
int ver;
ver=ext2fs_get_library_version(&e2ver,&e2date);
printf("version=%04i %s %s\n",ver,e2ver,e2date);
return 0;
}
Other options:
e2fsprogs comes with a set of libraries, so you can use pkg-config, e.g.
pkg-config --modversion ext2fs
pkg-config --modversion e2p
(But, some distros may not install enough "developer" material by default)
The translated message catalogues contain metadata in the empty "" msgid:
LANG=fr_FR gettext e2fsprogs ""
(But, there's no guarantee any particular language will be installed)