Remove unused rpc/xdr references.
[dyninst.git] / parseThat / configure.ac
1 # Process this file with autoconf to produce a configure script.
2 AC_INIT([parseThat],[1.0])
3 AC_CONFIG_SRCDIR([src/config.C])
4 AC_CONFIG_AUX_DIR([.])
5 AC_LANG(C++)
6
7
8 AC_SEARCH_LIBS(dlopen, dl)
9
10 AC_ARG_WITH(dyninst,
11             [AS_HELP_STRING([--with-dyninst],[Base directory to look for dyninst headers and libraries])],
12             [DYNINST_LIB="${withval}/${PLATFORM}/lib"
13              DYNINST_INC="${withval}/include"],)
14
15 AC_ARG_WITH(dyninst-lib,
16             [AS_HELP_STRING([--with-dyninst-lib],[Directory to look for dyninst libraries])],
17             [DYNINST_LIB="${withval}"],)
18
19 AC_ARG_WITH(dyninst-include,
20             [AS_HELP_STRING([--with-dyninst-include],[Directory to look for dyninst headers])],
21             [DYNINST_INC="${withval}"],)
22
23 AC_ARG_WITH(dwarf-lib,
24             [AS_HELP_STRING([--with-dwarf-include],[Directory to look for libdwarf])],
25             [DWARF_LIB="${withval}"],)
26
27 AC_ARG_WITH(elf-lib,
28             [AS_HELP_STRING([--with-elf-include],[Directory to look for libelf])],
29             [ELF_LIB="${withval}"],)
30
31 AC_ARG_WITH(liberty-lib,
32             [AS_HELP_STRING([--with-liberty-lib],[Link string to use for libiberty])],
33             [LIBERTY_LIB="${withval}"],)
34
35 if test -n ${DYNINST_ROOT}; then
36    # Add search paths to CPPFLAGS and LDFLAGS.
37    if test -z ${DYNINST_LIB}; then
38       DYNINST_LIB="${DYNINST_ROOT}/lib"
39    fi
40    if test -z ${DYNINST_INC}; then
41       DYNINST_INC="${DYNINST_ROOT}/include"
42    fi
43 fi
44
45 AC_SUBST([LDFLAGS], ["-L${DYNINST_LIB} ${LDFLAGS}"])
46 AC_SUBST([DWARFFLAGS], ["${DWARF_LIB}"])
47 AC_SUBST([ELFFLAGS], ["${ELF_LIB}"])
48 AC_SUBST([LIBERTYFLAGS], ["${LIBERTY_LIB}"])
49 AC_SUBST([CPPFLAGS], ["-I${DYNINST_INC} -D_GLIBCXX_USE_CXX11_ABI=0 ${CPPFLAGS}"])
50
51 # Generate host string.
52 AC_CANONICAL_HOST
53
54 # Build all configure tests with C++ compiler.
55 AC_LANG([C++])
56
57 # sha1.C requres these system files and endianess to be tested.
58 AC_CHECK_HEADERS([inttypes.h], [], [], [// Do not use default includes])
59 AC_CHECK_HEADERS([stdint.h], [], [], [// Do not use default includes])
60 AC_C_BIGENDIAN
61
62 # Search for Dyninst in all the right places.
63 AC_CHECK_HEADER([BPatch.h], [],
64                 [AC_MSG_ERROR([Cannot find DyninstAPI library include files.])],
65                 [// Do not use default includes])
66
67 # Check if Dyninst is version 5.0+
68 AC_CHECK_HEADERS([BPatch_process.h],
69                  [AC_SUBST([DYNINST_VER], [5])],
70                  [AC_SUBST([DYNINST_VER], [4])],
71                  [// Do not use default includes])
72
73 # Find appropriate install program
74 AC_PROG_INSTALL
75
76 AC_CONFIG_FILES([Makefile])
77 AC_OUTPUT