Changeset: a800978670e1 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a800978670e1
Modified Files:
        common/stream/stream.c
        common/utils/mutils.c
        configure.ag
        gdk/gdk_storage.c
        gdk/gdk_system.c
        gdk/gdk_system.h
        gdk/gdk_utils.c
Branch: embedded
Log Message:

cleaning up the diff to default


diffs (274 lines):

diff --git a/common/stream/stream.c b/common/stream/stream.c
--- a/common/stream/stream.c
+++ b/common/stream/stream.c
@@ -829,7 +829,7 @@ file_fgetpos(stream *s, lng *p)
 
        if (fp == NULL || p == NULL)
                return -1;
-#if defined(NATIVE_WIN32) && (_MSC_VER >= 1400 || defined(__MINGW32__))        
/* Visual Studio 2005 */
+#ifdef WIN32
        *p = (lng) _ftelli64(fp);       /* returns __int64 */
 #else
 #ifdef HAVE_FSEEKO
@@ -849,7 +849,7 @@ file_fsetpos(stream *s, lng p)
 
        if (fp == NULL)
                return -1;
-#if defined(NATIVE_WIN32) && (_MSC_VER >= 1400 || defined(__MINGW32__))        
/* Visual Studio 2005 */
+#ifdef WIN32
        res = _fseeki64(fp, (__int64) p, SEEK_SET);
 #else
 #ifdef HAVE_FSEEKO
diff --git a/common/utils/mutils.c b/common/utils/mutils.c
--- a/common/utils/mutils.c
+++ b/common/utils/mutils.c
@@ -472,7 +472,7 @@ get_bin_path(void)
 {
        /* getting the path to the executable's binary, isn't all that
         * simple, unfortunately */
-#if (defined(_MSC_VER) || defined(__MINGW32__))                /* Windows */
+#ifdef WIN32
        if (GetModuleFileName(NULL, _bin_path,
                              (DWORD) sizeof(_bin_path)) != 0)
                return _bin_path;
diff --git a/configure.ag b/configure.ag
--- a/configure.ag
+++ b/configure.ag
@@ -162,6 +162,13 @@ AC_ARG_ENABLE(netcdf,
                [enable support for netcdf (default=auto)]),
        enable_netcdf=$enableval,
        enable_netcdf=$dft_netcdf)
+       
+dft_lidar=auto
+AC_ARG_ENABLE(lidar,
+       AS_HELP_STRING([--enable-lidar],
+               [enable support for LiDAR data (default=auto)]),
+       enable_lidar=$enableval,
+       enable_lidar=$dft_lidar)
 
 dft_sql=yes
 AC_ARG_ENABLE(sql,
@@ -1473,12 +1480,14 @@ case "$have_rubygem_dir" in
 esac
 case "$RUBY_DIR" in
 ${prefix}/*)
-       RUBY_DIR="\${prefix}`echo "$RUBY_DIR" | sed "s|^$prefix||"`";;
-/*)    RUBY_DIR="\${prefix}$RUBY_DIR";;
-*)
-       RUBY_DIR="\${prefix}/$RUBY_DIR";;
+       RUBY_DIR="`echo "$RUBY_DIR" | sed "s|^$prefix/||"`";;
+/*)    RUBY_DIR="${RUBY_DIR#/}";;
 esac
 AC_SUBST(RUBY_DIR)
+QRUBY_DIR="$RUBY_DIR"
+XRUBY_DIR="`$translatepath "$QRUBY_DIR"`"
+QXRUBY_DIR="`echo "$XRUBY_DIR" | sed 's/\\\\/\\\\\\\\/g'`"
+AC_SUBST(QXRUBY_DIR)
 
 RUBYGEM=gem
 org_have_rubygem=auto
@@ -2311,7 +2320,6 @@ if test "x$enable_rintegration" != xno; 
 fi
 AM_CONDITIONAL(HAVE_LIBR, test x"$have_libr" != xno)
 
-
 # ODBC, only used by ODBC driver
 if test "x$enable_odbc" != xno; then
        have_unixodbc=auto
@@ -2430,19 +2438,43 @@ if test "x$have_samtools" != xno; then
        LDFLAGS="$LDFLAGS $SAMTOOLS_LIBS"
 
        AC_CHECK_HEADER(samtools/bam.h,
-               [ why_have_samtools= ],
-               [ why_have_samtools="samtools/bam.h header not found" ])
+               [ why_have_samtools=; AC_DEFINE([HAVE_SAMTOOLS_BAM_H], 1, 
[Define to 1 if you have the <samtools/bam.h> header file.]) ],
+               [ why_have_samtools="bam.h header not found" ])
+       if test -n "$why_have_samtools"; then
+               AC_CHECK_HEADER(bam/bam.h,
+                       [ why_have_samtools=; AC_DEFINE([HAVE_BAM_BAM_H], 1, 
[Define to 1 if you have the <samtools/bam.h> header file.]) ],
+                       [ why_have_samtools="Neither bam/bam.h or bam/bam.h 
header not found" ])
+       fi
+       
+       if test -z "$why_have_samtools"; then
+               AC_CHECK_HEADER(samtools/sam.h,
+                       [ why_have_samtools=; AC_DEFINE([HAVE_SAMTOOLS_SAM_H], 
1, [Define to 1 if you have the <samtools/sam.h> header file.]) ],
+                       [ why_have_samtools="sam.h header not found" ])
+       fi
+       if test -n "$why_have_samtools"; then
+               AC_CHECK_HEADER(bam/sam.h,
+                       [ why_have_samtools=; AC_DEFINE([HAVE_BAM_SAM_H], 1, 
[Define to 1 if you have the <bam/sam.h> header file.]) ],
+                       [ why_have_samtools="Neither samtools/sam.h or 
bam/sam.h header not found" ])
+       fi
+
        if test -z "$why_have_samtools"; then
                AC_CHECK_HEADER(samtools/bgzf.h,
-                       [ why_have_samtools= ],
-                       [ why_have_samtools="samtools/bgzf.h header not found" 
])
+                       [ why_have_samtools=; AC_DEFINE([HAVE_SAMTOOLS_BGZF_H], 
1, [Define to 1 if you have the <samtools/bgzf.h> header file.]) ],
+                       [ why_have_samtools="bgzf.h header not found" ])
        fi
+       if test -n "$why_have_samtools"; then
+               AC_CHECK_HEADER(bam/bgzf.h,
+                       [ why_have_samtools=; AC_DEFINE([HAVE_BAM_BGZF_H], 1, 
[Define to 1 if you have the <bam/bgzf.h> header file.]) ],
+                       [ why_have_samtools="Neither samtool/bgzf.h nor 
bam/bgzf.h header not found" ])
+       fi
+
        if test -z "$why_have_samtools"; then
                AC_CHECK_LIB(bam, bam_header_read,
-                       AC_DEFINE(HAVE_SAMTOOLS, 1, [Define if you have the 
samtools (providing the bam library)]),
+                       AC_DEFINE(HAVE_SAMTOOLS, 1, [Define if you have the 
samtools version 0.1.x (providing the bam library)]),
                        [ why_have_samtools="bam library not found" ],
                        [-lm -lpthread -lz])
        fi
+
        if test -n "$why_have_samtools"; then
                if test "x$have_samtools" != xauto; then
                        AC_MSG_ERROR([$why_have_samtools])
@@ -2455,7 +2487,7 @@ if test "x$have_samtools" != xno; then
        if test "x$have_samtools" = "xyes" -o "x$have_samtools" = "xauto"; then
                SAMTOOLS_CFLAGS=
                SAMTOOLS_LIBS="-lbam"
-               AC_CHECK_HEADERS([samtools/kstring.h])
+               AC_CHECK_HEADERS([samtools/kstring.h bam/kstring.h])
        fi
 fi
 AC_SUBST(SAMTOOLS_CFLAGS, $SAMTOOLS_CFLAGS)
@@ -2531,6 +2563,7 @@ esac
 AC_SUBST(GEOS_INCS)
 AC_SUBST(GEOS_LIBS)
 
+# fits, only used by sql
 org_have_cfitsio=no
 have_cfitsio=$org_have_cfitsio
 if test "x$enable_fits" != xno; then
@@ -2542,6 +2575,7 @@ if test "x$enable_fits" != xno; then
 fi
 AM_CONDITIONAL(HAVE_FITS, test x"$have_cfitsio" != xno)
 
+# netcdf, only used by sql
 org_have_netcdf=no
 have_netcdf=$org_have_netcdf
 if test "x$enable_netcdf" != xno; then
@@ -2628,9 +2662,12 @@ no)
 esac
 AC_SUBST(LIBLAS_INCS)
 AC_SUBST(LIBLAS_LIBS)
+AC_MSG_CHECKING(['enable lidar: $enable_lidar'])
+
+AM_CONDITIONAL(HAVE_LIDAR, test "x$enable_lidar" = xyes -o "x$enable_lidar" = 
xauto)
 
 AC_MSG_CHECKING(['enable lidar: $enable_lidar'])
-AM_CONDITIONAL(HAVE_LIDAR, test "x$enable_lidar" = xyes -o "x$enable_lidar" = 
xauto)
+
 
 PKG_CHECK_MODULES([atomic_ops], [atomic_ops], [have_atomic_ops="yes"],
        [have_atomic_ops="no"; why_have_atomic_ops="(atomic_ops library not 
found)"])
@@ -3366,6 +3403,14 @@ typedef lng ptrdiff_t;
 # define __declspec(x)
 #endif
 
+/* work around problem compiling batxml.c with clang
+ * clang 3.5.0 claims to be GnuC 4.3, but doesn't accept
+ * __attribute__((alloc_size(N))), as libml2 2.9.2 expects
+ */
+#if defined(__GNUC__) && defined(__clang__)
+#define LIBXML_ATTR_ALLOC_SIZE(x)
+#endif
+
 #endif /* _SEEN_MONETDB_CONFIG_H */
 ])
 
@@ -3423,20 +3468,12 @@ for comp in \
        'sql         ' \
        'geom        ' \
        'console     ' \
-       'gsl         ' \
-       'fits        ' \
-       'netcdf      ' \
        'microhttpd  ' \
        'rintegration' \
        'odbc        ' \
        'jdbc        ' \
        'control     ' \
        'testing     ' \
-       'developer   ' \
-       'strict      ' \
-       'debug       ' \
-       'assert      ' \
-       'optimize    ' \
        'embedded    ' \
 ; do
        eval "dft=\$dft_$comp"
@@ -3455,6 +3492,7 @@ for comp in \
        'atomic_ops   ' \
        'bz2          ' \
        'curl         ' \
+       'fits         ' \
        'getaddrinfo  ' \
        'gsl          ' \
        'java         ' \
@@ -3462,6 +3500,8 @@ for comp in \
        'java_jdbc    ' \
        'liblas       ' \
        'libxml2      ' \
+       'lidar        ' \
+       'netcdf       ' \
        'openssl      ' \
        'pcre         ' \
        'perl         ' \
diff --git a/gdk/gdk_storage.c b/gdk/gdk_storage.c
--- a/gdk/gdk_storage.c
+++ b/gdk/gdk_storage.c
@@ -127,7 +127,6 @@ GDKcreatedir(const char *dir)
 
 /* remove the directory DIRNAME with its file contents; does not
  * recurse into subdirectories */
-// FIXME: this function is very confused -- HM
 gdk_return
 GDKremovedir(int farmid, const char *dirname)
 {
diff --git a/gdk/gdk_system.c b/gdk/gdk_system.c
--- a/gdk/gdk_system.c
+++ b/gdk/gdk_system.c
@@ -150,7 +150,7 @@ GDKlockstatistics(int what)
 }
 #endif
 
-#if !defined(HAVE_PTHREAD_H) && (defined(_MSC_VER) || defined(__MINGW32__))
+#if !defined(HAVE_PTHREAD_H) && defined(WIN32)
 static struct winthread {
        struct winthread *next;
        HANDLE hdl;
diff --git a/gdk/gdk_system.h b/gdk/gdk_system.h
--- a/gdk/gdk_system.h
+++ b/gdk/gdk_system.h
@@ -94,7 +94,7 @@ gdk_export int MT_join_thread(MT_Id t);
 /*
  * @- MT Lock API
  */
-#if !defined(HAVE_PTHREAD_H) && (defined(_MSC_VER) || defined(__MINGW32__))
+#if !defined(HAVE_PTHREAD_H) && defined(WIN32)
 typedef HANDLE pthread_mutex_t;
 typedef void *pthread_mutexattr_t;
 gdk_export void pthread_mutex_init(pthread_mutex_t *,
@@ -290,7 +290,7 @@ gdk_export ATOMIC_TYPE volatile GDKlocks
 /*
  * @- MT Semaphore API
  */
-#if !defined(HAVE_PTHREAD_H) && (defined(_MSC_VER) || defined(__MINGW32__))
+#if !defined(HAVE_PTHREAD_H) && defined(WIN32)
 
 typedef HANDLE pthread_sema_t;
 gdk_export void pthread_sema_init(pthread_sema_t *s, int flag, int nresources);
diff --git a/gdk/gdk_utils.c b/gdk/gdk_utils.c
--- a/gdk/gdk_utils.c
+++ b/gdk/gdk_utils.c
@@ -367,7 +367,7 @@ MT_init(void)
        if (_MT_pagesize <= 0)
                _MT_pagesize = 4096;    /* default */
 
-#if defined(_MSC_VER) || defined(__MINGW32__)
+#ifdef WIN32
        {
                MEMORYSTATUSEX memStatEx;
 
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to