chiark / gitweb /
Doxygen file headers for most files
[disorder] / configure.ac
index f7956fda8fd609b25e128dab45e024b5d3348d88..a45d6edaf3b499e4c1c73a6ef5166df0ac9ac2c6 100644 (file)
@@ -4,25 +4,23 @@
 # Copyright (C) 2004-2008 Richard Kettlewell
 # Portions copyright (C) 2007 Ross Younger
 #
-# This program is free software; you can redistribute it and/or modify
+# This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
+# the Free Software Foundation, either version 3 of the License, or
 # (at your option) any later version.
 #
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# General Public License for more details.
-#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+# 
 # You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
-# USA
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-AC_INIT([disorder], [3.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, [3.0+])
+AM_INIT_AUTOMAKE(disorder, [4.2+])
 AC_CONFIG_SRCDIR([server/disorderd.c])
 AM_CONFIG_HEADER([config.h])
 
@@ -46,6 +44,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=""
@@ -110,6 +115,11 @@ case "$host" in
   AC_MSG_RESULT([$minver])
   AC_DEFINE_UNQUOTED([MAC_OS_X_VERSION_MIN_REQUIRED], [$minver],
                      [define to minimum version of Mac OS X to support])
+
+  # Fink's GTK+ is hopelessly broken
+  PKG_CONFIG_PATH=${PKG_CONFIG_PATH:-/sw/lib/pango-ft219/lib/pkgconfig}
+  export PKG_CONFIG_PATH
+
   ;;
 *-freebsd* )
   AC_MSG_RESULT([FreeBSD])
@@ -219,14 +229,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 +251,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'