# HG changeset patch # User Adam Chlipala # Date 1300643259 14400 # Node ID 8524a1709821d0bf9d5b76a0be8bb9fbe4dde0bc # Parent 6064ddd90ca601a611602f772b693a35b5b7aa4a '--without-emacs' configure option diff -r 6064ddd90ca6 -r 8524a1709821 Makefile.am --- a/Makefile.am Sun Mar 20 13:15:11 2011 -0400 +++ b/Makefile.am Sun Mar 20 13:47:39 2011 -0400 @@ -59,7 +59,13 @@ src/urweb.mlton.grm.sig src/urweb.mlton.grm.sml $(MLTON) -output $@ src/compiler.mlb -install-exec-local: +install-exec-emacs: +if USE_EMACS + mkdir -p $(DESTDIR)$(SITELISP) + cp src/elisp/*.el $(DESTDIR)$(SITELISP)/ +endif + +install-exec-local-main: mkdir -p $(DESTDIR)$(BIN) cp bin/urweb $(DESTDIR)$(BIN)/ mkdir -p $(DESTDIR)$(LIB_UR) @@ -70,11 +76,17 @@ mkdir -p $(DESTDIR)$(INCLUDE) cp config.h $(DESTDIR)$(INCLUDE)/ cp include/*.h $(DESTDIR)$(INCLUDE)/ - mkdir -p $(DESTDIR)$(SITELISP) - cp src/elisp/*.el $(DESTDIR)$(SITELISP)/ + +install-exec-local: install-exec-local-main install-exec-emacs -ldconfig -uninstall-local: +uninstall-emacs: +if USE_EMACS + rm -f $(DESTDIR)$(SITELISP)/urweb-compat.el $(DESTDIR)$(SITELISP)/urweb-mode.el $(DESTDIR)$(SITELISP)/urweb-move.el \ + $(DESTDIR)$(SITELISP)/urweb-defs.el $(DESTDIR)$(SITELISP)/urweb-mode-startup.el $(DESTDIR)$(SITELISP)/urweb-util.el +endif + +uninstall-local-main: rm -f $(DESTDIR)$(BIN)/urweb \ $(DESTDIR)$(LIB_UR)/basis.urs $(DESTDIR)$(LIB_UR)/char.urs $(DESTDIR)$(LIB_UR)/listPair.urs $(DESTDIR)$(LIB_UR)/list.urs \ $(DESTDIR)$(LIB_UR)/monad.urs $(DESTDIR)$(LIB_UR)/option.urs $(DESTDIR)$(LIB_UR)/string.urs $(DESTDIR)$(LIB_UR)/top.urs \ @@ -82,9 +94,9 @@ $(DESTDIR)$(LIB_UR)/monad.ur $(DESTDIR)$(LIB_UR)/option.ur $(DESTDIR)$(LIB_UR)/string.ur $(DESTDIR)$(LIB_UR)/top.ur \ $(DESTDIR)$(LIB_JS)/urweb.js \ $(DESTDIR)$(INCLUDE)/config.h $(DESTDIR)$(INCLUDE)/queue.h $(DESTDIR)$(INCLUDE)/request.h $(DESTDIR)$(INCLUDE)/types.h \ - $(DESTDIR)$(INCLUDE)/urweb.h \ - $(DESTDIR)$(SITELISP)/urweb-compat.el $(DESTDIR)$(SITELISP)/urweb-mode.el $(DESTDIR)$(SITELISP)/urweb-move.el \ - $(DESTDIR)$(SITELISP)/urweb-defs.el $(DESTDIR)$(SITELISP)/urweb-mode-startup.el $(DESTDIR)$(SITELISP)/urweb-util.el + $(DESTDIR)$(INCLUDE)/urweb.h + +uninstall-local: uninstall-local-main uninstall-emacs package: hg archive -t tgz -X tests /tmp/urweb.tgz diff -r 6064ddd90ca6 -r 8524a1709821 Makefile.in --- a/Makefile.in Sun Mar 20 13:15:11 2011 -0400 +++ b/Makefile.in Sun Mar 20 13:47:39 2011 -0400 @@ -777,7 +777,11 @@ src/urweb.mlton.grm.sig src/urweb.mlton.grm.sml $(MLTON) -output $@ src/compiler.mlb -install-exec-local: +install-exec-emacs: +@USE_EMACS_TRUE@ mkdir -p $(DESTDIR)$(SITELISP) +@USE_EMACS_TRUE@ cp src/elisp/*.el $(DESTDIR)$(SITELISP)/ + +install-exec-local-main: mkdir -p $(DESTDIR)$(BIN) cp bin/urweb $(DESTDIR)$(BIN)/ mkdir -p $(DESTDIR)$(LIB_UR) @@ -788,11 +792,15 @@ mkdir -p $(DESTDIR)$(INCLUDE) cp config.h $(DESTDIR)$(INCLUDE)/ cp include/*.h $(DESTDIR)$(INCLUDE)/ - mkdir -p $(DESTDIR)$(SITELISP) - cp src/elisp/*.el $(DESTDIR)$(SITELISP)/ + +install-exec-local: install-exec-local-main install-exec-emacs -ldconfig -uninstall-local: +uninstall-emacs: +@USE_EMACS_TRUE@ rm -f $(DESTDIR)$(SITELISP)/urweb-compat.el $(DESTDIR)$(SITELISP)/urweb-mode.el $(DESTDIR)$(SITELISP)/urweb-move.el \ +@USE_EMACS_TRUE@ $(DESTDIR)$(SITELISP)/urweb-defs.el $(DESTDIR)$(SITELISP)/urweb-mode-startup.el $(DESTDIR)$(SITELISP)/urweb-util.el + +uninstall-local-main: rm -f $(DESTDIR)$(BIN)/urweb \ $(DESTDIR)$(LIB_UR)/basis.urs $(DESTDIR)$(LIB_UR)/char.urs $(DESTDIR)$(LIB_UR)/listPair.urs $(DESTDIR)$(LIB_UR)/list.urs \ $(DESTDIR)$(LIB_UR)/monad.urs $(DESTDIR)$(LIB_UR)/option.urs $(DESTDIR)$(LIB_UR)/string.urs $(DESTDIR)$(LIB_UR)/top.urs \ @@ -800,9 +808,9 @@ $(DESTDIR)$(LIB_UR)/monad.ur $(DESTDIR)$(LIB_UR)/option.ur $(DESTDIR)$(LIB_UR)/string.ur $(DESTDIR)$(LIB_UR)/top.ur \ $(DESTDIR)$(LIB_JS)/urweb.js \ $(DESTDIR)$(INCLUDE)/config.h $(DESTDIR)$(INCLUDE)/queue.h $(DESTDIR)$(INCLUDE)/request.h $(DESTDIR)$(INCLUDE)/types.h \ - $(DESTDIR)$(INCLUDE)/urweb.h \ - $(DESTDIR)$(SITELISP)/urweb-compat.el $(DESTDIR)$(SITELISP)/urweb-mode.el $(DESTDIR)$(SITELISP)/urweb-move.el \ - $(DESTDIR)$(SITELISP)/urweb-defs.el $(DESTDIR)$(SITELISP)/urweb-mode-startup.el $(DESTDIR)$(SITELISP)/urweb-util.el + $(DESTDIR)$(INCLUDE)/urweb.h + +uninstall-local: uninstall-local-main uninstall-emacs package: hg archive -t tgz -X tests /tmp/urweb.tgz diff -r 6064ddd90ca6 -r 8524a1709821 configure --- a/configure Sun Mar 20 13:15:11 2011 -0400 +++ b/configure Sun Mar 20 13:47:39 2011 -0400 @@ -748,6 +748,8 @@ INCLUDE LIB BIN +USE_EMACS_FALSE +USE_EMACS_TRUE MLYACC MLLEX MLTON @@ -871,6 +873,7 @@ with_gnu_ld enable_libtool_lock with_openssl +with_emacs ' ac_precious_vars='build_alias host_alias @@ -1516,6 +1519,7 @@ both] --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-openssl=DIR root of the OpenSSL directory + --without-emacs disable installation of Emacs mode Some influential environment variables: CC C compiler command @@ -5332,13 +5336,13 @@ else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:5335: $ac_compile\"" >&5) + (eval echo "\"\$as_me:5339: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 - (eval echo "\"\$as_me:5338: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval echo "\"\$as_me:5342: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 - (eval echo "\"\$as_me:5341: output\"" >&5) + (eval echo "\"\$as_me:5345: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" @@ -6543,7 +6547,7 @@ ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 6546 "configure"' > conftest.$ac_ext + echo '#line 6550 "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -7805,11 +7809,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7808: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7812: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:7812: \$? = $ac_status" >&5 + echo "$as_me:7816: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -8144,11 +8148,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8147: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8151: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:8151: \$? = $ac_status" >&5 + echo "$as_me:8155: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -8249,11 +8253,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8252: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8256: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:8256: \$? = $ac_status" >&5 + echo "$as_me:8260: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -8304,11 +8308,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8307: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8311: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:8311: \$? = $ac_status" >&5 + echo "$as_me:8315: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -10688,7 +10692,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10691 "configure" +#line 10695 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10784,7 +10788,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10787 "configure" +#line 10791 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11317,6 +11321,24 @@ fi +# Check whether --with-emacs was given. +if test "${with_emacs+set}" = set; then : + withval=$with_emacs; +else + with_emacs=yes +fi + + + if test "x$with_emacs" = xyes; then + USE_EMACS_TRUE= + USE_EMACS_FALSE='#' +else + USE_EMACS_TRUE='#' + USE_EMACS_FALSE= +fi + + + @@ -11439,6 +11461,10 @@ am__EXEEXT_FALSE= fi +if test -z "${USE_EMACS_TRUE}" && test -z "${USE_EMACS_FALSE}"; then + as_fn_error $? "conditional \"USE_EMACS\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi : ${CONFIG_STATUS=./config.status} ac_write_fail=0 diff -r 6064ddd90ca6 -r 8524a1709821 configure.ac --- a/configure.ac Sun Mar 20 13:15:11 2011 -0400 +++ b/configure.ac Sun Mar 20 13:47:39 2011 -0400 @@ -49,6 +49,14 @@ SITELISP=$prefix/share/emacs/site-lisp/urweb-mode fi +AC_ARG_WITH([emacs], + [AS_HELP_STRING([--without-emacs], + [disable installation of Emacs mode])], + [], + [with_emacs=yes]) + +AM_CONDITIONAL(USE_EMACS, test "x$with_emacs" = xyes) + AC_SUBST(BIN) AC_SUBST(LIB) AC_SUBST(INCLUDE) diff -r 6064ddd90ca6 -r 8524a1709821 doc/manual.tex --- a/doc/manual.tex Sun Mar 20 13:15:11 2011 -0400 +++ b/doc/manual.tex Sun Mar 20 13:47:39 2011 -0400 @@ -85,6 +85,8 @@ apt-get install emacs-goodies-el \end{verbatim} +If you don't want to install the Emacs mode, run \texttt{./configure} with the argument \texttt{--without-emacs}. + Even with the right packages installed, configuration and building might fail to work. After you run \texttt{./configure}, you will see the values of some named environment variables printed. You may need to adjust these values to get proper installation for your system. To change a value, store your preferred alternative in the corresponding UNIX environment variable, before running \texttt{./configure}. For instance, here is how to change the list of extra arguments that the Ur/Web compiler will pass to GCC on every invocation. \begin{verbatim}