From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Matthew Leach Newsgroups: gmane.emacs.devel Subject: [PATCH v2 1/4] Check for libsystemd when building Emacs. Date: Sun, 27 Mar 2016 21:39:40 +0100 Message-ID: <1459111183-27018-2-git-send-email-matthew@mattleach.net> References: <1459111183-27018-1-git-send-email-matthew@mattleach.net> NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1459111236 31479 80.91.229.3 (27 Mar 2016 20:40:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 27 Mar 2016 20:40:36 +0000 (UTC) Cc: Matthew Leach To: emacs-devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Mar 27 22:40:23 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1akHTx-0004ua-L0 for ged-emacs-devel@m.gmane.org; Sun, 27 Mar 2016 22:40:21 +0200 Original-Received: from localhost ([::1]:37352 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1akHTt-0008T4-Q7 for ged-emacs-devel@m.gmane.org; Sun, 27 Mar 2016 16:40:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53454) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1akHTW-0008S3-NP for emacs-devel@gnu.org; Sun, 27 Mar 2016 16:39:56 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1akHTT-00005q-Qr for emacs-devel@gnu.org; Sun, 27 Mar 2016 16:39:54 -0400 Original-Received: from mx0.mattleach.net ([176.58.118.143]:54134) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1akHTT-00005m-Lo for emacs-devel@gnu.org; Sun, 27 Mar 2016 16:39:51 -0400 Original-Received: by mx0.mattleach.net (Postfix, from userid 99) id 3ED2F62231; Sun, 27 Mar 2016 21:39:51 +0100 (BST) Original-Received: from localhost.localdomain (host81-159-23-200.range81-159.btcentralplus.com [81.159.23.200]) by mx0.mattleach.net (Postfix) with ESMTPSA id 29ED86222D; Sun, 27 Mar 2016 21:39:50 +0100 (BST) X-Mailer: git-send-email 2.7.4 In-Reply-To: <1459111183-27018-1-git-send-email-matthew@mattleach.net> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 176.58.118.143 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:202305 Archived-At: * configure.ac: Add new default-on option systemd and check for necessary systemd libraries at configure time. * src/Makefile.in: Add libsystemd library and C flags to the Emacs compilation options. --- configure.ac | 13 +++++++++++++ src/Makefile.in | 6 +++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index f3846f4..d3628d2 100644 --- a/configure.ac +++ b/configure.ac @@ -330,6 +330,7 @@ OPTION_DEFAULT_ON([tiff],[don't compile with TIFF image support]) OPTION_DEFAULT_ON([gif],[don't compile with GIF image support]) OPTION_DEFAULT_ON([png],[don't compile with PNG image support]) OPTION_DEFAULT_ON([rsvg],[don't compile with SVG image support]) +OPTION_DEFAULT_ON([systemd],[don't compile with systemd support]) OPTION_DEFAULT_OFF([cairo],[compile with Cairo drawing (experimental)]) OPTION_DEFAULT_ON([xml2],[don't compile with XML parsing support]) OPTION_DEFAULT_ON([imagemagick],[don't compile with ImageMagick image support]) @@ -2716,6 +2717,18 @@ fi AC_SUBST(LIBGNUTLS_LIBS) AC_SUBST(LIBGNUTLS_CFLAGS) +HAVE_SYSTEMD=no +if test "${with_systemd}" = "yes" ; then + EMACS_CHECK_MODULES([LIBSYSTEMD], [libsystemd >= 226], + [HAVE_SYSTEMD=yes], [HAVE_SYSTEMD=no]) + if test "${HAVE_SYSTEMD}" = "yes"; then + AC_DEFINE(HAVE_SYSTEMD, 1, [Define if using systemd.]) + fi +fi + +AC_SUBST(LIBSYSTEMD_LIBS) +AC_SUBST(LIBSYSTEMD_CFLAGS) + NOTIFY_OBJ= NOTIFY_SUMMARY=no diff --git a/src/Makefile.in b/src/Makefile.in index c290a60..fc9360a 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -307,6 +307,9 @@ LIBSELINUX_LIBS = @LIBSELINUX_LIBS@ LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ +LIBSYSTEMD_LIBS = @LIBSYSTEMD_LIBS@ +LIBSYSTEMD_CFLAGS = @LIBSYSTEMD_CFLAGS@ + INTERVALS_H = dispextern.h intervals.h composite.h GETLOADAVG_LIBS = @GETLOADAVG_LIBS@ @@ -372,6 +375,7 @@ ALL_CFLAGS=-Demacs $(MYCPPFLAGS) -I. -I$(srcdir) \ $(WEBKIT_CFLAGS) \ $(SETTINGS_CFLAGS) $(FREETYPE_CFLAGS) $(FONTCONFIG_CFLAGS) \ $(LIBOTF_CFLAGS) $(M17N_FLT_CFLAGS) $(DEPFLAGS) \ + $(LIBSYSTEMD_CFLAGS) \ $(LIBGNUTLS_CFLAGS) $(NOTIFY_CFLAGS) $(CAIRO_CFLAGS) \ $(WARN_CFLAGS) $(WERROR_CFLAGS) $(CFLAGS) ALL_OBJC_CFLAGS=$(ALL_CFLAGS) $(GNU_OBJC_CFLAGS) @@ -489,7 +493,7 @@ LIBES = $(LIBS) $(W32_LIBS) $(LIBS_GNUSTEP) $(LIBX_BASE) $(LIBIMAGE) \ $(LIBS_TERMCAP) $(GETLOADAVG_LIBS) $(SETTINGS_LIBS) $(LIBSELINUX_LIBS) \ $(FREETYPE_LIBS) $(FONTCONFIG_LIBS) $(LIBOTF_LIBS) $(M17N_FLT_LIBS) \ $(LIBGNUTLS_LIBS) $(LIB_PTHREAD) $(GETADDRINFO_A_LIBS) \ - $(NOTIFY_LIBS) $(LIB_MATH) $(LIBZ) $(LIBMODULES) + $(NOTIFY_LIBS) $(LIB_MATH) $(LIBZ) $(LIBMODULES) $(LIBSYSTEMD_LIBS) $(leimdir)/leim-list.el: bootstrap-emacs$(EXEEXT) $(MAKE) -C ../leim leim-list.el EMACS="$(bootstrap_exe)" -- 2.7.4