X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/disorder/blobdiff_plain/50450a0060ff1fe52fa6211ab6fb7f64ef0a1a65..fc80bbcd268a28efc9869666d3a8dc078c300b58:/configure.ac diff --git a/configure.ac b/configure.ac index d1895dc..209e9c2 100644 --- a/configure.ac +++ b/configure.ac @@ -20,9 +20,9 @@ # USA # -AC_INIT([disorder], [4.0+], [richard+disorder@sfere.greenend.org.uk]) +AC_INIT([disorder], [4.2], [richard+disorder@sfere.greenend.org.uk]) AC_CONFIG_AUX_DIR([config.aux]) -AM_INIT_AUTOMAKE(disorder, [4.0+]) +AM_INIT_AUTOMAKE(disorder, [4.2]) AC_CONFIG_SRCDIR([server/disorderd.c]) AM_CONFIG_HEADER([config.h]) @@ -46,6 +46,13 @@ AC_PROG_CC AC_SET_MAKE if test "x$GCC" = xyes; then gcc_werror=-Werror + case "$CC" in + *-std=* ) + ;; + * ) + CC="${CC} -std=gnu99" + ;; + esac else AC_MSG_ERROR([GNU C is required to build this program]) gcc_werror="" @@ -219,14 +226,18 @@ if test $want_cgi = yes; then fi done ]) - if test "$rjk_cv_cgidir" = "not found"; then + if test "$rjk_cv_cgiexecdir" = "not found"; then AC_MSG_ERROR([cannot identify httpd documentroot. Set httpdir on configure command line]) fi httpdir="$rjk_cv_httpdir" fi - if test -z "$cgidir"; then - AC_CACHE_CHECK([for CGI directory],[rjk_cv_cgidir],[ - rjk_cv_cgidir="not found" + if test ! -z "$cgidir"; then + # This is a bit harsh but should stop any disasters + AC_MSG_ERROR([cgidir has been renamed to cgiexecdir]) + fi + if test -z "$cgiexecdir"; then + AC_CACHE_CHECK([for CGI directory],[rjk_cv_cgiexecdir],[ + rjk_cv_cgiexecdir="not found" for dir in /usr/lib/cgi-bin \ /Library/WebServer/CGI-Executables \ /srv/www/cgi-bin \ @@ -237,18 +248,18 @@ if test $want_cgi = yes; then /usr/local/www/cgi-bin \ /usr/local/www/*/cgi-bin; do if test -d "$dir"; then - rjk_cv_cgidir="$dir" + rjk_cv_cgiexecdir="$dir" break fi done ]) - if test "$rjk_cv_cgidir" = "not found"; then - AC_MSG_ERROR([cannot identify CGI install directory. Set cgidir on configure command line]) + if test "$rjk_cv_cgiexecdir" = "not found"; then + AC_MSG_ERROR([cannot identify CGI install directory. Set cgiexecdir on configure command line]) fi - cgidir="$rjk_cv_cgidir" + cgiexecdir="$rjk_cv_cgiexecdir" fi fi -AC_ARG_VAR([cgidir], [location of cgi-bin directory, e.g. /usr/lib/cgi-bin]) +AC_ARG_VAR([cgiexecdir], [location of cgi-bin directory, e.g. /usr/lib/cgi-bin]) AC_ARG_VAR([httpdir], [location of http document root, e.g. /var/www/htdocs]) if test -z "$pkghttpdir"; then pkghttpdir='$(httpdir)/disorder'