Mercurial > urweb
diff configure.ac @ 1132:d4cd54a4ea06
First attempt to switch to Automake, to get shared libraries built in OSX
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Thu, 28 Jan 2010 09:56:08 -0500 |
parents | f7b25375c0cf |
children | f6cb1cb2d7a8 |
line wrap: on
line diff
--- a/configure.ac Tue Jan 26 14:59:19 2010 -0500 +++ b/configure.ac Thu Jan 28 09:56:08 2010 -0500 @@ -1,29 +1,7 @@ -# configure.in for Ur/Web -*- sh -*- -# Process this file with autoconf to produce a configure script. - -# -------------- usual initial stuff ------------- -# this simply names a file somewhere in the source tree to verify -# we're in the right directory -AC_INIT(THIS_IS_URWEB) - - -# sm: require a late-enough autoconf; this is the version number -# that's on manju, so I assume it's ok -AC_PREREQ(2.50) - -AC_MSG_NOTICE(Configuring Ur/Web) - -# make sure I haven't forgotten to run autoconf -if test configure -ot configure.ac; then - AC_MSG_ERROR(configure is older than configure.in; you forgot to run autoconf) -fi - -# ---------------- generic functions ----------------- -# debugging diagnostic; set to 'echo' to debug or 'true' for production -diagnostic() { - #echo "$@" - true "$@" -} +AC_INIT([urweb], [1.0]) +AM_INIT_AUTOMAKE([-Wall -Werror foreign]) +AC_PROG_CC() +AC_PROG_LIBTOOL() if test [$prefix = "NONE"]; then prefix=/usr/local @@ -45,53 +23,20 @@ SITELISP=$prefix/share/emacs/site-lisp/urweb-mode fi - -do_not_edit="Do not edit this file. It was generated automatically from" - - -# ----------------- finish up ------------------- -# names of the variables that get substituted in files; for example, -# write @ARCHOS@ somewhere in a written file to get it substituted AC_SUBST(BIN) AC_SUBST(LIB) AC_SUBST(INCLUDE) AC_SUBST(SITELISP) AC_SUBST(GCCARGS) -AC_SUBST(do_not_edit) -# finish the configure script and generate various files; ./configure -# will apply variable substitutions to <filename>.in to generate <filename>; -# I find it useful to mark generated files as read-only so I don't -# accidentally edit them (and then lose my changes when ./configure -# runs again); I had originally done the chmod after AC_OUTPUT, but -# the problem is then the chmod doesn't run inside ./config.status - -# MY_AC_CONFIG_FILES(filename) -# do AC_CONFIG_FILES(filename, chmod a-w filename) -define([MY_AC_CONFIG_FILES], -[{ - if test -f [$1].in; then - AC_CONFIG_FILES([$1], chmod a-w [$1]) - else - true - #echo "skipping [$1] because it's not in this distribution" - fi -}]) -define([MY_AC_CONFIG_EXE_FILES], -[{ - if test -f [$1].in; then - AC_CONFIG_FILES([$1], [chmod a-w,a+x $1]) - else - true - #echo "skipping [$1] because it's not in this distribution" - fi -}]) -MY_AC_CONFIG_FILES(Makefile) -MY_AC_CONFIG_FILES(src/config.sml) +AC_CONFIG_FILES([ + Makefile + src/c/Makefile + src/config.sml +]) AC_OUTPUT() -# show the user what the variables have been set to cat <<EOF Ur/Web configuration: