# HG changeset patch # User Guido Berhoerster # Date 1398633126 -7200 # Node ID 6e2d746b06aeec3cd78515237512bbdbb47bef07 # Parent c53bcdabbba707dff2924381d45cf0420fa2cedc Support FreeBSD > 9.0 FreeBSD 9.0 introduced a new utmpx.h interface and using utempter is no longer possible or necessary. Adding entries to or removing them from the utmp database still requires elevated privileges, the base system provides a utempter-compatible interface with libulog which xwrited now makes use of. diff -r c53bcdabbba7 -r 6e2d746b06ae Makefile --- a/Makefile Sun Apr 27 23:12:06 2014 +0200 +++ b/Makefile Sun Apr 27 23:12:06 2014 +0200 @@ -52,6 +52,9 @@ xdgautostartdir ?= $(sysconfdir)/xdg/autostart OS_NAME := $(shell uname -s) +OS_RELEASE := $(shell uname -r) + +is_in = $(if $(filter $2, $1),true,false) PKGCONFIG_LIBS := dbus-1 glib-2.0 libnotify EXTRA_LIBS := @@ -61,7 +64,13 @@ EXTRA_LIBS += -lutempter else ifeq ($(OS_NAME),FreeBSD) OBJS_UTMP := xwrited-utmp-utempter.o - EXTRA_LIBS += -lutempter + FREEBSD_RELEASE_MAJOR := $(firstword $(subst ., ,$(OS_RELEASE))) + # FreeBSD < 9.0 needs libutempter + ifeq ($(call is_in, $(OS_RELEASE_MAJOR), 7 8), true) + EXTRA_LIBS += -lutempter + else + EXTRA_LIBS += -lulog + endif else OBJS_UTMP := xwrited-utmp-utmpx.o endif