Fix use after free of name_tables
[lttv.git] / configure.ac
CommitLineData
ce0214a6 1# This file is part of the Linux Trace Toolkit viewer
2# Copyright (C) 2003-2004 Mathieu Desnoyers
3#
4# This program is free software; you can redistribute it and/or modify
5# it under the terms of the GNU General Public License Version 2 as
6# published by the Free Software Foundation;
7#
8# This program is distributed in the hope that it will be useful,
9# but WITHOUT ANY WARRANTY; without even the implied warranty of
10# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11# GNU General Public License for more details.
12#
13# You should have received a copy of the GNU General Public License
14# along with this program; if not, write to the Free Software
15# Foundation, Inc., 59 Temple Place - Suite 330, Boston,
16# MA 02111-1307, USA.
17
18
19
9f14a497 20# -*- Autoconf -*-
21# Process this file with autoconf to produce a configure script.
22
23AC_PREREQ(2.57)
24AC_INIT(FULL-PACKAGE-NAME, VERSION, BUG-REPORT-ADDRESS)
b0f606e9 25#AC_WITH_LTDL # not needed ?
1a0282fc 26AM_INIT_AUTOMAKE(lttv,0.12.17-01072009)
b445142a 27AM_CONFIG_HEADER(config.h)
39407106 28AM_PROG_LIBTOOL
b00eda44 29
b37f012b 30AM_PATH_GLIB_2_0(2.4.0, ,AC_MSG_ERROR([glib is required in order to compile LinuxTraceToolkit - download it from ftp://ftp.gtk.org/pub/gtk]) , gmodule)
9f14a497 31
286ffb24 32AM_PATH_GTK_2_0(2.4.0, ,AC_MSG_ERROR([gtk is required in order to compile GUI - download it from ftp://ftp.gtk.org/pub/gtk]) , gmodule)
442137a6 33
065f8f41 34AC_PATH_PROGS(BASH, bash)
35
ddd2aaff 36AC_SYS_LARGEFILE
37
9f14a497 38# Checks for programs.
39AC_PROG_CC
40
41# Checks for libraries.
6591c2c3 42AC_CHECK_LIB([popt], [poptGetNextOpt], POPT_LIBS="-lpopt",AC_MSG_ERROR([libpopt is required in order to compile LinuxTraceToolkit]) )
21ff84a0 43#AC_CHECK_LIB([m], [round], M_LIBS="-lm",AC_MSG_ERROR([Mathematical libraries are missing.]) )
0b74aa83 44
3d55af6e 45AC_CHECK_LIB([util], [forkpty], UTIL_LIBS="-lutil", AC_MSG_ERROR([libutil is required in order to compile LinuxTraceToolkit]))
9f14a497 46
36ea7706 47
750eb11a 48# pthread for gdb with dlopen().
3d55af6e 49AC_CHECK_LIB(pthread, pthread_join, [], AC_MSG_ERROR([LinuxThreads is required in order to make sure gdb works fine with lttv-gui]))
36ea7706 50
9f14a497 51# Checks for header files.
52AC_HEADER_STDC
36ea7706 53AC_CHECK_HEADERS([fcntl.h stdlib.h string.h sys/time.h unistd.h pthread.h])
9f14a497 54
c8faea22 55AC_ISC_POSIX
56AC_PROG_CC
57AM_PROG_CC_STDC
58AC_HEADER_STDC
59
60pkg_modules="gtk+-2.0 >= 2.0.0"
3d55af6e 61PKG_CHECK_MODULES(GTK, [$pkg_modules])
104325ef 62
3d55af6e
BP
63pkg_modules="gobject-2.0 >= 2.0.0"
64PKG_CHECK_MODULES(GOBJECT, [$pkg_modules])
65
66LIBS="$LIBS $GTK_LIBS $GOBJECT_LIBS"
67PACKAGE_CFLAGS="$GTK_CFLAGS $GOBJECT_CFLAGS -Wall -Wformat"
104325ef
BP
68MODULE_CFLAGS="$PACKAGE_CFLAGS -fvisibility=hidden"
69MODULE_LDFLAGS="-module -avoid-version"
70AC_SUBST([PACKAGE_CFLAGS])
71AC_SUBST([MODULE_CFLAGS])
72AC_SUBST([MODULE_LDFLAGS])
388a40e9 73
9f14a497 74# Checks for typedefs, structures, and compiler characteristics.
75AC_HEADER_STDBOOL
76AC_C_CONST
77AC_C_INLINE
78AC_TYPE_OFF_T
79AC_TYPE_SIZE_T
80AC_HEADER_TIME
81
82# Checks for library functions.
83AC_FUNC_ERROR_AT_LINE
f5eafc51 84#AC_FUNC_MALLOC
9f14a497 85AC_FUNC_SELECT_ARGTYPES
86AC_CHECK_FUNCS([select])
87
88#CPPFLAGS="$CPPFLAGS -I"
89
7d3dcbe0
BP
90AC_ARG_ENABLE(lttvstatic,
91 AC_HELP_STRING( [--enable-lttvstatic],
92 [Build a statically linked executable @<:@default=no@:>@]),
93 [with_lttvstatic="yes"],
94 [with_lttvstatic="no"])
95AM_CONDITIONAL(LTTVSTATIC, test "x$with_lttvstatic" = "xyes")
25fba836 96lttvlibdir="${libdir}/lttv"
96cbee09 97lttvplugindir="${lttvlibdir}/plugins"
6da3640c 98#lttlibdir="${libdir}/ltt"
0c56e138 99top_lttvdir="\$(top_srcdir)/lttv"
13f86ce2 100top_lttvwindowdir="\$(top_srcdir)/lttv/modules/gui/lttvwindow"
fc17f7eb 101
f0d243f7 102DEFAULT_INCLUDES="-I\$(top_srcdir) -I\$(top_builddir) -I\$(top_lttvdir) -I\$(top_lttvwindowdir)"
273475ce 103
d8f124de 104lttincludedir="${includedir}/ltt"
940dc6d6 105lttvincludedir="${includedir}/lttv"
13f86ce2 106lttvwindowincludedir="${includedir}/lttvwindow"
5cec0a15 107lttctlincludedir="${includedir}/liblttctl"
6591c2c3 108
3d55af6e
BP
109AC_SUBST([POPT_LIBS])
110AC_SUBST([UTIL_LIBS])
25fba836 111AC_SUBST(lttvlibdir)
6591c2c3 112AC_SUBST(lttvplugindir)
6da3640c 113#AC_SUBST(lttlibdir)
6591c2c3 114AC_SUBST(top_lttvdir)
115AC_SUBST(top_lttvwindowdir)
116AC_SUBST(DEFAULT_INCLUDES)
117AC_SUBST(lttincludedir)
118AC_SUBST(lttvincludedir)
13f86ce2 119AC_SUBST(lttvwindowincludedir)
5cec0a15 120AC_SUBST(lttctlincludedir)
940dc6d6 121
c17abb87 122 #lttv/modules/gui/tutorial/Makefile
123 #lttv/modules/gui/diskperformance/Makefile
9f14a497 124AC_CONFIG_FILES([Makefile
a100e2b7 125 lttv/Makefile
d8f124de 126 lttv/lttv/Makefile
830eba15 127 lttv/modules/Makefile
0e9ba239 128 lttv/modules/text/Makefile
6ebfde5e 129 lttv/modules/gui/Makefile
2864f4c5 130 lttv/modules/gui/lttvwindow/Makefile
a246c5e3 131 lttv/modules/gui/interrupts/Makefile
13f86ce2 132 lttv/modules/gui/lttvwindow/lttvwindow/Makefile
2864f4c5 133 lttv/modules/gui/lttvwindow/pixmaps/Makefile
88feb618 134 lttv/modules/gui/controlflow/Makefile
135 lttv/modules/gui/detailedevents/Makefile
136 lttv/modules/gui/statistics/Makefile
1684ba2e 137 lttv/modules/gui/histogram/Makefile
fcc08e1e 138 lttv/modules/gui/filter/Makefile
139 lttv/modules/gui/tracecontrol/Makefile
c4e6f4dc 140 lttv/modules/gui/resourceview/Makefile
d7b45e73 141 ltt/Makefile
b1053af5 142 doc/Makefile
143 doc/developer/Makefile
144 doc/developer/developer_guide/Makefile
145 doc/developer/developer_guide/docbook/Makefile
146 doc/developer/developer_guide/html/Makefile
147 doc/user/Makefile
148 doc/user/user_guide/Makefile
149 doc/user/user_guide/docbook/Makefile
2c0d8f76 150 doc/user/user_guide/html/Makefile])
9f14a497 151AC_OUTPUT
This page took 0.066467 seconds and 4 git commands to generate.