Update of /cvsroot/tmux/tmux
In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv15910

Modified Files:
        Makefile.am configure.ac 
Log Message:
Support --enable-static.

Index: configure.ac
===================================================================
RCS file: /cvsroot/tmux/tmux/configure.ac,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- configure.ac        3 Jan 2011 23:43:35 -0000       1.7
+++ configure.ac        4 Jan 2011 09:43:14 -0000       1.8
@@ -44,6 +44,14 @@
 )
 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 @@
 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 @@
 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)

Index: Makefile.am
===================================================================
RCS file: /cvsroot/tmux/tmux/Makefile.am,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- Makefile.am 3 Jan 2011 23:54:51 -0000       1.3
+++ Makefile.am 4 Jan 2011 09:43:14 -0000       1.4
@@ -39,6 +39,11 @@
 endif
 endif
 
+# Set flags for static.
+if IS_STATIC
+LDFLAGS+= -static
+endif
+
 # Set flags for Solaris.
 if IS_SUNOS
 CPPFLAGS+= -D_XPG4_2 -D__EXTENSIONS__ -D_POSIX_PTHREAD_SEMANTICS


------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
tmux-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tmux-cvs

Reply via email to