annotate configure.ac @ 1662:edf86cef0dba

Make wildification a bit smarter about ordering of new wildcard declarations
author Adam Chlipala <adam@chlipala.net>
date Sat, 07 Jan 2012 11:01:21 -0500
parents 28b9b3d9414f
children 61421ab6be36
rev   line source
adam@1616 1 AC_INIT([urweb], [20111127])
adam@1617 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@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
adamc@429 44 LIB=$prefix/lib/urweb
adamc@378 45 fi
adamc@378 46
adamc@378 47 if test [-z $INCLUDE]; then
adamc@429 48 INCLUDE=$prefix/include/urweb
adamc@378 49 fi
adamc@378 50
adamc@378 51 if test [-z $SITELISP]; then
adamc@429 52 SITELISP=$prefix/share/emacs/site-lisp/urweb-mode
adamc@378 53 fi
adamc@378 54
adam@1441 55 AC_ARG_WITH([emacs],
adam@1441 56 [AS_HELP_STRING([--without-emacs],
adam@1441 57 [disable installation of Emacs mode])],
adam@1441 58 [],
adam@1441 59 [with_emacs=yes])
adam@1441 60
adam@1441 61 AM_CONDITIONAL(USE_EMACS, test "x$with_emacs" = xyes)
adam@1441 62
adam@1464 63 if test [-z $PGHEADER]; then
adam@1464 64 AC_CHECK_HEADERS([postgresql/libpq-fe.h],
adam@1464 65 [PGHEADER=postgresql/libpq-fe.h])
adam@1464 66 fi
adam@1464 67
adam@1464 68 if test [-z $PGHEADER]; then
adam@1464 69 PGHEADER=libpq-fe.h
adam@1464 70 fi
adam@1464 71
adam@1464 72 if test [-z $MSHEADER]; then
adam@1464 73 AC_CHECK_HEADERS([mysql/mysql.h],
adam@1464 74 [MSHEADER=mysql/mysql.h])
adam@1464 75 fi
adam@1464 76
adam@1464 77 if test [-z $MSHEADER]; then
adam@1464 78 MSHEADER=mysql.h
adam@1464 79 fi
adam@1464 80
adam@1464 81 if test [-z $SQHEADER]; then
adam@1464 82 SQHEADER=sqlite3.h
adam@1464 83 fi
adam@1464 84
adam@1520 85 if test [$WORKING_VERSION = "1"]; then
adam@1526 86 VERSION="$VERSION + `hg identify || (cat .hg_archival.txt | grep 'node\:') || echo ?`"
adam@1520 87 fi
adam@1520 88
adam@1474 89 AC_SUBST(CC)
adamc@378 90 AC_SUBST(BIN)
adamc@378 91 AC_SUBST(LIB)
adamc@378 92 AC_SUBST(INCLUDE)
adamc@378 93 AC_SUBST(SITELISP)
adam@1523 94 AC_SUBST(CCARGS)
adam@1464 95 AC_SUBST(PGHEADER)
adam@1464 96 AC_SUBST(MSHEADER)
adam@1464 97 AC_SUBST(SQHEADER)
adam@1520 98 AC_SUBST(VERSION)
adam@1528 99 AC_SUBST(PTHREAD_CFLAGS)
adam@1528 100 AC_SUBST(PTHREAD_LIBS)
adamc@378 101
adamc@1132 102 AC_CONFIG_FILES([
adamc@1132 103 Makefile
adamc@1132 104 src/c/Makefile
adamc@1132 105 src/config.sml
adamc@1132 106 ])
adamc@378 107
adamc@378 108 AC_OUTPUT()
adamc@378 109
adamc@378 110 cat <<EOF
adamc@378 111
adamc@378 112 Ur/Web configuration:
adam@1317 113 bin directory: BIN $BIN
adam@1317 114 lib directory: LIB $LIB
adam@1317 115 include directory: INCLUDE $INCLUDE
adam@1317 116 site-lisp directory: SITELISP $SITELISP
adam@1474 117 C compiler: CC $CC
adam@1523 118 Extra CC args: CCARGS $CCARGS
adam@1464 119 Postgres C header: PGHEADER $PGHEADER
adam@1464 120 MySQL C header: MSHEADER $MSHEADER
adam@1464 121 SQLite C header: SQHEADER $SQHEADER
adam@1661 122 OpenSSL: OPENSSL_LIBS $OPENSSL_LIBS
adam@1520 123
adam@1520 124 Version: $VERSION
adamc@378 125 EOF