summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2018-02-13 10:22:31 +0000
committerRoy Marples <roy@marples.name>2018-02-13 10:22:31 +0000
commit4e939a55d71f8f3e81cc1b0aa747376268c112ce (patch)
treea8c711299ab34289b7a5117196d77d7200f83ba7 /configure
parentd376c309b18d6d525e49f59820f14503a57179b6 (diff)
downloaddhcpcd-4e939a55d71f8f3e81cc1b0aa747376268c112ce.tar.xz
Add support for setproctitle(3).
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure21
1 files changed, 21 insertions, 0 deletions
diff --git a/configure b/configure
index 0eccc104..5282322c 100755
--- a/configure
+++ b/configure
@@ -799,6 +799,27 @@ else
fi
fi
+if [ -z "$SETPROCTITLE" ]; then
+ printf "Testing for setproctitle ... "
+ cat << EOF >_setproctitle.c
+#include <stdlib.h>
+int main(void) {
+ setproctitle("foo");
+ return 0;
+}
+EOF
+ if $XCC _setproctitle.c -o _setproctitle 2>&3; then
+ SETPROCTITLE=yes
+ else
+ SETPROCTITLE=no
+ fi
+ echo "$SETPROCTITLE"
+ rm -f _setproctitle.c _setproctitle
+fi
+if [ "$SETPROCTITLE" = yes ]; then
+ echo "#define HAVE_SETPROCTITLE" >>$CONFIG_H
+fi
+
if [ -z "$STRTOI" ]; then
printf "Testing for strtoi ... "
cat <<EOF >_strtoi.c