summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2016-05-27 18:04:45 +0100
committerNicholas Marriott <nicholas.marriott@gmail.com>2016-05-27 18:04:45 +0100
commit762fa58ce8de79ef06fdc673ee271dba1f193a44 (patch)
tree28e886eaaa59377901920daee36f0bf0416c9d96 /configure.ac
parentf2ec81cf210ec30418a7906abec004f7321b94f2 (diff)
parentcfef0c6658be29967f883997ba7139ca3bdef2ba (diff)
Merge branch 'master' of github.com:tmux/tmux
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac41
1 files changed, 40 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index f53414b3..636bfcc1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -121,7 +121,7 @@ AC_CHECK_FUNCS(
[ \
dirfd \
flock \
- setproctitle \
+ prctl \
sysconf \
cfmakeraw \
]
@@ -306,6 +306,20 @@ if test "x$found_daemon" = xyes; then
fi
AM_CONDITIONAL(NO_DAEMON, [test "x$found_daemon" = xno])
+# Look for getprogname, compat/getprogname.c used if missing.
+AC_CHECK_FUNC(getprogname, found_getprogname=yes, found_getprogname=no)
+if test "x$found_getprogname" = xyes; then
+ AC_DEFINE(HAVE_GETPROGNAME)
+fi
+AM_CONDITIONAL(NO_GETPROGNAME, [test "x$found_getprogname" = xno])
+
+# Look for setproctitle, compat/setproctitle.c used if missing.
+AC_CHECK_FUNC(setproctitle, found_setproctitle=yes, found_setproctitle=no)
+if test "x$found_setproctitle" = xyes; then
+ AC_DEFINE(HAVE_SETPROCTITLE)
+fi
+AM_CONDITIONAL(NO_SETPROCTITLE, [test "x$found_setproctitle" = xno])
+
# Look for setenv, compat/setenv.c used if missing.
AC_CHECK_FUNC(setenv, found_setenv=yes, found_setenv=no)
if test "x$found_setenv" = xyes; then
@@ -483,6 +497,31 @@ AC_LINK_IFELSE([AC_LANG_SOURCE(
AC_MSG_RESULT(no)
)
+# Look for program_invocation_short_name.
+AC_MSG_CHECKING(for program_invocation_short_name)
+AC_LINK_IFELSE([AC_LANG_SOURCE(
+ [
+ #include <stdio.h>
+ #include <stdlib.h>
+ extern char *program_invocation_short_name;
+ int main(void) {
+ const char *cp = program_invocation_short_name;
+ printf("%s\n", cp);
+ exit(0);
+ }
+ ])],
+ [AC_DEFINE(HAVE_PROGRAM_INVOCATION_SHORT_NAME) AC_MSG_RESULT(yes)],
+ AC_MSG_RESULT(no)
+)
+
+# Look for prctl(PR_SET_NAME).
+AC_CHECK_DECL(
+ PR_SET_NAME,
+ AC_DEFINE(HAVE_PR_SET_NAME),
+ ,
+ [#include <sys/prctl.h>]
+)
+
# Look for fcntl(F_CLOSEM).
AC_CHECK_DECL(
F_CLOSEM,