From 75fb74860da7decd94432a4d211795310308a4a8 Mon Sep 17 00:00:00 2001 From: Peter Kokot Date: Sun, 12 May 2019 18:43:03 +0200 Subject: Normalize comments in *nix build system m4 files Normalization include: - Use dnl for everything that can be ommitted when configure is built in favor of the shell comment character # which is visible in the output. - Line length normalized to 80 columns - Dots for most of the one line sentences - Macro definitions include similar pattern header comments now --- TSRM/threads.m4 | 25 ++++++++++++++----------- TSRM/tsrm.m4 | 29 ++++++++++++++++++++--------- 2 files changed, 34 insertions(+), 20 deletions(-) (limited to 'TSRM') diff --git a/TSRM/threads.m4 b/TSRM/threads.m4 index 55864c8982..dde7f17257 100644 --- a/TSRM/threads.m4 +++ b/TSRM/threads.m4 @@ -28,7 +28,7 @@ dnl OF THE POSSIBILITY OF SUCH DAMAGE. dnl dnl PTHREADS_FLAGS dnl -dnl Set some magic defines to achieve POSIX threads conformance +dnl Set some magic defines to achieve POSIX threads conformance. dnl AC_DEFUN([PTHREADS_FLAGS],[ if test -z "$host_alias" && test -n "$host"; then @@ -52,18 +52,17 @@ AC_DEFUN([PTHREADS_FLAGS],[ PTHREAD_FLAGS=-D_REENTRANT;; *sco*) PTHREAD_FLAGS=-D_REENTRANT;; -dnl Solves sigwait() problem, creates problems with u_long etc. -dnl PTHREAD_FLAGS="-D_REENTRANT -D_XOPEN_SOURCE=500 -D_POSIX_C_SOURCE=199506 -D_XOPEN_SOURCE_EXTENDED=1";; esac if test -n "$PTHREAD_FLAGS"; then CPPFLAGS="$CPPFLAGS $PTHREAD_FLAGS" fi -])dnl +]) + dnl dnl PTHREADS_CHECK_COMPILE dnl -dnl Check whether the current setup can use POSIX threads calls +dnl Check whether the current setup can use POSIX threads calls. dnl AC_DEFUN([PTHREADS_CHECK_COMPILE], [ AC_LINK_IFELSE([ AC_LANG_SOURCE([ @@ -85,11 +84,12 @@ int main() { ], [ pthreads_checked=no ] -) ] )dnl +) ] ) + dnl -dnl PTHREADS_CHECK() +dnl PTHREADS_CHECK dnl -dnl Try to find a way to enable POSIX threads +dnl Try to find a way to enable POSIX threads. dnl dnl Magic flags dnl -kthread gcc (FreeBSD) @@ -102,7 +102,6 @@ dnl -qthreaded AIX cc V5 dnl -threads gcc (HP-UX) dnl AC_DEFUN([PTHREADS_CHECK],[ - save_CFLAGS=$CFLAGS save_LIBS=$LIBS PTHREADS_ASSIGN_VARS @@ -151,8 +150,12 @@ if test "$pthreads_working" = "yes"; then else threads_result="POSIX-Threads not found" fi -])dnl +]) + dnl +dnl PTHREADS_ASSIGN_VARS +dnl +dnl Adds pthreads linker and compiler flags. dnl AC_DEFUN([PTHREADS_ASSIGN_VARS],[ if test -n "$ac_cv_pthreads_lib"; then @@ -162,4 +165,4 @@ fi if test -n "$ac_cv_pthreads_cflags"; then CFLAGS="$CFLAGS $ac_cv_pthreads_cflags" fi -])dnl +]) diff --git a/TSRM/tsrm.m4 b/TSRM/tsrm.m4 index a075001b5a..f269abf8a6 100644 --- a/TSRM/tsrm.m4 +++ b/TSRM/tsrm.m4 @@ -1,13 +1,19 @@ -AC_DEFUN([TSRM_BASIC_CHECKS],[ +dnl This file contains TSRM specific autoconf macros. +dnl +dnl TSRM_BASIC_CHECKS +dnl +AC_DEFUN([TSRM_BASIC_CHECKS],[ AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_RANLIB])dnl AC_CHECK_FUNCS(sigprocmask) ]) +dnl +dnl TSRM_CHECK_PTH +dnl AC_DEFUN([TSRM_CHECK_PTH],[ - AC_MSG_CHECKING(for GNU Pth) PTH_PREFIX="`$1 --prefix`" if test -z "$PTH_PREFIX"; then @@ -20,9 +26,11 @@ LIBS="$LIBS `$1 --libs`" AC_DEFINE(GNUPTH, 1, [Whether you use GNU Pth]) AC_MSG_RESULT(yes - installed in $PTH_PREFIX) - ]) +dnl +dnl TSRM_CHECK_ST +dnl AC_DEFUN([TSRM_CHECK_ST],[ if test -r "$1/include/st.h"; then CPPFLAGS="$CPPFLAGS -I$1/include" @@ -40,8 +48,10 @@ AC_DEFUN([TSRM_CHECK_ST],[ AC_DEFINE(TSRM_ST, 1, [ ]) ]) +dnl +dnl TSRM_CHECK_PTHREADS +dnl AC_DEFUN([TSRM_CHECK_PTHREADS],[ - PTHREADS_CHECK if test "$pthreads_working" != "yes"; then @@ -54,11 +64,13 @@ AC_MSG_CHECKING(for POSIX threads) AC_MSG_RESULT(yes) ]) +dnl +dnl TSRM_THREADS_CHECKS +dnl +dnl For the thread implementations, we always use --with-* to maintain +dnl consistency. +dnl AC_DEFUN([TSRM_THREADS_CHECKS],[ - -dnl For the thread implementations, we always use --with-* -dnl to maintain consistency - AC_ARG_WITH([tsrm-pth], [AS_HELP_STRING([[--with-tsrm-pth[=pth-config]]], [Use GNU Pth])], @@ -86,5 +98,4 @@ elif test "$TSRM_ST" != "no"; then elif test "$TSRM_PTHREADS" != "no"; then TSRM_CHECK_PTHREADS fi - ]) -- cgit v1.2.1