annotate configure.ac @ 1759:add6dc3f4383

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