Skip to content

Commit

Permalink
Add --disable-utempter to build without it.
Browse files Browse the repository at this point in the history
  • Loading branch information
nicm committed Apr 3, 2016
1 parent 5658b62 commit 75b2c16
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 8 deletions.
3 changes: 3 additions & 0 deletions README
Expand Up @@ -15,6 +15,9 @@ To build tmux from a release tarball, do:
$ ./configure && make
$ sudo make install

By default, tmux will use the utempter library to update utmp(5), if it is
installed. Run configure with --disable-utempter to disable this.

To get and build the latest from version control:

$ git clone https://github.com/tmux/tmux.git
Expand Down
24 changes: 16 additions & 8 deletions configure.ac
Expand Up @@ -167,16 +167,24 @@ if test "x$found_curses" = xno; then
fi

# Look for utempter.
AC_CHECK_HEADER(utempter.h, found_utempter=yes, found_utempter=no)
AC_ARG_ENABLE(
utempter,
AC_HELP_STRING(--enable-utempter, use utempter if it is installed),
found_utempter=$enable_utempter,
found_utempter=yes
)
if test "x$found_utempter" = xyes; then
AC_SEARCH_LIBS(
utempter_add_record,
utempter,
found_utempter=yes,
found_utempter=no
)
AC_CHECK_HEADER(utempter.h, found_utempter=yes, found_utempter=no)
if test "x$found_utempter" = xyes; then
AC_DEFINE(HAVE_UTEMPTER)
AC_SEARCH_LIBS(
utempter_add_record,
utempter,
found_utempter=yes,
found_utempter=no
)
if test "x$found_utempter" = xyes; then
AC_DEFINE(HAVE_UTEMPTER)
fi
fi
fi

Expand Down

0 comments on commit 75b2c16

Please sign in to comment.