summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorMark Hammond <mhammond@apache.org>2009-10-17 03:30:05 +0000
committerMark Hammond <mhammond@apache.org>2009-10-17 03:30:05 +0000
commitad18ea644ee7650425320736b10a48a8cbd0d340 (patch)
tree4df70f314eee22dc3f7bb266c3f1b295143b0f45 /configure.ac
parent2df3fabfdc2039504295219c88e0d160f76c1afb (diff)
have 'make dist' build a windows installer on windows
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@826173 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac63
1 files changed, 58 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac
index 557a6280..f48b8677 100644
--- a/configure.ac
+++ b/configure.ac
@@ -73,7 +73,13 @@ AC_ARG_WITH([js-include], [AC_HELP_STRING([--with-js-include=PATH],
AC_ARG_WITH([js-lib], [AC_HELP_STRING([--with-js-lib=PATH],
[set PATH to the SpiderMonkey library directory])],
- [JS_LIB_FLAGS="-L$withval"], [])
+ [
+ JS_LIB_DIR=$withval
+ JS_LIB_FLAGS="-L$withval"
+], [
+ JS_LIB_DIR=
+])
+AC_SUBST(JS_LIB_DIR)
AC_ARG_VAR([ERLC_FLAGS], [general flags to prepend to ERLC_FLAGS])
AC_ARG_VAR([FLAGS], [general flags to prepend to LDFLAGS and CPPFLAGS])
@@ -103,14 +109,61 @@ esac
AM_CONDITIONAL([WINDOWS], [test x$IS_WINDOWS = xTRUE])
-AC_CHECK_LIB([mozjs], [JS_NewContext], [JSLIB=-lmozjs], [
- AC_CHECK_LIB([js], [JS_NewContext], [JSLIB=-ljs], [
- AC_CHECK_LIB([js3250], [JS_NewContext], [JSLIB=-ljs3250], [
- AC_CHECK_LIB([js32], [JS_NewContext], [JSLIB=-ljs32], [
+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?])])])])])
+AC_SUBST(JS_LIB_BASE)
+
+if test x${IS_WINDOWS} = xTRUE; then
+ 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], [AC_HELP_STRING([--with-openssl-bin-dir=PATH],
+ [path to the open ssl binaries for distribution on Windows])], [
+ openssl_bin_dir=`cygpath -m "$withval"`
+ AC_SUBST(openssl_bin_dir)
+ ], [])
+
+ # Windows uses Inno setup - look for its compiler.
+ AC_PATH_PROG([INNO_COMPILER_EXECUTABLE], [iscc])
+ if test x${INNO_COMPILER_EXECUTABLE} = x; then
+ AC_MSG_WARN([You will be unable to build the Windows installer.])
+ fi
+
+ # We need the msvc redistributables for this platform too
+ # (in theory we could just install the assembly locally - but
+ # there are at least 4 directories with binaries, meaning 4 copies;
+ # so using the redist .exe means it ends up installed globally...)
+ AC_ARG_WITH([msvc-redist-dir], [AC_HELP_STRING([--with-msvc-redist-dir=PATH],
+ [path to the msvc redistributables for the Windows platform])], [
+ msvc_redist_dir=`cygpath -m "$withval"`
+ msvc_redist_name="vcredist_x86.exe"
+ AC_SUBST(msvc_redist_dir)
+ AC_SUBST(msvc_redist_name)
+ ], [])
+ if test ! -f ${msvc_redist_dir}/${msvc_redist_name}; then
+ AC_MSG_WARN([The MSVC redistributable seems to be missing; expect the installer to fail.])
+ fi
+fi
+
+JSLIB=-l$JS_LIB_BASE
+
AC_CHECK_HEADER([jsapi.h], [], [
AC_CHECK_HEADER([js/jsapi.h],
[