couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject [2/4] git commit: Remove SpiderMonkey stuff from Autotools
Date Fri, 25 Jan 2013 11:03:30 GMT
Remove SpiderMonkey stuff from Autotools


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/105ede2c
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/105ede2c
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/105ede2c

Branch: refs/heads/nodejs_couchdb
Commit: 105ede2cfb0667d884793912f5eecabfc06bceb3
Parents: 54a1410
Author: Jason Smith (work) <jhs@iriscouch.com>
Authored: Fri Jan 25 10:54:52 2013 +0000
Committer: Jason Smith (work) <jhs@iriscouch.com>
Committed: Fri Jan 25 10:54:52 2013 +0000

----------------------------------------------------------------------
 bin/Makefile.am              |    8 +--
 configure.ac                 |  141 -------------------------------------
 etc/couchdb/Makefile.am      |    5 --
 src/couchdb/priv/Makefile.am |   31 --------
 4 files changed, 1 insertions(+), 184 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/105ede2c/bin/Makefile.am
----------------------------------------------------------------------
diff --git a/bin/Makefile.am b/bin/Makefile.am
index 3d7a075..da4857a 100644
--- a/bin/Makefile.am
+++ b/bin/Makefile.am
@@ -20,7 +20,7 @@ endif
 
 man1dir = $(mandir)/man1
 
-noinst_SCRIPTS = couchjs_dev couch-config_dev
+noinst_SCRIPTS = couch-config_dev
 
 man_file = couchdb.1
 
@@ -38,7 +38,6 @@ CLEANFILES = $(bin_SCRIPTS) $(man_file_build) $(noinst_SCRIPTS)
 
 transform = @program_transform_name@
 couchdb_command_name = `echo couchdb | sed '$(transform)'`
-couchjs_command_name = `echo couchjs | sed '$(transform)'`
 
 couchdb: couchdb.tpl
 	sed -e "s|%ERL%|$(ERL)|g" \
@@ -62,13 +61,8 @@ couchdb: couchdb.tpl
 
 if !WINDOWS
 install-exec-hook:
-	$(LN_S) -f "$(locallibbindir)/$(couchjs_command_name)" \
-		"$(DESTDIR)$(bindir)/$(couchjs_command_name)"
 endif
 
-couchjs_dev:
-	$(LN_S) -f "$(abs_top_builddir)/src/couchdb/priv/couchjs" "$@"
-
 couchdb.bat: couchdb.bat.tpl
 	sed -e "s|%ICU_CONFIG%|$(ICU_CONFIG)|g" \
 	    -e "s|%version%|@version@|g" \

http://git-wip-us.apache.org/repos/asf/couchdb/blob/105ede2c/configure.ac
----------------------------------------------------------------------
diff --git a/configure.ac b/configure.ac
index 5246830..6709d10 100644
--- a/configure.ac
+++ b/configure.ac
@@ -150,56 +150,13 @@ AC_ARG_WITH([erlang],
 
 AC_SUBST(ERLANG_FLAGS)
 
-PKG_CHECK_MODULES([JS], [mozjs185], [
-    JS_LIB_DIR="$(${PKG_CONFIG} --variable=libdir mozjs185)"
-], [
-    PKG_CHECK_MODULES([JS], [mozilla-js >= 1.7], [
-        JS_LIB_DIR="$(${PKG_CONFIG} --variable=sdkdir mozilla-js)/lib"
-    ], [
-        JS_LIB_DIR="${libdir}"
-        JS_CFLAGS="-I/usr/include"
-        JS_CFLAGS="$JS_CFLAGS -I/usr/include/js"
-        JS_CFLAGS="$JS_CFLAGS -I/usr/include/mozjs"
-        JS_CFLAGS="$JS_CFLAGS -I/usr/local/include/js"
-        JS_CFLAGS="$JS_CFLAGS -I/opt/local/include/js"
-    ])
-])
-
-AC_ARG_WITH([js-include],
-    [AS_HELP_STRING([--with-js-include=PATH],
-        [set PATH to the SpiderMonkey include directory])
-], [
-    JS_INCLUDE="$withval"
-    JS_CFLAGS="-I$JS_INCLUDE"
-], [])
-
-AC_ARG_WITH([js-lib],
-    [AS_HELP_STRING([--with-js-lib=PATH],
-        [set PATH to the SpiderMonkey library directory])
-], [
-    JS_LIB_DIR=$withval
-    JS_LIBS="-L$withval"
-], [])
-
-use_js_trunk=no
-
-AC_ARG_ENABLE([js-trunk],
-    [AS_HELP_STRING([--enable-js-trunk],
-        [allow use of SpiderMonkey versions newer than js185-1.0.0])
-], [
-    use_js_trunk=$enableval
-], [])
-
 AC_ARG_VAR([ERLC_FLAGS], [general flags to prepend to ERLC_FLAGS])
 AC_ARG_VAR([FLAGS], [general flags to prepend to LDFLAGS and CPPFLAGS])
 
 AS_CASE([$(uname -s)], [CYGWIN*], [] , [*], [
     CPPFLAGS="$CPPFLAGS -I/opt/local/include"
-    CPPFLAGS="$CPPFLAGS -I/opt/local/include/js"
     CPPFLAGS="$CPPFLAGS -I/usr/local/include"
-    CPPFLAGS="$CPPFLAGS -I/usr/local/include/js"
     CPPFLAGS="$CPPFLAGS -I/usr/include"
-    CPPFLAGS="$CPPFLAGS -I/usr/include/js"
     LDFLAGS="$LDFLAGS -L/opt/local/lib"
     LDFLAGS="$LDFLAGS -L/usr/local/lib"
 ])
@@ -214,104 +171,17 @@ CFLAGS="-O2 $CFLAGS"
 LIBS="$LIBS $LDFLAGS"
 
 AS_CASE([$(uname -s)], [CYGWIN*], [
-    JS_CFLAGS="-DXP_WIN $JS_CFLAGS"
     IS_WINDOWS="TRUE"
 ], [*], [
-    # XP_UNIX required for jsapi.h, tested on Linux and Darwin.
-    JS_CFLAGS="-DXP_UNIX $JS_CFLAGS"
 ])
 
 AM_CONDITIONAL([WINDOWS], [test x$IS_WINDOWS = xTRUE])
 
 OLD_LIBS="$LIBS"
-LIBS="$JS_LIBS $LIBS"
 
 OLD_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="$JS_CFLAGS $CPPFLAGS"
-
-AC_CHECK_HEADER([jsapi.h], [], [
-    AC_CHECK_HEADER([js/jsapi.h], [
-        CPPFLAGS="$CPPFLAGS -I$JS_INCLUDE/js"
-    ], [
-        AC_MSG_ERROR([Could not find the jsapi header.
-
-Are the Mozilla SpiderMonkey headers installed?])
-    ])
-])
-
-AC_CHECK_LIB([mozjs185], [JS_NewContext], [JS_LIB_BASE=mozjs185], [
-    AC_CHECK_LIB([mozjs185-1.0], [JS_NewContext], [JS_LIB_BASE=mozjs185-1.0], [
-        AC_CHECK_LIB([mozjs], [JS_NewContext], [JS_LIB_BASE=mozjs], [
-            AC_CHECK_LIB([js], [JS_NewContext], [JS_LIB_BASE=js], [
-                AC_CHECK_LIB([js3250], [JS_NewContext], [JS_LIB_BASE=js3250], [
-                    AC_CHECK_LIB([js32], [JS_NewContext], [JS_LIB_BASE=js32], [
-                        AC_MSG_ERROR([Could not find the js library.
-
-Is the Mozilla SpiderMonkey library installed?])
-                    ])
-                ])
-            ])
-        ])
-    ])
-])
-
-# Figure out what version of SpiderMonkey to use
-
-AC_CHECK_LIB([$JS_LIB_BASE], [JS_NewCompartmentAndGlobalObject],
-    # Prevent people from accidentally using SpiderMonkey's that are too new
-    if test "$use_js_trunk" = "no"; then
-        AC_CHECK_DECL([JSOPTION_ANONFUNFIX], [], [
-            AC_MSG_ERROR([Your SpiderMonkey library is too new.
-
-Versions of SpiderMonkey after the js185-1.0.0 release remove the optional
-enforcement of preventing anonymous functions in a statement context. This
-will most likely break your existing JavaScript code as well as render all
-example code invalid.
-
-If you wish to ignore this error pass --enable-js-trunk to ./configure.])
-        ], [
-            [#include <jsapi.h>]
-        ])
-    fi
-    AC_DEFINE([SM185], [1], [Use SpiderMonkey 1.8.5])
-)
-
-AC_CHECK_LIB([$JS_LIB_BASE], [JS_ThrowStopIteration],
-    AC_DEFINE([SM180], [1],
-        [Use SpiderMonkey 1.8.0])
-)
-
-AC_CHECK_LIB([$JS_LIB_BASE], [JS_GetStringCharsAndLength],
-    AC_DEFINE([HAVE_JS_GET_STRING_CHARS_AND_LENGTH], [1],
-        [Use newer JS_GetCharsAndLength function.])
-)
-
-# Else, hope that 1.7.0 works
-
-# Deal with JSScript to JSObject to JSScript switcheroo
-
-AC_CHECK_TYPE([JSScript*],
-    [AC_DEFINE([JSSCRIPT_TYPE], [JSScript*], [Use JSObject* for scripts])],
-    [AC_DEFINE([JSSCRIPT_TYPE], [JSObject*], [Use JSScript* for scripts])],
-    [[#include <jsapi.h>]]
-)
-
-AC_DEFINE([COUCHJS_NAME], ["couchjs"], ["CouchJS executable name."])
 
 if test x${IS_WINDOWS} = xTRUE; then
-    AC_DEFINE([COUCHJS_NAME], ["couchjs.exe"], ["CouchJS executable name."])
-    if test -f "$JS_LIB_DIR/$JS_LIB_BASE.dll"; then
-        # seamonkey 1.7- build layout on Windows
-        JS_LIB_BINARY="$JS_LIB_DIR/$JS_LIB_BASE.dll"
-    else
-        # seamonkey 1.8+ build layout on Windows
-        if test -f "$JS_LIB_DIR/../bin/$JS_LIB_BASE.dll"; then
-            JS_LIB_BINARY="$JS_LIB_DIR/../bin/$JS_LIB_BASE.dll"
-        else
-        AC_MSG_ERROR([Could not find $JS_LIB_BASE.dll.])
-        fi
-    fi
-    AC_SUBST(JS_LIB_BINARY)
     # On windows we need to know the path to the openssl binaries.
     AC_ARG_WITH([openssl-bin-dir],
         [AS_HELP_STRING([--with-openssl-bin-dir=PATH],
@@ -343,10 +213,6 @@ if test x${IS_WINDOWS} = xTRUE; then
     fi
 fi
 
-JS_LIBS="-l$JS_LIB_BASE -lm $JS_LIBS"
-
-AC_SUBST(JS_LIBS)
-
 LIBS="$OLD_LIBS"
 CPPFLAGS="$OLD_CPPFLAGS"
 
@@ -379,13 +245,6 @@ AC_ARG_WITH([win32-curl],
     # OpenSSL libraries may be pulled in via libcurl if it was built with SSL
     # these are libeay32 ssleay32 instead of crypto ssl on unix
 ], [
-    AX_LIB_CURL([7.18.0],[
-        AC_DEFINE([HAVE_CURL], [1], ["Provide HTTP support to couchjs"])
-    ],[
-        AC_MSG_WARN([You will be unable to run some JavaScript unit tests.])
-        use_curl=no
-        CURL_LIBS=
-    ])
 ])
 
 AC_SUBST(CURL_CFLAGS)

http://git-wip-us.apache.org/repos/asf/couchdb/blob/105ede2c/etc/couchdb/Makefile.am
----------------------------------------------------------------------
diff --git a/etc/couchdb/Makefile.am b/etc/couchdb/Makefile.am
index 8d996f4..389a844 100644
--- a/etc/couchdb/Makefile.am
+++ b/etc/couchdb/Makefile.am
@@ -21,8 +21,6 @@ EXTRA_DIST = local.ini
 CLEANFILES = $(localconf_DATA) $(noinst_DATA)
 
 transform = @program_transform_name@
-couchjs_command_name = `echo couchjs | sed '$(transform)'`
-couchjs_dev_command_name = `echo couchjs_dev | sed '$(transform)'`
 
 if WINDOWS
 default.ini: default.ini.tpl
@@ -34,7 +32,6 @@ default.ini: default.ini.tpl
 	    -e "s|%localstatelogdir%|../var/log/couchdb|g" \
 	    -e "s|%localstaterundir%|../var/run/couchdb|g" \
 	    -e "s|%couchprivlibdir%|../lib/couch-$(version)/priv/lib|g" \
-	    -e "s|%couchjs_command_name%|couchjs.exe|g" \
 	    -e "s|%package_author_name%|$(package_author_name)|g" \
 	    -e "s|%version%|$(version)|g" \
 	< $< > $@
@@ -48,7 +45,6 @@ default.ini: default.ini.tpl
 	    -e "s|%localstatelogdir%|$(localstatelogdir)|g" \
 	    -e "s|%localstaterundir%|$(localstaterundir)|g" \
 	    -e "s|%couchprivlibdir%|$(couchprivlibdir)|g" \
-	    -e "s|%couchjs_command_name%|$(couchjs_command_name)|g" \
 	    -e "s|%package_author_name%|$(package_author_name)|g" \
 	    -e "s|%version%|$(version)|g" \
 	< $< > $@
@@ -63,7 +59,6 @@ default_dev.ini: default.ini.tpl
 	    -e "s|%localstatelogdir%|$(abs_top_builddir)/tmp/log|g" \
 	    -e "s|%localstaterundir%|$(abs_top_builddir)/tmp/run|g" \
 	    -e "s|%couchprivlibdir%|$(devcouchprivlibdir)|g" \
-	    -e "s|%couchjs_command_name%|$(couchjs_dev_command_name)|g" \
 	    -e "s|%package_author_name%|$(package_author_name)|g" \
 	    -e "s|%version%|$(version)|g" \
 	< $< > $@

http://git-wip-us.apache.org/repos/asf/couchdb/blob/105ede2c/src/couchdb/priv/Makefile.am
----------------------------------------------------------------------
diff --git a/src/couchdb/priv/Makefile.am b/src/couchdb/priv/Makefile.am
index 9a24222..e1079e1 100644
--- a/src/couchdb/priv/Makefile.am
+++ b/src/couchdb/priv/Makefile.am
@@ -17,8 +17,6 @@ couchprivdir = $(couchlibdir)/priv
 couchprivlibdir = $(couchlibdir)/priv/lib
 man1dir = $(mandir)/man1
 
-man_file = couchjs.1
-
 if BUILD_MAN
 man_file_build = $(man_file)
 else
@@ -31,9 +29,6 @@ EXTRA_DIST = \
 	spawnkillable/couchspawnkillable.sh \
 	stat_descriptions.cfg.in \
 	couch_ejson_compare/erl_nif_compat.h \
-	couch_js/sm170.c \
-	couch_js/sm180.c \
-	couch_js/sm185.c \
 	$(man_file_build)
 
 CLEANFILES = $(man_file_build) stat_descriptions.cfg
@@ -58,36 +53,11 @@ if WINDOWS
 couch_icu_driver_la_LDFLAGS += -no-undefined
 endif
 
-COUCHJS_SRCS = \
-	couch_js/help.h \
-	couch_js/http.c \
-	couch_js/http.h \
-	couch_js/main.c \
-	couch_js/utf8.c \
-	couch_js/utf8.h \
-	couch_js/util.h \
-	couch_js/util.c
-
-locallibbin_PROGRAMS = couchjs
-couchjs_SOURCES = $(COUCHJS_SRCS)
-couchjs_CFLAGS = -g -Wall -Werror -D_BSD_SOURCE $(CURL_CFLAGS) $(JS_CFLAGS)
-couchjs_LDADD = $(CURL_LIBS) $(JS_LIBS)
-
 couchpriv_DATA = stat_descriptions.cfg
 couchpriv_PROGRAMS = couchspawnkillable
 
 # Depend on source files so distributed man pages are not rebuilt for end user.
 
-$(man_file): $(COUCHJS_SRCS)
-	$(MAKE_SAFE) -f Makefile couchjs; \
-	$(top_srcdir)/build-aux/missing --run \
-	    help2man \
-	        --no-info \
-	        --help-option="-h" \
-	        --version-option="-V" \
-	        --name="$(package_name) JavaScript interpreter" \
-	        ./couchjs --output $@
-
 install-data-local:
 	if test -s $(man_file); then \
 	    if test `cat $(man_file) | wc -l` -gt 1; then \
@@ -130,7 +100,6 @@ if WINDOWS
 	$(INSTALL) $(ICU_BIN)/icuuc*.dll $(bindir)
 	$(INSTALL) $(ICU_BIN)/icudt*.dll $(bindir)
 	$(INSTALL) $(ICU_BIN)/icuin*.dll $(bindir)
-	$(INSTALL) $(JS_LIB_BINARY) $(bindir)
 	$(INSTALL) .libs/couchspawnkillable.exe \
 		"$(DESTDIR)$(couchprivdir)/couchspawnkillable.exe"
 endif


Mime
View raw message