comparison configure.ac @ 1739:c414850f206f

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.)
author Edward Z. Yang <ezyang@mit.edu>
date Wed, 02 May 2012 17:17:57 -0400
parents 0152f65ced6a
children 7afe63952fe6
comparison
equal deleted inserted replaced
1738:1a35e75b6967 1739:c414850f206f
3 AC_USE_SYSTEM_EXTENSIONS 3 AC_USE_SYSTEM_EXTENSIONS
4 AM_INIT_AUTOMAKE([-Wall -Werror foreign no-define]) 4 AM_INIT_AUTOMAKE([-Wall -Werror foreign no-define])
5 AC_PROG_CC() 5 AC_PROG_CC()
6 AC_PROG_LIBTOOL() 6 AC_PROG_LIBTOOL()
7 AC_CONFIG_MACRO_DIR([m4]) 7 AC_CONFIG_MACRO_DIR([m4])
8 AC_CONFIG_HEADERS([config.h]) 8 AC_CONFIG_HEADERS([include/urweb/config.h])
9 9
10 AX_PTHREAD([echo >/dev/null], [echo "Your C compiler does not support POSIX threads."; exit 1]) 10 AX_PTHREAD([echo >/dev/null], [echo "Your C compiler does not support POSIX threads."; exit 1])
11 11
12 AX_CHECK_OPENSSL([echo >/dev/null], [echo "You must install OpenSSL development files."; exit 1]) 12 AX_CHECK_OPENSSL([echo >/dev/null], [echo "You must install OpenSSL development files."; exit 1])
13 13
39 if test [-z $BIN]; then 39 if test [-z $BIN]; then
40 BIN=$prefix/bin 40 BIN=$prefix/bin
41 fi 41 fi
42 42
43 if test [-z $LIB]; then 43 if test [-z $LIB]; then
44 LIB=$prefix/lib/urweb 44 LIB=$prefix/lib
45 fi
46
47 if test [-z $SRCLIB]; then
48 SRCLIB=$prefix/lib/urweb
45 fi 49 fi
46 50
47 if test [-z $INCLUDE]; then 51 if test [-z $INCLUDE]; then
48 INCLUDE=$prefix/include/urweb 52 INCLUDE=$prefix/include/urweb
49 fi 53 fi
87 fi 91 fi
88 92
89 AC_SUBST(CC) 93 AC_SUBST(CC)
90 AC_SUBST(BIN) 94 AC_SUBST(BIN)
91 AC_SUBST(LIB) 95 AC_SUBST(LIB)
96 AC_SUBST(SRCLIB)
92 AC_SUBST(INCLUDE) 97 AC_SUBST(INCLUDE)
93 AC_SUBST(SITELISP) 98 AC_SUBST(SITELISP)
94 AC_SUBST(CCARGS) 99 AC_SUBST(CCARGS)
95 AC_SUBST(PGHEADER) 100 AC_SUBST(PGHEADER)
96 AC_SUBST(MSHEADER) 101 AC_SUBST(MSHEADER)
110 cat <<EOF 115 cat <<EOF
111 116
112 Ur/Web configuration: 117 Ur/Web configuration:
113 bin directory: BIN $BIN 118 bin directory: BIN $BIN
114 lib directory: LIB $LIB 119 lib directory: LIB $LIB
120 src lib directory: SRCLIB $SRCLIB
115 include directory: INCLUDE $INCLUDE 121 include directory: INCLUDE $INCLUDE
116 site-lisp directory: SITELISP $SITELISP 122 site-lisp directory: SITELISP $SITELISP
117 C compiler: CC $CC 123 C compiler: CC $CC
118 Extra CC args: CCARGS $CCARGS 124 Extra CC args: CCARGS $CCARGS
119 Postgres C header: PGHEADER $PGHEADER 125 Postgres C header: PGHEADER $PGHEADER