From 8d3c458848294495a1e7a45846d659a384ab69e3 Mon Sep 17 00:00:00 2001 From: Stanislaw Kardach Date: Thu, 3 Sep 2020 15:34:33 +0200 Subject: build: re-format autoconf argument defaults Make sure that all autoconf arguments defined by ODP use default value description similar to built-in arguments. That is: [default=]. Also make sure that all arguments use AS_HELP_STRING for uniform text formatting. Signed-off-by: Stanislaw Kardach Reviewed-by: Matias Elo --- configure.ac | 38 +++++++++++++++++++----------- doc/m4/configure.m4 | 3 ++- example/m4/configure.m4 | 6 +++-- helper/m4/configure.m4 | 6 +++-- m4/odp_openssl.m4 | 2 +- platform/linux-generic/m4/configure.m4 | 2 +- platform/linux-generic/m4/odp_dpdk.m4 | 9 ++++--- platform/linux-generic/m4/odp_libconfig.m4 | 5 ++-- platform/linux-generic/m4/odp_netmap.m4 | 7 +++--- platform/linux-generic/m4/odp_pcapng.m4 | 2 +- platform/linux-generic/m4/odp_scheduler.m4 | 4 ++-- test/m4/configure.m4 | 3 ++- test/m4/miscellaneous.m4 | 3 ++- test/m4/performance.m4 | 3 ++- test/m4/validation.m4 | 3 ++- 15 files changed, 60 insertions(+), 36 deletions(-) diff --git a/configure.ac b/configure.ac index c58407191..4de488a25 100644 --- a/configure.ac +++ b/configure.ac @@ -166,7 +166,7 @@ AX_VALGRIND_CHECK ########################################################################## AC_ARG_WITH([archincludedir], [AS_HELP_STRING([--with-archincludedir=DIR], - [directory to hold arch-specific headers (${includedir})])], + [directory to hold arch-specific headers [default=INCLUDEDIR]])], [archincludedir=$with_archincludedir], [archincludedir="${includedir}"]) AC_SUBST([archincludedir]) @@ -201,7 +201,8 @@ AC_SUBST([ARCH_ABI]) AC_ARG_ENABLE([host-optimization], [AS_HELP_STRING([--disable-host-optimization], - [disables using host-specific ARCH and ABI files])], + [disables using host-specific ARCH and ABI files] + [[default=enabled]])], [], [enable_host_optimization=yes]) if test "x$enable_host_optimization" = "xno" ; then ARCH_DIR=default @@ -234,7 +235,8 @@ ODP_ABI_COMPAT=1 abi_compat=yes AC_ARG_ENABLE([abi-compat], [AS_HELP_STRING([--disable-abi-compat], - [disables ABI compatible mode, enables inline code in header files])], + [disables ABI compatible mode, enables inline code in header files] + [[default=enabled]])], [if test "x$enableval" = "xno"; then ODP_ABI_COMPAT=0 abi_compat=no @@ -259,7 +261,8 @@ AM_CONDITIONAL(ODP_ABI_COMPAT, [test "x$ODP_ABI_COMPAT" = "x1"]) lto_enabled=no AC_ARG_ENABLE([lto], [AS_HELP_STRING([--enable-lto], - [Enable Link Time Optimization (LTO) in compiler and linker])], + [Enable Link Time Optimization (LTO) in compiler and linker] + [[default=disabled]])], [if test "x$enableval" = "xyes"; then lto_enabled=yes # Fat LTO object file contains GIMPLE bytecodes and the usual @@ -277,7 +280,7 @@ ODP_CFLAGS="$ODP_CFLAGS $ODP_LTO_FLAGS" AC_ARG_ENABLE([static-applications], [AS_HELP_STRING([--disable-static-applications], [disable static linking of examples and tests] - [ with ODP])], [], + [with ODP [default=enabled]])], [], [enable_static_applications=yes]) AS_IF([test "x$enable_static" != "xno" -a "x$enable_static_applications" != "xno"], [enable_static_applications=yes], [enable_static_applications=no]) @@ -295,7 +298,8 @@ fi ########################################################################## AC_ARG_WITH([openssl], [AS_HELP_STRING([--without-openssl], - [compile without OpenSSL (may result in disabled crypto and random support)])], + [compile without OpenSSL (may result in disabled crypto and random support)] + [[default=with]])], [], [with_openssl=yes]) AS_IF([test "$with_openssl" != "no"], @@ -314,7 +318,8 @@ m4_include([./test/m4/configure.m4]) # Set the install directory for test binaries/scripts ########################################################################## AC_ARG_WITH([testdir], - [AS_HELP_STRING([--with-testdir=DIR], [installation directory for tests])], + [AS_HELP_STRING([--with-testdir[=DIR]], + [installation directory for tests [default=none]])], [testdir=$withval], [testdir=no]) AS_IF([test "x$testdir" = "xyes"], [testdir=$libdir/odp/tests], @@ -343,8 +348,9 @@ AM_CONDITIONAL([ARCH_IS_X86_64], [test "x${ARCH_ABI}" = "xx86_64-linux"]) ########################################################################## AC_ARG_ENABLE([debug], [AS_HELP_STRING([--enable-debug], - [include additional debugging code ] - [(set to 'full' to enable all --enable-*-debug-* options)])], + [include additional debugging code.] + [Set to 'full' to enable all --enable-*-debug-* options] + [[default=disabled]])], [], [enable_debug=no]) AS_IF([test "x$enable_debug" != "xno"], [ODP_DEBUG=1], @@ -353,7 +359,8 @@ AC_DEFINE_UNQUOTED([ODP_DEBUG], [$ODP_DEBUG], [Define to 1 to include additional debug code]) AC_ARG_ENABLE([helper-debug], - [AS_HELP_STRING([--enable-helper-debug], [helpers include additional debugging code])], + [AS_HELP_STRING([--enable-helper-debug], + [helpers include additional debugging code [default=disabled]])], [], [AS_IF([test "x$enable_debug" = "xfull"], [enable_helper_debug=yes], [enable_helper_debug=no])]) AS_IF([test "x$enable_helper_debug" != "xno"], [ODPH_DEBUG=1], [ODPH_DEBUG=0]) @@ -364,7 +371,8 @@ AC_DEFINE_UNQUOTED([ODPH_DEBUG], [$ODPH_DEBUG], # Enable/disable ODP_DEBUG_PRINT ########################################################################## AC_ARG_ENABLE([debug-print], - [AS_HELP_STRING([--enable-debug-print], [display debugging information])], + [AS_HELP_STRING([--enable-debug-print], + [display debugging information [default=disabled]])], [], [AS_IF([test "x$enable_debug" = "xfull"], [enable_debug_print=yes], [enable_debug_print=no])]) AS_IF([test "x$enable_debug_print" != "xno"], [ODP_DEBUG_PRINT=1], @@ -373,7 +381,8 @@ AC_DEFINE_UNQUOTED([ODP_DEBUG_PRINT], [$ODP_DEBUG_PRINT], [Define to 1 to display debug information]) AC_ARG_ENABLE([helper-debug-print], - [AS_HELP_STRING([--enable-helper-debug-print], [display helper debugging information])], + [AS_HELP_STRING([--enable-helper-debug-print], + [display helper debugging information [default=disabled]])], [], [AS_IF([test "x$enable_debug" = "xfull"], [enable_helper_debug_print=yes], [enable_helper_debug_print=no])]) AS_IF([test "x$enable_helper_debug_print" != "xno"], [ODPH_DEBUG_PRINT=1], @@ -390,7 +399,8 @@ ODPH_DEBUG=${ODPH_DEBUG}, ODPH_DEBUG_PRINT=${ODPH_DEBUG_PRINT}" ODP_DEPRECATED_API=0 deprecated=no AC_ARG_ENABLE([deprecated], - [ --enable-deprecated enable deprecated API definitions], + [AS_HELP_STRING([--enable-deprecated], + [enable deprecated API definitions [default=disabled]])], [if test "x$enableval" = "xyes"; then ODP_DEPRECATED_API=1 deprecated=yes @@ -402,7 +412,7 @@ AC_SUBST(ODP_DEPRECATED_API) ########################################################################## AC_ARG_WITH([platform], [AS_HELP_STRING([--with-platform=platform], - [select platform to be used, default linux-generic])], + [select platform to be used [default=linux-generic]])], [], [with_platform=linux-generic ]) diff --git a/doc/m4/configure.m4 b/doc/m4/configure.m4 index ed9451dff..4abb0129c 100644 --- a/doc/m4/configure.m4 +++ b/doc/m4/configure.m4 @@ -19,7 +19,8 @@ fi ########################################################################## user_guides=no AC_ARG_ENABLE([user-guides], - [ --enable-user-guides generate supplemental users guides], + [AS_HELP_STRING([--enable-user-guides], + [generate supplemental users guides [default=disabled]])], [if test "x$enableval" = "xyes"; then if test -z "$ASCIIDOCTOR"; then AC_MSG_ERROR([cannot generate user guides without asciidoctor]) diff --git a/example/m4/configure.m4 b/example/m4/configure.m4 index ab8b8b04d..d9a70767b 100644 --- a/example/m4/configure.m4 +++ b/example/m4/configure.m4 @@ -3,7 +3,8 @@ ########################################################################## AC_ARG_WITH([examples], [AS_HELP_STRING([--without-examples], - [don't build and install example applications])], + [don't build and install example applications] + [[default=with]])], [], [with_examples=yes]) AM_CONDITIONAL([WITH_EXAMPLES], [test x$with_examples != xno]) @@ -12,7 +13,8 @@ AM_CONDITIONAL([WITH_EXAMPLES], [test x$with_examples != xno]) # Test examples during 'make check' ########################################################################## AC_ARG_ENABLE([test-example], - [AS_HELP_STRING([--enable-test-example], [run basic test against examples])], + [AS_HELP_STRING([--enable-test-example], + [run basic test against examples [default=enabled]])], [test_example=$enableval], [test_example=yes]) AM_CONDITIONAL([test_example], [test x$test_example = xyes ]) diff --git a/helper/m4/configure.m4 b/helper/m4/configure.m4 index 5f6ae0008..c25f8fe68 100644 --- a/helper/m4/configure.m4 +++ b/helper/m4/configure.m4 @@ -2,7 +2,8 @@ # Enable/disable test-helper ########################################################################## AC_ARG_ENABLE([test-helper], - [AS_HELP_STRING([--enable-test-helper], [run test in helper/test])], + [AS_HELP_STRING([--enable-test-helper], + [run test in helper/test [default=enabled]])], [test_helper=$enableval], [test_helper=yes]) AM_CONDITIONAL([test_helper], [test x$test_helper = xyes ]) @@ -11,7 +12,8 @@ AM_CONDITIONAL([test_helper], [test x$test_helper = xyes ]) # Enable/disable Linux helpers ########################################################################## AC_ARG_ENABLE([helper-linux], - [AS_HELP_STRING([--disable-helper-linux], [disable Linux helpers])], + [AS_HELP_STRING([--disable-helper-linux], + [disable Linux helpers [default=enabled]])], [helper_linux=$enableval], [helper_linux=yes]) diff --git a/m4/odp_openssl.m4 b/m4/odp_openssl.m4 index 428470dc6..dfab10a5e 100644 --- a/m4/odp_openssl.m4 +++ b/m4/odp_openssl.m4 @@ -11,7 +11,7 @@ AC_ARG_VAR([OPENSSL_STATIC_LIBS], [static linker flags for OpenSSL crypto librar ########################################################################## AC_ARG_WITH([openssl-path], [AS_HELP_STRING([--with-openssl-path=DIR], - [path to openssl libs and headers (use system path if not provided)])], + [path to openssl libs and headers [default=system]])], [OPENSSL_CPPFLAGS="-I$withval/include" OPENSSL_LIBS="-L$withval/lib -lcrypto"], [if test "x$ac_cv_env_OPENSSL_LIBS_set" != "xset" ; then diff --git a/platform/linux-generic/m4/configure.m4 b/platform/linux-generic/m4/configure.m4 index 76ef62c6e..be6d024e3 100644 --- a/platform/linux-generic/m4/configure.m4 +++ b/platform/linux-generic/m4/configure.m4 @@ -11,7 +11,7 @@ m4_include([platform/linux-generic/m4/odp_scheduler.m4]) AC_ARG_WITH([pcap], [AS_HELP_STRING([--without-pcap], - [compile without PCAP])], + [compile without PCAP [default=with]])], [], [with_pcap=yes]) have_pcap=no diff --git a/platform/linux-generic/m4/odp_dpdk.m4 b/platform/linux-generic/m4/odp_dpdk.m4 index a7c775418..f8d985a64 100644 --- a/platform/linux-generic/m4/odp_dpdk.m4 +++ b/platform/linux-generic/m4/odp_dpdk.m4 @@ -4,12 +4,14 @@ pktio_dpdk_support=no AC_ARG_ENABLE([dpdk], - [AS_HELP_STRING([--enable-dpdk], [enable DPDK support for Packet I/O])], + [AS_HELP_STRING([--enable-dpdk], + [enable DPDK support for Packet I/O [default=disabled]])], [pktio_dpdk_support=$enableval DPDK_PATH=system]) AC_ARG_WITH([dpdk-path], -[AS_HELP_STRING([--with-dpdk-path=DIR], [path to dpdk build directory])], +[AS_HELP_STRING([--with-dpdk-path=DIR], + [path to dpdk build directory [default=system]])], [DPDK_PATH="$withval" pktio_dpdk_support=yes],[]) @@ -18,7 +20,8 @@ AC_ARG_WITH([dpdk-path], ########################################################################## zero_copy=0 AC_ARG_ENABLE([dpdk-zero-copy], - [AS_HELP_STRING([--enable-dpdk-zero-copy], [enable experimental zero-copy DPDK pktio mode])], + [AS_HELP_STRING([--enable-dpdk-zero-copy], + [enable experimental zero-copy DPDK pktio mode [default=disabled]])], [if test x$enableval = xyes; then zero_copy=1 fi]) diff --git a/platform/linux-generic/m4/odp_libconfig.m4 b/platform/linux-generic/m4/odp_libconfig.m4 index d13fcf274..aee71fd01 100644 --- a/platform/linux-generic/m4/odp_libconfig.m4 +++ b/platform/linux-generic/m4/odp_libconfig.m4 @@ -24,8 +24,9 @@ AC_CHECK_PROGS([REALPATH], [realpath]) AS_IF([test -z "$REALPATH"], [AC_MSG_ERROR([Could not find 'realpath'])]) AC_ARG_WITH([config-file], -AS_HELP_STRING([--with-config-file=FILE path to the default configuration file], - [(this file must include all configuration options).]), +AS_HELP_STRING([--with-config-file=FILE], [path to the default configuration file] + [(this file must include all configuration options)] + [[default=SRCDIR/config/odp-.conf]]), [default_config_path=$withval], []) rel_default_config_path=`realpath --relative-to=$(pwd) ${default_config_path}` diff --git a/platform/linux-generic/m4/odp_netmap.m4 b/platform/linux-generic/m4/odp_netmap.m4 index b9c7bcbfe..08bd4397b 100644 --- a/platform/linux-generic/m4/odp_netmap.m4 +++ b/platform/linux-generic/m4/odp_netmap.m4 @@ -3,7 +3,8 @@ ########################################################################## netmap_support=no AC_ARG_ENABLE([netmap_support], - [ --enable-netmap-support include netmap IO support], + [AS_HELP_STRING([--enable-netmap-support], [include netmap IO support] + [[default=disabled]])], [if test x$enableval = xyes; then netmap_support=yes fi]) @@ -12,8 +13,8 @@ AC_ARG_ENABLE([netmap_support], # Set optional netmap path ########################################################################## AC_ARG_WITH([netmap-path], -AS_HELP_STRING([--with-netmap-path=DIR path to netmap root directory], - [(or in the default path if not specified).]), +AS_HELP_STRING([--with-netmap-path=DIR], [path to netmap root directory] + [[default=system]]), [NETMAP_PATH=$withval NETMAP_CPPFLAGS="-isystem $NETMAP_PATH/sys" netmap_support=yes],[]) diff --git a/platform/linux-generic/m4/odp_pcapng.m4 b/platform/linux-generic/m4/odp_pcapng.m4 index f0a5d56da..af4d41f65 100644 --- a/platform/linux-generic/m4/odp_pcapng.m4 +++ b/platform/linux-generic/m4/odp_pcapng.m4 @@ -6,7 +6,7 @@ pcapng_support=0 AC_ARG_ENABLE([pcapng-support], [AS_HELP_STRING([--enable-pcapng-support], - [enable experimental tcpdump for pktios])], + [enable experimental tcpdump for pktios [default=disabled]])], have_pcapng=$enableval [if test x$enableval = xyes; then pcapng_support=1 diff --git a/platform/linux-generic/m4/odp_scheduler.m4 b/platform/linux-generic/m4/odp_scheduler.m4 index 1d4071394..da4f3471d 100644 --- a/platform/linux-generic/m4/odp_scheduler.m4 +++ b/platform/linux-generic/m4/odp_scheduler.m4 @@ -3,8 +3,8 @@ # Select default scheduler AC_DEFUN([ODP_SCHEDULER], [dnl AC_ARG_ENABLE([scheduler-default], - [AS_HELP_STRING([enable-scheduler-default], - [Choose default scheduler (default is basic)])], + [AS_HELP_STRING([--enable-scheduler-default], + [Choose default scheduler [default=basic]])], [], [enable_scheduler_default=basic]) AC_DEFINE_UNQUOTED([_ODP_SCHEDULE_DEFAULT], ["$enable_scheduler_default"], [Define to name default scheduler]) diff --git a/test/m4/configure.m4 b/test/m4/configure.m4 index 16f0046ba..2d59d8859 100644 --- a/test/m4/configure.m4 +++ b/test/m4/configure.m4 @@ -3,7 +3,8 @@ ########################################################################## AC_ARG_WITH([tests], [AS_HELP_STRING([--without-tests], - [don't build and install test applications])], + [don't build and install test applications] + [[default=with]])], [], [with_tests=yes]) AM_CONDITIONAL([WITH_TESTS], [test x$with_tests != xno]) diff --git a/test/m4/miscellaneous.m4 b/test/m4/miscellaneous.m4 index 07c323774..62178c9f2 100644 --- a/test/m4/miscellaneous.m4 +++ b/test/m4/miscellaneous.m4 @@ -2,7 +2,8 @@ # Enable/disable test-cpp ########################################################################## AC_ARG_ENABLE([test-cpp], - [AS_HELP_STRING([--disable-test-cpp], [run basic test against cpp])], + [AS_HELP_STRING([--disable-test-cpp], [run basic test against cpp] + [[default=enable-if-cpp-works]])], [test_cpp=$enableval], [test_cpp=check]) diff --git a/test/m4/performance.m4 b/test/m4/performance.m4 index 34270e8d8..fce0ffb4f 100644 --- a/test/m4/performance.m4 +++ b/test/m4/performance.m4 @@ -2,7 +2,8 @@ # Enable/disable test-perf ########################################################################## AC_ARG_ENABLE([test-perf], - [AS_HELP_STRING([--enable-test-perf], [run test in test/performance])], + [AS_HELP_STRING([--enable-test-perf], + [run test in test/performance [default=enabled]])], [test_perf=$enableval], [test_perf=yes]) AM_CONDITIONAL([test_perf], [test x$test_perf = xyes ]) diff --git a/test/m4/validation.m4 b/test/m4/validation.m4 index 65ba2aa2e..a90910008 100644 --- a/test/m4/validation.m4 +++ b/test/m4/validation.m4 @@ -2,7 +2,8 @@ # Enable/disable Unit tests ########################################################################## AC_ARG_ENABLE([test_vald], - [AS_HELP_STRING([--enable-test-vald], [run test in test/validation])], + [AS_HELP_STRING([--enable-test-vald], + [run test in test/validation [default=enabled]])], [test_vald=$enableval], [test_vald=check]) -- cgit v1.2.3