configure.ac: Add --enable-{client,server,examples}

These default respectively to yes, yes, no.
This commit is contained in:
Keegan McAllister
2012-03-17 05:36:42 -04:00
parent a151ea15c2
commit 139bcbf9ae
5 changed files with 42 additions and 4 deletions
+18
View File
@@ -42,6 +42,24 @@ AC_ARG_ENABLE([compile-warnings],
AC_SUBST([WARNING_CXXFLAGS]) AC_SUBST([WARNING_CXXFLAGS])
AC_SUBST([PICKY_CXXFLAGS]) AC_SUBST([PICKY_CXXFLAGS])
AC_ARG_ENABLE([client],
[AS_HELP_STRING([--enable-client], [Build the mosh-client program @<:@yes@:>@])],
[build_client="$enableval"],
[build_client="yes"])
AM_CONDITIONAL([BUILD_CLIENT], [test x"$build_client" != xno])
AC_ARG_ENABLE([server],
[AS_HELP_STRING([--enable-server], [Build the mosh-server program @<:@yes@:>@])],
[build_server="$enableval"],
[build_server="yes"])
AM_CONDITIONAL([BUILD_SERVER], [test x"$build_server" != xno])
AC_ARG_ENABLE([examples],
[AS_HELP_STRING([--enable-examples], [Build the miscellaneous programs in src/examples @<:@no@:>@])],
[build_examples="$enableval"],
[build_examples="no"])
AM_CONDITIONAL([BUILD_EXAMPLES], [test x"$build_examples" != xno])
# Checks for libraries. # Checks for libraries.
AC_SEARCH_LIBS([utempter_remove_added_record], [utempter], AC_SEARCH_LIBS([utempter_remove_added_record], [utempter],
[AC_DEFINE([HAVE_UTEMPTER], [1], [AC_DEFINE([HAVE_UTEMPTER], [1],
+9 -1
View File
@@ -1 +1,9 @@
dist_man_MANS = mosh.1 mosh-client.1 mosh-server.1 dist_man_MANS =
if BUILD_CLIENT
dist_man_MANS += mosh.1 mosh-client.1
endif
if BUILD_SERVER
dist_man_MANS += mosh-server.1
endif
+3 -1
View File
@@ -1 +1,3 @@
dist_bin_SCRIPTS = mosh if BUILD_CLIENT
dist_bin_SCRIPTS = mosh
endif
+3 -1
View File
@@ -1,7 +1,9 @@
AM_CPPFLAGS = $(protobuf_CFLAGS) AM_CPPFLAGS = $(protobuf_CFLAGS)
AM_CXXFLAGS = $(WARNING_CXXFLAGS) $(PICKY_CXXFLAGS) -fno-default-inline -pipe AM_CXXFLAGS = $(WARNING_CXXFLAGS) $(PICKY_CXXFLAGS) -fno-default-inline -pipe
noinst_PROGRAMS = encrypt decrypt ntester parse termemu benchmark if BUILD_EXAMPLES
noinst_PROGRAMS = encrypt decrypt ntester parse termemu benchmark
endif
encrypt_SOURCES = encrypt.cc encrypt_SOURCES = encrypt.cc
encrypt_CPPFLAGS = -I$(srcdir)/../crypto encrypt_CPPFLAGS = -I$(srcdir)/../crypto
+9 -1
View File
@@ -9,7 +9,15 @@ else
LDADD += $(STDDJB_LDFLAGS) LDADD += $(STDDJB_LDFLAGS)
endif endif
bin_PROGRAMS = mosh-client mosh-server bin_PROGRAMS =
if BUILD_CLIENT
bin_PROGRAMS += mosh-client
endif
if BUILD_SERVER
bin_PROGRAMS += mosh-server
endif
mosh_client_SOURCES = mosh-client.cc stmclient.cc stmclient.h terminaloverlay.cc terminaloverlay.h mosh_client_SOURCES = mosh-client.cc stmclient.cc stmclient.h terminaloverlay.cc terminaloverlay.h
mosh_server_SOURCES = mosh-server.cc mosh_server_SOURCES = mosh-server.cc