mirror of
https://github.com/tmate-io/tmate.git
synced 2025-02-02 19:39:32 +01:00
Fix static compilation (libc should be dynamically linked)
This commit is contained in:
parent
3a73f17354
commit
a2520da195
@ -11,7 +11,7 @@ TMATE_CONFIGURE=PKG_CONFIG_PATH=./ext/lib/pkgconfig
|
|||||||
all: tmate
|
all: tmate
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
apt-get install build-essentials cmake libssl-dev autoconf automake pkg-config libtool libevent-dev libncurses-dev zlib1g-dev
|
apt-get install build-essential cmake libssl-dev autoconf automake pkg-config libtool libevent-dev libncurses-dev zlib1g-dev
|
||||||
|
|
||||||
downloads/$(notdir $(LIBSSH_URL)):
|
downloads/$(notdir $(LIBSSH_URL)):
|
||||||
mkdir -p downloads
|
mkdir -p downloads
|
||||||
|
@ -47,13 +47,12 @@ AC_ARG_ENABLE(
|
|||||||
found_static=$enable_static
|
found_static=$enable_static
|
||||||
)
|
)
|
||||||
if test "x$found_static" = xyes; then
|
if test "x$found_static" = xyes; then
|
||||||
LDFLAGS="$LDFLAGS -static"
|
|
||||||
PKG_CONFIG="pkg-config --static"
|
PKG_CONFIG="pkg-config --static"
|
||||||
|
|
||||||
CFLAGS="$CFLAGS -flto"
|
CFLAGS="$CFLAGS -flto"
|
||||||
LDFLAGS="$LDFLAGS -flto"
|
LDFLAGS="$LDFLAGS -flto"
|
||||||
|
|
||||||
PKG_CHECK_MODULES([ZLIB], [zlib], [
|
PKG_CHECK_MODULES([ZLIB], [zlib], [
|
||||||
CPPFLAGS="$ZLIB_CFLAGS $CPPFLAGS"
|
CPPFLAGS="$ZLIB_CFLAGS $CPPFLAGS"
|
||||||
LIBS="$ZLIB_LIBS $LIBS"
|
LIBS="$ZLIB_LIBS $LIBS"
|
||||||
])
|
])
|
||||||
@ -62,7 +61,6 @@ if test "x$found_static" = xyes; then
|
|||||||
CPPFLAGS="$LIBCRYPTO_CFLAGS $CPPFLAGS"
|
CPPFLAGS="$LIBCRYPTO_CFLAGS $CPPFLAGS"
|
||||||
LIBS="$LIBCRYPTO_LIBS $LIBS"
|
LIBS="$LIBCRYPTO_LIBS $LIBS"
|
||||||
])
|
])
|
||||||
AC_CHECK_LIB(dl, dlopen)
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Is this gcc?
|
# Is this gcc?
|
||||||
@ -451,6 +449,11 @@ if test "x$found_getopt" != xno; then
|
|||||||
fi
|
fi
|
||||||
AM_CONDITIONAL(NO_GETOPT, [test "x$found_getopt" = xno])
|
AM_CONDITIONAL(NO_GETOPT, [test "x$found_getopt" = xno])
|
||||||
|
|
||||||
|
if test "x$found_static" = xyes; then
|
||||||
|
# libc and libdl should be dynamically linked.
|
||||||
|
LIBS="-Wl,-Bstatic ${LIBS/-ldl/} -Wl,-Bdynamic -ldl"
|
||||||
|
fi
|
||||||
|
|
||||||
# Check for BSD-style integer types.
|
# Check for BSD-style integer types.
|
||||||
AC_MSG_CHECKING(for BSD-style unsigned types)
|
AC_MSG_CHECKING(for BSD-style unsigned types)
|
||||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE(
|
AC_COMPILE_IFELSE([AC_LANG_SOURCE(
|
||||||
|
Loading…
Reference in New Issue
Block a user