summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorGravatar Edward Z. Yang <ezyang@mit.edu>2012-05-02 17:17:57 -0400
committerGravatar Edward Z. Yang <ezyang@mit.edu>2012-05-02 17:17:57 -0400
commit5e29700b15fad9e4ccbbea59b8312c53447df01b (patch)
tree91cc80e8e50847ab4c3b37714f133417df65f59a /configure.ac
parent1ca9408089542b282078cc1b7f3c8aa71659f00c (diff)
Add support for -boot flag, which allows in-tree execution of Ur/Web
The boot flag rewrites most hardcoded paths to point to the build directory, and also forces static compilation. This is convenient for developing Ur/Web, or if you cannot 'sudo make install' Ur/Web. The following changes were made: * Header files were moved to include/urweb instead of include; this lets FFI users point their C_INCLUDE_PATH at this directory at write <urweb/urweb.h>. For internal Ur/Web executables, we simply pass -I$PATH/include/urweb as normal. * Differentiate between LIB and SRCLIB; SRCLIB is Ur and JavaScript source files, while LIB is compiled products from libtool. For in-tree compilation these live in different places. * No longer reference Config for paths; instead use Settings; these settings can be changed dynamically by Compiler.enableBoot () (TODO: add a disableBoot function.) * config.h is now generated directly in include/urweb/config.h, for consistency's sake (especially since it gets installed along with the rest of the headers!) * All of the autotools build products got updated. * The linkStatic field in protocols now only contains the name of the build product, and not the absolute path. Future users have to be careful not to reference the Settings files to early, lest they get an old version (this was the source of two bugs during development of this patch.)
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac10
1 files changed, 8 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index d19bad85..48bdb813 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5,7 +5,7 @@ AM_INIT_AUTOMAKE([-Wall -Werror foreign no-define])
AC_PROG_CC()
AC_PROG_LIBTOOL()
AC_CONFIG_MACRO_DIR([m4])
-AC_CONFIG_HEADERS([config.h])
+AC_CONFIG_HEADERS([include/urweb/config.h])
AX_PTHREAD([echo >/dev/null], [echo "Your C compiler does not support POSIX threads."; exit 1])
@@ -41,7 +41,11 @@ if test [-z $BIN]; then
fi
if test [-z $LIB]; then
- LIB=$prefix/lib/urweb
+ LIB=$prefix/lib
+fi
+
+if test [-z $SRCLIB]; then
+ SRCLIB=$prefix/lib/urweb
fi
if test [-z $INCLUDE]; then
@@ -89,6 +93,7 @@ fi
AC_SUBST(CC)
AC_SUBST(BIN)
AC_SUBST(LIB)
+AC_SUBST(SRCLIB)
AC_SUBST(INCLUDE)
AC_SUBST(SITELISP)
AC_SUBST(CCARGS)
@@ -112,6 +117,7 @@ cat <<EOF
Ur/Web configuration:
bin directory: BIN $BIN
lib directory: LIB $LIB
+ src lib directory: SRCLIB $SRCLIB
include directory: INCLUDE $INCLUDE
site-lisp directory: SITELISP $SITELISP
C compiler: CC $CC