/[pkgs]/devel/CodeAnalyst-gui/ca-configure-libdwarf.patch
ViewVC logotype

Contents of /devel/CodeAnalyst-gui/ca-configure-libdwarf.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download) (as text)
Mon Apr 6 17:12:49 2009 UTC (7 months, 2 weeks ago) by suravee
Branch: MAIN
CVS Tags: F-11-split, F-12-split, CodeAnalyst-gui-2_8_38-12_fc12, CodeAnalyst-gui-2_8_54-17_fc12, CodeAnalyst-gui-2_8_38-11_fc11, CodeAnalyst-gui-2_8_38-11_fc12, CodeAnalyst-gui-2_8_54-18_fc12, CodeAnalyst-gui-2_8_54-19_fc12, CodeAnalyst-gui-2_8_54-16_fc12, CodeAnalyst-gui-2_8_38-13_fc12, CodeAnalyst-gui-2_8_54-14_fc12, CodeAnalyst-gui-2_8_54-20_fc13, CodeAnalyst-gui-2_8_54-15_fc12, HEAD
File MIME type: text/x-patch
- Add patch to enable libdwarf configuration
- Add patch to fix CA splash screen
- configure to use libdwarf
- Bump version number
1 diff -uarN CodeAnalyst-gui-2.8.38/configure.ac CodeAnalyst-gui-2.8.38-libdwarf/configure.ac
2 --- CodeAnalyst-gui-2.8.38/configure.ac 2009-02-19 05:55:00.000000000 -0600
3 +++ CodeAnalyst-gui-2.8.38-libdwarf/configure.ac 2009-04-06 11:27:23.000000000 -0500
4 @@ -1,4 +1,4 @@
5 -#$Id: configure.ac 16162 2009-02-17 18:07:41Z ssuthiku $
6 +#$Id: configure.ac 16431 2009-04-03 20:06:32Z ssuthiku $
7
8 # Process this file with autoconf to produce a configure script
9
10 @@ -46,13 +46,29 @@
11 #Get Oprofile configuration
12 AC_ARG_WITH(oprofile,
13 [ --with-oprofile=DIR absolute location where the Oprofile is installed])
14 -AC_ARG_WITH(oprofile,
15 +AC_ARG_WITH(oprofile-includes,
16 [ --with-oprofile-includes=DIR absolute location where the Oprofile includes are])
17 -AC_ARG_WITH(oprofile,
18 +AC_ARG_WITH(oprofile-libraries,
19 [ --with-oprofile-libraries=DIR absolute location where the Oprofile libraries are])
20 -AC_ARG_WITH(oprofile,
21 +AC_ARG_WITH(oprofile-source,
22 [ --with-oprofile-source=DIR absolute location where the Oprofile source code is])
23
24 +#Get libdwarf configuration
25 +AC_ARG_WITH(libdwarf-includes,
26 + [ --with-libdwarf-includes=DIR absolute location where the libdwarf includes are])
27 +AC_ARG_WITH(libdwarf-libraries,
28 + [ --with-libdwarf-libraries=DIR absolute location where the libdwarf libraries are])
29 +
30 +# Disable dwarf library
31 +AC_ARG_ENABLE(dwarf,
32 + [ --disable-dwarf disable usage of Dwarf Library (default is enabled)],
33 + enable_dwarf=$enableval,
34 + enable_dwarf=yes)
35 +AM_CONDITIONAL(enable_dwarf, test "$enable_dwarf" = yes)
36 +if test "$enable_dwarf" = "yes"; then
37 + AC_DEFINE_UNQUOTED(ENABLE_DWARF,1, [Enable dwarf-symbol-engine])
38 +fi
39 +
40 #Turn on debug
41 AC_ARG_ENABLE(debug,
42 [ --enable-debug Turn on debugging],
43 @@ -77,11 +93,11 @@
44
45 AC_DEFINE_UNQUOTED([DEBUGDIR], "$debugdir", [Directory with separate debug info files])
46
47 -dnl disable -Werr flag
48 +dnl enable -Werr flag
49 AC_ARG_ENABLE(werror,
50 - [ --disable-werror disable -Werror flag (default is enabled for non-release)],
51 + [ --enable-werror enable -Werror flag (default is disabled)],
52 enable_werror=$enableval,
53 - enable_werror=yes)
54 + enable_werror=no)
55
56 dnl disable-optimization flag
57 AC_ARG_ENABLE(optimization,
58 @@ -89,16 +105,6 @@
59 enable_optimization=$enableval,
60 enable_optimization=yes)
61
62 -# Disable dwarf library
63 -AC_ARG_ENABLE(dwarf,
64 - [ --disable-dwarf disable usage of Dwarf Library (default is enabled)],
65 - enable_dwarf=$enableval,
66 - enable_dwarf=yes)
67 -AM_CONDITIONAL(enable_dwarf, test "$enable_dwarf" = yes)
68 -if test "$enable_dwarf" = "yes"; then
69 - AC_DEFINE_UNQUOTED(ENABLE_DWARF,1, [Enable dwarf-symbol-engine])
70 -fi
71 -
72 # Enable Oprofile XML library
73 AC_ARG_ENABLE(oprofile-lib,
74 [ --disable-oprofile-lib disable usage of Oprofile Library (default is enabled)],
75 @@ -181,21 +187,19 @@
76 ELF_LIB="-l$ELF"; AC_SUBST(ELF_LIB),
77 ELF_LIB=""; AC_MSG_ERROR([libelf liberary not found]))
78
79 +LIBS="$ELF_LIB $LIBS"
80 +
81 dnl check for popt
82 AC_CHECK_LIB(popt, poptGetContext,
83 POPT_LIB="-lpopt"; AC_SUBST(POPT_LIB),
84 POPT_LIB=""; AC_MSG_ERROR([popt library not found]))
85 +LIBS="$POPT_LIB $LIBS"
86
87 dnl check for dl
88 AC_CHECK_LIB(dl, dlopen,
89 DL_LIB="-ldl",
90 DL_LIB=""; AC_MSG_ERROR([dl library not found]))
91 -
92 -dnl check for bfd
93 -CHECK_LBFD
94 -AC_CHECK_LIB($BFD, bfd_openr,
95 - BFD_LIB="-l$BFD"; AC_SUBST(BFD_LIB),
96 - BFD_LIB=""; AC_MSG_ERROR([bfd_openr bfd library not found]))
97 +LIBS="$DL_LIB $LIBS"
98
99 dnl some distro have a libiberty.a but does not have a libiberty.h
100 AC_CHECK_HEADERS(libiberty.h,,AC_MSG_ERROR([libiberth.h not found]))
101 @@ -204,7 +208,25 @@
102 AC_CHECK_LIB(iberty, cplus_demangle,
103 IBERTY_LIB="-liberty";AC_SUBST(IBERTY_LIB),
104 IBERTY_LIB=""; AC_MSG_ERROR([liberty library not found])))
105 -LIBS="$ELF_LIB $POPT_LIB $DL_LIB $BFD_LIB $IBERTY_LIB"
106 +LIBS="$IBERTY_LIB $LIBS"
107 +
108 +dnl check for dl (needed by libbfd)
109 +AC_CHECK_LIB(z, compress,
110 + Z_LIB="-lz"; AC_SUBST(Z_LIB),
111 + Z_LIB=""; [AC_MSG_ERROR([libz library not found; required by libbfd])])
112 +LIBS="$Z_LIB $LIBS"
113 +
114 +dnl check for libbfd
115 +#AC_CHECK_LIB(bfd, bfd_fdopenr,
116 +# BFD_LIB="-lbfd"; AC_SUBST(BFD_LIB),
117 +# [AC_MSG_ERROR([bfd library not found])])
118 +CHECK_LBFD
119 +AC_CHECK_LIB($BFD, bfd_openr,
120 + BFD_LIB="-l$BFD"; AC_SUBST(BFD_LIB),
121 + BFD_LIB=""; AC_MSG_ERROR([bfd_openr bfd library not found]))
122 +
123 +LIBS="$BFD_LIB $LIBS"
124 +
125 ORIG_SAVE_LIBS="$LIBS"
126
127 dnl Check for X Window stuff
128 @@ -266,9 +288,10 @@
129 AX_CFLAGS_OPTION(CA_CFLAGS,[-DCA_ENABLE_DEBUG])
130 fi
131
132 -if test "$enable_werror" = yes; then
133 +if test "$enable_werror" = "yes"; then
134 # enable -Werror for non-release versions.
135 - if ls `pwd` | grep .svn >/dev/null; then
136 + ls `pwd`/.svn > /dev/null
137 + if test "$?" = "0" ; then
138 AX_CFLAGS_OPTION(CA_CFLAGS,[-Werror])
139 fi
140 fi
141 @@ -282,12 +305,13 @@
142 AX_CXXFLAGS_OPTION(CA_CXXFLAGS,[-ftemplate-depth-50])
143 AX_CXXFLAGS_OPTION(CA_CXXFLAGS,[-fPIC])
144 if test x$debug = xtrue; then
145 - AX_CFLAGS_OPTION(CA_CXXFLAGS,[-DCA_ENABLE_DEBUG])
146 + AX_CXXFLAGS_OPTION(CA_CXXFLAGS,[-DCA_ENABLE_DEBUG])
147 fi
148
149 -if test "$enable_werror" = yes; then
150 +if test "$enable_werror" = "yes"; then
151 # enable -Werror for non-release versions.
152 - if ls `pwd` | grep .svn >/dev/null; then
153 + ls `pwd`/.svn > /dev/null
154 + if test "$?" = "0" ; then
155 AX_CXXFLAGS_OPTION(CA_CXXFLAGS,[-Werror])
156 fi
157 fi
158 @@ -325,11 +349,37 @@
159 fi
160 my_bindir="$my_exec_prefix/bin"
161
162 -CA_DATA_DIR=`eval echo "$my_datadir/codeanalyst/"`
163 +CA_DATA_DIR="$my_datadir/codeanalyst/"
164 AC_DEFINE_DIR(CA_DATA_DIR, CA_DATA_DIR,[Defines the data directory])
165 AC_DEFINE_DIR(CA_BIN_DIR, bindir, [Defines the binary directory])
166 AC_DEFINE_DIR(CA_SBIN_DIR, sbindir, [Defines the super-user binary directory])
167
168 +############################################
169 +# Setup for libdwarf
170 +############################################
171 +
172 +dnl Check with_libdwarf_includes
173 +if test "$with_libdwarf_includes" != "" ; then
174 + LIBDWARF_INC="-I $with_libdwarf_includes"
175 +fi
176 +
177 +dnl Check with_libdwarf_libraries
178 +if test "$with_libdwarf_libraries" != "" ; then
179 + LIBDWARF_LIB="$with_libdwarf_libraries"
180 +fi
181 +
182 +if test "$LIBDWARF_INC" = "" ; then
183 +if test "$LIBDWARF_LIB" = "" ; then
184 + echo "---------- Begin Setup for libdwarf ----------"
185 + CA_LIBDWARF_CONFIG()
186 + if test "$LIBDWARF_DIR" != "" ; then
187 + LIBDWARF_INC="-I $LIBDWARF_DIR"
188 + LIBDWARF_LIB="$LIBDWARF_DIR"
189 + fi
190 + echo "---------- Finish Setup for libdwarf ----------"
191 +fi fi
192 +AC_SUBST(LIBDWARF_INC)
193 +AC_SUBST(LIBDWARF_LIB)
194
195 ############################################
196 # Setup for Oprofile
197 @@ -338,7 +388,7 @@
198
199 dnl Check with_oprofile
200 if test ! -z $with_oprofile; then
201 - OPINST=`eval echo "$with_oprofile"`
202 + OPINST="$with_oprofile"
203
204 # TODO: check where the default bin should be
205 OPBIN=$OPINST/bin
206 @@ -352,18 +402,17 @@
207
208 dnl Check with_oprofile_includes
209 if test ! -z $with_oprofile_includes; then
210 - OPINC=`eval echo "$with_oprofile_includes/"`
211 + OPINC="$with_oprofile_includes/"
212 fi
213
214 -
215 dnl Check with_oprofile_libraries
216 if test ! -z $with_oprofile_libraries; then
217 - OPLIB=`eval echo "$with_oprofile_libraries/"`
218 + OPLIB="$with_oprofile_libraries/"
219 fi
220
221 dnl Check with_oprofile_bin
222 if test ! -z $with_oprofile_bin; then
223 - OPBIN=`eval echo "$with_oprofile_bin/"`
224 + OPBIN="$with_oprofile_bin/"
225 AC_SUBST(OPBIN)
226 fi
227
228 @@ -401,7 +450,7 @@
229
230 dnl Setup oprofile src dir
231 if test ! -z $with_oprofile_source ; then
232 - OPSRC=`eval echo "$with_oprofile_source/"`
233 + OPSRC="$with_oprofile_source/"
234 AC_SUBST(OPSRC)
235 CHECK_OPROFILE_CONFIG($OPSRC)
236 fi
237 diff -uarN CodeAnalyst-gui-2.8.38/m4/calibdwarfconfig.m4 CodeAnalyst-gui-2.8.38-libdwarf/m4/calibdwarfconfig.m4
238 --- CodeAnalyst-gui-2.8.38/m4/calibdwarfconfig.m4 1969-12-31 18:00:00.000000000 -0600
239 +++ CodeAnalyst-gui-2.8.38-libdwarf/m4/calibdwarfconfig.m4 2009-04-04 10:41:01.000000000 -0500
240 @@ -0,0 +1,16 @@
241 +AC_DEFUN([CA_LIBDWARF_CONFIG],
242 +[
243 + dnl Check for configure
244 + echo "... Configuring libdwarf"
245 + test -f "src/dwarf-20090217/libdwarf/configure"
246 + if test "$?" = "0" ; then
247 + pushd src/dwarf-20090217/libdwarf/
248 + echo "... running src/dwarf-20090217/libdwarf/configure"
249 + ./configure --prefix=$prefix --libdir=$libdir --enable-shared CFLAGS=-fPIC
250 + LIBDWARF_DIR=${topdir}/src/dwarf-20090217/libdwarf/
251 + AC_SUBST(LIBDWARF_DIR)
252 + popd
253 + fi
254 +
255 +])
256 +
257 diff -uarN CodeAnalyst-gui-2.8.38/src/ca/diffgui/Makefile.am CodeAnalyst-gui-2.8.38-libdwarf/src/ca/diffgui/Makefile.am
258 --- CodeAnalyst-gui-2.8.38/src/ca/diffgui/Makefile.am 2009-04-04 13:12:03.000000000 -0500
259 +++ CodeAnalyst-gui-2.8.38-libdwarf/src/ca/diffgui/Makefile.am 2009-04-04 10:42:05.000000000 -0500
260 @@ -68,7 +68,7 @@
261 DiffAnalyst_LDADD= \
262 ${top_srcdir}/${CADIR}/libs/libca/libCA.la \
263 ${top_srcdir}/${CADIR}/libs/libcabba/libCAbba.la \
264 - ${top_srcdir}/${CADIR}/libs/libdwarf-20070223/lib/${build_cpu}/libdwarf.a \
265 + -L${LIBDWARF_LIB} -ldwarf \
266 ${top_srcdir}/${CADIR}/libs/liboutput/lib_tbp_output.la \
267 ${op_libs} \
268 @QT_LIB@ \
269 diff -uarN CodeAnalyst-gui-2.8.38/src/ca/gui/Makefile.am CodeAnalyst-gui-2.8.38-libdwarf/src/ca/gui/Makefile.am
270 --- CodeAnalyst-gui-2.8.38/src/ca/gui/Makefile.am 2009-04-04 13:12:03.000000000 -0500
271 +++ CodeAnalyst-gui-2.8.38-libdwarf/src/ca/gui/Makefile.am 2009-04-04 10:42:17.000000000 -0500
272 @@ -174,7 +174,7 @@
273 CodeAnalyst_LDADD= \
274 ${top_srcdir}/${CADIR}/libs/libcabba/libCAbba.la \
275 ${top_srcdir}/${CADIR}/libs/libca/libCA.la \
276 - ${top_srcdir}/${CADIR}/libs/libdwarf-20070223/lib/${build_cpu}/libdwarf.a \
277 + -L${LIBDWARF_LIB} -ldwarf \
278 ${top_srcdir}/${CADIR}/libs/libopdata/libopdata.la \
279 ${top_srcdir}/${CADIR}/libs/liboutput/lib_tbp_output.la \
280 ${op_libs} \
281 diff -uarN CodeAnalyst-gui-2.8.38/src/ca/libs/libca/Makefile.am CodeAnalyst-gui-2.8.38-libdwarf/src/ca/libs/libca/Makefile.am
282 --- CodeAnalyst-gui-2.8.38/src/ca/libs/libca/Makefile.am 2009-02-12 12:06:37.000000000 -0600
283 +++ CodeAnalyst-gui-2.8.38-libdwarf/src/ca/libs/libca/Makefile.am 2009-04-06 10:41:36.000000000 -0500
284 @@ -12,8 +12,8 @@
285 AM_CPPFLAGS= \
286 @QT_INCLUDES@ \
287 ${op_includes} \
288 + ${LIBDWARF_INC} \
289 -I ../../include \
290 - -I ../libdwarf-20070223/include/ \
291 -I /usr/include/libelf \
292 -I ../libopdata \
293 -I ../liboutput \
294 @@ -35,7 +35,7 @@
295 if enable_dwarf
296 libCA_la_LIBADD = \
297 ${op_libs} \
298 - ${top_srcdir}/${CADIR}/libs/libdwarf-20070223/lib/${build_cpu}/libdwarf.a \
299 + -L${LIBDWARF_LIB} -ldwarf \
300 ${top_srcdir}/${CADIR}/libs/liboutput/lib_tbp_output.la \
301 ${top_srcdir}/${CADIR}/libs/libopdata/libopdata.la
302
303 diff -uarN CodeAnalyst-gui-2.8.38/src/ca/libs/libcabba/Makefile.am CodeAnalyst-gui-2.8.38-libdwarf/src/ca/libs/libcabba/Makefile.am
304 --- CodeAnalyst-gui-2.8.38/src/ca/libs/libcabba/Makefile.am 2009-04-04 13:12:03.000000000 -0500
305 +++ CodeAnalyst-gui-2.8.38-libdwarf/src/ca/libs/libcabba/Makefile.am 2009-04-04 17:24:46.000000000 -0500
306 @@ -7,8 +7,8 @@
307 # bbatest
308
309 INCLUDES = \
310 - -I ../libdwarf-20070223/include/ \
311 - -I /usr/include/libelf
312 + ${LIBDWARF_INC} \
313 + -I /usr/include/libelf
314
315 AM_CPPFLAGS = $(INCLUDES) $(FLAG64)\
316 -pipe -Wno-unused -Wno-parentheses ${CA_CXXFLAGS}
317 @@ -16,7 +16,7 @@
318 libCAbba_la_LDFLAGS = -Wl -fPIC --no-undefined -version-number ${libVersion}
319
320 if enable_dwarf
321 -libCAbba_la_LIBADD = ../libdwarf-20070223/lib/${build_cpu}/libdwarf.a
322 +libCAbba_la_LIBADD = -L${LIBDWARF_LIB} -ldwarf
323 else
324 libCAbba_la_LIBADD =
325 endif
326 diff -uarN CodeAnalyst-gui-2.8.38/src/Makefile.am CodeAnalyst-gui-2.8.38-libdwarf/src/Makefile.am
327 --- CodeAnalyst-gui-2.8.38/src/Makefile.am 2009-01-29 00:48:12.000000000 -0600
328 +++ CodeAnalyst-gui-2.8.38-libdwarf/src/Makefile.am 2009-04-04 10:41:45.000000000 -0500
329 @@ -1,4 +1,19 @@
330 SUBDIRS = \
331 + $(LIBDWARF_DIR) \
332 $(CA_OPROFILE_DIR) \
333 ca
334
335 +install-exec-hook:
336 + @if test -e "${LIBDWARF_DIR}libdwarf.so"; then \
337 + install -pD -m 755 ${LIBDWARF_DIR}libdwarf.so $(DESTDIR)$(prefix)/lib/libdwarf.so ; \
338 + ldconfig ;\
339 + fi
340 +
341 +uninstall-hook:
342 + @if test -e "${LIBDWARF_DIR}libdwarf.so"; then \
343 + if test -e "$(DESTDIR)$(prefix)/lib/libdwarf.so"; then \
344 + rm -f $(DESTDIR)$(prefix)/lib/libdwarf.so ; \
345 + ldconfig ; \
346 + fi ; \
347 + fi
348 +

admin@fedoraproject.org
ViewVC Help
Powered by ViewVC 1.1.2