mirror of
https://github.com/tmux/tmux.git
synced 2025-01-12 03:08:46 +00:00
Fix --enable-static and add a different check for b64_ntop that might work on
OS X.
This commit is contained in:
parent
e9ebdac3dd
commit
ee5e97926d
@ -43,11 +43,6 @@ CPPFLAGS += -I. -I- -I/usr/local/include
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Set flags for static.
|
|
||||||
if IS_STATIC
|
|
||||||
LDFLAGS += -static
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Set flags for Solaris.
|
# Set flags for Solaris.
|
||||||
if IS_SUNOS
|
if IS_SUNOS
|
||||||
CPPFLAGS += -D_XPG4_2 -D__EXTENSIONS__ -D_POSIX_PTHREAD_SEMANTICS
|
CPPFLAGS += -D_XPG4_2 -D__EXTENSIONS__ -D_POSIX_PTHREAD_SEMANTICS
|
||||||
|
49
configure.ac
49
configure.ac
@ -12,6 +12,7 @@ AC_CANONICAL_HOST
|
|||||||
# autoconf will automatically use CFLAGS="-O2 -g". Prevent that by using an
|
# autoconf will automatically use CFLAGS="-O2 -g". Prevent that by using an
|
||||||
# empty default.
|
# empty default.
|
||||||
: ${CFLAGS=""}
|
: ${CFLAGS=""}
|
||||||
|
|
||||||
# Set up the compiler in two different ways and say yes we may want to install.
|
# Set up the compiler in two different ways and say yes we may want to install.
|
||||||
AC_PROG_CC
|
AC_PROG_CC
|
||||||
AM_PROG_CC_C_O
|
AM_PROG_CC_C_O
|
||||||
@ -52,9 +53,8 @@ AM_CONDITIONAL(IS_DEBUG, test "x$found_debug" = xyes)
|
|||||||
AC_ARG_ENABLE(
|
AC_ARG_ENABLE(
|
||||||
static,
|
static,
|
||||||
AC_HELP_STRING(--enable-static, create a static build),
|
AC_HELP_STRING(--enable-static, create a static build),
|
||||||
[found_static=$enable_static]
|
[LDFLAGS="$LDFLAGS -static"]
|
||||||
)
|
)
|
||||||
AM_CONDITIONAL(IS_STATIC, test "x" = xyes)
|
|
||||||
|
|
||||||
# Is this gcc?
|
# Is this gcc?
|
||||||
AM_CONDITIONAL(IS_GCC, test "x$GCC" = xyes)
|
AM_CONDITIONAL(IS_GCC, test "x$GCC" = xyes)
|
||||||
@ -126,15 +126,44 @@ if test "x$found_curses" = xno; then
|
|||||||
AC_MSG_ERROR("curses not found")
|
AC_MSG_ERROR("curses not found")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Look for networking libraries.
|
# Check for b64_ntop.
|
||||||
AC_SEARCH_LIBS(b64_ntop, resolv, found_b64_ntop=yes, found_b64_ntop=no)
|
AC_MSG_CHECKING(for b64_ntop)
|
||||||
AC_SEARCH_LIBS(__b64_ntop, resolv, found___b64_ntop=yes, found___b64_ntop=no)
|
AC_TRY_LINK(
|
||||||
if test "x$found_b64_ntop" = xyes -o "x$found___b64_ntop" = xyes; then
|
[
|
||||||
AC_DEFINE(HAVE_B64_NTOP)
|
#include <sys/types.h>
|
||||||
|
#include <netinet/in.h>
|
||||||
|
#include <resolv.h>
|
||||||
|
],
|
||||||
|
[b64_ntop(NULL, 0, NULL, 0);],
|
||||||
|
found_b64_ntop=yes,
|
||||||
|
found_b64_ntop=no
|
||||||
|
)
|
||||||
|
if test "x$found_b64_ntop" = xno; then
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
|
||||||
|
AC_MSG_CHECKING(for b64_ntop with -lresolv)
|
||||||
|
LIBS="$LIBS -lresolv"
|
||||||
|
AC_TRY_LINK(
|
||||||
|
[
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <netinet/in.h>
|
||||||
|
#include <resolv.h>
|
||||||
|
],
|
||||||
|
[b64_ntop(NULL, 0, NULL, 0);],
|
||||||
|
found_b64_ntop=yes,
|
||||||
|
found_b64_ntop=no
|
||||||
|
)
|
||||||
|
if test "x$found_b64_ntop" = xno; then
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
AM_CONDITIONAL(
|
if test "x$found_b64_ntop" = xyes; then
|
||||||
NO_B64_NTOP,
|
AC_DEFINE(HAVE_B64_NTOP)
|
||||||
[test "x$found_b64_ntop" = xno -a "x$found___b64_ntop" = xno])
|
AC_MSG_RESULT(yes)
|
||||||
|
fi
|
||||||
|
AM_CONDITIONAL(NO_B64_NTOP, [test "x$found_b64_ntop" = xno])
|
||||||
|
|
||||||
|
# Look for networking libraries.
|
||||||
AC_SEARCH_LIBS(inet_ntoa, nsl)
|
AC_SEARCH_LIBS(inet_ntoa, nsl)
|
||||||
AC_SEARCH_LIBS(socket, socket)
|
AC_SEARCH_LIBS(socket, socket)
|
||||||
AC_CHECK_LIB(xnet, socket)
|
AC_CHECK_LIB(xnet, socket)
|
||||||
|
Loading…
Reference in New Issue
Block a user