From 2b03e4ea2f63bff82fb7caae455533bb9045bfbf Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Thu, 27 Nov 2014 16:01:44 +0000 Subject: Make use of buildsystem REQUIRED_LIBS to add -lrt when required --- Makefile | 9 +++++++++ libnsutils.pc.in | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 7d3f128..b6a1448 100644 --- a/Makefile +++ b/Makefile @@ -25,6 +25,15 @@ else endif CFLAGS := $(CFLAGS) -D_POSIX_C_SOURCE=200809L +REQUIRED_LIBS := nsutils + +# Strictly the requirement for rt is dependant on both the clib and if +# the build is using rt features like clock_gettime() but this check +# will suffice +ifeq ($(BUILD),x86_64-linux-gnu) + REQUIRED_LIBS := $(REQUIRED_LIBS) rt +endif + TESTCFLAGGS := -g -O2 TESTLDFLAGS := -lm -l$(COMPONENT) $(TESTLDFLAGS) diff --git a/libnsutils.pc.in b/libnsutils.pc.in index c30afe0..38023de 100644 --- a/libnsutils.pc.in +++ b/libnsutils.pc.in @@ -6,5 +6,5 @@ includedir=${prefix}/include Name: libnsutils Description: NetSurf utilities Version: VERSION -Libs: -L${libdir} -lnsutils +Libs: -L${libdir} LIBRARIES Cflags: -I${includedir} -- cgit v1.2.3