annotate configure.ac @ 1780:85a87f155e7b

Flush elaboration cache when switching between .urp files
author Adam Chlipala <adam@chlipala.net>
date Sat, 23 Jun 2012 10:11:33 -0400
parents 141f234a91fb
children 40557fb08e98
rev   line source
adam@1771 1 AC_INIT([urweb], [20120519])
adam@1772 2 WORKING_VERSION=1
adamc@1149 3 AC_USE_SYSTEM_EXTENSIONS
adam@1760 4
adam@1760 5 # automake 1.12 requires this, but automake 1.11 doesn't recognize it
adam@1762 6 m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
adam@1760 7
adamc@1148 8 AM_INIT_AUTOMAKE([-Wall -Werror foreign no-define])
adamc@1132 9 AC_PROG_CC()
adamc@1132 10 AC_PROG_LIBTOOL()
adamc@1141 11 AC_CONFIG_MACRO_DIR([m4])
ezyang@1739 12 AC_CONFIG_HEADERS([include/urweb/config.h])
adamc@378 13
adam@1528 14 AX_PTHREAD([echo >/dev/null], [echo "Your C compiler does not support POSIX threads."; exit 1])
adam@1528 15
adam@1369 16 AX_CHECK_OPENSSL([echo >/dev/null], [echo "You must install OpenSSL development files."; exit 1])
adamc@1165 17
adamc@1165 18 AC_CHECK_PROG(MLTON, mlton, yes, [])
adamc@1165 19
adamc@1165 20 if test [-z $MLTON]; then
adamc@1165 21 echo "You must install MLton."
adamc@1165 22 exit 1
adamc@1165 23 fi
adamc@1165 24
adamc@1165 25 AC_CHECK_PROG(MLLEX, mllex, yes, [])
adamc@1165 26
adamc@1165 27 if test [-z $MLLEX]; then
adamc@1165 28 echo "You must install MLton (to get mllex)."
adamc@1165 29 exit 1
adamc@1165 30 fi
adamc@1165 31
adamc@1165 32 AC_CHECK_PROG(MLYACC, mlyacc, yes, [])
adamc@1165 33
adamc@1165 34 if test [-z $MLYACC]; then
adamc@1165 35 echo "You must install MLton (to get mlyacc)."
adamc@1165 36 exit 1
adamc@1165 37 fi
adamc@1165 38
adamc@429 39 if test [$prefix = "NONE"]; then
adamc@429 40 prefix=/usr/local
adamc@429 41 fi
adamc@429 42
adamc@378 43 if test [-z $BIN]; then
adamc@429 44 BIN=$prefix/bin
adamc@378 45 fi
adamc@378 46
adamc@378 47 if test [-z $LIB]; then
ezyang@1739 48 LIB=$prefix/lib
ezyang@1739 49 fi
ezyang@1739 50
ezyang@1739 51 if test [-z $SRCLIB]; then
ezyang@1739 52 SRCLIB=$prefix/lib/urweb
adamc@378 53 fi
adamc@378 54
adamc@378 55 if test [-z $INCLUDE]; then
adamc@429 56 INCLUDE=$prefix/include/urweb
adamc@378 57 fi
adamc@378 58
adamc@378 59 if test [-z $SITELISP]; then
adamc@429 60 SITELISP=$prefix/share/emacs/site-lisp/urweb-mode
adamc@378 61 fi
adamc@378 62
adam@1441 63 AC_ARG_WITH([emacs],
adam@1441 64 [AS_HELP_STRING([--without-emacs],
adam@1441 65 [disable installation of Emacs mode])],
adam@1441 66 [],
adam@1441 67 [with_emacs=yes])
adam@1441 68
adam@1441 69 AM_CONDITIONAL(USE_EMACS, test "x$with_emacs" = xyes)
adam@1441 70
adam@1464 71 if test [-z $PGHEADER]; then
adam@1464 72 AC_CHECK_HEADERS([postgresql/libpq-fe.h],
adam@1464 73 [PGHEADER=postgresql/libpq-fe.h])
adam@1464 74 fi
adam@1464 75
adam@1464 76 if test [-z $PGHEADER]; then
adam@1464 77 PGHEADER=libpq-fe.h
adam@1464 78 fi
adam@1464 79
adam@1464 80 if test [-z $MSHEADER]; then
adam@1464 81 AC_CHECK_HEADERS([mysql/mysql.h],
adam@1464 82 [MSHEADER=mysql/mysql.h])
adam@1464 83 fi
adam@1464 84
adam@1464 85 if test [-z $MSHEADER]; then
adam@1464 86 MSHEADER=mysql.h
adam@1464 87 fi
adam@1464 88
adam@1464 89 if test [-z $SQHEADER]; then
adam@1464 90 SQHEADER=sqlite3.h
adam@1464 91 fi
adam@1464 92
adam@1520 93 if test [$WORKING_VERSION = "1"]; then
adam@1526 94 VERSION="$VERSION + `hg identify || (cat .hg_archival.txt | grep 'node\:') || echo ?`"
adam@1520 95 fi
adam@1520 96
adam@1474 97 AC_SUBST(CC)
adamc@378 98 AC_SUBST(BIN)
adamc@378 99 AC_SUBST(LIB)
ezyang@1739 100 AC_SUBST(SRCLIB)
adamc@378 101 AC_SUBST(INCLUDE)
adamc@378 102 AC_SUBST(SITELISP)
adam@1523 103 AC_SUBST(CCARGS)
adam@1464 104 AC_SUBST(PGHEADER)
adam@1464 105 AC_SUBST(MSHEADER)
adam@1464 106 AC_SUBST(SQHEADER)
adam@1520 107 AC_SUBST(VERSION)
adam@1528 108 AC_SUBST(PTHREAD_CFLAGS)
adam@1528 109 AC_SUBST(PTHREAD_LIBS)
adamc@378 110
adamc@1132 111 AC_CONFIG_FILES([
adamc@1132 112 Makefile
adamc@1132 113 src/c/Makefile
adamc@1132 114 src/config.sml
adamc@1132 115 ])
adamc@378 116
adamc@378 117 AC_OUTPUT()
adamc@378 118
adamc@378 119 cat <<EOF
adamc@378 120
adamc@378 121 Ur/Web configuration:
adam@1317 122 bin directory: BIN $BIN
adam@1317 123 lib directory: LIB $LIB
ezyang@1739 124 src lib directory: SRCLIB $SRCLIB
adam@1317 125 include directory: INCLUDE $INCLUDE
adam@1317 126 site-lisp directory: SITELISP $SITELISP
adam@1474 127 C compiler: CC $CC
adam@1523 128 Extra CC args: CCARGS $CCARGS
adam@1464 129 Postgres C header: PGHEADER $PGHEADER
adam@1464 130 MySQL C header: MSHEADER $MSHEADER
adam@1464 131 SQLite C header: SQHEADER $SQHEADER
adam@1661 132 OpenSSL: OPENSSL_LIBS $OPENSSL_LIBS
adam@1520 133
adam@1520 134 Version: $VERSION
adamc@378 135 EOF