Build with bundled libstddjb selfpipe by default
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
This commit is contained in:
+1
-1
@@ -1,3 +1,3 @@
|
|||||||
ACLOCAL_AMFLAGS = --install -I m4
|
ACLOCAL_AMFLAGS = --install -I m4
|
||||||
SUBDIRS = src scripts man
|
SUBDIRS = third src scripts man
|
||||||
EXTRA_DIST = ocb-license.html README.md
|
EXTRA_DIST = ocb-license.html README.md
|
||||||
|
|||||||
+25
-7
@@ -10,6 +10,7 @@ AC_CONFIG_MACRO_DIR([m4])
|
|||||||
AC_CONFIG_HEADERS([config.h])
|
AC_CONFIG_HEADERS([config.h])
|
||||||
|
|
||||||
# Checks for programs.
|
# Checks for programs.
|
||||||
|
AC_PROG_CC
|
||||||
AC_PROG_CXX
|
AC_PROG_CXX
|
||||||
AC_PROG_RANLIB
|
AC_PROG_RANLIB
|
||||||
AC_PATH_PROG([PROTOC], [protoc], [AC_MSG_ERROR([protoc is not found])])
|
AC_PATH_PROG([PROTOC], [protoc], [AC_MSG_ERROR([protoc is not found])])
|
||||||
@@ -55,7 +56,8 @@ AC_ARG_WITH([skalibs],
|
|||||||
[with_skalibs=$withval
|
[with_skalibs=$withval
|
||||||
AS_IF([test x"$withval" != xyes],
|
AS_IF([test x"$withval" != xyes],
|
||||||
[SKALIBS_CPPFLAGS="-I$withval/include"
|
[SKALIBS_CPPFLAGS="-I$withval/include"
|
||||||
SKALIBS_LDFLAGS="-L$withval/lib"])])
|
SKALIBS_LDFLAGS="-L$withval/lib"])],
|
||||||
|
[with_skalibs=no])
|
||||||
AC_ARG_WITH([skalibs-include],
|
AC_ARG_WITH([skalibs-include],
|
||||||
[AS_HELP_STRING([--with-skalibs-include=DIR],
|
[AS_HELP_STRING([--with-skalibs-include=DIR],
|
||||||
[specify exact include dir for skalibs headers])],
|
[specify exact include dir for skalibs headers])],
|
||||||
@@ -65,11 +67,12 @@ AC_ARG_WITH([skalibs-libdir],
|
|||||||
[specify exact library dir for skalibs libraries])],
|
[specify exact library dir for skalibs libraries])],
|
||||||
[SKALIBS_LDFLAGS="-L$withval"])
|
[SKALIBS_LDFLAGS="-L$withval"])
|
||||||
|
|
||||||
AX_CHECK_LIBRARY([SKALIBS], [selfpipe.h], [stddjb], [],
|
AM_CONDITIONAL([COND_THIRD_LIBSTDDJB], [test x"$with_skalibs" = xno])
|
||||||
[AC_MSG_ERROR([Unable to find skalibs.])])
|
AS_IF([test x"$with_skalibs" != xno],
|
||||||
|
[AX_CHECK_LIBRARY([SKALIBS], [selfpipe.h], [stddjb], [],
|
||||||
AC_SUBST([STDDJB_CPPFLAGS], ["$SKALIBS_CPPFLAGS"])
|
[AC_MSG_ERROR([Unable to find skalibs.])])
|
||||||
AC_SUBST([STDDJB_LDFLAGS], ["$SKALIBS_LDFLAGS -lstddjb"])
|
AC_SUBST([STDDJB_CPPFLAGS], ["$SKALIBS_CPPFLAGS"])
|
||||||
|
AC_SUBST([STDDJB_LDFLAGS], ["$SKALIBS_LDFLAGS -lstddjb"])])
|
||||||
|
|
||||||
# Checks for header files.
|
# Checks for header files.
|
||||||
AC_CHECK_HEADERS([arpa/inet.h fcntl.h langinfo.h limits.h locale.h netinet/in.h pty.h stddef.h stdint.h stdlib.h string.h sys/ioctl.h sys/socket.h sys/time.h termios.h unistd.h util.h wchar.h wctype.h])
|
AC_CHECK_HEADERS([arpa/inet.h fcntl.h langinfo.h limits.h locale.h netinet/in.h pty.h stddef.h stdint.h stdlib.h string.h sys/ioctl.h sys/socket.h sys/time.h termios.h unistd.h util.h wchar.h wctype.h])
|
||||||
@@ -130,5 +133,20 @@ AC_CHECK_DECL([IP_MTU_DISCOVER],
|
|||||||
# Checks for protobuf
|
# Checks for protobuf
|
||||||
PKG_CHECK_MODULES([protobuf], [protobuf])
|
PKG_CHECK_MODULES([protobuf], [protobuf])
|
||||||
|
|
||||||
AC_CONFIG_FILES([Makefile src/Makefile src/crypto/Makefile src/frontend/Makefile src/network/Makefile src/protobufs/Makefile src/statesync/Makefile src/terminal/Makefile src/util/Makefile scripts/Makefile src/examples/Makefile man/Makefile])
|
AC_CONFIG_FILES([
|
||||||
|
Makefile
|
||||||
|
third/Makefile
|
||||||
|
third/libstddjb/Makefile
|
||||||
|
src/Makefile
|
||||||
|
src/crypto/Makefile
|
||||||
|
src/frontend/Makefile
|
||||||
|
src/network/Makefile
|
||||||
|
src/protobufs/Makefile
|
||||||
|
src/statesync/Makefile
|
||||||
|
src/terminal/Makefile
|
||||||
|
src/util/Makefile
|
||||||
|
scripts/Makefile
|
||||||
|
src/examples/Makefile
|
||||||
|
man/Makefile
|
||||||
|
])
|
||||||
AC_OUTPUT
|
AC_OUTPUT
|
||||||
|
|||||||
@@ -18,8 +18,13 @@ parse_LDADD = ../terminal/libmoshterminal.a ../util/libmoshutil.a -lutil $(BOOST
|
|||||||
termemu_SOURCES = termemu.cc
|
termemu_SOURCES = termemu.cc
|
||||||
termemu_CPPFLAGS = -I$(srcdir)/../terminal -I$(srcdir)/../util -I$(srcdir)/../statesync -I$(builddir)/../protobufs
|
termemu_CPPFLAGS = -I$(srcdir)/../terminal -I$(srcdir)/../util -I$(srcdir)/../statesync -I$(builddir)/../protobufs
|
||||||
termemu_LDADD = ../terminal/libmoshterminal.a ../util/libmoshutil.a ../statesync/libmoshstatesync.a ../protobufs/libmoshprotos.a -lutil $(BOOST_LDFLAGS) $(protobuf_LIBS)
|
termemu_LDADD = ../terminal/libmoshterminal.a ../util/libmoshutil.a ../statesync/libmoshstatesync.a ../protobufs/libmoshprotos.a -lutil $(BOOST_LDFLAGS) $(protobuf_LIBS)
|
||||||
termemu_CPPFLAGS += $(STDDJB_CPPFLAGS)
|
if COND_THIRD_LIBSTDDJB
|
||||||
termemu_LDADD += $(STDDJB_LDFLAGS)
|
termemu_CPPFLAGS += -I$(top_srcdir)/third/libstddjb
|
||||||
|
termemu_LDADD += $(top_builddir)/third/libstddjb/libstddjb.a
|
||||||
|
else
|
||||||
|
termemu_CPPFLAGS += $(STDDJB_CPPFLAGS)
|
||||||
|
termemu_LDADD += $(STDDJB_LDFLAGS)
|
||||||
|
endif
|
||||||
|
|
||||||
ntester_SOURCES = ntester.cc
|
ntester_SOURCES = ntester.cc
|
||||||
ntester_CPPFLAGS = -I$(srcdir)/../statesync -I$(srcdir)/../terminal -I$(srcdir)/../network -I$(srcdir)/../crypto -I$(builddir)/../protobufs $(BOOST_CPPFLAGS)
|
ntester_CPPFLAGS = -I$(srcdir)/../statesync -I$(srcdir)/../terminal -I$(srcdir)/../network -I$(srcdir)/../crypto -I$(builddir)/../protobufs $(BOOST_CPPFLAGS)
|
||||||
|
|||||||
@@ -1,8 +1,13 @@
|
|||||||
AM_CPPFLAGS = -I$(srcdir)/../statesync -I$(srcdir)/../terminal -I$(srcdir)/../network -I$(srcdir)/../crypto -I$(builddir)/../protobufs -I$(srcdir)/../util $(BOOST_CPPFLAGS) $(protobuf_CFLAGS)
|
AM_CPPFLAGS = -I$(srcdir)/../statesync -I$(srcdir)/../terminal -I$(srcdir)/../network -I$(srcdir)/../crypto -I$(builddir)/../protobufs -I$(srcdir)/../util $(BOOST_CPPFLAGS) $(protobuf_CFLAGS)
|
||||||
AM_CXXFLAGS = $(WARNING_CXXFLAGS) $(PICKY_CXXFLAGS) -fno-default-inline -pipe
|
AM_CXXFLAGS = $(WARNING_CXXFLAGS) $(PICKY_CXXFLAGS) -fno-default-inline -pipe
|
||||||
LDADD = ../crypto/libmoshcrypto.a ../network/libmoshnetwork.a ../statesync/libmoshstatesync.a ../terminal/libmoshterminal.a ../util/libmoshutil.a ../protobufs/libmoshprotos.a -lutil -lm $(protobuf_LIBS)
|
LDADD = ../crypto/libmoshcrypto.a ../network/libmoshnetwork.a ../statesync/libmoshstatesync.a ../terminal/libmoshterminal.a ../util/libmoshutil.a ../protobufs/libmoshprotos.a -lutil -lm $(protobuf_LIBS)
|
||||||
AM_CPPFLAGS += $(STDDJB_CPPFLAGS)
|
if COND_THIRD_LIBSTDDJB
|
||||||
LDADD += $(STDDJB_LDFLAGS)
|
AM_CPPFLAGS += -I$(top_srcdir)/third/libstddjb
|
||||||
|
LDADD += $(top_builddir)/third/libstddjb/libstddjb.a
|
||||||
|
else
|
||||||
|
AM_CPPFLAGS += $(STDDJB_CPPFLAGS)
|
||||||
|
LDADD += $(STDDJB_LDFLAGS)
|
||||||
|
endif
|
||||||
|
|
||||||
bin_PROGRAMS = mosh-client mosh-server
|
bin_PROGRAMS = mosh-client mosh-server
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,4 @@
|
|||||||
|
SUBDIRS =
|
||||||
|
if COND_THIRD_LIBSTDDJB
|
||||||
|
SUBDIRS += libstddjb
|
||||||
|
endif
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
AM_CFLAGS = -pedantic -Wall -Wextra -pipe
|
||||||
|
|
||||||
|
noinst_LIBRARIES = libstddjb.a
|
||||||
|
|
||||||
|
libstddjb_a_SOURCES = \
|
||||||
|
allreadwrite.h \
|
||||||
|
coe.c \
|
||||||
|
djbunix.h \
|
||||||
|
error.h \
|
||||||
|
fd_close.c \
|
||||||
|
fd_read.c \
|
||||||
|
fd_write.c \
|
||||||
|
gccattributes.h \
|
||||||
|
ndelay_on.c \
|
||||||
|
nsig.h \
|
||||||
|
pipe_internal.c \
|
||||||
|
sanitize_read.c \
|
||||||
|
selfpipe-internal.h \
|
||||||
|
selfpipe.h \
|
||||||
|
selfpipe_finish.c \
|
||||||
|
selfpipe_init.c \
|
||||||
|
selfpipe_internal.c \
|
||||||
|
selfpipe_read.c \
|
||||||
|
selfpipe_trap.c \
|
||||||
|
selfpipe_trapset.c \
|
||||||
|
selfpipe_untrap.c \
|
||||||
|
sig.h \
|
||||||
|
sig_restoreto.c \
|
||||||
|
skalibs-config.h \
|
||||||
|
skasig_dfl.c \
|
||||||
|
skasigaction.c \
|
||||||
|
sysdeps.h \
|
||||||
|
uint64.h
|
||||||
|
|
||||||
|
EXTRA_DIST = COPYING
|
||||||
Reference in New Issue
Block a user