annotate configure.ac @ 1469:a354b306f948

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