From 6ac33ad57be76cf5d0190d7f2d6ef0dd86e66cda Mon Sep 17 00:00:00 2001 From: Mark Grondona <mgrondona@llnl.gov> Date: Wed, 11 Jun 2003 20:37:26 +0000 Subject: [PATCH] o add tests for setproctitle() emulation --- acinclude.m4 | 29 +++++++++++++++++++++++++++++ configure.ac | 7 +++++++ 2 files changed, 36 insertions(+) diff --git a/acinclude.m4 b/acinclude.m4 index ad074f341af..a5ffa5ef833 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -90,6 +90,33 @@ AC_DEFUN([AC_SLURM_USE_INCLUDED_POPT], ]) +dnl +dnl Perform checks related to setproctitle() emulation +dnl +AC_DEFUN([AC_SLURM_SETPROCTITLE], +[ +# +case "$host" in +*-*-aix*) + AC_DEFINE(SETPROCTITLE_STRATEGY,PS_USE_CLOBBER_ARGV) + AC_DEFINE(SETPROCTITLE_PS_PADDING, '\0') + ;; +*-*-hpux*) + AC_DEFINE(SETPROCTITLE_STRATEGY,PS_USE_PSTAT) + ;; +*-*-linux*) + AC_DEFINE(SETPROCTITLE_STRATEGY,PS_USE_CLOBBER_ARGV) + AC_DEFINE(SETPROCTITLE_PS_PADDING, '\0') + ;; +*) + AC_DEFINE(SETPROCTITLE_STRATEGY,PS_USE_NONE, + [Define to the setproctitle() emulation type]) + AC_DEFINE(SETPROCTITLE_PS_PADDING, '\0', + [Define if you need setproctitle padding]) + ;; +esac +]) + dnl dnl dnl @@ -484,3 +511,5 @@ CPPFLAGS="$saved_CPPFLAGS" LDFLAGS="$saved_LDFLAGS" ])dnl AC_SLURM_WITH_SSL + + diff --git a/configure.ac b/configure.ac index 936b480f179..18169c14b86 100644 --- a/configure.ac +++ b/configure.ac @@ -74,8 +74,10 @@ AC_CHECK_FUNCS( \ inet_aton \ inet_ntop \ inet_pton \ + setproctitle \ ) + AC_CHECK_DECLS([strsignal, sys_siglist]) ACX_PTHREAD([], AC_MSG_ERROR([Error: Cannot figure out how to use pthreads!])) @@ -89,6 +91,7 @@ LIBS="$PTHREAD_LIBS $LIBS" AC_SLURM_SEMAPHORE AC_SLURM_USE_INCLUDED_POPT + dnl checks for system services. dnl @@ -96,6 +99,10 @@ dnl dnl checks for system-specific stuff. dnl +dnl check for how to emulate setproctitle +dnl +AC_SLURM_SETPROCTITLE + dnl check for debug compilation dnl AC_MSG_CHECKING(whether debug compilation of modules is enabled) -- GitLab