Fixes a bug introduced in #19614
The LevelDB-specific fdatasync check was only using AC_SUBST
, which works for Makefiles, but doesn’t define anything for C++. Furthermore, the #define is typically 0 or 1, never undefined.
This fixes both issues by defining it and checking its value instead of whether it is merely defined.
Pulled out of #14501 by fanquake’s request