On Wed, 2010-10-20 at 22:54 +0200, Christophe Fergeau wrote: > What I wanted to ask the list for now is if such a patch is wanted, > and to get feedback on how things are done in it, and what should be > improved in it. [2] and [3] might be useful reading while looking at > the patch.
You can simplify the environment preserving with these changes: http://hg.dovecot.org/dovecot-2.0/rev/e0a97842182f http://hg.dovecot.org/dovecot-2.0/rev/d1fd5b84d410 > +if HAVE_SYSTEMD > +dovecot_SOURCES += sd-daemon.c > +noinst_HEADERS += sd-daemon.h > +endif I don't think this is portable. You could do it instead like: if HAVE_SYSTEMD SD_SOURCES = sd-daemon.c endif dovecot_SOURCES = \ $(SD_SOURCES) \ .. noinst_HEADERS = \ sd-daemon.h \ .. I don't think there's any reason to put sd-daemon.h behind "if". > + AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for > systemd service files]), > + [], [with_systemdsystemunitdir=$($PKG_CONFIG > --variable=systemdsystemunitdir systemd)]) Is this a common name for this option? If not, I'd prefer a shorter name.