annotate configure.ac @ 1522:4d0b80dd4c37

Introduce URWEB_STACK_SIZE environment variable (based on a patch by Hao Deng)
author Adam Chlipala <adam@chlipala.net>
date Tue, 02 Aug 2011 14:31:37 -0400
parents b5517f47b1f1
children 52fbd8534ef3
rev   line source
adam@1520 1 AC_INIT([urweb], [20110715])
adam@1520 2 WORKING_VERSION=1
adamc@1149 3 AC_USE_SYSTEM_EXTENSIONS
adamc@1148 4 AM_INIT_AUTOMAKE([-Wall -Werror foreign no-define])
adamc@1132 5 AC_PROG_CC()
adamc@1132 6 AC_PROG_LIBTOOL()
adamc@1141 7 AC_CONFIG_MACRO_DIR([m4])
adamc@1263 8 AC_CONFIG_HEADERS([config.h])
adamc@378 9
adam@1369 10 AX_CHECK_OPENSSL([echo >/dev/null], [echo "You must install OpenSSL development files."; exit 1])
adamc@1165 11
adamc@1165 12 AC_CHECK_PROG(MLTON, mlton, yes, [])
adamc@1165 13
adamc@1165 14 if test [-z $MLTON]; then
adamc@1165 15 echo "You must install MLton."
adamc@1165 16 exit 1
adamc@1165 17 fi
adamc@1165 18
adamc@1165 19 AC_CHECK_PROG(MLLEX, mllex, yes, [])
adamc@1165 20
adamc@1165 21 if test [-z $MLLEX]; then
adamc@1165 22 echo "You must install MLton (to get mllex)."
adamc@1165 23 exit 1
adamc@1165 24 fi
adamc@1165 25
adamc@1165 26 AC_CHECK_PROG(MLYACC, mlyacc, yes, [])
adamc@1165 27
adamc@1165 28 if test [-z $MLYACC]; then
adamc@1165 29 echo "You must install MLton (to get mlyacc)."
adamc@1165 30 exit 1
adamc@1165 31 fi
adamc@1165 32
adamc@429 33 if test [$prefix = "NONE"]; then
adamc@429 34 prefix=/usr/local
adamc@429 35 fi
adamc@429 36
adamc@378 37 if test [-z $BIN]; then
adamc@429 38 BIN=$prefix/bin
adamc@378 39 fi
adamc@378 40
adamc@378 41 if test [-z $LIB]; then
adamc@429 42 LIB=$prefix/lib/urweb
adamc@378 43 fi
adamc@378 44
adamc@378 45 if test [-z $INCLUDE]; then
adamc@429 46 INCLUDE=$prefix/include/urweb
adamc@378 47 fi
adamc@378 48
adamc@378 49 if test [-z $SITELISP]; then
adamc@429 50 SITELISP=$prefix/share/emacs/site-lisp/urweb-mode
adamc@378 51 fi
adamc@378 52
adam@1441 53 AC_ARG_WITH([emacs],
adam@1441 54 [AS_HELP_STRING([--without-emacs],
adam@1441 55 [disable installation of Emacs mode])],
adam@1441 56 [],
adam@1441 57 [with_emacs=yes])
adam@1441 58
adam@1441 59 AM_CONDITIONAL(USE_EMACS, test "x$with_emacs" = xyes)
adam@1441 60
adam@1464 61 if test [-z $PGHEADER]; then
adam@1464 62 AC_CHECK_HEADERS([postgresql/libpq-fe.h],
adam@1464 63 [PGHEADER=postgresql/libpq-fe.h])
adam@1464 64 fi
adam@1464 65
adam@1464 66 if test [-z $PGHEADER]; then
adam@1464 67 PGHEADER=libpq-fe.h
adam@1464 68 fi
adam@1464 69
adam@1464 70 if test [-z $MSHEADER]; then
adam@1464 71 AC_CHECK_HEADERS([mysql/mysql.h],
adam@1464 72 [MSHEADER=mysql/mysql.h])
adam@1464 73 fi
adam@1464 74
adam@1464 75 if test [-z $MSHEADER]; then
adam@1464 76 MSHEADER=mysql.h
adam@1464 77 fi
adam@1464 78
adam@1464 79 if test [-z $SQHEADER]; then
adam@1464 80 SQHEADER=sqlite3.h
adam@1464 81 fi
adam@1464 82
adam@1520 83 if test [$WORKING_VERSION = "1"]; then
adam@1520 84 VERSION="$VERSION + `hg identify || cat .hg_archival.txt || echo ?`"
adam@1520 85 fi
adam@1520 86
adam@1474 87 AC_SUBST(CC)
adamc@378 88 AC_SUBST(BIN)
adamc@378 89 AC_SUBST(LIB)
adamc@378 90 AC_SUBST(INCLUDE)
adamc@378 91 AC_SUBST(SITELISP)
adamc@435 92 AC_SUBST(GCCARGS)
adam@1464 93 AC_SUBST(PGHEADER)
adam@1464 94 AC_SUBST(MSHEADER)
adam@1464 95 AC_SUBST(SQHEADER)
adam@1520 96 AC_SUBST(VERSION)
adamc@378 97
adamc@1132 98 AC_CONFIG_FILES([
adamc@1132 99 Makefile
adamc@1132 100 src/c/Makefile
adamc@1132 101 src/config.sml
adamc@1132 102 ])
adamc@378 103
adamc@378 104 AC_OUTPUT()
adamc@378 105
adamc@378 106 cat <<EOF
adamc@378 107
adamc@378 108 Ur/Web configuration:
adam@1317 109 bin directory: BIN $BIN
adam@1317 110 lib directory: LIB $LIB
adam@1317 111 include directory: INCLUDE $INCLUDE
adam@1317 112 site-lisp directory: SITELISP $SITELISP
adam@1474 113 C compiler: CC $CC
adam@1317 114 Extra GCC args: GCCARGS $GCCARGS
adam@1464 115 Postgres C header: PGHEADER $PGHEADER
adam@1464 116 MySQL C header: MSHEADER $MSHEADER
adam@1464 117 SQLite C header: SQHEADER $SQHEADER
adam@1520 118
adam@1520 119 Version: $VERSION
adamc@378 120 EOF