Make librt optional, required for at least OpenBSD

master
Jasper Lievisse Adriaanse 2014-10-15 21:08:17 +02:00
parent c42b864654
commit 3e169c4726
2 changed files with 7 additions and 2 deletions

View File

@ -209,7 +209,7 @@ test_keyseq_LDADD = $(TESTS_LDADD)
test_rulescomp_LDADD = $(TESTS_LDADD)
test_rmlvo_to_kccgst_LDADD = $(TESTS_LDADD)
test_print_compiled_keymap_LDADD = $(TESTS_LDADD)
test_compose_LDADD = $(TESTS_LDADD) -lrt
test_compose_LDADD = $(TESTS_LDADD) $(RT_LIBS)
if BUILD_LINUX_TESTS
check_PROGRAMS += \
@ -242,7 +242,7 @@ check_PROGRAMS += $(TESTS)
# Benchmarks
##
BENCH_LDADD = $(TESTS_LDADD) -lrt
BENCH_LDADD = $(TESTS_LDADD) $(RT_LIBS)
check_PROGRAMS += \
bench/key-proc \

View File

@ -95,6 +95,11 @@ XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wdocumentation])
XORG_CHECK_LINKER_FLAGS([-Wl,--no-undefined], [have_no_undefined=yes])
AM_CONDITIONAL([HAVE_NO_UNDEFINED], [test "x$have_no_undefined" = xyes])
AC_CHECK_LIB(rt, clock_gettime,
[AC_SUBST(RT_LIBS, "-lrt")],
[AC_SUBST(RT_LIBS, "")],
[-lrt])
# Define a configuration option for the XKB config root
xkb_base=`$PKG_CONFIG --variable=xkb_base xkeyboard-config`
AS_IF([test "x$xkb_base" = x], [