Changeset: f186ca1da5b6 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f186ca1da5b6 Modified Files: configure.ag Branch: default Log Message:
Follow the recommendation: use # for comments (at least most of the time). dnl is useful as a comment when commenting about the configure source, # should be used when commenting about what the code is supposed to do. I know, this is a bit vague. diffs (truncated from 1501 to 300 lines): diff --git a/configure.ag b/configure.ag --- a/configure.ag +++ b/configure.ag @@ -42,7 +42,8 @@ dnl unbalanced parentheses (due to ther dnl statements). This makes editing easier. dnl Also note that comments that start with # are copied to the -dnl configure file, whereas comments starting with dnl are elided. +dnl configure file, whereas comments starting with dnl are elided +dnl (including their trailing newline). AC_PREREQ([2.63]) AC_INIT([MonetDB], [11.24.0], [https://bugs.monetdb.org/], [MonetDB], [https://www.monetdb.org/]) @@ -50,7 +51,7 @@ AC_CONFIG_AUX_DIR([buildtools/conf]) AC_CONFIG_MACRO_DIR([buildtools/conf]) AC_CANONICAL_HOST AC_CANONICAL_TARGET -dnl use tar-ustar since we have long (longer than 99 characters) file names +# use tar-ustar since we have long (longer than 99 characters) file names AM_INIT_AUTOMAKE([tar-ustar no-dist-gzip dist-bzip2]) AC_CONFIG_SRCDIR([gdk/gdk.h]) AC_CONFIG_HEADERS([monetdb_config.h]) @@ -78,13 +79,13 @@ PKG_PROG_PKG_CONFIG AS_VAR_IF([PKG_CONFIG], [], [AC_MSG_ERROR([pkg-config is required to configure MonetDB])]) -dnl BUILD and SOURCE are *only* used for testing. +# BUILD and SOURCE are *only* used for testing. -dnl The Q versions of various variables are used in places where \'s -dnl need to be escapes with an extra \. Configure does not support \'s -dnl in path names, so there is no need to do anything special here -dnl except set the variables. The command to set them in case we do -dnl need to escape the \'s is Qvar=`echo "$var" | sed 's/\\\\/\\\\\\\\/g'` +# The Q versions of various variables are used in places where \'s +# need to be escapes with an extra \. Configure does not support \'s +# in path names, so there is no need to do anything special here +# except set the variables. The command to set them in case we do +# need to escape the \'s is Qvar=`echo "$var" | sed 's/\\\\/\\\\\\\\/g'` BUILD=[`pwd`] AC_SUBST([BUILD]) @@ -97,29 +98,29 @@ AC_SUBST([MAPI_VERSION]) AC_SUBST([MONETDB5_VERSION]) AC_SUBST([STREAM_VERSION]) -dnl if no --prefix option, we must set Qprefix to the default value -dnl the problem is that prefix is set very late in the process if it -dnl wasn't set by --prefix +# if no --prefix option, we must set Qprefix to the default value +# the problem is that prefix is set very late in the process if it +# wasn't set by --prefix AS_VAR_IF([prefix], [NONE], [Qprefix="${ac_default_prefix}"]. [Qprefix="${prefix}"]) Qprefix="`echo "$Qprefix" | sed 's/\\\\/\\\\\\\\/g'`" AC_SUBST([Qprefix]) -dnl exec_prefix is created very late, so let make do the expansion +# exec_prefix is created very late, so let make do the expansion AS_VAR_IF([exec_prefix], [NONE], [Qexec_prefix='${prefix}'], [Qexec_prefix="`echo "$exec_prefix" | sed 's/\\\\/\\\\\\\\/g'`"]) AC_SUBST([Qexec_prefix]) -dnl small hack to get icc -no-gcc, done here because AC_PROG_CC shouldn't -dnl set GCC=yes if we use icc. +# small hack to get icc -no-gcc, done here because AC_PROG_CC shouldn't +# set GCC=yes if we use icc. AS_CASE(["$CC"], [*icc*-no-gcc*], [], [*icc*], [ - dnl Since version 8.0, ecc/ecpc are also called icc/icpc, - dnl and icc/icpc requires "-no-gcc" to avoid predefining - dnl __GNUC__, __GNUC_MINOR__, and __GNUC_PATCHLEVEL__ macros. + # Since version 8.0, ecc/ecpc are also called icc/icpc, + # and icc/icpc requires "-no-gcc" to avoid predefining + # __GNUC__, __GNUC_MINOR__, and __GNUC_PATCHLEVEL__ macros. icc_ver="`$CC -dumpversion 2>/dev/null`" AS_CASE([$icc_ver], [8.*], [CC="$CC -no-gcc"], @@ -131,16 +132,16 @@ AS_CASE(["$CC"], AS_IF([test -f "$srcdir"/vertoo.data], [ - dnl Developers compiling from Mercurial: - dnl default is --enable-strict --enable-assert --enable-debug --disable-optimize --enable-developer + # Developers compiling from Mercurial: + # default is --enable-strict --enable-assert --enable-debug --disable-optimize --enable-developer dft_strict=yes dft_assert=yes dft_debug=yes dft_optimize=no dft_developer=yes], [ - dnl Users compiling from source tarball(s): - dnl default is --disable-strict --disable-assert --disable-debug --disable-optimize --disable-developer + # Users compiling from source tarball(s): + # default is --disable-strict --disable-assert --disable-debug --disable-optimize --disable-developer dft_strict=no dft_assert=no dft_debug=no @@ -298,12 +299,12 @@ AC_ARG_ENABLE([pyintegration], [enable_pyintegration=$enableval], [enable_pyintegration=$dft_pyintegration]) -dnl The console is a direct client hooked onto the kernel with full -dnl administrative privileges, bypassing any security checks. It is -dnl handy only during development. -dnl We simply can't disable it for now because Testing gets hopelessly -dnl upset about it, but we can offer to the user to disable it for -dnl increased security. +# The console is a direct client hooked onto the kernel with full +# administrative privileges, bypassing any security checks. It is +# handy only during development. +# We simply can't disable it for now because Testing gets hopelessly +# upset about it, but we can offer to the user to disable it for +# increased security. dft_console=yes AC_ARG_ENABLE([console], [AS_HELP_STRING([--enable-console], @@ -388,9 +389,9 @@ AC_ARG_ENABLE([instrument], [enable_instrument=$enableval], [enable_instrument=def_$dft_instrument]) -dnl RIPEMD160 is patent free, academic and European, but unfortunately -dnl can't use it by default, as that would exclude JDBC usage (Java -dnl doesn't natively support RIPEMD160). +# RIPEMD160 is patent free, academic and European, but unfortunately +# can't use it by default, as that would exclude JDBC usage (Java +# doesn't natively support RIPEMD160). MONETDB5_PASSWDHASH="SHA512" AC_ARG_WITH([password-backend], [AS_HELP_STRING([--with-password-backend=HASHALG], @@ -410,7 +411,7 @@ AC_DISABLE_STATIC AC_ENABLE_SHARED AM_CONDITIONAL([CROSS_COMPILING], [test x$cross_compiling = xyes]) -dnl logs usually end up in /var/log +# logs usually end up in /var/log logdir='${localstatedir}/log/monetdb' AC_ARG_WITH([logdir], [AS_HELP_STRING([--with-logdir=DIR], @@ -420,7 +421,7 @@ AC_ARG_WITH([logdir], [AC_MSG_WARN([--with-logdir called without argument - will use default])], [logdir="$withval"])]) -dnl pidfiles usually end up in /var/run +# pidfiles usually end up in /var/run rundir='${localstatedir}/run/monetdb' AC_ARG_WITH([rundir], [AS_HELP_STRING([--with-rundir=DIR], @@ -431,38 +432,38 @@ AC_ARG_WITH([rundir], [rundir="$withval"])]) -dnl checks for programs +# checks for programs AC_LANG([C]) -dnl autoconf-2.60: enable extensions on systems that normally disable them +# autoconf-2.60: enable extensions on systems that normally disable them AC_USE_SYSTEM_EXTENSIONS() -dnl enable 64-bits file offsets, check this early, since it breaks other -dnl stuff (in particular on Solaris), which we do not want to detect as -dnl usable below in that case +# enable 64-bits file offsets, check this early, since it breaks other +# stuff (in particular on Solaris), which we do not want to detect as +# usable below in that case AC_SYS_LARGEFILE AC_PROG_CPP() -dnl check for compiler (also set GCC (yes/no)). +# check for compiler (also set GCC (yes/no)). AC_PROG_CC() -dnl What do we need to get the msg_control and msg_controllen fields on -dnl struct msg (filedescriptor passing)? In the future this could be a -dnl check to see if we can find it, such that we can disable it compile -dnl time if absent. It looks however, as if it's available everywhere -dnl we try where UNIX domain sockets also exist. So we go by the -dnl following simple implementation for now. +# What do we need to get the msg_control and msg_controllen fields on +# struct msg (filedescriptor passing)? In the future this could be a +# check to see if we can find it, such that we can disable it compile +# time if absent. It looks however, as if it's available everywhere +# we try where UNIX domain sockets also exist. So we go by the +# following simple implementation for now. AS_CASE([$host], [*-solaris*], [ - dnl Solaris needs this to get msg_control and msg_controllen; - dnl it disables, however, the availability of madvise, which is - dnl in use use by GDK, so we cannot just AC_DEFINE this, but - dnl rather have to enable it where it is necessary + # Solaris needs this to get msg_control and msg_controllen; + # it disables, however, the availability of madvise, which is + # in use use by GDK, so we cannot just AC_DEFINE this, but + # rather have to enable it where it is necessary MSGCONTROL_FLAGS="-D_XOPEN_SOURCE=500" AC_SUBST([MSGCONTROL_FLAGS])]) -dnl (try to) determine compiler type (gcc, icc, clang) (and version) -dnl independent of call ($CC) and result of AC_PROG_CC() ($GCC) -dnl (e.g., on OSX, Apple pretends its clang is gcc) +# (try to) determine compiler type (gcc, icc, clang) (and version) +# independent of call ($CC) and result of AC_PROG_CC() ($GCC) +# (e.g., on OSX, Apple pretends its clang is gcc) AC_MSG_CHECKING([compiler type & version]) gcc_ver="" icc_ver="" @@ -476,14 +477,14 @@ AS_CASE(["$CC_version"], icc_ver="`$CC -dumpversion 2>/dev/null`" CC_ver="icc-$icc_ver"], [*clang*], [ - dnl `clang -dumpversion` reports the original/old gcc version it is based on + # `clang -dumpversion` reports the original/old gcc version it is based on gcc_ver="`$CC -v 2>&1 | grep -w '[[Vv]]ersion [[0-9]]\+\.[[0-9]]\+' | sed 's|^.*[[Vv]]ersion \([[0-9]][[0-9]]*\(\.[[0-9]][[0-9]]*\)\(\.[[0-9]][[0-9]]*\)*\).*$|\1|'`" CC_ver="clang-$gcc_ver"], [CC_V="`$CC -V 2>&1`" AS_CASE(["$CC_V"], [*'Sun Ceres C '*|*'Sun C '*], [ - dnl developer/sunstudioexpress and - dnl developer/sunstudio12u1 respectively + # developer/sunstudioexpress and + # developer/sunstudio12u1 respectively CC_ver="suncc-`echo "$CC_version" | sed -n 's/.*Sun Ceres C \(.*\) SunOS.*/\1/p;s/.*Sun C \(.*\) SunOS.*/\1/p'`" CC_version="$CC_V"], [AC_MSG_WARN([compiler not recognized: @@ -493,7 +494,7 @@ AS_CASE(["$CC_version"], $CC_V])])]) AC_MSG_RESULT([$CC_ver]) -dnl sanity/consistency check +# sanity/consistency check AS_CASE(["$GCC!$CC!$CC_ver"], [yes!*clang*!clang-*], [], [yes!*gcc*!clang-*], [], @@ -518,11 +519,11 @@ AC_C_BIGENDIAN() LINUX_DIST='' AS_CASE(["$host_os"], [linux*], [ - dnl Please keep this aligned / in sync with testing/Mtest.py.in ! + # Please keep this aligned / in sync with testing/Mtest.py.in ! AC_MSG_CHECKING([which Linux distribution we're using]) AS_IF([test -s /etc/os-release], [ - dnl this is the new way of getting release information - dnl works for Fedora >= 17, Ubuntu >= 12.04 (Precise Pangolin) + # this is the new way of getting release information + # works for Fedora >= 17, Ubuntu >= 12.04 (Precise Pangolin) LINUX_DIST=`source /etc/os-release; echo ${ID}:${VERSION_ID}`], [test -s /etc/fedora-release ], [ LINUX_DIST="`cat /etc/fedora-release | head -n1 \ @@ -561,9 +562,9 @@ AC_DEFUN([MCHECK_ADD_FLAG], [ cache_var=AS_TR_SH([m_cv_cc_has_$1]) AC_CACHE_CHECK([whether ${CC} supports $1], [${cache_var}], [ SAVE_FLAGS="${CFLAGS}" - dnl compile a small program that has enough challenges to trigger - dnl the compiler to actually do something, such that it needs to - dnl actually look at the flags given + # compile a small program that has enough challenges to trigger + # the compiler to actually do something, such that it needs to + # actually look at the flags given CFLAGS="${SAVE_FLAGS} ${X_CFLAGS} $1" dnl do not use AC_LANG_PROGRAM here, because it generates a program dnl with "int main() {" function, which triggers @@ -594,21 +595,23 @@ AC_DEFUN([MCHECK_ADD_FLAG], [ eval "test \"x\$${cache_var}\" = xyes && X_CFLAGS=\"${X_CFLAGS} $1\"" ]) -dnl Set compiler switches. -dnl The idea/goal is to be as strict as possible, i.e., enable preferably -dnl *all* warnings and make them errors. This should help keep the code -dnl as clean and portable as possible. -dnl It turned out, though, that this, especially turning all warnings into -dnl errors, is a bit too ambitious for configure/autoconf. Hence, we set -dnl all flags that enable specific warnings and those that make the -dnl compiler die on them (-Werror) in X_CFLAGS, which are added to the -dnl standard CFLAGS once configure/autoconf are done with their job, -dnl i.e., at the end of this configure[.ag] script. -dnl Only GNU (gcc) and Intel ([ie]cc/[ie]cpc on Linux) are done so far. +# Set compiler switches. +# The idea/goal is to be as strict as possible, i.e., enable preferably +# *all* warnings and make them errors. This should help keep the code +# as clean and portable as possible. +# It turned out, though, that this, especially turning all warnings into +# errors, is a bit too ambitious for configure/autoconf. Hence, we set +# all flags that enable specific warnings and those that make the +# compiler die on them (-Werror) in X_CFLAGS, which are added to the +# standard CFLAGS once configure/autoconf are done with their job, +# i.e., at the end of this configure[.ag] script. +# Only GNU (gcc) and Intel ([ie]cc/[ie]cpc on Linux) are done so far. AS_VAR_IF([enable_strict], [yes], [ AS_CASE(["$GCC-$CC-$host_os"], [yes-*-*], [ - MCHECK_ADD_FLAG([-Werror]) dnl keep this one first + # keep this one first + MCHECK_ADD_FLAG([-Werror]) + MCHECK_ADD_FLAG([-Wall]) MCHECK_ADD_FLAG([-Wextra]) _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list