diff --git a/.gitignore b/.gitignore
index 273eeb6..8faec7f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,8 +1,30 @@
build
node_modules
+package.json
+lib/version.js
-# downloaded by minification build
-tools/compiler.jar
+# generated by dist target
+AUTHORS
+NEWS
+ChangeLog
+
+# autotools- and configure-generated
+aclocal.m4
+Makefile.in
+Makefile
+*.cache/
+configure
+config.*
+
+# should be added using autoreconf -i
+INSTALL
+tools/install-sh
+tools/missing
+tools/mdate-sh
+tools/texinfo.tex
+
+# downloaded manually by user
+tools/closure-compiler.jar
# website branch
webroot/
diff --git a/COPYING.LGPL b/COPYING.LGPL
deleted file mode 100644
index 65c5ca8..0000000
--- a/COPYING.LGPL
+++ /dev/null
@@ -1,165 +0,0 @@
- GNU LESSER GENERAL PUBLIC LICENSE
- Version 3, 29 June 2007
-
- Copyright (C) 2007 Free Software Foundation, Inc.
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-
- This version of the GNU Lesser General Public License incorporates
-the terms and conditions of version 3 of the GNU General Public
-License, supplemented by the additional permissions listed below.
-
- 0. Additional Definitions.
-
- As used herein, "this License" refers to version 3 of the GNU Lesser
-General Public License, and the "GNU GPL" refers to version 3 of the GNU
-General Public License.
-
- "The Library" refers to a covered work governed by this License,
-other than an Application or a Combined Work as defined below.
-
- An "Application" is any work that makes use of an interface provided
-by the Library, but which is not otherwise based on the Library.
-Defining a subclass of a class defined by the Library is deemed a mode
-of using an interface provided by the Library.
-
- A "Combined Work" is a work produced by combining or linking an
-Application with the Library. The particular version of the Library
-with which the Combined Work was made is also called the "Linked
-Version".
-
- The "Minimal Corresponding Source" for a Combined Work means the
-Corresponding Source for the Combined Work, excluding any source code
-for portions of the Combined Work that, considered in isolation, are
-based on the Application, and not on the Linked Version.
-
- The "Corresponding Application Code" for a Combined Work means the
-object code and/or source code for the Application, including any data
-and utility programs needed for reproducing the Combined Work from the
-Application, but excluding the System Libraries of the Combined Work.
-
- 1. Exception to Section 3 of the GNU GPL.
-
- You may convey a covered work under sections 3 and 4 of this License
-without being bound by section 3 of the GNU GPL.
-
- 2. Conveying Modified Versions.
-
- If you modify a copy of the Library, and, in your modifications, a
-facility refers to a function or data to be supplied by an Application
-that uses the facility (other than as an argument passed when the
-facility is invoked), then you may convey a copy of the modified
-version:
-
- a) under this License, provided that you make a good faith effort to
- ensure that, in the event an Application does not supply the
- function or data, the facility still operates, and performs
- whatever part of its purpose remains meaningful, or
-
- b) under the GNU GPL, with none of the additional permissions of
- this License applicable to that copy.
-
- 3. Object Code Incorporating Material from Library Header Files.
-
- The object code form of an Application may incorporate material from
-a header file that is part of the Library. You may convey such object
-code under terms of your choice, provided that, if the incorporated
-material is not limited to numerical parameters, data structure
-layouts and accessors, or small macros, inline functions and templates
-(ten or fewer lines in length), you do both of the following:
-
- a) Give prominent notice with each copy of the object code that the
- Library is used in it and that the Library and its use are
- covered by this License.
-
- b) Accompany the object code with a copy of the GNU GPL and this license
- document.
-
- 4. Combined Works.
-
- You may convey a Combined Work under terms of your choice that,
-taken together, effectively do not restrict modification of the
-portions of the Library contained in the Combined Work and reverse
-engineering for debugging such modifications, if you also do each of
-the following:
-
- a) Give prominent notice with each copy of the Combined Work that
- the Library is used in it and that the Library and its use are
- covered by this License.
-
- b) Accompany the Combined Work with a copy of the GNU GPL and this license
- document.
-
- c) For a Combined Work that displays copyright notices during
- execution, include the copyright notice for the Library among
- these notices, as well as a reference directing the user to the
- copies of the GNU GPL and this license document.
-
- d) Do one of the following:
-
- 0) Convey the Minimal Corresponding Source under the terms of this
- License, and the Corresponding Application Code in a form
- suitable for, and under terms that permit, the user to
- recombine or relink the Application with a modified version of
- the Linked Version to produce a modified Combined Work, in the
- manner specified by section 6 of the GNU GPL for conveying
- Corresponding Source.
-
- 1) Use a suitable shared library mechanism for linking with the
- Library. A suitable mechanism is one that (a) uses at run time
- a copy of the Library already present on the user's computer
- system, and (b) will operate properly with a modified version
- of the Library that is interface-compatible with the Linked
- Version.
-
- e) Provide Installation Information, but only if you would otherwise
- be required to provide such information under section 6 of the
- GNU GPL, and only to the extent that such information is
- necessary to install and execute a modified version of the
- Combined Work produced by recombining or relinking the
- Application with a modified version of the Linked Version. (If
- you use option 4d0, the Installation Information must accompany
- the Minimal Corresponding Source and Corresponding Application
- Code. If you use option 4d1, you must provide the Installation
- Information in the manner specified by section 6 of the GNU GPL
- for conveying Corresponding Source.)
-
- 5. Combined Libraries.
-
- You may place library facilities that are a work based on the
-Library side by side in a single library together with other library
-facilities that are not Applications and are not covered by this
-License, and convey such a combined library under terms of your
-choice, if you do both of the following:
-
- a) Accompany the combined library with a copy of the same work based
- on the Library, uncombined with any other library facilities,
- conveyed under the terms of this License.
-
- b) Give prominent notice with the combined library that part of it
- is a work based on the Library, and explaining where to find the
- accompanying uncombined form of the same work.
-
- 6. Revised Versions of the GNU Lesser General Public License.
-
- The Free Software Foundation may publish revised and/or new versions
-of the GNU Lesser General Public License from time to time. Such new
-versions will be similar in spirit to the present version, but may
-differ in detail to address new problems or concerns.
-
- Each version is given a distinguishing version number. If the
-Library as you received it specifies that a certain numbered version
-of the GNU Lesser General Public License "or any later version"
-applies to it, you have the option of following the terms and
-conditions either of that published version or of any later version
-published by the Free Software Foundation. If the Library as you
-received it does not specify a version number of the GNU Lesser
-General Public License, you may choose any version of the GNU Lesser
-General Public License ever published by the Free Software Foundation.
-
- If the Library as you received it specifies that a proxy can decide
-whether future versions of the GNU Lesser General Public License shall
-apply, that proxy's public statement of acceptance of any version is
-permanent authorization for you to choose that version for the
-Library.
diff --git a/Makefile b/Makefile
deleted file mode 100644
index 93afa29..0000000
--- a/Makefile
+++ /dev/null
@@ -1,113 +0,0 @@
-##
-# ease.js Makefile
-#
-# Copyright (C) 2012 Mike Gerwitz
-#
-# This file is part of ease.js.
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see .
-##
-
-path_build=./build
-path_tools=./tools
-path_lib=./lib
-path_combine_output=${path_build}/ease.js
-path_combine_output_full=${path_build}/ease-full.js
-path_browser_test=${path_tools}/browser-test.html
-path_test=./test
-path_perf_test=${path_test}/perf
-
-perf_tests := $(shell find "$(path_perf_test)" -name 'perf-*.js')
-
-src_js := index.js $(wildcard $(path_lib)/*.js)
-src_tests := index.js $(shell find "$(path_test)" -name test-* \
- -o -name *Test* \
- -o -name inc-*.js )
-
-path_doc := ./doc
-
-combine := $(path_tools)/combine
-compiler := $(path_tools)/compiler.jar
-path_externs_internal := $(path_build)/externs-internal.js
-
-.PHONY: combine min doc test test-combine clean distclean
-
-
-default: combine min
-all: combine min doc
-
-mkbuild: $(path_build)
-
-# create build dir
-$(path_build):
- mkdir -p "$(path_build)"
-
-# combine all modules into easily redistributable ease.js file (intended for
-# browser)
-$(path_combine_output): $(src_js) | mkbuild
- ${combine} > "$(path_combine_output)"
-$(path_combine_output_full): $(src_js) $(src_tests) | mkbuild
- INC_TEST=1 "$(combine)" > "${path_combine_output_full}"
-$(path_build)/browser-test.html: $(path_browser_test) | $(path_combine_output_full)
- cp "$(path_browser_test)" $@
-$(path_build)/browser-test-min.html: $(path_browser_test) | $(path_combine_output_full)
- cat "$(path_browser_test)" | sed 's/ease-full\.js/ease-full\.min\.js/' > $@
-combine: $(path_combine_output) $(path_build)/browser-test.html
-
-doc:
- $(MAKE) -C $(path_doc)
-doc-html:
- $(MAKE) -C $(path_doc) html
-
-test: default
- $(MAKE) -C $(path_test)
-
-# performance tests
-perf: default $(perf_tests)
-perf-%.js: default
- @node $@
-
-# externs for compilation process
-$(path_externs_internal): | mkbuild
- $(path_tools)/mkexterns > $@
-
-# minification process uses Google Closure compiler
-min: build/ease.min.js build/ease-full.min.js $(path_build)/browser-test-min.html \
- | combine
-$(compiler):
- wget -O- http://closure-compiler.googlecode.com/files/compiler-latest.tar.gz \
- | tar -C $(path_tools) -xzv compiler.jar
-build/%.min.js: build/%.js $(path_tools)/externs-global.js $(path_externs_internal) \
- $(compiler)
- cat $(path_tools)/license-min.tpl > $@
- java -jar $(compiler) \
- --externs $(path_tools)/externs-global.js \
- --externs $(path_build)/externs-internal.js \
- --js $< >> $@ || rm $@
-
-install: doc-info
- [ -d $(path_info_install) ] || mkdir -p $(path_info_install)
- cp $(path_doc_output_info) $(path_info_install)
-
-uninstall:
- rm $(path_info_install)/easejs.info
-
-# clean up build dir
-clean:
- $(MAKE) -C $(path_doc) clean
- rm -rf "${path_build}"
-
-distclean: clean
- rm $(compiler)
-
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..0048602
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,166 @@
+## ease.js Makefile.am
+#
+# Copyright (C) 2013, 2014 Mike Gerwitz
+#
+# This file is part of GNU ease.js.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+##
+
+path_build = $(top_builddir)/build
+path_tools = $(top_builddir)/tools
+path_lib = $(top_builddir)/lib
+path_test = $(top_builddir)/test
+path_doc = $(top_builddir)/doc
+
+path_combine_output = $(path_build)/ease.js
+path_combine_output_full = $(path_build)/ease-full.js
+path_browser_test = $(path_tools)/browser-test.html
+
+path_combine_output_min = $(path_combine_output:.js=.min.js)
+path_combine_output_full_min = $(path_combine_output_full:.js=.min.js)
+
+src_js = @SRC_JS@
+path_externs_internal = $(path_build)/externs-internal.js
+
+test_cases=$(shell find test/ -name '*Test.*' | tr '\n' ' ' )
+src_tests=$(shell find test/ -name test-* | tr '\n' ' ' )
+
+combine = $(path_tools)/combine
+compiler = @CCJAR@
+MKDIR_P = @MKDIR_P@
+
+# see README
+SUBDIRS = doc
+EXTRA_DIST = AUTHORS NEWS ChangeLog README.md README.hacking \
+ lib test index.js package.json \
+ $(path_combine_output) $(path_combine_output_full) \
+ $(path_browser_test) $(path_combine_output_min) \
+ $(path_combine_output_full_min) \
+ tools/combine tools/mkexterns tools/rmtrail \
+ tools/signchk tools/browser-test.html tools/combine-order.js \
+ tools/combine-test.tpl tools/combine.tpl tools/externs-global.js \
+ tools/externs.js tools/license-min.tpl tools/license.tpl \
+ tools/linechk-ignores
+
+.PHONY: mkbuild combine min doc check test test-suite perf FORCE
+
+default: combine
+
+mkbuild: $(path_build)
+
+# create build dir
+$(path_build):
+ $(MKDIR_P) "$(path_build)"
+
+
+combine: $(path_combine_output) $(path_build)/browser-test.html
+
+# combine all modules into easily redistributable ease.js file (intended for
+# browser)
+$(path_combine_output): $(src_js) | mkbuild
+ $(combine) > "$(path_combine_output)"
+$(path_combine_output_full): $(src_js) $(src_tests) | mkbuild
+ INC_TEST=1 "$(combine)" > "${path_combine_output_full}"
+$(path_build)/browser-test.html: $(path_browser_test) | $(path_combine_output_full)
+ cp -f "$(path_browser_test)" $@
+$(path_build)/browser-test-min.html: $(path_browser_test) | $(path_combine_output_full)
+ cat "$(path_browser_test)" | sed 's/ease-full\.js/ease-full\.min\.js/' > $@
+
+# minification process uses Google Closure compiler
+min: $(path_build)/ease.min.js $(path_build)/ease-full.min.js \
+$(path_build)/browser-test-min.html | combine
+build/%.min.js: build/%.js $(path_tools)/externs-global.js $(path_externs_internal)
+if HAS_JAVA
+if HAS_CCJAR
+ cat $(path_tools)/license-min.tpl > $@
+ $(JAVA) -jar $(compiler) \
+ --externs $(path_tools)/externs-global.js \
+ --externs $(path_build)/externs-internal.js \
+ --js $< >> $@ || rm $@
+else
+ @echo "cannot create $@:"
+ @echo " please download closure-compiler.jar and re-run ./configure"
+ @exit 1
+endif
+else
+ @echo "Please install a Java virtual machine (e.g. openjdk)"
+ @exit 1
+endif
+
+# externs for compilation process
+$(path_externs_internal): | mkbuild
+ $(path_tools)/mkexterns > $@
+
+doc:
+ $(MAKE) -C "$(path_doc)"
+html-single:
+ $(MAKE) -C "$(path_doc)" html-single
+
+test: check
+check: $(src_tests) test-suite
+
+# performance tests
+perf: @PERF_TESTS@
+perf-%.js: FORCE
+if HAS_NODE
+ @$(NODE) $@
+else
+ @echo "Node.js must be installed in order to run performance tests"
+ @exit 1
+endif
+
+# test cases (old format)
+test/%.js: FORCE
+ NODE_PATH="$(path_test):$(NODE_PATH)" $(NODE) --stack_trace_limit=20 "$@"
+test/test-%: FORCE
+ ./"$@"
+
+# test suite (new format)
+test-suite:
+if HAS_NODE
+ @echo "ease.js Test Suite"
+ @echo
+ @NODE_PATH="$(path_test):$(NODE_PATH)" $(NODE) --stack_trace_limit=20 \
+ $(path_test)/runner.js $(test_cases)
+else
+ @echo "Node.js must be installed in order to run the test suite"
+ @exit 1
+endif
+
+# generate the familiar files that automake normally checks for
+dist-hook: AUTHORS NEWS ChangeLog
+ cp $? $(distdir)
+AUTHORS: FORCE
+ $(path_tools)/gitlog-to-authors > AUTHORS
+NEWS: FORCE
+ $(path_tools)/gitlog-to-news $(path_tools)/news-ignore > NEWS
+ChangeLog: FORCE
+ $(path_tools)/gitlog-to-changelog \
+ --strip-cherry-pick \
+ --format=%s \
+ -- \
+ --no-merges \
+ > ChangeLog
+
+clean-local:
+ -rm -rf "$(path_build)"
+ -rm -rf doc-cp # created by website branch build
+ -rm -f AUTHORS NEWS ChangeLog
+
+distclean-local:
+ -rm -f package.json
+
+maintainer-clean-local:
+ -rm -f "$(compiler)"
diff --git a/README b/README
new file mode 100644
index 0000000..88079ed
--- /dev/null
+++ b/README
@@ -0,0 +1,51 @@
+Configuring ease.js
+*******************
+
+ Copyright (C) 2013 Mike Gerwitz
+
+ This file is part of GNU ease.js.
+
+ Copying and distribution of this file, with or without modification, are
+ permitted in any medium without royalty provided the copyright notice and
+ this notice are preserved. This file is offered as-is, without warranty
+ of any kind.
+
+
+This file contains information on configuring and building GNU ease.js; for
+information on using the library, please see the Markdown-formatted README.md
+file or the Texinfo manual.
+
+
+Installing
+==========
+
+For information on installing ease.js on your system, see INSTALL.
+Alternatively, you may install the software using npm by issuing the
+following command:
+
+ $ npm install easejs
+
+
+
+Configuring
+===========
+
+If your distribution contains a `configure' file in the project root, you
+may jump immediately to INSTALL.
+
+Otherwise, you likely have the sources as they exist in the project
+repository, which does not contain the generated `configure' script; you
+may generate it by issuing the following command:
+
+ $ autoreconf -fvi
+
+Please note that certain files (such as AUTHORS, NEWS, and ChangeLog) are
+generated as part of the `dist' target and do not exist as part of the
+repository.
+
+
+
+Hacking
+=======
+For information on hacking and contributing to GNU ease.js, please see
+README.hacking.
diff --git a/README.md b/README.md
index 44f0390..efc8c8e 100644
--- a/README.md
+++ b/README.md
@@ -1,8 +1,19 @@
-# ease.js
+
+
+# GNU ease.js
+
+GNU ease.js is a classical object-oriented framework for Javascript, intended to
+eliminate boilerplate code and "ease" the transition into JavaScript from other
+object-oriented languages.
Current support includes:
@@ -10,10 +21,10 @@ Current support includes:
* Classical inheritance
* Abstract classes and methods
* Interfaces
-* Visibility (public, protected and private members)
+* Visibility (public, protected, and private members)
* Static and constant members
-While the current focus of the project is Object-Oriented design, it is likely
+While the current focus of the project is object-oriented design, it is likely
that ease.js will expand to other paradigms in the future.
**This project is under active development. Please see the manual for more
@@ -32,7 +43,7 @@ http://easejs.org/bugs/
## Why ease.js?
There are already a number of libraries/frameworks that permit basic classical
-Object-Oriented development, so why ease.js? While many of the existing
+object-oriented development, so why ease.js? While many of the existing
solutions certainly provide viable solutions, they are largely incomplete. Until
the appearance of ECMAScript 5, many of the features enjoyed by classical OO
developers were elusive to JavaScript. The aim of this project is to provide an
@@ -49,7 +60,7 @@ whatever native ECMAScript implementation is decided upon.
### Why Classical OOP in JavaScript?
ease.js was created (historically) for a number of reasons:
-* To "ease" Object-Oriented developers into JavaScript by providing a familiar
+* To "ease" object-oriented developers into JavaScript by providing a familiar
environment.
* To provide the maintenance and development benefits of classical OOP.
* To provide features missing from the language, such as proper encapsulation
@@ -57,9 +68,9 @@ ease.js was created (historically) for a number of reasons:
etc.
* To encapsulate the hacks commonly used to perform the above tasks.
-Many JS purists believe that classical Object-Oriented programming should be
+Many JS purists believe that classical object-oriented programming should be
left out of the language and one should stick strictly to prototypal
-development. While the two are related (both Object-Oriented), they can be
+development. While the two are related (both object-oriented), they can be
applied to different problem domains in order to achieve results that are more
natural or intuitive to developers. ease.js works seamlessly with existing
prototypes, allowing the developer to choose whether or not they want to use
@@ -223,13 +234,17 @@ To implement an interface, use the `implement()` class method:
Note that, if a concrete implementation for each method is not provided, the
implementing type must be declared abstract.
+## License
+ease.js is free software: you can redistribute it and/or modify it under the
+terms of the GNU General Public License as published by the Free Software
+Foundation, either version 3 of the License, or (at your option) any later
+version.
-## Use of Reserved Words
-Though JavaScript doesn't currently implement classes, interfaces, etc, it does
-reserve the keywords. In an effort to ensure that ease.js will not clash, the
-following precautions are taken:
-
-* `Class` is used with a capital 'C'
-* `Interface` is used with a capital 'I'
-* Reserved keywords are quoted when used (e.g. in property strings)
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+**N.B.:** Versions prior to 0.2.0 were released under the LGPLv3+. Upon becoming
+a GNU project, it was relicensed under the GPLv3+ to help the FSF stand strong
+in its fight against proprietary JavaScript. For more information, please see
+the NEWS file (which can be built with `make NEWS`).
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..973b881
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,91 @@
+# For use by automake and autoconf
+#
+# Copyright (C) 2013 Mike Gerwitz
+#
+# This file is part of GNU ease.js.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+##
+
+AC_INIT([ease.js], [0.2.0-dev], [bugs@easejs.org])
+AC_CONFIG_AUX_DIR([tools])
+AM_INIT_AUTOMAKE([foreign])
+
+# provide more granular version numbers based on the above AC_INIT line
+m4_define([ver_split], m4_split(m4_translit(AC_PACKAGE_VERSION, [-], [.]), [\.]))
+AC_SUBST(MAJOR, m4_argn(1, ver_split))
+AC_SUBST(MINOR, m4_argn(2, ver_split))
+AC_SUBST(REV, m4_argn(3, ver_split))
+AC_SUBST(SUFFIX, m4_argn(4, ver_split))
+
+AC_PROG_MKDIR_P
+
+# check for node, which is required for nearly every operation
+AC_ARG_VAR([NODE], [The node.js interpreter])
+AC_CHECK_PROGS(NODE, [node nodejs])
+AM_CONDITIONAL(HAS_NODE, [test "$NODE"])
+
+# certain portions of the build process require that node be installed (in the
+# future, we may be able to allow alternatives, such as SpiderMonkey)
+test "$NODE" || AC_MSG_WARN([
+
+ Node.js is not installed; certain make targets have been disabled.
+])
+
+# yes, this isn't necessarily a good practice, however the directory itself can
+# be loaded and used without being built, so it's important that our resulting
+# file includes exactly what is contained within the dir and is rebuilt if /any/
+# of the files change
+AC_MSG_CHECKING([for source js files])
+SRC_JS_LIB="$(find lib/*.js | tr '\n' ' ' )"
+SRC_JS="index.js $SRC_JS_LIB"
+AC_SUBST(SRC_JS)
+if test -n "$SRC_JS_LIB"; then
+ AC_MSG_RESULT(ok)
+else
+ AC_MSG_ERROR(failed!)
+fi
+
+# Java is used for Closure Compiler
+AC_ARG_VAR([JAVA], [The Java executable])
+AC_ARG_VAR([CCJAR], [The Clojure Compiler jar file])
+AC_CHECK_PROGS(JAVA, [java])
+AM_CONDITIONAL(HAS_JAVA, [test "$JAVA"])
+
+ccjar=
+AS_IF(test "$JAVA" -a ! "$CCJAR",
+ [AC_CHECK_FILE([$srcdir/tools/closure-compiler.jar],
+ [AC_SUBST([CCJAR], [$srcdir/tools/closure-compiler.jar])],
+ [AC_MSG_NOTICE([
+
+ If you wish perform minification of the combined source file, you must
+ download closure-compiler.jar into the tools sub-directory; it is
+ available here:
+
+ https://developers.google.com/closure/compiler/
+
+ If it is installed elsewhere on your system, specify its location with
+ the CCJAR environment variable.
+ ])])], [])
+
+AM_CONDITIONAL(HAS_CCJAR, [test "$CCJAR"])
+
+# check for performance tests
+AC_MSG_CHECKING([for performance tests])
+PERF_TESTS=$( find test/perf -name 'perf-*.js' | tr '\n' ' ' )
+AC_SUBST(PERF_TESTS)
+AS_IF([test "$PERF_TESTS"], [AC_MSG_RESULT(ok)], [AC_MSG_WARN(none found)])
+
+AC_CONFIG_FILES([Makefile doc/Makefile package.json lib/version.js])
+AC_OUTPUT
diff --git a/doc/.gitignore b/doc/.gitignore
index 8640841..ed54f73 100644
--- a/doc/.gitignore
+++ b/doc/.gitignore
@@ -10,3 +10,10 @@
*.vr
*.pdf
*.toc
+
+stamp-vti
+version.texi
+easejs.info
+easejs.txt
+easejs.html
+easejs-single.html
diff --git a/doc/Makefile b/doc/Makefile
deleted file mode 100644
index 203639b..0000000
--- a/doc/Makefile
+++ /dev/null
@@ -1,131 +0,0 @@
-##
-# ease.js manual Makefile
-#
-# Responsible for building the project documentation.
-#
-# Copyright (C) 2012 Mike Gerwitz
-#
-# This file is part of ease.js.
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see .
-##
-
-path_doc=.
-path_build=../build
-path_lib=../lib
-path_doc_output=${path_build}/doc
-path_doc_output_info=${path_doc_output}/easejs.info
-path_doc_output_plain=${path_doc_output}/manual.txt
-path_doc_output_html=${path_doc_output}/manual
-path_doc_output_html1=${path_doc_output}/manual.html
-path_doc_css=${path_doc}/manual.css
-path_doc_img=${path_doc}/img
-path_doc_css_ref=manual.css
-path_manual_texi=${path_doc}/manual.texi
-
-path_info_install := /usr/local/share/info
-
-doc_src := $(wildcard $(path_doc)/*.texi)
-doc_imgs := $(patsubst %.dia, %.png, $(wildcard $(path_doc_img)/*.dia))
-doc_imgs_txt := $(patsubst %.dia, %.png, $(wildcard $(path_doc_img)/*.txt))
-
-doc_replace := s/<\/body>/