0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-26 07:23:53 +01:00

configure: Toward consistent formatting.

This commit is contained in:
Jason Volk 2018-08-12 09:54:44 -07:00
parent a8a2015ec9
commit 406f79ef7d

View file

@ -35,7 +35,9 @@ AX_CXX_COMPILE_STDCXX([17], [gnu], [mandatory], 201500)
dnl ***************************************************************************
dnl
dnl Makefile tree
dnl
dnl These (and Makefile.in) are generated from a Makefile.am in the same dir.
dnl
@ -51,7 +53,6 @@ AC_CONFIG_FILES(\
AM_INIT_AUTOMAKE([subdir-objects])
dnl
dnl Initialization of variables exported to Makefile.am.
dnl These will be further composed throughout this file...
@ -64,8 +65,7 @@ AC_SUBST(CPPFLAGS)
AC_SUBST(LDFLAGS)
AC_SUBST(LIBS)
dnl ***************************************************************************
dnl
dnl Preprocessor define macros
dnl
dnl Use RB_DEFINE() et al to generate defines in config.h
@ -101,13 +101,11 @@ AC_DEFUN([CPPDEFINE],
fi
])
dnl ***************************************************************************
dnl
dnl Platform
dnl
dnl
dnl Recursive local targets (clean-local is implied)
dnl
@ -116,7 +114,6 @@ dnl
# mrproper
#])
dnl
dnl Coarse compiler test macros
dnl
@ -126,7 +123,6 @@ AM_CONDITIONAL([CLANG], [[[[ $CXX = clang* ]]]])
RB_DEFINE_UNQUOTED([CXX], ["$CXX"], [CXX Compiler])
dnl
dnl Coarse operating system test macros
dnl
@ -141,7 +137,6 @@ AM_CONDITIONAL([SOLARIS], [[[[ $host_os = *solaris* ]]]])
RB_DEFINE_UNQUOTED([OS], ["$host_os"], [Host operating system])
dnl
dnl The CXX standard check even with the sd6 check wasn't enough for GCC. This
dnl is because we're developing with C++15'ish, which is in some grey area
@ -166,12 +161,11 @@ AM_COND_IF([GCC],
])
dnl ***************************************************************************
dnl
dnl Developer options
dnl
dnl
dnl Debugging mode
dnl
@ -190,7 +184,6 @@ AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug], [Enable debugging suite fo
AM_CONDITIONAL([DEBUG], [[[[ "$DEBUG" = "1" ]]]])
dnl
dnl Explicit assert switch for still using assert() without --enable-debug
dnl
@ -218,7 +211,6 @@ AM_COND_IF(ASSERT,
CPPDEFINE([NDEBUG])
])
dnl
dnl Explicit optimize switch for enabling optimization when using --enable-debug
dnl
@ -240,7 +232,6 @@ AC_ARG_ENABLE(optimize, AC_HELP_STRING([--enable-optimize], [Enable optimization
AM_CONDITIONAL([OPTIMIZE], [[[[ "$OPTIMIZE" = "1" ]]]])
dnl
dnl Explicit optimization level switch
dnl
@ -275,10 +266,11 @@ AC_ARG_WITH(optimize-level, AC_HELP_STRING([--with-optimize-level[[[=3]]]], [Exp
])
])
dnl
dnl Explicit log level
dnl
dnl NOTE: Log levels here must be manually sync'ed with ircd/logger.h
dnl
AC_MSG_CHECKING(whether to explicitly set the logging level ceiling)
AC_ARG_WITH(log-level, AC_HELP_STRING([--with-log-level[[[=INFO]]]], [Explicitly set the log level ceiling]),
@ -321,7 +313,6 @@ AC_ARG_WITH(log-level, AC_HELP_STRING([--with-log-level[[[=INFO]]]], [Explicitly
])
])
dnl
dnl Profiling mode
dnl
@ -339,7 +330,6 @@ AC_ARG_ENABLE(profile, AC_HELP_STRING([--enable-profile], [Enable profiling]),
], [
])
dnl
dnl Precompiled headers
dnl
@ -357,7 +347,6 @@ AC_ARG_ENABLE(pch, AC_HELP_STRING([--disable-pch], [Disable precompiled header g
AM_CONDITIONAL([BUILD_PCH], [[[[ "$build_pch" = "yes" ]]]])
dnl
dnl Generic Mode compilation
dnl
@ -382,7 +371,6 @@ AM_COND_IF([GENERIC],
CXXFLAGS+=" -march=native"
])
dnl
dnl Optimization
dnl
@ -417,7 +405,6 @@ AM_COND_IF([OPTIMIZE],
CXXFLAGS+=" -ggdb"
])
dnl
dnl Compiler intrumentation
dnl
@ -436,7 +423,6 @@ dnl -fvisibility-inlines-hidden - for optimization; note the address of inline
dnl functions won't be the same between translation units
CXXFLAGS+=" -fvisibility-inlines-hidden"
dnl
dnl Compiler warnings
dnl
@ -534,8 +520,8 @@ AM_COND_IF([CLANG],
CPPFLAGS+="$CWARNS"
dnl ***************************************************************************
dnl
dnl Philology checks
dnl
@ -563,11 +549,9 @@ AC_CHECK_SIZEOF(long)
AC_CHECK_SIZEOF(long long)
AC_CHECK_SIZEOF(__int128)
dnl -fsigned-char ensures 'char' is signed on all platforms
CXXFLAGS+=" -fsigned-char"
dnl
dnl Header files
dnl
@ -665,7 +649,6 @@ dnl experimental
RB_CHK_SYSHEADER(experimental/string_view, [EXPERIMENTAL_STRING_VIEW])
RB_CHK_SYSHEADER(experimental/optional, [EXPERIMENTAL_OPTIONAL])
dnl
dnl Specific function checks
dnl
@ -681,7 +664,6 @@ AC_CHECK_FUNCS([ \
AC_SEARCH_LIBS(dlinfo, dl, AC_DEFINE(HAVE_DLINFO, 1, [Define if you have dlinfo]))
AC_SEARCH_LIBS(nanosleep, rt posix4, AC_DEFINE(HAVE_NANOSLEEP, 1, [Define if you have nanosleep]))
dnl
dnl Networking Functions
dnl
@ -703,7 +685,8 @@ fi
dnl ***************************************************************************
dnl TODO: sort this OS-specific section
dnl
dnl Miscellaneous operating system specific
dnl
AM_COND_IF(MINGW,
@ -721,7 +704,6 @@ AM_COND_IF(INTERIX,
CPPDEFINE([_XPG4_2])
],[])
dnl
dnl Linux AIO support
dnl
@ -747,6 +729,7 @@ AM_CONDITIONAL([AIO], [[[[ $aio = yes ]]]])
dnl ***************************************************************************
dnl
dnl Installation Layout
dnl
@ -927,15 +910,16 @@ AC_SUBST([PROGRAM_PREFIX])
AC_DEFINE_UNQUOTED([PROGRAM_PREFIX], ["$with_program_prefix"], [String with which all programs intended to be in PATH are prefixed.])
dnl ***************************************************************************
dnl
dnl Third party
dnl
dnl
dnl
dnl libsodium (NaCl) crypto support
dnl
dnl
dnl PKG_CHECK_MODULES(SODIUM, [sodium], [have_sodium="yes"], [have_sodium="no"])
RB_CHK_SYSHEADER(sodium.h, [SODIUM_H])
@ -951,10 +935,11 @@ AC_SUBST(SODIUM_CPPFLAGS, [])
AC_SUBST(SODIUM_LDFLAGS, [])
AC_SUBST(SODIUM_LIBS, ["-lsodium"])
dnl
dnl
dnl libgmp support
dnl
dnl
PKG_CHECK_MODULES(GMP, [gmp], [have_gmp="yes"], [have_gmp="no"])
AM_CONDITIONAL([GMP], [test "x$have_gmp" = "xyes"])
@ -963,10 +948,11 @@ AC_SUBST(GMP_CPPFLAGS, [])
AC_SUBST(GMP_LDFLAGS, [])
AC_SUBST(GMP_LIBS, ["-lgmp"])
dnl
dnl
dnl libmagic support
dnl
dnl
RB_CHK_SYSHEADER(magic.h, [MAGIC_H])
AC_CHECK_LIB(magic, magic_version,
@ -983,10 +969,11 @@ AC_CHECK_LIB(magic, magic_version,
AM_CONDITIONAL([MAGIC], [test "x$have_magic" = "xyes"])
dnl
dnl
dnl zlib support
dnl
dnl
AC_SUBST(Z_CPPFLAGS)
AC_SUBST(Z_LDFLAGS)
@ -1014,10 +1001,11 @@ AC_CHECK_HEADER(zlib.h,
zlib=no
])
dnl
dnl
dnl lz4 support
dnl
dnl
AC_SUBST(LZ4_CPPFLAGS)
AC_SUBST(LZ4_LDFLAGS)
@ -1045,10 +1033,11 @@ AC_CHECK_HEADER(lz4.h,
lz4=no
])
dnl
dnl
dnl snappy support
dnl
dnl
AC_SUBST(SNAPPY_CPPFLAGS)
AC_SUBST(SNAPPY_LDFLAGS)
@ -1076,10 +1065,11 @@ AC_CHECK_HEADER(snappy.h,
snappy=no
])
dnl
dnl
dnl boost support
dnl
dnl
BOOST_VERSION_MIN="1.66"
BOOST_VERSION_MIN_PATCH="0"
@ -1165,10 +1155,11 @@ fi
BOOST_CPPFLAGS+=" -DBOOST_COROUTINES_NO_DEPRECATION_WARNING=1"
dnl
dnl
dnl RocksDB support
dnl
dnl
AC_MSG_CHECKING([whether you asked to use the RocksDB included here])
AC_ARG_WITH(included-rocksdb,
@ -1213,10 +1204,11 @@ AC_HELP_STRING([--with-included-rocksdb[[[=shared]]]], [Use the RocksDB sources
AC_SUBST(ROCKSDB_LIBS, ["-lrocksdb"])
])
dnl
dnl
dnl SpiderMonkey support
dnl
dnl
AC_MSG_CHECKING([whether you asked to use the JS engine included here])
AC_ARG_WITH(included-js,
@ -1293,10 +1285,11 @@ AC_HELP_STRING([--with-included-js[[[=shared]]]], [Use the JS engine (SpiderMonk
dnl TODO use an $enable_js var
AM_CONDITIONAL([JS], [[[[ $with_included_js = yes ]]]])
dnl
dnl
dnl OpenSSL support
dnl
dnl
AC_MSG_CHECKING([for OpenSSL])
AC_ARG_ENABLE(openssl,
@ -1399,10 +1392,11 @@ AC_SUBST(SSL_INCLUDES)
AC_SUBST(SSL_CFLAGS)
AC_SUBST(SSL_LIBS)
dnl
dnl
dnl mbedTLS support
dnl
dnl
AC_ARG_ENABLE(mbedtls,
[AC_HELP_STRING([--enable-mbedtls], [Enable mbedTLS support.])
@ -1421,10 +1415,11 @@ fi
AC_SUBST(MBEDTLS_CFLAGS)
AC_SUBST(MBEDTLS_LIBS)
dnl
dnl
dnl GnuTLS support
dnl
dnl
AC_MSG_CHECKING(for GnuTLS)
AC_ARG_ENABLE(gnutls,
@ -1474,10 +1469,11 @@ elif test x"$cf_enable_gnutls" != xno; then
SSL_TYPE="gnutls"
fi
dnl
dnl
dnl Additional linkages
dnl
dnl
AM_COND_IF([MINGW],
[
@ -1487,9 +1483,8 @@ AM_COND_IF([MINGW],
LIBS+="-lpthread -latomic"
])
dnl ***************************************************************************
dnl
dnl Application settings
dnl
@ -1547,7 +1542,6 @@ AC_HELP_STRING([--with-nicklen=LENGTH],[Set the upper-bound nick length to LENGT
AC_DEFINE_UNQUOTED(NICKLEN, (${NICKLEN}+1), [Nickname length])
dnl
dnl --with-topiclen
dnl
@ -1566,8 +1560,8 @@ AC_HELP_STRING([--with-topiclen=NUMBER],[Set the max topic length to NUMBER (def
AC_DEFINE_UNQUOTED(TOPICLEN, ${TOPICLEN}, [Maximum topic length (<=390)])
dnl ***************************************************************************
dnl
dnl Branding defined in the compilation
dnl
@ -1603,7 +1597,6 @@ RB_DEFINE_UNQUOTED([TIME_CONFIGURED], [$RB_DATECODE], [UNIX epoch time at config
RB_DEFINE_UNQUOTED([DATE_CONFIGURED], ["$RB_DATESTR"], [Convenience string of RB_TIME_CONFIGURED])
CPPDEFINE([RB_TIME_COMPILED], [$(date +%s)])
dnl
dnl --with-custom-branding
dnl
@ -1619,7 +1612,6 @@ AC_ARG_WITH(custom-branding, AC_HELP_STRING([--with-custom-branding=NAME], [Cust
AC_MSG_RESULT([no])
])
dnl
dnl --with-custom-version
dnl
@ -1634,9 +1626,8 @@ AC_ARG_WITH(custom-version, AC_HELP_STRING([--with-custom-version=NAME], [Custom
AC_MSG_RESULT([no])
])
dnl ***************************************************************************
dnl
dnl Misc
dnl
@ -1652,13 +1643,12 @@ AC_CONFIG_COMMANDS([tools/genssl_chmod], [chmod 755 tools/genssl])
dnl ***************************************************************************
dnl
dnl Output
dnl
AC_OUTPUT
if [[ $DEBUG ]]; then
debug="yes"
else