diff options
author | Eric Wong <normalperson@yhbt.net> | 2012-03-15 16:29:57 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2012-03-15 23:47:20 +0000 |
commit | 4684050a21fb7a1ac27becf3936373c48024d7cb (patch) | |
tree | 283d73f9d07e88b328d49efa19a4b9a442fa2c46 /configure.ac | |
parent | e612507a5b407fe176adcea1d8b3ad6695a7de3f (diff) | |
download | cmogstored-4684050a21fb7a1ac27becf3936373c48024d7cb.tar.gz |
We don't want a redundant CPP macro for HAVE_SETPROCTITLE, so we'll just bundle setproctitle (and anything else we'll need) into a noinst library.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 50910b5..bbf202c 100644 --- a/configure.ac +++ b/configure.ac @@ -45,5 +45,17 @@ dnl gnulib doesn't actually define SOCK_NONBLOCK/SOCK_CLOEXEC, and dnl even if it did, emulation wouldn't be thread-safe AC_CHECK_FUNCS([accept4]) +AC_SUBST(NOSTD_CFLAGS) + +# This works for all platforms we care about: +# GNU/Linux, FreeBSD, Debian GNU/kFreeBSD +AC_CHECK_FUNCS([setproctitle], [NOSTD_CFLAGS=-DHAVE_SETPROCTITLE=1], +[ +case $build_os in +*linux*) ;; +*) NOSTD_CFLAGS=-DSETPROCTITLE_NOOP;; +esac +]) + AC_CONFIG_FILES([Makefile lib/Makefile]) AC_OUTPUT |