Files
mosh/configure.ac
T
Anders Kaseorg c71f8e2dc2 Use automake’s silent-rules mode if available, for quieter build output
With automake 1.11, this gives us Linux kernel–style silent output
that makes warnings more obvious:

  GEN    userinput.pb.cc
  CXX    userinput.pb.o
  AR     libmoshprotos.a
  CXXLD  mosh-client

(Use ‘make V=1’ for the traditional verbose output.)

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2012-03-07 03:05:35 -05:00

76 lines
2.4 KiB
Plaintext

# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.65])
AC_INIT([mosh], [0.96a], [mosh-devel@mit.edu])
AM_INIT_AUTOMAKE([-Wall -Werror foreign])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
AC_CONFIG_SRCDIR([src/frontend/mosh-client.cc])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADERS([config.h])
# Checks for programs.
AC_PROG_CXX
AC_PROG_RANLIB
WARNING_CXXFLAGS=""
PICKY_CXXFLAGS=""
AC_ARG_ENABLE([compile-warnings],
[AS_HELP_STRING([--enable-compile-warnings@<:@=no/yes/maximum/error],
[Turn on compiler warnings])],
[case "$enableval" in
no)
;;
'' | yes)
WARNING_CXXFLAGS="-Wall"
;;
maximum)
WARNING_CXXFLAGS="-Wall"
PICKY_CXXFLAGS="-Wextra -pedantic -Wno-long-long -Weffc++"
;;
error)
WARNING_CXXFLAGS="-Wall -Werror"
PICKY_CXXFLAGS="-Wextra -pedantic -Wno-long-long -Weffc++"
;;
*)
AC_MSG_ERROR([Unknown argument '$enableval' to --enable-compile-warnings])
;;
esac],
[WARNING_CXXFLAGS="-Wall"])
AC_SUBST([WARNING_CXXFLAGS])
AC_SUBST([PICKY_CXXFLAGS])
# Checks for libraries.
AC_SEARCH_LIBS([utempter_remove_added_record], [utempter], , [AC_MSG_ERROR([Unable to find libutempter.])])
AC_SEARCH_LIBS([compress], [z], , [AC_MSG_ERROR([Unable to find zlib.])])
AX_BOOST_BASE(, , [AC_MSG_ERROR([Unable to find boost libraries.])])
# Checks for header files.
AC_CHECK_HEADERS([arpa/inet.h fcntl.h langinfo.h limits.h locale.h netinet/in.h stddef.h stdint.h stdlib.h string.h sys/ioctl.h sys/socket.h sys/time.h termios.h unistd.h wchar.h wctype.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
AC_C_INLINE
AC_TYPE_INT64_T
AC_TYPE_PID_T
AC_C_RESTRICT
AC_TYPE_SIZE_T
AC_TYPE_SSIZE_T
AC_TYPE_UINT16_T
AC_TYPE_UINT32_T
AC_TYPE_UINT64_T
AC_TYPE_UINT8_T
# Checks for library functions.
AC_FUNC_FORK
AC_FUNC_MALLOC
AC_FUNC_MBRTOWC
AC_FUNC_REALLOC
AC_CHECK_FUNCS([clock_gettime gettimeofday inet_ntoa iswprint memchr memset nl_langinfo setenv setlocale socket strchr strdup strerror strtol wcwidth])
# Checks for 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_OUTPUT