Removed cunit library dependency for production builds
authoradam <anton@adamansky.com>
Thu, 10 Jan 2013 05:44:27 +0000 (12:44 +0700)
committeradam <anton@adamansky.com>
Thu, 10 Jan 2013 05:44:27 +0000 (12:44 +0700)
Changelog
README.md
package.json
tcejdb/README
tcejdb/configure
tcejdb/configure.ac

index 5885cf1..baaed09 100644 (file)
--- a/Changelog
+++ b/Changelog
@@ -1,3 +1,7 @@
+2013-01-10 Anton Adamansky. <adamansky@gmail.com>
+    * Removed cunit library dependency for production builds.
+    - Release 1.0.47
+
 2013-01-09 Anton Adamansky. <adamansky@gmail.com>
     * Critical fixes in ejdb cli console
     * Fix count(*) query optimization when OR predicates used
index db2c44f..d5d6cd7 100644 (file)
--- a/README.md
+++ b/README.md
@@ -99,13 +99,12 @@ Installation
 **System libraries:**
 
 * g++
-* cunit
 * zlib
 
 On Debian/Ubuntu linux you can install it as follows:
 
 ~~~~~~
-sudo apt-get install g++ libcunit1 libcunit1-dev zlib1g zlib1g-dev
+sudo apt-get install g++ zlib1g zlib1g-dev
 ~~~~~~
 
 **Installation from node package manager:**
@@ -652,13 +651,12 @@ Prerequisites
 **System libraries:**
 
 * gcc
-* cunit
 * zlib
 
 On Debian/Ubuntu linux you can install it as follows:
 
 ```sh
-   sudo apt-get install gcc libcunit1 libcunit1-dev zlib1g zlib1g-dev
+   sudo apt-get install gcc zlib1g zlib1g-dev
 ```
 
 Building
index 620f069..67247b6 100644 (file)
@@ -1,6 +1,6 @@
 {
     "name" : "ejdb",
-    "version" : "1.0.46",
+    "version" : "1.0.47",
     "main" : "node/ejdb.js",
     "homepage" : "http://ejdb.org",
     "description" : "EJDB - Embedded JSON Database engine",
index 5c984ba..b8204ff 100644 (file)
@@ -120,13 +120,12 @@ Prerequisites
 **System libraries:**
 
 * gcc
-* cunit
 * zlib
 
 On Debian/Ubuntu linux you can install it as follows:
 
 ```sh
-   sudo apt-get install gcc libcunit1 libcunit1-dev zlib1g zlib1g-dev
+   sudo apt-get install gcc zlib1g zlib1g-dev
 ```
 
 Building
index 5038e8e..e49d2cf 100755 (executable)
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for tcejdb 1.0.46.
+# Generated by GNU Autoconf 2.69 for tcejdb 1.0.47.
 #
 #
 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@@ -577,8 +577,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='tcejdb'
 PACKAGE_TARNAME='tcejdb'
-PACKAGE_VERSION='1.0.46'
-PACKAGE_STRING='tcejdb 1.0.46'
+PACKAGE_VERSION='1.0.47'
+PACKAGE_STRING='tcejdb 1.0.47'
 PACKAGE_BUGREPORT=''
 PACKAGE_URL=''
 
@@ -698,6 +698,7 @@ enable_fastest
 enable_off64
 enable_swab
 enable_uyield
+enable_tests
 enable_bzip
 enable_ubc
 enable_zlib
@@ -1257,7 +1258,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures tcejdb 1.0.46 to adapt to many kinds of systems.
+\`configure' configures tcejdb 1.0.47 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1318,7 +1319,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of tcejdb 1.0.46:";;
+     short | recursive ) echo "Configuration of tcejdb 1.0.47:";;
    esac
   cat <<\_ACEOF
 
@@ -1334,6 +1335,7 @@ Optional Features:
   --enable-off64          build with 64-bit file offset on 32-bit system
   --enable-swab           build for swapping byte-orders
   --enable-uyield         build for detecting race conditions
+  --enable-tests          build with testcases
   --enable-bzip           build with BZIP2 compression
   --disable-ubc           build without the unified buffer cache assumption
   --disable-zlib          build without ZLIB compression
@@ -1424,7 +1426,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-tcejdb configure 1.0.46
+tcejdb configure 1.0.47
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1722,7 +1724,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by tcejdb $as_me 1.0.46, which was
+It was created by tcejdb $as_me 1.0.47, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -2224,8 +2226,19 @@ then
   enables="$enables (uyield)"
 fi
 
+# Enable test cases
+# Check whether --enable-tests was given.
+if test "${enable_tests+set}" = set; then :
+  enableval=$enable_tests;
+fi
+
+if test "$enable_tests" = "yes"
+then
+  MYCPPFLAGS="$MYCPPFLAGS -D_MYTESTS"
+  enables="$enables (tests)"
+fi
 
-# Anable BZIP2 compression
+# Enable BZIP2 compression
 # Check whether --enable-bzip was given.
 if test "${enable_bzip+set}" = set; then :
   enableval=$enable_bzip;
@@ -4139,7 +4152,9 @@ $as_echo "$as_me: WARNING: old version of EJDB was found" >&2;}
 fi
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lcunit" >&5
+if test "$enable_tests" = "yes"
+then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lcunit" >&5
 $as_echo_n "checking for main in -lcunit... " >&6; }
 if ${ac_cv_lib_cunit_main+:} false; then :
   $as_echo_n "(cached) " >&6
@@ -4175,6 +4190,15 @@ else
   as_fn_error $? "CUnit lubrary is required" "$LINENO" 5
 fi
 
+  ac_fn_c_check_header_mongrel "$LINENO" "CUnit/Basic.h" "ac_cv_header_CUnit_Basic_h" "$ac_includes_default"
+if test "x$ac_cv_header_CUnit_Basic_h" = xyes; then :
+  true
+else
+  as_fn_error $? "CUnit/Basic.h is required" "$LINENO" 5
+fi
+
+
+fi
 
 # Necessary headers
 ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
@@ -4870,7 +4894,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by tcejdb $as_me 1.0.46, which was
+This file was extended by tcejdb $as_me 1.0.47, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -4923,7 +4947,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-tcejdb config.status 1.0.46
+tcejdb config.status 1.0.47
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
index 6ab9b21..d42f904 100644 (file)
@@ -11,7 +11,7 @@ test -n "$CPPFLAGS" && MYCPPFLAGS="$CPPFLAGS $MYCPPFLAGS"
 test -n "$LDFLAGS" && MYLDFLAGS="$LDFLAGS $MYLDFLAGS"
 
 # Package name
-AC_INIT(tcejdb, 1.0.46)
+AC_INIT(tcejdb, 1.0.47)
 
 # Package information
 MYLIBVER=9
@@ -142,8 +142,16 @@ then
   enables="$enables (uyield)"
 fi
 
+# Enable test cases
+AC_ARG_ENABLE(tests,
+  AC_HELP_STRING([--enable-tests], [build with testcases]))
+if test "$enable_tests" = "yes"
+then
+  MYCPPFLAGS="$MYCPPFLAGS -D_MYTESTS"
+  enables="$enables (tests)"
+fi
 
-# Anable BZIP2 compression
+# Enable BZIP2 compression
 AC_ARG_ENABLE(bzip,
   AC_HELP_STRING([--enable-bzip], [build with BZIP2 compression]))
 if test "$enable_bzip" = "yes"
@@ -281,7 +289,11 @@ then
 fi
 AC_CHECK_LIB(tcejdb, main, AC_MSG_WARN([old version of EJDB was found]))
 
-AC_CHECK_LIB(cunit, main, true, AC_MSG_ERROR([CUnit lubrary is required]))
+if test "$enable_tests" = "yes"
+then
+  AC_CHECK_LIB(cunit, main, true, AC_MSG_ERROR([CUnit lubrary is required]))
+  AC_CHECK_HEADER(CUnit/Basic.h, true, AC_MSG_ERROR([CUnit/Basic.h is required]))
+fi
 
 # Necessary headers
 AC_CHECK_HEADER(stdlib.h, true, AC_MSG_ERROR([stdlib.h is required]))