Changeset: 19dc0804eafe for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=19dc0804eafe
Modified Files:
        configure.ag
Branch: iot
Log Message:

Merge with default


diffs (truncated from 4944 to 300 lines):

diff --git a/configure.ag b/configure.ag
--- a/configure.ag
+++ b/configure.ag
@@ -7,15 +7,50 @@ dnl file, You can obtain one at http://m
 dnl
 dnl Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
 
-# Process this file with autoconf to produce a configure script.
+dnl Process this file with autoconf to produce a configure script.
 
-AC_PREREQ([2.60])
-AC_INIT([MonetDB], [11.24.0], [i...@monetdb.org], [MonetDB], 
[http://www.monetdb.org/])
+dnl  Some help with the syntax:
+dnl  AS_IF(test, body [, test, body]* [, body])
+dnl     All tests are executed in order until one returns true, then
+dnl     the corresponding body is executed, if no tests succeed, the
+dnl     last body (if present) is executed.
+dnl     This translates to a shell if statement with a bunch of elif
+dnl     clauses and an else clause.
+
+dnl  AS_CASE(word [, pattern, body]* [,body])
+dnl     The word is tested against each successive pattern, the body
+dnl     of the first matching pattern is executed, if no patterns
+dnl     match, the final body (if present) is executed.
+dnl     This translates to a shell case command with patterns and
+dnl     bodies, the final body gets the pattern *.
+
+dnl  AS_VERSION_COMPARE(version1, version2, lt-body, eq-body, gt-body)
+dnl     The two versions are compared, the body corresponding with
+dnl     whether the first version is less than, equal to, or greater
+dnl     than the second version is executed.
+
+dnl  AS_VAR_IF(var, word, eq-body, ne-body)
+dnl     If $var is equal to word, execute eq-body, else execute ne-body.
+
+dnl  @%:@
+dnl     This is a quadrigraph for #.  We use this in C preprocessor
+dnl     code that we inline in the script so that it doesn't get
+dnl     confused with a start-of-comment.
+
+dnl  Note that by using this syntax, there should not be any
+dnl  unbalanced parentheses (due to there not being loose case
+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.
+
+AC_PREREQ([2.63])
+AC_INIT([MonetDB], [11.24.0], [https://bugs.monetdb.org/], [MonetDB], 
[https://www.monetdb.org/])
 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
+dnl  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])
@@ -24,9 +59,10 @@ AC_SUBST([CONFIG_H], [monetdb_config.h])
 HOST=[$target]
 AC_DEFINE_UNQUOTED([HOST], ["$HOST"], [Host identifier])
 
-if test x"$target_os" = xcygwin; then
-       AC_DEFINE([WIN32], 1, [Define on Microsoft Windows (also under Cygwin)])
-fi
+AC_DEFINE([MONETDB_RELEASE], ["unreleased"], [Release name or "unreleased"])
+
+AS_VAR_IF([target_os], [cygwin],
+       [AC_DEFINE([WIN32], 1, [Define on Microsoft Windows (also under 
Cygwin)])])
 AM_CONDITIONAL([NOT_WIN32], [test x"$target_os" != xcygwin])
 AM_CONDITIONAL([NATIVE_WIN32], [false])
 
@@ -39,23 +75,16 @@ m4_ifndef([PKG_PROG_PKG_CONFIG],
 
 PKG_PROG_PKG_CONFIG
 
-if test x"$PKG_CONFIG" = x ; then
-       AC_MSG_ERROR([pkg-config is required to configure MonetDB])
-fi
+AS_VAR_IF([PKG_CONFIG], [],
+       [AC_MSG_ERROR([pkg-config is required to configure MonetDB])])
 
-dnl VERSION_TO_NUMBER macro (copied from libxslt)
-AC_DEFUN([MONETDB_VERSION_TO_NUMBER],
-[`$1 | sed 's|[[_\-]][[a-zA-Z0-9]]*$||' | awk 'BEGIN { FS = "."; } { printf 
"%d", ([$]1 * 1000 + [$]2) * 1000 + [$]3;}'`])
+dnl  BUILD and SOURCE are *only* used for testing.
 
-# BUILD and SOURCE are *only* used for monetdb-config and RunMserver
-# SOURCE is the absolute path name of the source directory
-# (srcdir can be relative)
-
-# 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'`
+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'`
 BUILD=[`pwd`]
 AC_SUBST([BUILD])
 
@@ -68,63 +97,86 @@ AC_SUBST([MAPI_VERSION])
 AC_SUBST([MONETDB5_VERSION])
 AC_SUBST([STREAM_VERSION])
 
-# 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
-if test "${prefix}x" = "NONEx"; then
-       Qprefix="${ac_default_prefix}"
-else
-       Qprefix="${prefix}"
-fi
+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
+AS_VAR_IF([prefix], [NONE],
+       [Qprefix="${ac_default_prefix}"].
+       [Qprefix="${prefix}"])
+
 Qprefix="`echo "$Qprefix" | sed 's/\\\\/\\\\\\\\/g'`"
 AC_SUBST([Qprefix])
-# exec_prefix is created very late, so let make do the expansion
-if test "${exec_prefix}x" = "NONEx"; then
-       Qexec_prefix='${prefix}'
-else
-       Qexec_prefix="`echo "$exec_prefix" | sed 's/\\\\/\\\\\\\\/g'`"
-fi
+dnl  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])
 
-if test -f "$srcdir"/vertoo.data; then
+dnl  small hack to get icc -no-gcc, done here because AC_PROG_CC shouldn't
+dnl  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.
+               icc_ver="`$CC -dumpversion 2>/dev/null`"
+               AS_CASE([$icc_ver],
+                       [8.*], [CC="$CC -no-gcc"],
+                       [9.*], [CC="$CC -no-gcc"],
+                       [10.*], [CC="$CC -no-gcc"],
+                       [11.*], [CC="$CC -no-gcc"],
+                       [15.*], [CC="$CC -no-gcc"],
+                       [AC_MSG_WARN([icc ($CC) $icc_ver not handled, yet])])])
+
+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
        dft_strict=yes
        dft_assert=yes
        dft_debug=yes
        dft_optimize=no
-       dft_developer=yes
-else
+       dft_developer=yes],
+       [
        dnl  Users compiling from source tarball(s):
        dnl  default is --disable-strict --disable-assert --disable-debug 
--disable-optimize --disable-developer
        dft_strict=no
        dft_assert=no
        dft_debug=no
        dft_optimize=no
-       dft_developer=no
-fi
+       dft_developer=no])
 
-dnl small hack to get icc -no-gcc, done here because AC_PROG_CC shouldn't
-dnl set GCC=yes if we use icc.
-case "$CC" in
-*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.
-       icc_ver="`$CC -dumpversion 2>/dev/null`"
-       case $icc_ver in
-       8.*)    CC="$CC -no-gcc";;
-       9.*)    CC="$CC -no-gcc";;
-       10.*)   CC="$CC -no-gcc";;
-       11.*)   CC="$CC -no-gcc";;
-       15.*)   CC="$CC -no-gcc";;
-       *)      AC_MSG_WARN([icc ($CC) $icc_ver not handled, yet]);;
-       esac
-       ;;
-esac
+AC_ARG_ENABLE([developer],
+       [AS_HELP_STRING([--enable-developer],
+               [enable support for MonetDB development (default=yes for 
development sources)])],
+       [enable_developer=$enableval],
+       [enable_developer=$dft_developer])
 
-AC_DEFINE([MONETDB_RELEASE], ["unreleased"], [Release name or "unreleased"])
+dft_testing=auto
+AC_ARG_ENABLE([testing],
+       [AS_HELP_STRING([--enable-testing],
+               [enable support for testing (default=auto)])],
+       [enable_testing=$enableval],
+       [enable_testing=$dft_testing])
+
+dft_mapi=yes
+AC_ARG_ENABLE([mapi],
+       [AS_HELP_STRING([--enable-mapi],
+               [Enable MAPI (default=yes)])],
+       [enable_mapi=$enableval],
+       [enable_mapi=$dft_mapi])
+AM_CONDITIONAL([HAVE_MAPI], [test x$enable_mapi != xno])
+AS_VAR_IF([enable_mapi], [no],
+       [],
+       [AC_DEFINE([HAVE_MAPI], 1, [Enable MAPI])])
+
+dft_odbc=auto
+AC_ARG_ENABLE([odbc],
+       [AS_HELP_STRING([--enable-odbc],
+               [compile the MonetDB ODBC driver (default=auto)])],
+       [enable_odbc=$enableval],
+       [enable_odbc=$dft_odbc])
 
 dft_gdk=yes
 AC_ARG_ENABLE([gdk],
@@ -139,15 +191,37 @@ AC_ARG_ENABLE([monetdb5],
                [enable support for MonetDB5 (default=yes)])],
        [enable_monetdb5=$enableval],
        [enable_monetdb5=$dft_monetdb5])
-case "$enable_gdk-$enable_monetdb5" in
-no-yes)
-       AC_MSG_ERROR([MonetDB5 requires GDK.])
-       ;;
-no-auto)
-       enable_monetdb5=no
-       disable_monetdb5="(MonetDB5 requires GDK.)"
-       ;;
-esac
+AS_CASE(["$enable_gdk-$enable_monetdb5"],
+       [no-yes], [AC_MSG_ERROR([MonetDB5 requires GDK.])],
+       [no-auto], [
+               enable_monetdb5=no
+               disable_monetdb5="(MonetDB5 requires GDK.)"])
+
+dft_sql=yes
+AC_ARG_ENABLE([sql],
+       [AS_HELP_STRING([--enable-sql],
+               [enable support for MonetDB/SQL (default=yes)])],
+       [enable_sql=$enableval],
+       [enable_sql=$dft_sql])
+AS_CASE(["$enable_monetdb5-$enable_sql"],
+[no-yes], [
+       AC_MSG_ERROR([MonetDB/SQL requires MonetDB5.])],
+[no-auto], [
+       enable_sql=no
+       disable_sql="(MonetDB/SQL requires MonetDB5.)"])
+
+dft_geom=auto
+AC_ARG_ENABLE([geom],
+       [AS_HELP_STRING([--enable-geom],
+               [enable support for geom module (default=auto)])],
+       [enable_geom=$enableval],
+       [enable_geom=$dft_geom])
+AS_CASE(["$enable_monetdb5-$enable_geom"],
+[no-yes], [
+       AC_MSG_ERROR([geom module requires MonetDB5])],
+[no-auto], [
+       enable_geom=no
+       disable_geom="(geom module requires MonetDB5)"])
 
 dft_fits=auto
 AC_ARG_ENABLE([fits],
@@ -170,64 +244,25 @@ AC_ARG_ENABLE([lidar],
        [have_lidar=$enableval],
        [have_lidar=$dft_lidar])
 
-dft_sql=yes
-AC_ARG_ENABLE([sql],
-       [AS_HELP_STRING([--enable-sql],
-               [enable support for MonetDB/SQL (default=yes)])],
-       [enable_sql=$enableval],
-       [enable_sql=$dft_sql])
-case "$enable_monetdb5-$enable_sql" in
-no-yes)
-       AC_MSG_ERROR([MonetDB/SQL requires MonetDB5.])
-       ;;
-no-auto)
-       enable_sql=no
-       disable_sql="(MonetDB/SQL requires MonetDB5.)"
-       ;;
-esac
-
-dft_geom=auto
-AC_ARG_ENABLE([geom],
-       [AS_HELP_STRING([--enable-geom],
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to