configure.ac: improve check for clock_gettime library
authorJim Meyering <meyering@fb.com>
Fri, 5 Jun 2015 15:03:00 +0000 (08:03 -0700)
committerNIIBE Yutaka <gniibe@fsij.org>
Sat, 6 Jun 2015 07:46:25 +0000 (16:46 +0900)
commita49a061c65fb3a6d9c58add4dc55435f0c4353a2
tree3d3d14f2431c237270ca8e1a949c5de71142124f
parentc2015a2bafa99fdab8f26af9b60e93f1d36ac166
configure.ac: improve check for clock_gettime library

* configure.ac: When using AC_SEARCH_LIBS, handle the case in which
that function returns "none required". Also, save and restore LIBS
around the check, and properly m4-quote the first argument to AC_DEFINE.
Finally, also set and AC_SUBST LIB_CLOCK_GETTIME.
This added code is very similar to that provided in gnulib's
clock-time.m4.
* tests/Makefile.am (LDADD): Append $(LIB_CLOCK_GETTIME).
configure.ac
tests/Makefile.am