chiark / gitweb /
build-sys: support old glibc versions without clock_gettime()
authorKay Sievers <kay@vrfy.org>
Tue, 30 Jul 2013 01:38:55 +0000 (03:38 +0200)
committerKay Sievers <kay@vrfy.org>
Tue, 30 Jul 2013 01:46:14 +0000 (03:46 +0200)
configure.ac

index 76aa2a9..f71e15c 100644 (file)
@@ -191,17 +191,22 @@ AM_CONDITIONAL([HAVE_PYTHON_DEVEL], [test "$have_python_devel" = "yes"])
 # ------------------------------------------------------------------------------
 
 AC_SEARCH_LIBS([dlsym], [dl], [], [AC_MSG_ERROR([*** Dynamic linking loader library not found])])
+AC_CHECK_HEADERS([sys/capability.h], [], [AC_MSG_ERROR([*** POSIX caps headers not found])])
+
+# unconditionally pull-in librt with old glibc versions
+AC_SEARCH_LIBS([clock_gettime], [rt], [], [])
 
 save_LIBS="$LIBS"
 LIBS=
 AC_SEARCH_LIBS([cap_init], [cap], [], [AC_MSG_ERROR([*** POSIX caps library not found])])
-AC_CHECK_HEADERS([sys/capability.h], [], [AC_MSG_ERROR([*** POSIX caps headers not found])])
 CAP_LIBS="$LIBS"
+AC_SUBST(CAP_LIBS)
+
+LIBS=
 AC_SEARCH_LIBS([mq_open], [rt], [], [AC_MSG_ERROR([*** POSIX RT library not found])])
 RT_LIBS="$LIBS"
 AC_SUBST(RT_LIBS)
 LIBS="$save_LIBS"
-AC_SUBST(CAP_LIBS)
 
 AC_CHECK_FUNCS([fanotify_init fanotify_mark])
 AC_CHECK_FUNCS([__secure_getenv secure_getenv])