blob: e1d9234c55db051906bf0ebdde973f08c2c29916 [file] [log] [blame]
openvcdiff311c7142008-08-26 19:29:25 +00001## Process this file with autoconf to produce configure.
2## In general, the safest way to proceed is to run ./autogen.sh
3
4# make sure we're interpreted by some minimal autoconf
5AC_PREREQ(2.57)
6
openvcdiff28db8072008-10-10 23:29:11 +00007AC_INIT(open-vcdiff, 0.3, opensource@google.com)
openvcdiff311c7142008-08-26 19:29:25 +00008AC_CONFIG_SRCDIR(README)
9AM_INIT_AUTOMAKE
10AM_CONFIG_HEADER(src/config.h)
11
12# Checks for programs.
13AC_PROG_CC
14AC_PROG_CPP
15AC_PROG_CXX
16AM_CONDITIONAL(GCC, test "$GCC" = yes) # let the Makefile know if we're gcc
17AC_CANONICAL_HOST
18
19AC_PROG_LIBTOOL
20AC_SUBST(LIBTOOL_DEPS)
21
22# Check whether some low-level functions/files are available
23AC_HEADER_STDC
24
openvcdiff28db8072008-10-10 23:29:11 +000025# Built-in memcmp can be inefficient when gcc compiles for x86 processors.
26# In those cases, use an alternative function instead of memcmp.
27case $host_cpu in
28 *86*)
29 if test "$GCC" = "yes"; then
30 AC_DEFINE(VCDIFF_USE_BLOCK_COMPARE_WORDS, 1,
31 Use custom compare function instead of memcmp)
32 fi
openvcdiffd4832872008-09-02 18:21:13 +000033 ;;
openvcdiff311c7142008-08-26 19:29:25 +000034esac
35
36AC_CHECK_HEADERS([ext/rope])
37AC_CHECK_HEADERS([getopt.h])
38AC_CHECK_HEADERS([malloc.h])
39AC_CHECK_HEADERS([sys/mman.h])
40AC_CHECK_HEADERS([sys/time.h])
41AC_CHECK_HEADERS([unistd.h])
42AC_CHECK_HEADERS([windows.h])
43AC_CHECK_FUNCS([gettimeofday QueryPerformanceCounter])
44AC_CHECK_FUNCS([memalign posix_memalign])
45AC_CHECK_FUNCS([mprotect])
46
47# Start of definitions needed by gflags package
48
49AC_CHECK_HEADERS([stdint.h sys/types.h inttypes.h])
50AC_CHECK_HEADERS([fnmatch.h])
openvcdiff311c7142008-08-26 19:29:25 +000051AC_CHECK_FUNCS([strtoll strtoq])
52AC_CHECK_TYPES([uint16_t, u_int16_t, __int16])
53
54AX_C___ATTRIBUTE__
55
openvcdiff311c7142008-08-26 19:29:25 +000056# End of definitions needed by gflags package
57
58AC_CONFIG_FILES([Makefile])
59AC_OUTPUT