• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1## 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
7AC_INIT(open-vcdiff, 0.7, opensource@google.com)
8AC_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
19# Issue #21:  Fail to test on MinGW 5.1.4
20# Disabling fast install keeps libtool from creating wrapper scripts around
21# the executables it builds.  Such scripts have caused failures on MinGW.
22# Using this option means an extra link step is executed during "make install".
23AC_DISABLE_FAST_INSTALL
24
25AC_PROG_LIBTOOL
26AC_SUBST(LIBTOOL_DEPS)
27
28# Check whether some low-level functions/files are available
29AC_HEADER_STDC
30
31# Built-in memcmp can be inefficient when gcc compiles for x86 processors.
32# In those cases, use an alternative function instead of memcmp.
33case $host_cpu in
34  *86*)
35    if test "$GCC" = "yes"; then
36      AC_DEFINE(VCDIFF_USE_BLOCK_COMPARE_WORDS, 1,
37                Use custom compare function instead of memcmp)
38    fi
39    ;;
40esac
41
42AC_CHECK_HEADERS([ext/rope])
43AC_CHECK_HEADERS([getopt.h])
44AC_CHECK_HEADERS([malloc.h])
45AC_CHECK_HEADERS([sys/mman.h])
46AC_CHECK_HEADERS([sys/time.h])
47AC_CHECK_HEADERS([unistd.h])
48AC_CHECK_HEADERS([windows.h])
49AC_CHECK_FUNCS([gettimeofday QueryPerformanceCounter])
50AC_CHECK_FUNCS([memalign posix_memalign])
51AC_CHECK_FUNCS([mprotect])
52
53# Start of definitions needed by gflags package
54
55AC_CHECK_HEADERS([stdint.h sys/types.h inttypes.h])
56AC_CHECK_HEADERS([fnmatch.h])
57AC_CHECK_FUNCS([strtoll strtoq])
58AC_CHECK_TYPES([uint16_t, u_int16_t, __int16])
59
60AX_C___ATTRIBUTE__
61
62# End of definitions needed by gflags package
63
64# Solaris 10 6/06 has a bug where /usr/sfw/lib/libstdc++.la is empty.
65# If so, we replace it with our own version.
66LIBSTDCXX_LA_LINKER_FLAG=
67if test -f /usr/sfw/lib/libstdc++.la && ! test -s /usr/sfw/lib/libstdc++.la
68then
69  LIBSTDCXX_LA_LINKER_FLAG='-L$(top_srcdir)/src/solaris'
70fi
71AC_SUBST(LIBSTDCXX_LA_LINKER_FLAG)
72
73AC_CONFIG_FILES([Makefile])
74AC_OUTPUT
75