Changeset: d93abc346939 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d93abc346939
Removed Files:
        tools/embedded/undef.h
Modified Files:
        NT/monetdb_config.h.in
        configure.ag
        tools/embedded/build-rpkg.sh
        tools/embedded/rpackage/configure
        tools/embedded/rpackage/configure.win
Branch: embedded
Log Message:

new non-cheating configure script


diffs (truncated from 499 to 300 lines):

diff --git a/NT/monetdb_config.h.in b/NT/monetdb_config.h.in
--- a/NT/monetdb_config.h.in
+++ b/NT/monetdb_config.h.in
@@ -22,6 +22,12 @@
 #ifndef _SEEN_MONETDB_CONFIG_H
 #define _SEEN_MONETDB_CONFIG_H 1
 
+#ifdef __MINGW32__
+/* for now, compiling with mingw implies we're compiling for embedded */
+#define HAVE_EMBEDDED 1
+#define HAVE_EMBEDDED_R 1
+#endif
+
 /* Prevent pollution through excessive inclusion of include files by
  * Windows.h. */
 #ifndef WIN32_LEAN_AND_MEAN
@@ -112,10 +118,12 @@
 /* Define to 1 if you have the `ctime_r' function. */
 #define HAVE_CTIME_R 1
 
+#ifdef _MSC_VER
 /* Define if you have ctime_r(time_t*,char *buf,size_t s) */
 #define HAVE_CTIME_R3 1
 /* there is something very similar to ctime_r on Windows: */
 #define ctime_r(t,b,s) (ctime_s(b,s,t) ? NULL : (b))
+#endif
 
 /* Define if you have the cURL library */
 /* #undef HAVE_CURL */
@@ -146,7 +154,7 @@
 /* #undef HAVE_FDATASYNC */
 
 /* Define to 1 if you have the <fenv.h> header file. */
-#if _MSC_VER > 1600
+#if !defined(_MSV_VER) || _MSC_VER > 1600
 #define HAVE_FENV_H 1
 #endif
 
@@ -157,7 +165,7 @@
 #define HAVE_FPCLASS 1         /* uses _fpclass, see mmath.c */
 
 /* Define to 1 if you have the `fpclassify' function. */
-#if _MSC_VER > 1600
+#if defined(_MSC_VER) && _MSC_VER > 1600
 #define HAVE_FPCLASSIFY 1
 #endif
 
@@ -172,7 +180,9 @@
 
 /* Define to 1 if you have the `ftruncate' function. */
 #define HAVE_FTRUNCATE 1
+#ifdef _MSC_VER
 #define ftruncate(fd, sz)      (-(_chsize_s((fd), (__int64) (sz)) != 0))
+#endif
 
 /* Define if you use garbage collection */
 /* #undef HAVE_GC */
@@ -208,7 +218,9 @@
 /* #undef HAVE_GETTIMEOFDAY */
 
 /* Define to 1 if you have the `_get_timezone' function. */
+#ifdef _MSC_VER
 #define HAVE__GET_TIMEZONE 1
+#endif
 
 /* Define if you have the gsl library */
 /* #undef HAVE_GSL */
@@ -234,7 +246,7 @@
 #define HAVE_IO_H 1
 
 /* Define to 1 if you have the `isinf' function. */
-#if _MSC_VER > 1600
+#if !defined(_MSV_VER) || _MSC_VER > 1600
 #define HAVE_ISINF 1
 #endif
 
@@ -303,7 +315,7 @@
 
 /* Define to 1 if you have the `llabs' function. */
 #define HAVE_LLABS 1
-#if _MSC_VER <= 1500
+#if defined(_MSV_VER) && _MSC_VER <= 1500
 #define llabs _abs64
 #endif
 
@@ -319,10 +331,10 @@
 /* #undef HAVE_LOCKF */
 
 /* Define to 1 if the system has the type `long long'. */
-#if _MSC_VER > 1600 || (defined(__ICL) && __ICL >= 1010)
+#if (defined(_MSC_VER) && _MSC_VER > 1600) || (defined(__ICL) && __ICL >= 
1010) || defined(__MINGW32__)
 #define HAVE_LONG_LONG 1
 #else
-#if _MSC_VER >= 1300
+#if defined(_MSC_VER) && _MSC_VER >= 1300
 /* Visual Studio .NET 2003 does have long long, but the printf %lld
  * format is interpreted the same as %ld, i.e. useless
  */
@@ -376,7 +388,7 @@
 /* #undef HAVE_NL_LANGINFO */
 
 /* Define to 1 if you have the `nextafterf' function. */
-#if _MSC_VER > 1600
+#if !defined(_MSC_VER) || _MSC_VER > 1600
 #define HAVE_NEXTAFTERF 1
 #endif
 
@@ -454,7 +466,7 @@
 /* #undef HAVE_RLIMIT_H */
 
 /* Define to 1 if you have the `round' function. */
-#if _MSC_VER > 1600
+#if !defined(_MSV_VER) || _MSC_VER > 1600
 #define HAVE_ROUND 1
 #endif
 
@@ -525,7 +537,7 @@
 #define HAVE_STDDEF_H 1
 
 /* Define to 1 if you have the <stdint.h> header file. */
-#if _MSC_VER > 1600
+#if !defined(_MSC_VER) || _MSC_VER > 1600
 #define HAVE_STDINT_H 1
 #endif
 
@@ -542,7 +554,7 @@
 /* #undef HAVE_STRCASESTR */
 
 /* Define to 1 if you have the `strftime' function. */
-#if _MSC_VER >= 1500
+#if !defined(_MSC_VER) || _MSC_VER >= 1500
 #define HAVE_STRFTIME 1
 #endif
 
@@ -571,24 +583,24 @@
 #define HAVE_STRTOD 1
 
 /* Define to 1 if you have the `strtof' function. */
-#if _MSC_VER > 1600
+#if !defined(_MSC_VER) || _MSC_VER > 1600
 #define HAVE_STRTOF 1
 #endif
 
 #define strtok_r(t,d,c) strtok_s(t,d,c)
 
 /* Define to 1 if you have the `strtoll' function. */
-#if _MSC_VER >= 1300
+#if !defined(_MSC_VER) || _MSC_VER >= 1300
 #define HAVE_STRTOLL 1
-#if _MSC_VER <= 1600 && !defined(strtoll)
+#if defined(_MSC_VER) && _MSC_VER <= 1600 && !defined(strtoll)
 #define strtoll _strtoi64
 #endif
 #endif
 
 /* Define to 1 if you have the `strtoull' function. */
-#if _MSC_VER >= 1300
+#if !defined(_MSC_VER) || _MSC_VER >= 1300
 #define HAVE_STRTOULL 1
-#if _MSC_VER <= 1600 && !defined(strtoull)
+#if defined(_MSC_VER) && _MSC_VER <= 1600 && !defined(strtoull)
 #define strtoull _strtoui64
 #endif
 #endif
@@ -665,7 +677,7 @@
 #define HAVE_TIME_H 1
 
 /* Define to 1 if you have the `trunc' function. */
-#if _MSC_VER > 1600
+#if !defined(_MSC_VER) || _MSC_VER > 1600
 #define HAVE_TRUNC 1
 #endif
 
@@ -693,8 +705,10 @@
 /* Define if you have valgrind installed and want to use it */
 /* #undef HAVE_VALGRIND */
 
+#ifdef _MSC_VER
 /* Define to 1 if you have the `_wfopen' function. */
 #define HAVE__WFOPEN 1
+#endif
 
 /* Define to 1 if you have the <winsock2.h> header file. */
 #define HAVE_WINSOCK2_H 1
@@ -703,7 +717,7 @@
 #define HAVE_WINSOCK_H 1
 
 /* Define to 1 if you have the <xmmintrin.h> header file. */
-#if _MSC_VER > 1600
+#if !defined(_MSC_VER) || _MSC_VER > 1600
 #define HAVE_XMMINTRIN_H 1
 #endif
 
@@ -1003,7 +1017,7 @@
 /* Define to `unsigned int' if <sys/types.h> does not define. */
 /* #undef size_t */
 
-#if _MSC_VER < 1900
+#if defined(_MSC_VER) && _MSC_VER < 1900
 #define snprintf c99_snprintf
 #define vsnprintf c99_vsnprintf
 
@@ -1047,7 +1061,7 @@ c99_snprintf(char *outBuf, size_t size, 
 #define ssize_t int
 #endif
 
-#if _MSC_VER <= 1600
+#if defined(_MSC_VER) && _MSC_VER <= 1600
 /* no va_copy in win32 */
 #define va_copy(x,y) ((x) = (y))
 #endif
diff --git a/configure.ag b/configure.ag
--- a/configure.ag
+++ b/configure.ag
@@ -2028,23 +2028,37 @@ m4_ifndef([AM_ICONV],
 
 AM_ICONV
 
-dnl UUID: remember that most UNIX systems have uuid_* functions in their
-dnl       libc, not as separate library, such as from util-linux.  We
-dnl       can't just use pkg-config check because of that.
-save_LIBS="$LIBS"
-LIBS=
-AC_SEARCH_LIBS([uuid_generate], [uuid], [AC_DEFINE([HAVE_UUID], 1, [uuid])])
-UUID_LIBS="$LIBS"
-LIBS="$save_LIBS"
-AC_SUBST(UUID_LIBS)
+org_have_uuid=yes
+have_uuid=$org_have_uuid
+AC_ARG_WITH(uuid,
+       AS_HELP_STRING([--with-uuid],
+               [include UUID support (default=yes)]),
+       have_uuid=$withval)
+if test "x$have_uuid" != xno; then
+       dnl UUID: remember that most UNIX systems have uuid_* functions in their
+       dnl       libc, not as separate library, such as from util-linux.  We
+       dnl       can't just use pkg-config check because of that.
+       save_LIBS="$LIBS"
+       LIBS=
+       AC_SEARCH_LIBS([uuid_generate], [uuid], [AC_DEFINE([HAVE_UUID], 1, 
[uuid])])
+       UUID_LIBS="$LIBS"
+       LIBS="$save_LIBS"
+       AC_SUBST(UUID_LIBS)
+fi
+AM_CONDITIONAL(HAVE_UUID, test x"$have_uuid" != xno)
+
 
 dnl OpenSSL library
-dnl required for MonetDB5 (and SQL), optional otherwise
-PKG_CHECK_MODULES([openssl], [openssl],
-               [have_openssl=yes],
-               [have_openssl=no; why_have_openssl="(OpenSSL library not 
found)"])
-# in embedded mode, we do not need OpenSSL
-if test "x$enable_embedded" = xno; then
+org_have_openssl=yes
+have_openssl=$org_have_openssl
+AC_ARG_WITH(openssl,
+       AS_HELP_STRING([--with-openssl],
+               [include OpenSSL support (default=yes)]),
+       have_openssl=$withval)
+if test "x$have_openssl" != xno; then
+       PKG_CHECK_MODULES([openssl], [openssl],
+                       [have_openssl=yes],
+                       [have_openssl=no; why_have_openssl="(OpenSSL library 
not found)"])
        case "$enable_monetdb5-$have_openssl" in
        yes-no)
                AC_MSG_ERROR([OpenSSL library not found but required for 
MonetDB5])
@@ -2083,9 +2097,9 @@ if test "x$enable_embedded" = xno; then
        if test x"$have_openssl" = x"yes"; then
                AC_DEFINE(HAVE_OPENSSL, 1, [Define if you have the OpenSSL 
library])
        fi
-else
-       AC_MSG_WARN([Not requiring OpenSSL in embedded configuration])
 fi
+AM_CONDITIONAL(HAVE_OPENSSL, test x"$have_openssl" != xno)
+
 
 dnl PCRE library
 dnl required for MonetDB5 (and SQL), optional otherwise
@@ -2123,10 +2137,14 @@ auto-no)
        ;;
 esac
 
-
-PKG_CHECK_MODULES([libxml2], [libxml-2.0], [have_libxml2="yes"], 
[have_libxml2="no"; why_have_libxml2="(libxml2 not found)"])
-# in embedded mode, we do not want this libxml2 dependency
-if test "x$enable_embedded" = xno; then
+org_have_libxml2=yes
+have_libxml2=$org_have_libxml2
+AC_ARG_WITH(libxml2,
+       AS_HELP_STRING([--with-libxml2],
+               [include libxml2 support (default=yes)]),
+       have_libxml2=$withval)
+if test "x$have_libxml2" != xno; then
+       PKG_CHECK_MODULES([libxml2], [libxml-2.0], [have_libxml2="yes"], 
[have_libxml2="no"; why_have_libxml2="(libxml2 not found)"])
        case "$enable_monetdb5-$have_libxml2" in
        yes-no)
                AC_MSG_ERROR([libxml2 library not found but required for 
MonetDB5])
@@ -2138,22 +2156,29 @@ if test "x$enable_embedded" = xno; then
                fi
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to