-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfigure.in
98 lines (70 loc) · 2.42 KB
/
configure.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.52)
AC_INIT(memprof, 0.6.2)
AC_CONFIG_SRCDIR(memprof.glade)
dnl $Format: "AM_INIT_AUTOMAKE(MemProf, $ReleaseVersion$)" $
AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
dnl Specify a configuration file
AM_CONFIG_HEADER(config.h)
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
dnl Initialize libtool
AM_PROG_LIBTOOL
dnl Initialize maintainer mode
AM_MAINTAINER_MODE
AC_PROG_CC
AM_PROG_CC_STDC
AC_PROG_INSTALL
AC_PROG_INTLTOOL
changequote(,)dnl
if test "x$GCC" = "xyes"; then
case " $CFLAGS " in
*[\ \ ]-Wall[\ \ ]*) ;;
*) CFLAGS="$CFLAGS -Wall" ;;
esac
fi
changequote([,])dnl
debugdir=${libdir}/debug
AC_ARG_WITH(separate-debug-dir,
[ --with-separate-debug-dir=path Look for global separate debug info in this path [LIBDIR/debug]],
[debugdir="${withval}"])
AC_DEFINE_DIR(DEBUGDIR, debugdir,
[Look for global separate debug info in this path])
dnl GNOME checks (using pkg-config macros) and getting cflags and libs
GTK_REQUIRED=2.6.0
LIBGLADE_REQUIRED=1.99.9
PKG_CHECK_MODULES(MEMPROF,
[
gtk+-2.0 >= $GTK_REQUIRED
libglade-2.0 >= $LIBGLADE_REQUIRED
])
AC_SUBST(MEMPROF_CFLAGS)
AC_CHECK_LIB(iberty, cplus_demangle,:,
AC_CHECK_LIB(iberty, cplus_demangle_opname, LIBS="$LIBS -ldl",
AC_MSG_ERROR([*** libiberty required to compile MemProf]), -ldl))
AC_CHECK_LIB(bfd, bfd_get_error, [MEMPROF_LIBS="$MEMPROF_LIBS -Wl,-Bstatic -lbfd -liberty -Wl,-Bdynamic"],
AC_MSG_ERROR([*** libbfd required to compile MemProf]),
-liberty)
AC_CHECK_HEADER([bfd.h],[],
[AC_MSG_ERROR([Cannot continue: bfd.h not found. Do you have binutils-dev installed?])])
if ! uname | grep Linux > /dev/null ; then
AC_MSG_ERROR([*** MemProf only works on linux])
fi
AC_SUBST(MEMPROF_LIBS)
dnl Initialize gettext
GETTEXT_PACKAGE=memprof
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",
[Identifier for message catalog files])
ALL_LINGUAS="am ar az be bs ca cs da de dz el en_CA en_GB es et eu fi fr hr hu it ja ko lv mk ml ms nb ne nl oc pa pl pt pt_BR ru rw sk sl sr sr@Latn sv ta tr uk vi zh_CN zh_TW"
AM_GLIB_GNU_GETTEXT
AC_HAVE_HEADERS(execinfo.h)
AC_CHECK_FUNCS(bind_textdomain_codeset backtrace)
dnl Remember ACLOCAL_FLAGS for automatic reautogen.
ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
dnl Output the Makefiles
AC_CONFIG_FILES([
Makefile
po/Makefile.in
memprof.spec
])
AC_OUTPUT