Date: 22.02.2012 Use AS_HELP_STRING to format the output of AC_ARG_WITH. Require autoconf 2.62 in order to be able to be able to specify the start column. Signed-off-by: Philipp Thomas Index: src/configure.in =================================================================== --- src/configure.in.orig 2012-04-23 14:20:13.182274457 +0200 +++ src/configure.in 2012-04-23 14:20:34.597755889 +0200 @@ -38,18 +38,18 @@ AC_DEFUN([AS_AC_EXPAND], AC_MSG_CHECKING(for architecture) AC_ARG_WITH(arch, - [ --with-arch= Specify architecture (uname -m)], + AS_HELP_STRING([--with-arch=], [Specify architecture (uname -m)],[30]), [arch=$withval], [arch=`uname -m`]) AC_MSG_RESULT($arch) AC_ARG_WITH(bitmode, - [ --with-bitmode=<32,64> Specify bit mode of library], + AS_HELP_STRING([--with-bitmode=<32,64>], [Specify bit mode of library],[30]), [bitmode=$withval]) AC_MSG_CHECKING(for OS) AC_ARG_WITH(OS, - [ --with-OS= Specify operating system], + AS_HELP_STRING([--with-OS=], [Specify operating system], [30]), [OS=$withval], [OS="`uname | tr '[A-Z]' '[a-z]'`" if (test "$OS" = "SunOS" || test "$OS" = "sunos"); then @@ -58,12 +58,12 @@ AC_ARG_WITH(OS, AC_MSG_RESULT($OS) AC_ARG_WITH(no_cpu_counters, - [ --with-no-cpu-counters Specify a build with no CPU counters], + AS_HELP_STRING([--with-no-cpu-counters], [Specify a build with no CPU counters]), [no_cpu_counters=yes]) AC_MSG_CHECKING(for OS version) AC_ARG_WITH(OSVER, - [ --with-OSVER= Specify operating system version], + AS_HELP_STRING([--with-OSVER=], [Specify operating system version]), [OSVER=$withval], [if test "$OS" != "bgp" -o "$OS" != "bgq"; then OSVER="`uname -r`" @@ -72,22 +72,24 @@ AC_MSG_RESULT($OSVER) AC_MSG_CHECKING(for user events) AC_ARG_WITH(user_events, - [ --with-user-events Build with support for user defined events.], - [USER_EVENTS=yes]) + AS_HELP_STRING([--with-user-events], [Build with support for user defined events.], [30]), + [USER_EVENTS=yes]) AC_MSG_RESULT($USER_EVENTS) AC_MSG_CHECKING(for static user events build) AC_ARG_WITH(static_user_events, - [ --with-static-user-events Build with a static user events file papi_static_user_events.h.], - [STATIC_USER_EVENTS=yes]) + AS_HELP_STRING([--with-static-user-events], + [Build with a static user events file papi_static_user_events.h.], [30]), + [STATIC_USER_EVENTS=yes]) AC_MSG_RESULT($STATIC_USER_EVENTS) AC_MSG_CHECKING(for perf_event workaround level) AC_ARG_WITH(assumed_kernel, - [ --with-assumed-kernel= Assume kernel version is for purposes of workarounds], - [assumed_kernel=$withval; CFLAGS="$CFLAGS -DASSUME_KERNEL=\\\"$with_assumed_kernel\\\""], - [assumed_kernel="autodetect"] - ) + AS_HELP_STRING([--with-assumed-kernel=], + [Assume kernel version is for purposes of workarounds], [30]), + [assumed_kernel=$withval; CFLAGS="$CFLAGS -DASSUME_KERNEL=\\\"$with_assumed_kernel\\\""], + [assumed_kernel="autodetect"] + ) AC_MSG_RESULT($assumed_kernel) @@ -175,7 +177,7 @@ elif test "$OS" = "bgp"; then cross_compiling=yes elif test "$OS" = "bgq"; then AC_ARG_WITH(bgpm_installdir, - [ --with-bgpm_installdir= Specify the installation path of BGPM], + AS_HELP_STRING([--with-bgpm_installdir=], [Specify the installation path of BGPM]), [BGPM_INSTALL_DIR=$withval CFLAGS="$CFLAGS -I$withval"], [AC_MSG_ERROR([BGQ CPU component requires installation path of BGPM (see --with-bgpm_installdir)])]) @@ -206,14 +208,16 @@ fi if test "$cross_compiling" = "yes" ; then AC_MSG_CHECKING(for native compiler for header generation) AC_ARG_WITH(nativecc, - [ --with-nativecc= Specify native C compiler for header generation ], + AS_HELP_STRING([--with-nativecc=], + [Specify native C compiler for header generation ], [30]), [nativecc=$withval], [nativecc=gcc]) AC_MSG_RESULT($nativecc) fi AC_ARG_WITH(tests, - [ --with-tests= Specify which tests to run on install ], + AS_HELP_STRING([--with-tests=], + [Specify which tests to run on install], [30]), [tests=$withval], [tests="ctests ftests"]) @@ -225,7 +229,7 @@ echo "#define COMPONENTS_CONFIG_H" >> co echo "" >> components_config.h echo "extern papi_vector_t MY_VECTOR;" >> components_config.h AC_ARG_WITH(components, - [ --with-components=<"component1 component2"> Specify which components to build ], + AS_HELP_STRING([--with-components=<"component1 component2">], [Specify which components to build ]), [components=$withval]) for comp in $components; do idx=`expr index "$comp" /` @@ -267,7 +271,9 @@ AC_MSG_RESULT($components) AC_MSG_CHECKING(for debug build) AC_ARG_WITH(debug, - [ --with-debug= Yes builds a debug version of the library and memory disables PAPI_NO_MEMORY_MANAGEMENT ], + AS_HELP_STRING([--with-debug=], + [Yes builds a debug version of the library and + memory disables PAPI_NO_MEMORY_MANAGEMENT], [30]), [debug=$withval]) if test "$debug" = "yes"; then if test "$CC" = "gcc"; then @@ -403,7 +409,7 @@ AC_DEFINE_UNQUOTED(CPU,$CPU,[cpu type]) if test "x$ffsll" = "x"; then AC_ARG_WITH(ffsll, - [ --with-ffsll Specify use of the ffsll() function ], + AS_HELP_STRING([--with-ffsll], [Specify use of the ffsll() function], [30]), [ffsll=$withval], [if test "$cross_compiling" = "yes" ; then AC_MSG_ERROR([ffsll must be specified for cross compile]) @@ -435,7 +441,8 @@ AC_LINK_IFELSE([#include if test "x$walltimer" = "x"; then AC_ARG_WITH(walltimer, - [ --with-walltimer= Specify realtime timer ], + AS_HELP_STRING([--with-walltimer=], + [Specify realtime timer], [30]), [walltimer=$withval], [if test "$cross_compiling" = "yes" ; then AC_MSG_ERROR([walltimer must be specified for cross compile]) @@ -533,7 +540,8 @@ CFLAGS="-pthread" if test "x$tls" = "x"; then AC_ARG_WITH(tls, - [ --with-tls= This platform supports thread local storage with a keyword ], + AS_HELP_STRING([--with-tls=], + [This platform supports thread local storage with a keyword], [30]), [tls=$withval], [if test "$cross_compiling" = "yes" ; then AC_MSG_ERROR([tls must be specified for cross compile]) @@ -595,7 +603,8 @@ AC_MSG_RESULT($tls) if test "x$virtualtimer" = "x"; then AC_ARG_WITH(virtualtimer, - [ --with-virtualtimer= Specify per-thread virtual timer ], + AS_HELP_STRING([--with-virtualtimer=], + [Specify per-thread virtual timer], [30]), [virtualtimer=$withval], [if test "$cross_compiling" = "yes" ; then AC_MSG_ERROR([virtualtimer must be specified for cross compile]) @@ -744,7 +753,7 @@ AC_MSG_RESULT($virtualtimer) if test "$OS" = "aix"; then AC_ARG_WITH(pmapi, - [ --with-pmapi= Specify path of pmapi on aix system ], + AS_HELP_STRING([--with-pmapi=], [Specify path of pmapi on aix system], [30]), [PMAPI=$withval], [PMAPI="/usr/pmapi"]) LIBS="-L$PMAPI/lib -lpmapi" @@ -757,7 +766,7 @@ if test "$OS" = "aix"; then fi AC_ARG_WITH(papi_events, - [ --with-papi-events= Specify events file to use], + AS_HELP_STRING([--with-papi-events=], [Specify events file to use], [30]), [papi_events=$withval], [papi_events="static" papi_events_table="papi_events_table.h" @@ -766,16 +775,18 @@ AC_ARG_WITH(papi_events, sh papi_events_table.sh > papi_events_table.h]) AC_ARG_WITH(static_tools, - [ --with-static-tools Specify static build of tests and utilities], + AS_HELP_STRING([--with-static-tools], [Specify static build of tests and utilities], [30]), [STATIC="-static"]) AC_MSG_CHECKING(for which libraries to build) AC_ARG_WITH(static_lib, - [ --with-static-lib= Specify whether to build a static library of Papi], + AS_HELP_STRING([--with-static-lib=], + [Specify whether to build a static library of Papi], [30]), [static_lib=$withval], [static_lib=yes]) AC_ARG_WITH(shared_lib, - [ --with-shared-lib= Specify whether to build a shared library of Papi], + AS_HELP_STRING([--with-shared-lib=], + [Specify whether to build a shared library of Papi], [30]), [shared_lib=$withval], [shared_lib=yes]) if test "$shared_lib" = "yes"; then @@ -792,7 +803,9 @@ fi AC_MSG_CHECKING(for link test cases with shared library) AC_ARG_WITH(shlib, - [ --with-shlib Specify dynamic linking of papi library with test cases and utilities], + AS_HELP_STRING([--with-shlib], + [Specify dynamic linking of papi library with test + cases and utilities], [30]), [shlib=yes SETPATH='export LD_LIBRARY_PATH=$(PWD):$(PWD)/libpfm-3.y/lib:$(PWD)/libpfm4/lib;export LIBPATH=.:./libpfm-3.y/lib:./libpfm4/lib;' LINKLIB='../$(SHLIB)'], @@ -821,7 +834,7 @@ perfctr=0 force_perfctr=no AC_ARG_WITH(perfctr, - [ --with-perfctr Specify perfctr as the performance interface ], + AS_HELP_STRING([--with-perfctr], [Specify perfctr as the performance interface], [30]), force_perfctr=yes [user_specified_interface=perfctr if test "$arch" != "ppc64"; then @@ -844,19 +857,24 @@ if test "$perfctr" != 0; then fi AC_ARG_WITH(perfctr_root, - [ --with-perfctr-root= Specify path to source tree (for use by developers only) ], + AS_HELP_STRING([--with-perfctr-root=], + [Specify path to source tree (for use by developers only)], [30]), [perfctr_root=$withval user_specified_interface=perfctr]) AC_ARG_WITH(perfctr_prefix, - [ --with-perfctr-prefix= Specify prefix to installed perfctr distribution ], + AS_HELP_STRING([--with-perfctr-prefix=], + [Specify prefix to installed perfctr distribution], [30]), [perfctr_prefix=$withval user_specified_interface=perfctr]) AC_ARG_WITH(perfctr_incdir, - [ --with-perfctr-incdir= Specify directory of perfctr header files in non-standard location ], + AS_HELP_STRING([--with-perfctr-incdir=], + [Specify directory of perfctr header files in non-standard location ], [30]), [perfctr_incdir=$withval user_specified_interface=perfctr]) AC_ARG_WITH(perfctr_libdir, - [ --with-perfctr-libdir= Specify directory of perfctr library in non-standard location ], + AS_HELP_STRING([--with-perfctr-libdir=], + [Specify directory of perfctr library in + non-standard location], [30]), [perfctr_libdir=$withval user_specified_interface=perfctr]) @@ -915,7 +933,8 @@ perfmon2=no force_perfmon2=no AC_ARG_WITH(perfmon, - [ --with-perfmon= Specify perfmon as the performance interface and specify version], + AS_HELP_STRING([--with-perfmon=], + [Specify perfmon as the performance interface and specify version], [30]), [perfmon=$withval user_specified_interface=perfmon force_perfmon2=yes @@ -955,19 +974,23 @@ AC_ARG_WITH(perfmon, fi]) AC_ARG_WITH(pfm_root, - [ --with-pfm-root= Specify path to source tree (for use by developers only) ], + AS_HELP_STRING([--with-pfm-root=], + [Specify path to source tree (for use by developers only)], [30]), [pfm_root=$withval user_specified_interface=perfmon]) AC_ARG_WITH(pfm_prefix, - [ --with-pfm-prefix= Specify prefix to installed pfm distribution ], + AS_HELP_STRING([--with-pfm-prefix=], + [Specify prefix to installed pfm distribution], [30]), [pfm_prefix=$withval user_specified_interface=perfmon]) AC_ARG_WITH(pfm_incdir, - [ --with-pfm-incdir= Specify directory of pfm header files in non-standard location ], + AS_HELP_STRING([--with-pfm-incdir=], + [Specify directory of pfm header files in non-standard location], [30]), [pfm_incdir=$withval user_specified_interface=perfmon]) AC_ARG_WITH(pfm_libdir, - [ --with-pfm-libdir= Specify directory of pfm library in non-standard location ], + AS_HELP_STRING([--with-pfm-libdir=], + [Specify directory of pfm library in non-standard location], [30]), [pfm_libdir=$withval user_specified_interface=perfmon]) @@ -981,24 +1004,28 @@ force_perf_events=no pe_incdir="libpfm4/include/perfmon" AC_ARG_WITH(perf_events, - [ --with-perf-events Specify use of Linux Performance Event (requires kernel 2.6.32 or greater)], + AS_HELP_STRING([--with-perf-events], + [Specify use of Linux Performance Event (requires kernel 2.6.32 or greater)], [30]), [force_perf_events=yes user_specified_interface=pe]) AC_ARG_WITH(libpfm4, - [ --with-libpfm4 Specify use of libpfm4 with Linux Performance Event (requires kernel 2.6.32 or greater)], + AS_HELP_STRING([--with-libpfm4], + [Specify use of libpfm4 with Linux Performance Event (requires kernel 2.6.32 or greater)], [30]), [force_libpfm4=yes force_perf_events=yes user_specified_interface=pe]) AC_ARG_WITH(libpfm3, - [ --with-libpfm3 Specify use of libpfm3 with Linux Performance Event (requires kernel 2.6.32 or greater)], + AS_HELP_STRING([--with-libpfm3], + [Specify use of libpfm3 with Linux Performance Event (requires kernel 2.6.32 or greater)], [30]), [force_libpfm3=yes force_perf_events=yes user_specified_interface=pe]) AC_ARG_WITH(pe_incdir, - [ --with-pe-incdir= Specify path to the correct perf header file], + AS_HELP_STRING([--with-pe-incdir=], + [Specify path to the correct perf header file], [30]), [pe_incdir=$with_pe_incdir force_perf_events=yes user_specified_interface=pe])