From 2d0d1c9e6fa5fba583194bd1020d69fe2afc7fb4 Mon Sep 17 00:00:00 2001 From: Jim Hague Date: Thu, 2 Nov 2017 13:21:50 +0000 Subject: [PATCH] Add configure --with-piddir. Use this for runstatedir. You need autoconf 2.70 (or 2.69 plus patch as in Debian) for runstatedir to be automatically in the configure script. This adds a always-present config option. --- configure.ac | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/configure.ac b/configure.ac index 1c7dc8e1..b07ca624 100644 --- a/configure.ac +++ b/configure.ac @@ -38,6 +38,17 @@ sinclude(./m4/pkg.m4) AC_INIT([getdns], [1.2.1], [users@getdnsapi.net], [], [https://getdnsapi.net]) +# Autoconf 2.70 will have set up runstatedir. 2.69 is frequently (Debian) +# patched to do the same, but frequently (MacOS) not. So add a with option +# for pid file location, and default it to runstatedir if present. +default_piddir=${runstatedir:-"${localstatedir}/run"} +AC_ARG_WITH([piddir], + [AS_HELP_STRING([--with-piddir=DIR], + [directory for pid files @<:@default=RUNSTATEDIR or LOCALSTATEDIR/run@:>@])], + [], + [with_piddir=${default_piddir}]) +AC_SUBST([runstatedir], [$with_piddir]) + # Dont forget to put a dash in front of the release candidate!!! # That is how it is done with semantic versioning! #