summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2011-01-04 09:43:14 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2011-01-04 09:43:14 +0000
commit11dcbd755677ed1c6f6f0b136a45370fe0792010 (patch)
tree4eb8fb269b0fa0af3f050f4f4d3303da2ac28d99 /configure.ac
parent03ec2482c96e38b56d34ae265c6a861ac8c25a85 (diff)
Support --enable-static.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac17
1 files changed, 14 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index f86fe8b7..315a361c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
-# $Id: configure.ac,v 1.7 2011-01-03 23:43:35 nicm Exp $
+# $Id: configure.ac,v 1.8 2011-01-04 09:43:14 nicm Exp $
# Miscellaneous autofoo bullshit.
AC_INIT(tmux, 1.5)
@@ -44,6 +44,14 @@ AC_ARG_ENABLE(
)
AM_CONDITIONAL(IS_DEBUG, test "x$found_debug" = xyes)
+# Is this a static build?
+AC_ARG_ENABLE(
+ static,
+ AC_HELP_STRING(--enable-static, create a static build),
+ [found_static=]
+)
+AM_CONDITIONAL(IS_STATIC, test "x" = xyes)
+
# Is this gcc?
AM_CONDITIONAL(IS_GCC, test "x$GCC" = xyes)
AC_MSG_CHECKING(for gcc that whines about -I)
@@ -89,6 +97,9 @@ AC_EGREP_CPP(
AM_CONDITIONAL(IS_GLIBC, test "x$found_glibc" = xyes)
AC_MSG_RESULT($found_glibc)
+# Look for clock_gettime. Must come before event_init.
+AC_CHECK_LIB(rt, clock_gettime)
+
# Look for libevent.
AC_SEARCH_LIBS(event_init, event, found_libevent=yes, found_libevent=no)
if test "x$found_libevent" = xno; then
@@ -107,8 +118,8 @@ if test "x$found_curses" = xno; then
fi
# Look for networking libraries.
-AC_SEARCH_LIBS([inet_ntoa], [nsl])
-AC_SEARCH_LIBS([socket], [socket])
+AC_SEARCH_LIBS(inet_ntoa, nsl)
+AC_SEARCH_LIBS(socket, socket)
# Look for imsg in libutil. compat/imsg.c is linked by Makefile.am if missing.
AC_SEARCH_LIBS(imsg_init, util, found_imsg_init=yes, found_imsg_init=no)