Commit | Line | Data |
---|---|---|
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 | ||
23 | AC_PREREQ(2.57) | |
24 | AC_INIT(FULL-PACKAGE-NAME, VERSION, BUG-REPORT-ADDRESS) | |
b0f606e9 | 25 | #AC_WITH_LTDL # not needed ? |
1a0282fc | 26 | AM_INIT_AUTOMAKE(lttv,0.12.17-01072009) |
b445142a | 27 | AM_CONFIG_HEADER(config.h) |
39407106 | 28 | AM_PROG_LIBTOOL |
b00eda44 | 29 | |
68d52dcc WB |
30 | # If requested, only build LTT library part |
31 | AC_ARG_WITH(liblttvtraceread-only, [ --with-liblttvtraceread-only Do not build any LTT ui, only compile the trace reading library]) | |
32 | if test -z "$with_liblttvtraceread_only"; then | |
33 | with_liblttvtraceread_only=${with_liblttvtraceread_only_default-no} | |
34 | else | |
35 | # Requesting lib-only turn off the lttv-gui building as well | |
36 | enable_lttv_gui="no" | |
37 | fi | |
38 | AM_CONDITIONAL(BUILD_LIB_ONLY, test "$with_liblttvtraceread_only" = "yes") | |
39 | ||
40 | ||
41 | # If requested, avoid building LLTv part | |
42 | AC_ARG_ENABLE(lttv-gui, | |
43 | [ --disable-lttv-gui Do not build LTTv gui, only build textmode LTTv]) | |
44 | ||
45 | if test -z "$enable_lttv_gui"; then | |
46 | enable_lttv_gui=${enable_lttv_gui_default-yes} | |
47 | fi | |
48 | AM_CONDITIONAL(BUILD_LTTV_GUI, test "$enable_lttv_gui" = "yes") | |
49 | ||
b37f012b | 50 | 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) |
9f14a497 | 51 | |
68d52dcc WB |
52 | # GTK is only needed by the GUI |
53 | if test "$enable_lttv_gui" = "yes" ; then | |
54 | 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) | |
55 | fi | |
442137a6 | 56 | |
065f8f41 | 57 | AC_PATH_PROGS(BASH, bash) |
58 | ||
ddd2aaff | 59 | AC_SYS_LARGEFILE |
60 | ||
9f14a497 | 61 | # Checks for programs. |
62 | AC_PROG_CC | |
63 | ||
64 | # Checks for libraries. | |
6591c2c3 | 65 | AC_CHECK_LIB([popt], [poptGetNextOpt], POPT_LIBS="-lpopt",AC_MSG_ERROR([libpopt is required in order to compile LinuxTraceToolkit]) ) |
21ff84a0 | 66 | #AC_CHECK_LIB([m], [round], M_LIBS="-lm",AC_MSG_ERROR([Mathematical libraries are missing.]) ) |
0b74aa83 | 67 | |
68d52dcc WB |
68 | AC_CHECK_LIB([util], [forkpty], UTIL_LIBS="-lutil", AC_MSG_ERROR([ |
69 | libutil is required in order to compile LinuxTraceToolkit])) | |
9f14a497 | 70 | |
36ea7706 | 71 | |
750eb11a | 72 | # pthread for gdb with dlopen(). |
3d55af6e | 73 | AC_CHECK_LIB(pthread, pthread_join, [], AC_MSG_ERROR([LinuxThreads is required in order to make sure gdb works fine with lttv-gui])) |
36ea7706 | 74 | |
9f14a497 | 75 | # Checks for header files. |
76 | AC_HEADER_STDC | |
36ea7706 | 77 | AC_CHECK_HEADERS([fcntl.h stdlib.h string.h sys/time.h unistd.h pthread.h]) |
9f14a497 | 78 | |
68d52dcc WB |
79 | # Set compile flags to java include files if given |
80 | AC_ARG_WITH(java_jdk, [ --with-java-jdk=DIR use java jdk from DIR. Ex : $JAVA_HOME.], JAVA_SDK=$withval,) | |
81 | if test $JAVA_SDK; then | |
82 | if test -d $JAVA_SDK; then | |
83 | AC_MSG_RESULT([using java include in $JAVA_SDK]) | |
84 | SUBDIRS=`find $JAVA_SDK/include -type d` | |
a97fddd2 | 85 | CFLAGS+=" " |
78608bce | 86 | CFLAGS+=`for x in $SUBDIRS; do echo -n "-I$x "; done` |
a97fddd2 | 87 | CFLAGS+=" " |
68d52dcc WB |
88 | else |
89 | AC_MSG_ERROR(Unable to find java include file in $JAVA_JDK) | |
90 | fi | |
91 | fi | |
92 | ||
93 | ||
94 | # Check for JNI header files if requested | |
95 | AC_ARG_ENABLE(jni-interface, | |
96 | [ --enable-jni-interface build JNI interface between C and java. Need java include files. ]) | |
97 | ||
98 | if test -z "$enable_jni_interface"; then | |
99 | enable_jni_interface=${enable_jni_interface_default-no} | |
100 | fi | |
101 | ||
102 | if test "$enable_jni_interface" = "yes"; then | |
103 | AC_CHECK_HEADERS([jni.h],,AC_MSG_ERROR([ | |
104 | missing jni.h | |
105 | Make sure Sun Java or GJC is installed and that this header file exists in the system path. | |
106 | Use --with-java-jdk=DIR flag to point to your java include files or desactivate the JNI interface.])) | |
107 | fi | |
108 | AM_CONDITIONAL(BUILD_JNI_INTERFACE, test "$enable_jni_interface" = "yes") | |
109 | ||
110 | ||
c8faea22 | 111 | AC_ISC_POSIX |
112 | AC_PROG_CC | |
113 | AM_PROG_CC_STDC | |
114 | AC_HEADER_STDC | |
115 | ||
78608bce | 116 | # If we want the gui, we need additionnal flags for GTK |
68d52dcc WB |
117 | if test "$enable_lttv_gui" = "yes" ; then |
118 | pkg_modules="gtk+-2.0 >= 2.0.0" | |
119 | PKG_CHECK_MODULES(PACKAGE, [$pkg_modules]) | |
120 | PACKAGE_CFLAGS="-Wall -Wformat" | |
121 | AC_SUBST(PACKAGE_CFLAGS) | |
122 | AC_SUBST(PACKAGE_LIBS) | |
78608bce WB |
123 | # Else, we still have a dependency on gmodule |
124 | # We will add flags for gmodule alone | |
125 | else | |
126 | pkg_modules="gmodule-2.0 >= 2.0.0" | |
127 | PKG_CHECK_MODULES(GMODULE, [$pkg_modules]) | |
128 | PACKAGE_CFLAGS="-Wall -Wformat" | |
129 | AC_SUBST(PACKAGE_CFLAGS) | |
130 | AC_SUBST(PACKAGE_LIBS) | |
68d52dcc | 131 | fi |
104325ef | 132 | |
3d55af6e BP |
133 | pkg_modules="gobject-2.0 >= 2.0.0" |
134 | PKG_CHECK_MODULES(GOBJECT, [$pkg_modules]) | |
135 | ||
78608bce WB |
136 | LIBS="$LIBS $GTK_LIBS $GOBJECT_LIBS $GMODULE_LIBS" |
137 | PACKAGE_CFLAGS="$GTK_CFLAGS $GOBJECT_CFLAGS $GMODULE_CFLAGS -Wall -Wformat" | |
104325ef BP |
138 | MODULE_CFLAGS="$PACKAGE_CFLAGS -fvisibility=hidden" |
139 | MODULE_LDFLAGS="-module -avoid-version" | |
140 | AC_SUBST([PACKAGE_CFLAGS]) | |
141 | AC_SUBST([MODULE_CFLAGS]) | |
142 | AC_SUBST([MODULE_LDFLAGS]) | |
388a40e9 | 143 | |
9f14a497 | 144 | # Checks for typedefs, structures, and compiler characteristics. |
145 | AC_HEADER_STDBOOL | |
146 | AC_C_CONST | |
147 | AC_C_INLINE | |
148 | AC_TYPE_OFF_T | |
149 | AC_TYPE_SIZE_T | |
150 | AC_HEADER_TIME | |
151 | ||
152 | # Checks for library functions. | |
153 | AC_FUNC_ERROR_AT_LINE | |
f5eafc51 | 154 | #AC_FUNC_MALLOC |
9f14a497 | 155 | AC_FUNC_SELECT_ARGTYPES |
156 | AC_CHECK_FUNCS([select]) | |
157 | ||
158 | #CPPFLAGS="$CPPFLAGS -I" | |
159 | ||
7d3dcbe0 BP |
160 | AC_ARG_ENABLE(lttvstatic, |
161 | AC_HELP_STRING( [--enable-lttvstatic], | |
162 | [Build a statically linked executable @<:@default=no@:>@]), | |
163 | [with_lttvstatic="yes"], | |
164 | [with_lttvstatic="no"]) | |
165 | AM_CONDITIONAL(LTTVSTATIC, test "x$with_lttvstatic" = "xyes") | |
25fba836 | 166 | lttvlibdir="${libdir}/lttv" |
96cbee09 | 167 | lttvplugindir="${lttvlibdir}/plugins" |
6da3640c | 168 | #lttlibdir="${libdir}/ltt" |
0c56e138 | 169 | top_lttvdir="\$(top_srcdir)/lttv" |
13f86ce2 | 170 | top_lttvwindowdir="\$(top_srcdir)/lttv/modules/gui/lttvwindow" |
fc17f7eb | 171 | |
f0d243f7 | 172 | DEFAULT_INCLUDES="-I\$(top_srcdir) -I\$(top_builddir) -I\$(top_lttvdir) -I\$(top_lttvwindowdir)" |
273475ce | 173 | |
d8f124de | 174 | lttincludedir="${includedir}/ltt" |
940dc6d6 | 175 | lttvincludedir="${includedir}/lttv" |
13f86ce2 | 176 | lttvwindowincludedir="${includedir}/lttvwindow" |
5cec0a15 | 177 | lttctlincludedir="${includedir}/liblttctl" |
6591c2c3 | 178 | |
3d55af6e BP |
179 | AC_SUBST([POPT_LIBS]) |
180 | AC_SUBST([UTIL_LIBS]) | |
25fba836 | 181 | AC_SUBST(lttvlibdir) |
6591c2c3 | 182 | AC_SUBST(lttvplugindir) |
6da3640c | 183 | #AC_SUBST(lttlibdir) |
6591c2c3 | 184 | AC_SUBST(top_lttvdir) |
185 | AC_SUBST(top_lttvwindowdir) | |
186 | AC_SUBST(DEFAULT_INCLUDES) | |
187 | AC_SUBST(lttincludedir) | |
188 | AC_SUBST(lttvincludedir) | |
13f86ce2 | 189 | AC_SUBST(lttvwindowincludedir) |
5cec0a15 | 190 | AC_SUBST(lttctlincludedir) |
940dc6d6 | 191 | |
c17abb87 | 192 | #lttv/modules/gui/tutorial/Makefile |
193 | #lttv/modules/gui/diskperformance/Makefile | |
9f14a497 | 194 | AC_CONFIG_FILES([Makefile |
a100e2b7 | 195 | lttv/Makefile |
d8f124de | 196 | lttv/lttv/Makefile |
830eba15 | 197 | lttv/modules/Makefile |
0e9ba239 | 198 | lttv/modules/text/Makefile |
6ebfde5e | 199 | lttv/modules/gui/Makefile |
2864f4c5 | 200 | lttv/modules/gui/lttvwindow/Makefile |
a246c5e3 | 201 | lttv/modules/gui/interrupts/Makefile |
13f86ce2 | 202 | lttv/modules/gui/lttvwindow/lttvwindow/Makefile |
2864f4c5 | 203 | lttv/modules/gui/lttvwindow/pixmaps/Makefile |
88feb618 | 204 | lttv/modules/gui/controlflow/Makefile |
205 | lttv/modules/gui/detailedevents/Makefile | |
206 | lttv/modules/gui/statistics/Makefile | |
1684ba2e | 207 | lttv/modules/gui/histogram/Makefile |
fcc08e1e | 208 | lttv/modules/gui/filter/Makefile |
209 | lttv/modules/gui/tracecontrol/Makefile | |
c4e6f4dc | 210 | lttv/modules/gui/resourceview/Makefile |
d7b45e73 | 211 | ltt/Makefile |
b1053af5 | 212 | doc/Makefile |
213 | doc/developer/Makefile | |
214 | doc/developer/developer_guide/Makefile | |
215 | doc/developer/developer_guide/docbook/Makefile | |
216 | doc/developer/developer_guide/html/Makefile | |
217 | doc/user/Makefile | |
218 | doc/user/user_guide/Makefile | |
219 | doc/user/user_guide/docbook/Makefile | |
2c0d8f76 | 220 | doc/user/user_guide/html/Makefile]) |
9f14a497 | 221 | AC_OUTPUT |