chiark / gitweb /
Support feeble FreeBSD versions of dd and truncate in tests
[vbig.git] / configure.ac
1 #
2 # This file is part of vbig.
3 # Copyright (C) 2011, 2013 Richard Kettlewell
4 # Copyright (C) 2013 Ian Jackson
5 #
6 # This program is free software: you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation, either version 3 of the License, or
9 # (at your option) any later version.
10 #
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 # GNU General Public License for more details.
15 #
16 # You should have received a copy of the GNU General Public License
17 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
18 #
19 AC_PREREQ([2.61])
20 AC_INIT([vbig], [0.3], [rjk@greenend.org.uk])
21 m4_include([m4/ax_random_device.m4])
22 AC_CONFIG_AUX_DIR([config.aux])
23 AM_INIT_AUTOMAKE([foreign])
24 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES])
25 AC_CONFIG_SRCDIR([vbig.cc])
26 AM_CONFIG_HEADER([config.h])
27 AC_CANONICAL_HOST
28 case "$host" in
29 *-*-darwin* )
30   AC_DEFINE([PURGE_COMMAND],["purge"], [Command to purge filesystem cache])
31   ;;
32 *-*-linux* )
33   AC_DEFINE([DROP_CACHE_FILE],["/proc/sys/vm/drop_caches"],
34             [Path to filesystem cache purge interface])
35   ;;
36 esac
37 AC_LANG([C++])
38 AC_PROG_CXX
39 AC_PROG_RANLIB
40 AC_SET_MAKE
41 AC_DEFINE([_GNU_SOURCE], [1], [use GNU extensions])
42 if test "x$GXX" = xyes; then
43   CXX="$CXX -Wall -W -Werror -Wpointer-arith -Wwrite-strings"
44 fi
45 AX_RANDOM_DEVICE
46 AC_CONFIG_FILES([Makefile])
47 AC_OUTPUT