diff options
author | James Abbatiello <jabbatiello@factset.com> | 2021-01-19 13:51:59 -0500 |
---|---|---|
committer | BenBE <BenBE@geshi.org> | 2021-01-20 15:04:03 +0100 |
commit | b20bb543ced602748d3d5fad191dda07919be13d (patch) | |
tree | 95985ef9bd94bb16a3357c656b9eb08f1d9300fb /configure.ac | |
parent | 03824da684731557ecf2e809ade6310277744a7e (diff) |
Find the correct library for clock_gettime before trying to use it
Otherwise if clock_gettime is librt then this code will incorrectly believe
that the function does not exist at all.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac index 1feeb0fc..59081807 100644 --- a/configure.ac +++ b/configure.ac @@ -92,6 +92,10 @@ AC_TYPE_UINT64_T # ---------------------------------------------------------------------- AC_FUNC_CLOSEDIR_VOID AC_FUNC_STAT + +AC_SEARCH_LIBS([dlopen], [dl dld]) +AC_SEARCH_LIBS([clock_gettime], [rt]) + AC_CHECK_FUNCS([\ clock_gettime\ faccessat\ @@ -101,9 +105,6 @@ AC_CHECK_FUNCS([\ readlinkat\ ]) -AC_SEARCH_LIBS([dlopen], [dl dld]) -AC_SEARCH_LIBS([clock_gettime], [rt]) - save_cflags="${CFLAGS}" CFLAGS="${CFLAGS} -std=c99" AC_MSG_CHECKING([whether cc -std=c99 option works]) |