X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/disorder/blobdiff_plain/0eaf64e8d26c08228401fa89741c63fc2ff064c3..a18344bc44435a1e3583e4a0c15a8257724c44dd:/configure.ac diff --git a/configure.ac b/configure.ac index 2522f45..7b4fe51 100644 --- a/configure.ac +++ b/configure.ac @@ -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 . # -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]) @@ -43,6 +41,7 @@ want_coreaudio=yes # Checks for programs. AC_PROG_CC +AC_PROG_AWK AC_SET_MAKE if test "x$GCC" = xyes; then gcc_werror=-Werror @@ -117,6 +116,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]) @@ -164,6 +168,37 @@ if test -z "$browser"; then fi AC_DEFINE_UNQUOTED([BROWSER],["$browser"],[HTML viewer]) +# Figure out what version of sox is installed +AC_CACHE_CHECK([sox version],[rjk_cv_soxver],[ + rjk_cv_soxver=UNKNOWN + if sox --version > /dev/null 2>&1; then + rjk_cv_soxver=`sox --version|$AWK '{ if(match($0, /[[0-9\.]]+/)) print substr($0,RSTART,RLENGTH)}'` + else + rjk_cv_soxver=`sox -h 2>&1|$AWK '/Version/ { if(match($0, /[[0-9\.]]+/)) print substr($0,RSTART,RLENGTH)}'` + fi +]) + +# Decide what command line options to use +# +# sox version endian bits deployed +# 12.17.9 -x -[bwld] debian etch, ubuntu dapper +# 14.0.0 -x/-[BL] -[bwld] ubuntu hardy +# 14.0.1 -x/-[BL] -[1248] debian lenny +# 14.2.0 -x/-[BL] -[1248] debian sid (at 2008-12) + +AC_CACHE_CHECK([default sox generation],[rjk_cv_soxgen],[ + case $rjk_cv_soxver in + [[0-9]].* | 1[[0123]].* ) + rjk_cv_soxgen=0 + ;; + * ) + rjk_cv_soxgen=1 + ;; + esac +]) +AC_DEFINE_UNQUOTED([DEFAULT_SOX_GENERATION],[$rjk_cv_soxgen], + [default sox generation]) + AC_ARG_WITH([server], [AS_HELP_STRING([--without-server], [do not build server])],