1 # This file is part of the Linux Trace Toolkit viewer
2 # Copyright (C) 2003-2004 Mathieu Desnoyers
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;
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.
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,
21 # Process this file with autoconf to produce a configure script.
24 AC_INIT(FULL-PACKAGE-NAME, VERSION, BUG-REPORT-ADDRESS)
25 #AC_WITH_LTDL # not needed ?
26 AM_INIT_AUTOMAKE(lttv,0.12.17-01072009)
27 AM_CONFIG_HEADER(config.h)
30 AM_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)
32 AM_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)
34 AC_PATH_PROGS(BASH, bash)
38 # Checks for programs.
41 # Checks for libraries.
42 AC_CHECK_LIB([popt], [poptGetNextOpt], POPT_LIBS="-lpopt",AC_MSG_ERROR([libpopt is required in order to compile LinuxTraceToolkit]) )
43 #AC_CHECK_LIB([m], [round], M_LIBS="-lm",AC_MSG_ERROR([Mathematical libraries are missing.]) )
45 AC_CHECK_LIB([util], [forkpty], UTIL_LIBS="-lutil", AC_MSG_ERROR([libutil is required in order to compile LinuxTraceToolkit]))
48 # pthread for gdb with dlopen().
49 AC_CHECK_LIB(pthread, pthread_join, [], AC_MSG_ERROR([LinuxThreads is required in order to make sure gdb works fine with lttv-gui]))
51 # Checks for header files.
53 AC_CHECK_HEADERS([fcntl.h stdlib.h string.h sys/time.h unistd.h pthread.h])
60 pkg_modules="gtk+-2.0 >= 2.0.0"
61 PKG_CHECK_MODULES(GTK, [$pkg_modules])
63 pkg_modules="gobject-2.0 >= 2.0.0"
64 PKG_CHECK_MODULES(GOBJECT, [$pkg_modules])
66 LIBS="$LIBS $GTK_LIBS $GOBJECT_LIBS"
67 PACKAGE_CFLAGS="$GTK_CFLAGS $GOBJECT_CFLAGS -Wall -Wformat"
68 MODULE_CFLAGS="$PACKAGE_CFLAGS -fvisibility=hidden"
69 MODULE_LDFLAGS="-module -avoid-version"
70 AC_SUBST([PACKAGE_CFLAGS])
71 AC_SUBST([MODULE_CFLAGS])
72 AC_SUBST([MODULE_LDFLAGS])
74 # Checks for typedefs, structures, and compiler characteristics.
82 # Checks for library functions.
85 AC_FUNC_SELECT_ARGTYPES
86 AC_CHECK_FUNCS([select])
88 #CPPFLAGS="$CPPFLAGS -I"
90 AC_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"])
95 AM_CONDITIONAL(LTTVSTATIC, test "x$with_lttvstatic" = "xyes")
96 lttvlibdir="${libdir}/lttv"
97 lttvplugindir="${lttvlibdir}/plugins"
98 #lttlibdir="${libdir}/ltt"
99 top_lttvdir="\$(top_srcdir)/lttv"
100 top_lttvwindowdir="\$(top_srcdir)/lttv/modules/gui/lttvwindow"
102 DEFAULT_INCLUDES="-I\$(top_srcdir) -I\$(top_builddir) -I\$(top_lttvdir) -I\$(top_lttvwindowdir)"
104 lttincludedir="${includedir}/ltt"
105 lttvincludedir="${includedir}/lttv"
106 lttvwindowincludedir="${includedir}/lttvwindow"
107 lttctlincludedir="${includedir}/liblttctl"
109 AC_SUBST([POPT_LIBS])
110 AC_SUBST([UTIL_LIBS])
112 AC_SUBST(lttvplugindir)
114 AC_SUBST(top_lttvdir)
115 AC_SUBST(top_lttvwindowdir)
116 AC_SUBST(DEFAULT_INCLUDES)
117 AC_SUBST(lttincludedir)
118 AC_SUBST(lttvincludedir)
119 AC_SUBST(lttvwindowincludedir)
120 AC_SUBST(lttctlincludedir)
122 #lttv/modules/gui/tutorial/Makefile
123 #lttv/modules/gui/diskperformance/Makefile
124 AC_CONFIG_FILES([Makefile
127 lttv/modules/Makefile
128 lttv/modules/text/Makefile
129 lttv/modules/gui/Makefile
130 lttv/modules/gui/lttvwindow/Makefile
131 lttv/modules/gui/interrupts/Makefile
132 lttv/modules/gui/lttvwindow/lttvwindow/Makefile
133 lttv/modules/gui/lttvwindow/pixmaps/Makefile
134 lttv/modules/gui/controlflow/Makefile
135 lttv/modules/gui/detailedevents/Makefile
136 lttv/modules/gui/statistics/Makefile
137 lttv/modules/gui/histogram/Makefile
138 lttv/modules/gui/filter/Makefile
139 lttv/modules/gui/tracecontrol/Makefile
140 lttv/modules/gui/resourceview/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
148 doc/user/user_guide/Makefile
149 doc/user/user_guide/docbook/Makefile
150 doc/user/user_guide/html/Makefile])