Remove some duplicate code in the build system
[lttv.git] / configure.in
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
23 AC_PREREQ(2.57)
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)
28 AM_PROG_LIBTOOL
29
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)
31
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)
33
34 AC_PATH_PROGS(BASH, bash)
35
36 AC_SYS_LARGEFILE
37
38 # Checks for programs.
39 AC_PROG_CC
40
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.]) )
44
45 AC_CHECK_LIB([util], [forkpty], UTIL_LIBS="-lutil", AC_MSG_ERROR([libutil is
46 required in order to compile LinuxTraceToolkit]))
47
48
49 # pthread for gdb with dlopen().
50 AC_CHECK_LIB(pthread, pthread_join,[THREAD_LIBS="-lpthread"], AC_MSG_ERROR([LinuxThreads is required in order to make sure gdb works fine with lttv-gui]))
51
52 # Checks for header files.
53 AC_HEADER_STDC
54 AC_CHECK_HEADERS([fcntl.h stdlib.h string.h sys/time.h unistd.h pthread.h])
55
56 AC_ISC_POSIX
57 AC_PROG_CC
58 AM_PROG_CC_STDC
59 AC_HEADER_STDC
60
61 pkg_modules="gtk+-2.0 >= 2.0.0"
62 PKG_CHECK_MODULES(PACKAGE, [$pkg_modules])
63
64 PACKAGE_CFLAGS="$PACKAGE_CFLAGS -Wall -Wformat"
65 MODULE_CFLAGS="$PACKAGE_CFLAGS -fvisibility=hidden"
66 MODULE_LDFLAGS="-module -avoid-version"
67 AC_SUBST([PACKAGE_CFLAGS])
68 AC_SUBST([MODULE_CFLAGS])
69 AC_SUBST([MODULE_LDFLAGS])
70
71 # Checks for typedefs, structures, and compiler characteristics.
72 AC_HEADER_STDBOOL
73 AC_C_CONST
74 AC_C_INLINE
75 AC_TYPE_OFF_T
76 AC_TYPE_SIZE_T
77 AC_HEADER_TIME
78
79 # Checks for library functions.
80 AC_FUNC_ERROR_AT_LINE
81 #AC_FUNC_MALLOC
82 AC_FUNC_SELECT_ARGTYPES
83 AC_CHECK_FUNCS([select])
84
85 #CPPFLAGS="$CPPFLAGS -I"
86
87 AM_CONDITIONAL(LTTVSTATIC, test "$enable_lttvstatic" = yes)
88 lttvlibdir="${libdir}/lttv"
89 lttvplugindir="${lttvlibdir}/plugins"
90 #lttlibdir="${libdir}/ltt"
91 top_lttvdir="\$(top_srcdir)/lttv"
92 top_lttvwindowdir="\$(top_srcdir)/lttv/modules/gui/lttvwindow"
93
94 DEFAULT_INCLUDES="-I\$(top_srcdir) -I\$(top_builddir) -I\$(top_lttvdir) -I\$(top_lttvwindowdir)"
95
96 lttincludedir="${includedir}/ltt"
97 lttvincludedir="${includedir}/lttv"
98 lttvwindowincludedir="${includedir}/lttvwindow"
99 lttctlincludedir="${includedir}/liblttctl"
100
101 AC_SUBST(POPT_LIBS)
102 AC_SUBST(UTIL_LIBS)
103 AC_SUBST(THREAD_LIBS)
104 AC_SUBST(lttvlibdir)
105 AC_SUBST(lttvplugindir)
106 #AC_SUBST(lttlibdir)
107 AC_SUBST(top_lttvdir)
108 AC_SUBST(top_lttvwindowdir)
109 AC_SUBST(DEFAULT_INCLUDES)
110 AC_SUBST(lttincludedir)
111 AC_SUBST(lttvincludedir)
112 AC_SUBST(lttvwindowincludedir)
113 AC_SUBST(lttctlincludedir)
114
115 #lttv/modules/gui/tutorial/Makefile
116 #lttv/modules/gui/diskperformance/Makefile
117 AC_CONFIG_FILES([Makefile
118 lttv/Makefile
119 lttv/lttv/Makefile
120 lttv/modules/Makefile
121 lttv/modules/text/Makefile
122 lttv/modules/gui/Makefile
123 lttv/modules/gui/lttvwindow/Makefile
124 lttv/modules/gui/interrupts/Makefile
125 lttv/modules/gui/lttvwindow/lttvwindow/Makefile
126 lttv/modules/gui/lttvwindow/pixmaps/Makefile
127 lttv/modules/gui/controlflow/Makefile
128 lttv/modules/gui/detailedevents/Makefile
129 lttv/modules/gui/statistics/Makefile
130 lttv/modules/gui/histogram/Makefile
131 lttv/modules/gui/filter/Makefile
132 lttv/modules/gui/tracecontrol/Makefile
133 lttv/modules/gui/resourceview/Makefile
134 ltt/Makefile
135 doc/Makefile
136 doc/developer/Makefile
137 doc/developer/developer_guide/Makefile
138 doc/developer/developer_guide/docbook/Makefile
139 doc/developer/developer_guide/html/Makefile
140 doc/user/Makefile
141 doc/user/user_guide/Makefile
142 doc/user/user_guide/docbook/Makefile
143 doc/user/user_guide/html/Makefile])
144 AC_OUTPUT
This page took 0.032536 seconds and 4 git commands to generate.