aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorDavid Timber <mieabby@gmail.com>2020-09-14 15:47:30 +0930
committerDavid Timber <mieabby@gmail.com>2020-09-14 15:47:30 +0930
commitf7f7332afafd4f965c5ef1d45cc1c7da9275c6ef (patch)
tree53b8e96d2d070215f0c6ee133cdba58ca93a4138 /configure.ac
parentc4160ed41717260b5941e2729c444b8ec051d5f0 (diff)
* Add "--enable-static" configure option
* Change "PRNE_DEBUG" macro use * Add "PRNE_VERBOSE" * Impl "recon" * Add "inet.h" for Internet Protocol stuff * Changes regarding "PRNE_RND_WELL512_SEEDLEN" * Add prne_own_realloc() for objects with multiple array memebers * Add prne_add_timespec()
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac61
1 files changed, 53 insertions, 8 deletions
diff --git a/configure.ac b/configure.ac
index c23cd49..3d38e73 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,6 +2,7 @@ AC_INIT([proone], [0.0.0], [])
: ${CFLAGS=""}
: ${CXXFLAGS=""}
+: ${PRNE_VERBOSE=2}
AM_INIT_AUTOMAKE([1.0 subdir-objects])
AC_CANONICAL_HOST
@@ -11,7 +12,7 @@ AC_PROG_RANLIB
AC_ARG_ENABLE(debug,
AS_HELP_STRING([--enable-debug],
- [build with debug flags, default: no]),
+ [build with debug flags. Default: no]),
[case "${enableval}" in
yes) debug=true ;;
no) debug=false ;;
@@ -20,13 +21,57 @@ esac],
[debug=false])
AM_CONDITIONAL(DEBUG, test x"$debug" = x"true")
-AC_CHECK_LIB([pthread], [pthread_create], [], [AC_MSG_ERROR([pthread not found])])
-AC_CHECK_LIB([rt], [shm_open], [], [AC_MSG_ERROR([rt not found])])
-AC_CHECK_LIB([z], [zlibVersion], [], [AC_MSG_ERROR([zlib not found])])
-AC_CHECK_LIB([mbedcrypto], [mbedtls_cipher_setup], [], [AC_MSG_ERROR([mbedtls not found])])
-AC_CHECK_LIB([mbedtls], [mbedtls_ssl_init], [], [AC_MSG_ERROR([mbedtls not found])])
-AC_CHECK_LIB([mbedx509], [mbedtls_x509_crt_parse], [], [AC_MSG_ERROR([mbedtls not found])])
-AC_CHECK_LIB([pthsem], [pth_init], [], [AC_MSG_ERROR([pthsem not found])])
+AC_ARG_ENABLE(static,
+AS_HELP_STRING([--enable-static],
+ [build statically linked executables. Default: no]),
+[case "${enableval}" in
+ yes) static=true ;;
+ no) static=false ;;
+ *) AC_MSG_ERROR([bad value ${enableval} for --enable-static]) ;;
+esac],
+[static=false])
+AM_CONDITIONAL(STATIC_RT, test x"$static" = x"true")
+
+
+AC_ARG_VAR(
+ [PRNE_VERBOSE],
+ [Debug verbose level. Must be used with --enable-debug. Defaults to 2])
+
+AC_CHECK_LIB(
+ [pthread],
+ [pthread_create],
+ [],
+ [AC_MSG_ERROR([pthread not found])])
+AC_CHECK_LIB(
+ [rt],
+ [shm_open],
+ [],
+ [AC_MSG_ERROR([rt not found])])
+AC_CHECK_LIB(
+ [z],
+ [zlibVersion],
+ [],
+ [AC_MSG_ERROR([zlib not found])])
+AC_CHECK_LIB(
+ [mbedcrypto],
+ [mbedtls_cipher_setup],
+ [],
+ [AC_MSG_ERROR([mbedtls not found])])
+AC_CHECK_LIB(
+ [mbedx509],
+ [mbedtls_x509_crt_parse],
+ [],
+ [AC_MSG_ERROR([mbedtls not found])])
+AC_CHECK_LIB(
+ [mbedtls],
+ [mbedtls_ssl_init],
+ [],
+ [AC_MSG_ERROR([mbedtls not found])])
+AC_CHECK_LIB(
+ [pthsem],
+ [pth_init],
+ [],
+ [AC_MSG_ERROR([pthsem not found])])
AC_CHECK_PROG(TOOL_XXD, [xxd], [yes])
AS_IF([test x"$TOOL_XXD" != x"yes"], [AC_MSG_ERROR([xxd not found])])