We don't need this local lib check macro. We can use AX_CHECK_LIBRARY from autoconf-archive.
Use AX_CXX_CHECK_LIB from autoconf archive instead of AC_LIB_HAVE_LINKFLAGS which is from gettext and causes a bunch of other stuff to need to be copied in.