Update the README file to mark the project as unmaintained
[lttv.git] / configure.ac
... / ...
CommitLineData
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
20# -*- Autoconf -*-
21# Process this file with autoconf to produce a configure script.
22
23AC_PREREQ(2.57)
24AC_INIT([lttv], [1.5], [yannick.brosseau@gmail.com])
25AC_CONFIG_AUX_DIR([config])
26AC_CONFIG_MACRO_DIR([config])
27AM_INIT_AUTOMAKE([dist-bzip2 no-dist-gzip])
28AM_SILENT_RULES([yes])
29AC_CONFIG_HEADERS([config.h])
30LT_INIT
31
32#Always build basic command line modules
33with_lttv="yes"
34
35# If requested, avoid building LTTV part
36AC_ARG_WITH(lttv-gui,
37 AS_HELP_STRING([--with-lttv-gui],
38 [build LTTV gui, as opposed to only build textmode LTTV [[default=yes]]]),
39 [with_lttv_gui="$withval"],
40 [with_lttv_gui="yes"])
41
42AM_CONDITIONAL([BUILD_LTTV_GUI], [ test "x$with_lttv_gui" = "xyes" ])
43
44AM_PATH_GLIB_2_0(2.4.0, , AC_MSG_ERROR([glib is required in order to compile LTTV]) , gmodule)
45
46# GTK is only needed by the GUI
47AS_IF([test "x$with_lttv_gui" = "xyes"],[
48 AM_PATH_GTK_2_0(2.4.0, , AC_MSG_ERROR([GTK 2 is required in order to compile the LTTV GUI]) , gmodule)
49])
50
51AC_PATH_PROGS(BASH, bash)
52
53AC_SYS_LARGEFILE
54
55# Checks for programs.
56AC_PROG_CC
57
58# Checks for libraries.
59AC_CHECK_LIB([popt], [poptGetNextOpt], [],
60 AC_MSG_ERROR([libpopt is required in order to compile LTTV])
61)
62AC_CHECK_LIB([m], [round], [],
63 AC_MSG_ERROR([Mathematical libraries are missing.])
64)
65AC_CHECK_LIB([util], [forkpty], [],
66 AC_MSG_ERROR([libutil is required in order to compile LTTV])
67)
68
69# Trace synchronization feature, which requires libglpk
70AC_ARG_WITH([trace-sync],
71 AS_HELP_STRING([--with-trace-sync],
72 [support trace synchronization accuracy calculation (needs libglpk) [default=no]]),
73 [with_trace_sync="$withval"],
74 [with_trace_sync="no"])
75
76AS_IF([test "x$with_trace_sync" = "xyes"],[
77 AC_CHECK_LIB([glpk], [glp_create_prob], [], [
78 AC_MSG_ERROR([The trace synchronization feature requires libglpk, please install it first.])
79 ])
80 AC_DEFINE([HAVE_LIBGLPK], [1], [Define if you have libglpk]),
81])
82
83
84# Checks for header files.
85AC_HEADER_STDC
86AC_CHECK_HEADERS([fcntl.h stdlib.h string.h sys/time.h unistd.h pthread.h])
87
88
89# If we want the gui, we need additionnal flags for GTK
90AS_IF([test "x$with_lttv_gui" = "xyes"],[
91 pkg_modules="gtk+-2.0 >= 2.0.0"
92 PKG_CHECK_MODULES(PACKAGE, [$pkg_modules])
93])
94
95pkg_modules="gmodule-2.0 >= 2.0.0"
96PKG_CHECK_MODULES(GMODULE, [$pkg_modules])
97
98pkg_modules="gobject-2.0 >= 2.0.0"
99PKG_CHECK_MODULES(GOBJECT, [$pkg_modules])
100
101PKG_CHECK_MODULES(BABELTRACE, [babeltrace >= 1.1.0], [],
102 [AC_CHECK_LIB([babeltrace], [bt_context_create], [],
103 [AC_MSG_ERROR([Cannot find the babeltrace library.])]
104 )
105
106# Check for libbabeltrace-ctf
107AC_CHECK_LIB([babeltrace-ctf], [bt_ctf_iter_create], [],
108 [AC_MSG_ERROR([Cannot find the babeltrace-ctf library.])]
109 )
110])
111
112AC_CHECK_LIB([babeltrace], [bt_iter_equals_pos],
113 [AC_DEFINE([HAVE_BT_ITER_EQUALS_POS],[],[Have equal function])], [])
114
115AC_CHECK_LIB([babeltrace-ctf], [bt_ctf_event_name],
116 [], [AC_MSG_ERROR([libbabeltrace-ctf is required in order to compile LTTV])])
117
118LIBS="$LIBS $GTK_LIBS $GOBJECT_LIBS $GMODULE_LIBS $BABELTRACE_LIBS"
119PACKAGE_CFLAGS="$GTK_CFLAGS $GOBJECT_CFLAGS $GMODULE_CFLAGS -Wall -Wformat-security"
120
121MODULE_CFLAGS="$PACKAGE_CFLAGS -fvisibility=hidden"
122MODULE_LDFLAGS="-module -avoid-version"
123AC_SUBST([PACKAGE_CFLAGS])
124AC_SUBST(PACKAGE_LIBS)
125AC_SUBST([MODULE_CFLAGS])
126AC_SUBST([MODULE_LDFLAGS])
127
128# Checks for typedefs, structures, and compiler characteristics.
129AC_HEADER_STDBOOL
130AC_C_CONST
131AC_C_INLINE
132AC_TYPE_OFF_T
133AC_TYPE_SIZE_T
134AC_HEADER_TIME
135
136# Checks for library functions.
137AC_FUNC_ERROR_AT_LINE
138AC_FUNC_SELECT_ARGTYPES
139AC_CHECK_FUNCS([select])
140
141AC_ARG_ENABLE(lttvstatic,
142 AS_HELP_STRING([--enable-lttvstatic],
143 [build a statically linked executable [[default=no]]]),
144 [lttvstatic="$enableval"],
145 [lttvstatic="no"])
146AM_CONDITIONAL([LTTVSTATIC], [ test "x$lttvstatic" = "xyes" ] )
147
148lttvlibdir="${libdir}/lttv"
149lttvplugindir="${lttvlibdir}/plugins"
150top_lttvdir="\$(top_srcdir)/lttv"
151top_lttvwindowdir="\$(top_srcdir)/lttv/modules/gui/lttvwindow"
152
153DEFAULT_INCLUDES="-I\$(top_srcdir) -I\$(top_builddir) -I\$(top_lttvdir) -I\$(top_lttvwindowdir)"
154
155lttvincludedir="${includedir}/lttv"
156lttvwindowincludedir="${includedir}/lttvwindow"
157lttctlincludedir="${includedir}/liblttctl"
158
159AC_SUBST(lttvlibdir)
160AC_SUBST(lttvplugindir)
161AC_SUBST(top_lttvdir)
162AC_SUBST(top_lttvwindowdir)
163AC_SUBST(DEFAULT_INCLUDES)
164AC_SUBST(lttvincludedir)
165AC_SUBST(lttvwindowincludedir)
166AC_SUBST(lttctlincludedir)
167
168# ltt/Makefile
169
170AC_CONFIG_FILES([Makefile
171 lttv/Makefile
172 lttv/lttv/Makefile
173 lttv/modules/Makefile
174 lttv/modules/text/Makefile
175 lttv/modules/gui/Makefile
176 lttv/modules/gui/lttvwindow/Makefile
177 lttv/modules/gui/lttvwindow/lttvwindow/Makefile
178 lttv/modules/gui/lttvwindow/pixmaps/Makefile
179 lttv/modules/gui/controlflow/Makefile
180 lttv/modules/gui/detailedevents/Makefile
181 lttv/modules/gui/histogram/Makefile
182 lttv/modules/gui/resourceview/Makefile
183 doc/Makefile
184 doc/developer/Makefile
185 doc/developer/developer_guide/Makefile
186 doc/developer/developer_guide/docbook/Makefile
187 doc/developer/developer_guide/html/Makefile
188 doc/user/Makefile
189 doc/user/user_guide/Makefile
190 doc/user/user_guide/docbook/Makefile
191 doc/user/user_guide/html/Makefile])
192# lttv/lttv/sync/Makefile
193# lttv/modules/gui/interrupts/Makefile
194# lttv/modules/gui/statistics/Makefile
195# lttv/modules/gui/filter/Makefile
196# lttv/modules/gui/tracecontrol/Makefile
197
198
199AC_OUTPUT
200
201# Report on what will be built
202AS_ECHO()
203AS_ECHO("The following components will be built:")
204
205AS_ECHO_N("LTTV command line tool: ")
206AS_IF([test "x$with_lttv" = "xyes"],[AS_ECHO("Enabled")],[AS_ECHO("Disabled")])
207
208AS_ECHO_N("LTTV graphical interface: ")
209AS_IF([test "x$with_lttv_gui" = "xyes"],[AS_ECHO("Enabled")],[AS_ECHO("Disabled")])
210
211AS_ECHO_N("Trace synchronization: ")
212AS_IF([test "x$with_trace_sync" = "xyes"],[AS_ECHO("Enabled")],[AS_ECHO("Disabled")])
213
214AS_ECHO()
215AS_ECHO_N("Statically linked executable: ")
216AS_IF([test "x$lttvstatic" = "xyes"],[AS_ECHO("Yes")],[AS_ECHO("No")])
217
218AS_ECHO()
219AS_ECHO("Type 'make' to build LTTV.")
220
This page took 0.022021 seconds and 4 git commands to generate.