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