1 Index: gdb-6.8.50.20090302/gdb/event-top.c
2 ===================================================================
3 --- gdb-6.8.50.20090302.orig/gdb/event-top.c 2009-03-07 17:13:33.000000000 +0100
4 +++ gdb-6.8.50.20090302/gdb/event-top.c 2009-03-07 17:25:06.000000000 +0100
6 #include "cli/cli-script.h" /* for reset_command_nest_depth */
11 /* For dont_repeat() */
13 @@ -193,6 +194,8 @@ cli_command_loop (void)
15 char *gdb_prompt = get_prompt ();
17 + debug_flush_missing ();
19 /* Tell readline what the prompt to display is and what function it
20 will need to call after a whole line is read. This also displays
22 @@ -264,6 +267,8 @@ display_gdb_prompt (char *new_prompt)
23 /* Reset the nesting depth used when trace-commands is set. */
24 reset_command_nest_depth ();
26 + debug_flush_missing ();
28 /* Each interpreter has its own rules on displaying the command
30 if (!current_interp_display_prompt_p ())
31 Index: gdb-6.8.50.20090302/gdb/symfile.c
32 ===================================================================
33 --- gdb-6.8.50.20090302.orig/gdb/symfile.c 2009-03-07 17:22:21.000000000 +0100
34 +++ gdb-6.8.50.20090302/gdb/symfile.c 2009-03-07 17:26:47.000000000 +0100
39 +#include "elf/external.h"
41 #include <sys/types.h>
47 +#include <sys/param.h>
50 int (*deprecated_ui_load_progress_hook) (const char *section, unsigned long num);
51 @@ -1684,8 +1686,352 @@ build_id_to_filename (struct build_id *b
57 +#include <rpm/rpmlib.h>
58 +#include <rpm/rpmts.h>
59 +#include <rpm/rpmdb.h>
60 +#include <rpm/header.h>
65 +/* This MISSING_RPM_HASH tracker is used to collect all the missing rpm files
66 + and avoid their duplicities during a single inferior run. */
68 +static struct htab *missing_rpm_hash;
70 +/* This MISSING_RPM_LIST tracker is used to collect and print as a single line
71 + all the rpms right before the nearest GDB prompt. It gets cleared after
72 + each such print (it is questionable if we should clear it after the print).
77 + struct missing_rpm *next;
80 +static struct missing_rpm *missing_rpm_list;
81 +static int missing_rpm_list_entries;
83 +/* Returns the count of newly added rpms. */
86 +missing_rpm_enlist (const char *filename)
88 + static int rpm_init_done = 0;
90 + rpmdbMatchIterator mi;
94 + /* Duplicate here the declarations to verify they match. The same sanity
95 + check is present also in `configure.ac'. */
96 + extern char * headerFormat(Header h, const char * fmt, errmsg_t * errmsg);
97 + static char *(*headerFormat_p) (Header h, const char * fmt, errmsg_t *errmsg);
98 + extern int rpmReadConfigFiles(const char * file, const char * target);
99 + static int (*rpmReadConfigFiles_p) (const char * file, const char * target);
100 + extern rpmdbMatchIterator rpmdbFreeIterator(rpmdbMatchIterator mi);
101 + static rpmdbMatchIterator (*rpmdbFreeIterator_p) (rpmdbMatchIterator mi);
102 + extern Header rpmdbNextIterator(rpmdbMatchIterator mi);
103 + static Header (*rpmdbNextIterator_p) (rpmdbMatchIterator mi);
104 + extern rpmts rpmtsCreate(void);
105 + static rpmts (*rpmtsCreate_p) (void);
106 + extern rpmts rpmtsFree(rpmts ts);
107 + static rpmts (*rpmtsFree_p) (rpmts ts);
108 + extern rpmdbMatchIterator rpmtsInitIterator(const rpmts ts, rpmTag rpmtag,
109 + const void * keyp, size_t keylen);
110 + static rpmdbMatchIterator (*rpmtsInitIterator_p) (const rpmts ts,
114 +#else /* !DLOPEN_LIBRPM */
115 +# define headerFormat_p headerFormat
116 +# define rpmReadConfigFiles_p rpmReadConfigFiles
117 +# define rpmdbFreeIterator_p rpmdbFreeIterator
118 +# define rpmdbNextIterator_p rpmdbNextIterator
119 +# define rpmtsCreate_p rpmtsCreate
120 +# define rpmtsFree_p rpmtsFree
121 +# define rpmtsInitIterator_p rpmtsInitIterator
122 +#endif /* !DLOPEN_LIBRPM */
124 + if (filename == NULL)
127 + if (!rpm_init_done)
129 + static int init_tried;
131 + /* Already failed the initialization before? */
136 +#ifdef DLOPEN_LIBRPM
140 + h = dlopen (DLOPEN_LIBRPM, RTLD_LAZY);
143 + warning (_("Unable to open \"%s\" (%s), "
144 + "missing debuginfos notifications will not be displayed"),
145 + DLOPEN_LIBRPM, dlerror ());
149 + if (!((headerFormat_p = dlsym (h, "headerFormat"))
150 + && (rpmReadConfigFiles_p = dlsym (h, "rpmReadConfigFiles"))
151 + && (rpmdbFreeIterator_p = dlsym (h, "rpmdbFreeIterator"))
152 + && (rpmdbNextIterator_p = dlsym (h, "rpmdbNextIterator"))
153 + && (rpmtsCreate_p = dlsym (h, "rpmtsCreate"))
154 + && (rpmtsFree_p = dlsym (h, "rpmtsFree"))
155 + && (rpmtsInitIterator_p = dlsym (h, "rpmtsInitIterator"))))
157 + warning (_("Opened library \"%s\" is incompatible (%s), "
158 + "missing debuginfos notifications will not be displayed"),
159 + DLOPEN_LIBRPM, dlerror ());
161 + warning (_("Error closing library \"%s\": %s\n"), DLOPEN_LIBRPM,
166 +#endif /* DLOPEN_LIBRPM */
168 + if (rpmReadConfigFiles_p (NULL, NULL) != 0)
170 + warning (_("Error reading the rpm configuration files"));
177 + ts = rpmtsCreate_p ();
179 + mi = rpmtsInitIterator_p (ts, RPMTAG_BASENAMES, filename, 0);
185 + char *debuginfo, **slot, *s, *s2;
187 + size_t srcrpmlen = sizeof (".src.rpm") - 1;
188 + size_t debuginfolen = sizeof ("-debuginfo") - 1;
189 + rpmdbMatchIterator mi_debuginfo;
191 + h = rpmdbNextIterator_p (mi);
195 + /* Verify the debuginfo file is not already installed. */
197 + debuginfo = headerFormat_p (h, "%{sourcerpm}-debuginfo.%{arch}",
201 + warning (_("Error querying the rpm file `%s': %s"), filename,
205 + /* s = `.src.rpm-debuginfo.%{arch}' */
206 + s = strrchr (debuginfo, '-') - srcrpmlen;
208 + if (s > debuginfo && memcmp (s, ".src.rpm", srcrpmlen) == 0)
210 + /* s2 = `-%{release}.src.rpm-debuginfo.%{arch}' */
211 + s2 = memrchr (debuginfo, '-', s - debuginfo);
215 + /* s2 = `-%{version}-%{release}.src.rpm-debuginfo.%{arch}' */
216 + s2 = memrchr (debuginfo, '-', s2 - debuginfo);
220 + warning (_("Error querying the rpm file `%s': %s"), filename,
225 + /* s = `.src.rpm-debuginfo.%{arch}' */
226 + /* s2 = `-%{version}-%{release}.src.rpm-debuginfo.%{arch}' */
227 + memmove (s2 + debuginfolen, s2, s - s2);
228 + memcpy (s2, "-debuginfo", debuginfolen);
229 + /* s = `XXXX.%{arch}' */
230 + /* strlen ("XXXX") == srcrpmlen + debuginfolen */
231 + /* s2 = `-debuginfo-%{version}-%{release}XX.%{arch}' */
232 + /* strlen ("XX") == srcrpmlen */
233 + memmove (s + debuginfolen, s + srcrpmlen + debuginfolen,
234 + strlen (s + srcrpmlen + debuginfolen) + 1);
235 + /* s = `-debuginfo-%{version}-%{release}.%{arch}' */
237 + /* RPMDBI_PACKAGES requires keylen == sizeof (int). */
238 + /* RPMDBI_LABEL is an interface for NVR-based dbiFindByLabel(). */
239 + mi_debuginfo = rpmtsInitIterator_p (ts, RPMDBI_LABEL, debuginfo, 0);
243 + rpmdbFreeIterator_p (mi_debuginfo);
248 + /* The allocated memory gets utilized below for MISSING_RPM_HASH. */
249 + debuginfo = headerFormat_p (h,
250 + "%{name}-%{version}-%{release}.%{arch}",
254 + warning (_("Error querying the rpm file `%s': %s"), filename,
259 + /* Base package name for `debuginfo-install'. We do not use the
260 + `yum' command directly as the line
261 + yum --enablerepo='*-debuginfo' install NAME-debuginfo.ARCH
262 + would be more complicated than just:
263 + debuginfo-install NAME-VERSION-RELEASE.ARCH
264 + Do not supply the rpm base name (derived from .src.rpm name) as
265 + debuginfo-install is unable to install the debuginfo package if
266 + the base name PKG binary rpm is not installed while for example
267 + PKG-libs would be installed (RH Bug 467901).
268 + FUTURE: After multiple debuginfo versions simultaneously installed
269 + get supported the support for the VERSION-RELEASE tags handling
270 + may need an update. */
272 + if (missing_rpm_hash == NULL)
274 + /* DEL_F is passed NULL as MISSING_RPM_LIST's HTAB_DELETE
275 + should not deallocate the entries. */
277 + missing_rpm_hash = htab_create_alloc (64, htab_hash_string,
278 + (int (*) (const void *, const void *)) streq,
279 + NULL, xcalloc, xfree);
281 + slot = (char **) htab_find_slot (missing_rpm_hash, debuginfo, INSERT);
282 + /* XCALLOC never returns NULL. */
283 + gdb_assert (slot != NULL);
286 + struct missing_rpm *missing_rpm;
290 + missing_rpm = xmalloc (sizeof (*missing_rpm) + strlen (debuginfo));
291 + strcpy (missing_rpm->rpm, debuginfo);
292 + missing_rpm->next = missing_rpm_list;
293 + missing_rpm_list = missing_rpm;
294 + missing_rpm_list_entries++;
301 + rpmdbFreeIterator_p (mi);
310 +missing_rpm_list_compar (const char *const *ap, const char *const *bp)
312 + return strcoll (*ap, *bp);
315 +/* It returns a NULL-terminated array of strings needing to be FREEd. It may
316 + also return only NULL. */
319 +missing_rpm_list_print (void)
321 + char **array, **array_iter;
322 + struct missing_rpm *list_iter;
323 + struct cleanup *cleanups;
325 + if (missing_rpm_list_entries == 0)
328 + array = xmalloc (sizeof (*array) * missing_rpm_list_entries);
329 + cleanups = make_cleanup (xfree, array);
331 + array_iter = array;
332 + for (list_iter = missing_rpm_list; list_iter != NULL;
333 + list_iter = list_iter->next)
335 + *array_iter++ = list_iter->rpm;
337 + gdb_assert (array_iter == array + missing_rpm_list_entries);
339 + qsort (array, missing_rpm_list_entries, sizeof (*array),
340 + (int (*) (const void *, const void *)) missing_rpm_list_compar);
342 + printf_unfiltered (_("Missing separate debuginfos, use: %s"),
343 + "debuginfo-install");
344 + for (array_iter = array; array_iter < array + missing_rpm_list_entries;
347 + putchar_unfiltered (' ');
348 + puts_unfiltered (*array_iter);
350 + putchar_unfiltered ('\n');
352 + while (missing_rpm_list != NULL)
354 + list_iter = missing_rpm_list;
355 + missing_rpm_list = list_iter->next;
358 + missing_rpm_list_entries = 0;
360 + do_cleanups (cleanups);
364 +missing_rpm_change (void)
366 + debug_flush_missing ();
368 + gdb_assert (missing_rpm_list == NULL);
369 + if (missing_rpm_hash != NULL)
371 + htab_delete (missing_rpm_hash);
372 + missing_rpm_hash = NULL;
378 + /* Init state. EXEC_BFD also still could be NULL. */
379 + MISSING_EXEC_NOT_TRIED,
380 + /* We saw a non-NULL EXEC_BFD but RPM has no info about it. */
381 + MISSING_EXEC_NOT_FOUND,
382 + /* We found EXEC_BFD by RPM and we either have its symbols (either embedded
383 + or separate) or the main executable's RPM is now contained in
384 + MISSING_RPM_HASH. */
385 + MISSING_EXEC_ENLISTED
387 +static enum missing_exec missing_exec = MISSING_EXEC_NOT_TRIED;
389 +#endif /* HAVE_LIBRPM */
392 +debug_flush_missing (void)
395 + missing_rpm_list_print ();
399 /* This MISSING_FILEPAIR_HASH tracker is used only for the duplicite messages
400 - Try to install the hash file ...
401 + yum --enablerepo='*-debuginfo' install ...
404 struct missing_filepair
405 @@ -1739,11 +2085,17 @@ missing_filepair_change (void)
406 /* All their memory came just from missing_filepair_OBSTACK. */
407 missing_filepair_hash = NULL;
410 + missing_exec = MISSING_EXEC_NOT_TRIED;
415 debug_print_executable_changed (void)
418 + missing_rpm_change ();
420 missing_filepair_change ();
423 @@ -1802,14 +2154,33 @@ debug_print_missing (const char *binary,
425 *slot = missing_filepair;
427 - /* We do not collect and flush these messages as each such message
428 - already requires its own separate lines. */
430 + if (missing_exec == MISSING_EXEC_NOT_TRIED)
432 + char *exec_filename;
434 - fprintf_unfiltered (gdb_stdlog,
435 - _("Missing separate debuginfo for %s\n"), binary);
437 - fprintf_unfiltered (gdb_stdlog, _("Try to install the hash file %s\n"),
439 + exec_filename = get_exec_file (0);
440 + if (exec_filename != NULL)
442 + if (missing_rpm_enlist (exec_filename) == 0)
443 + missing_exec = MISSING_EXEC_NOT_FOUND;
445 + missing_exec = MISSING_EXEC_ENLISTED;
448 + if (missing_exec != MISSING_EXEC_ENLISTED)
449 + if (missing_rpm_enlist (binary) == 0 && missing_rpm_enlist (debug) == 0)
450 +#endif /* HAVE_LIBRPM */
452 + /* We do not collect and flush these messages as each such message
453 + already requires its own separate lines. */
455 + fprintf_unfiltered (gdb_stdlog,
456 + _("Missing separate debuginfo for %s\n"), binary);
458 + fprintf_unfiltered (gdb_stdlog, _("Try: %s %s\n"),
459 + "yum --enablerepo='*-debuginfo' install", debug);
464 Index: gdb-6.8.50.20090302/gdb/symfile.h
465 ===================================================================
466 --- gdb-6.8.50.20090302.orig/gdb/symfile.h 2009-03-07 17:13:33.000000000 +0100
467 +++ gdb-6.8.50.20090302/gdb/symfile.h 2009-03-07 17:25:06.000000000 +0100
468 @@ -378,6 +378,7 @@ extern struct build_id *build_id_addr_ge
469 extern char *build_id_to_filename (struct build_id *build_id,
470 char **link_return, int add_debug_suffix);
471 extern void debug_print_missing (const char *binary, const char *debug);
472 +extern void debug_flush_missing (void);
474 /* From dwarf2read.c */
476 Index: gdb-6.8.50.20090302/gdb/testsuite/lib/gdb.exp
477 ===================================================================
478 --- gdb-6.8.50.20090302.orig/gdb/testsuite/lib/gdb.exp 2009-03-07 17:13:33.000000000 +0100
479 +++ gdb-6.8.50.20090302/gdb/testsuite/lib/gdb.exp 2009-03-07 17:25:06.000000000 +0100
480 @@ -1230,7 +1230,7 @@ proc default_gdb_start { } {
481 warning "Couldn't set the width to 0."
484 - # Turn off the missing warnings as the testsuite does not expect it.
485 + # Turn off the missing RPMs warnings as the testsuite does not expect it.
486 send_gdb "set build-id-verbose 0\n"
488 -re "$gdb_prompt $" {
489 Index: gdb-6.8.50.20090302/gdb/tui/tui-interp.c
490 ===================================================================
491 --- gdb-6.8.50.20090302.orig/gdb/tui/tui-interp.c 2009-03-07 17:13:33.000000000 +0100
492 +++ gdb-6.8.50.20090302/gdb/tui/tui-interp.c 2009-03-07 17:25:06.000000000 +0100
495 #include "tui/tui-io.h"
496 #include "exceptions.h"
497 +#include "symfile.h"
499 /* Set to 1 when the TUI mode must be activated when we first start
501 @@ -128,6 +129,8 @@ tui_command_loop (void *data)
503 char *gdb_prompt = get_prompt ();
505 + debug_flush_missing ();
507 /* Tell readline what the prompt to display is and what function
508 it will need to call after a whole line is read. This also
509 displays the first prompt. */
510 Index: gdb-6.8.50.20090302/gdb/aclocal.m4
511 ===================================================================
512 --- gdb-6.8.50.20090302.orig/gdb/aclocal.m4 2009-03-07 17:13:33.000000000 +0100
513 +++ gdb-6.8.50.20090302/gdb/aclocal.m4 2009-03-07 17:25:06.000000000 +0100
515 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
516 # PARTICULAR PURPOSE.
518 +# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
520 +# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
522 +# This program is free software; you can redistribute it and/or modify
523 +# it under the terms of the GNU General Public License as published by
524 +# the Free Software Foundation; either version 2 of the License, or
525 +# (at your option) any later version.
527 +# This program is distributed in the hope that it will be useful, but
528 +# WITHOUT ANY WARRANTY; without even the implied warranty of
529 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
530 +# General Public License for more details.
532 +# You should have received a copy of the GNU General Public License
533 +# along with this program; if not, write to the Free Software
534 +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
536 +# As a special exception to the GNU General Public License, if you
537 +# distribute this file as part of a program that contains a
538 +# configuration script generated by Autoconf, you may include it under
539 +# the same distribution terms that you use for the rest of that program.
541 +# PKG_PROG_PKG_CONFIG([MIN-VERSION])
542 +# ----------------------------------
543 +AC_DEFUN([PKG_PROG_PKG_CONFIG],
544 +[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
545 +m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
546 +AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
547 +if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
548 + AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
550 +if test -n "$PKG_CONFIG"; then
551 + _pkg_min_version=m4_default([$1], [0.9.0])
552 + AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
553 + if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
554 + AC_MSG_RESULT([yes])
556 + AC_MSG_RESULT([no])
561 +])# PKG_PROG_PKG_CONFIG
563 +# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
565 +# Check to see whether a particular set of modules exists. Similar
566 +# to PKG_CHECK_MODULES(), but does not set variables or print errors.
569 +# Similar to PKG_CHECK_MODULES, make sure that the first instance of
570 +# this or PKG_CHECK_MODULES is called, or make sure to call
571 +# PKG_CHECK_EXISTS manually
572 +# --------------------------------------------------------------
573 +AC_DEFUN([PKG_CHECK_EXISTS],
574 +[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
575 +if test -n "$PKG_CONFIG" && \
576 + AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
577 + m4_ifval([$2], [$2], [:])
578 +m4_ifvaln([$3], [else
583 +# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
584 +# ---------------------------------------------
585 +m4_define([_PKG_CONFIG],
586 +[if test -n "$$1"; then
588 + elif test -n "$PKG_CONFIG"; then
589 + PKG_CHECK_EXISTS([$3],
590 + [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
597 +# _PKG_SHORT_ERRORS_SUPPORTED
598 +# -----------------------------
599 +AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
600 +[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
601 +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
602 + _pkg_short_errors_supported=yes
604 + _pkg_short_errors_supported=no
606 +])# _PKG_SHORT_ERRORS_SUPPORTED
609 +# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
610 +# [ACTION-IF-NOT-FOUND])
613 +# Note that if there is a possibility the first call to
614 +# PKG_CHECK_MODULES might not happen, you should be sure to include an
615 +# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
618 +# --------------------------------------------------------------
619 +AC_DEFUN([PKG_CHECK_MODULES],
620 +[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
621 +AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
622 +AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
625 +AC_MSG_CHECKING([for $1])
627 +_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
628 +_PKG_CONFIG([$1][_LIBS], [libs], [$2])
630 +m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
631 +and $1[]_LIBS to avoid the need to call pkg-config.
632 +See the pkg-config man page for more details.])
634 +if test $pkg_failed = yes; then
635 + _PKG_SHORT_ERRORS_SUPPORTED
636 + if test $_pkg_short_errors_supported = yes; then
637 + $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
639 + $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
641 + # Put the nasty error message in config.log where it belongs
642 + echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
644 + ifelse([$4], , [AC_MSG_ERROR(dnl
645 +[Package requirements ($2) were not met:
649 +Consider adjusting the PKG_CONFIG_PATH environment variable if you
650 +installed software in a non-standard prefix.
654 + [AC_MSG_RESULT([no])
656 +elif test $pkg_failed = untried; then
657 + ifelse([$4], , [AC_MSG_FAILURE(dnl
658 +[The pkg-config script could not be found or is too old. Make sure it
659 +is in your PATH or set the PKG_CONFIG environment variable to the full
664 +To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
667 + $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
668 + $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
669 + AC_MSG_RESULT([yes])
670 + ifelse([$3], , :, [$3])
672 +])# PKG_CHECK_MODULES
674 # Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
676 # This file is free software; the Free Software Foundation
677 @@ -468,6 +624,27 @@ AC_DEFUN([AM_PROG_INSTALL_SH],
678 install_sh=${install_sh-"$am_aux_dir/install-sh"}
679 AC_SUBST(install_sh)])
681 +# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
683 +# This file is free software; the Free Software Foundation
684 +# gives unlimited permission to copy and/or distribute it,
685 +# with or without modifications, as long as this notice is preserved.
689 +# Check whether the underlying file-system supports filenames
690 +# with a leading dot. For instance MS-DOS doesn't.
691 +AC_DEFUN([AM_SET_LEADING_DOT],
692 +[rm -rf .tst 2>/dev/null
693 +mkdir .tst 2>/dev/null
694 +if test -d .tst; then
699 +rmdir .tst 2>/dev/null
700 +AC_SUBST([am__leading_dot])])
702 # Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
705 @@ -868,7 +1045,4 @@ m4_include([gnulib/m4/onceonly_2_57.m4])
706 m4_include([gnulib/m4/stdint.m4])
707 m4_include([gnulib/m4/string_h.m4])
708 m4_include([gnulib/m4/wchar.m4])
709 -m4_include([../config/extensions.m4])
710 -m4_include([../config/lead-dot.m4])
711 -m4_include([../config/proginstall.m4])
712 m4_include([acinclude.m4])
713 Index: gdb-6.8.50.20090302/gdb/config.in
714 ===================================================================
715 --- gdb-6.8.50.20090302.orig/gdb/config.in 2009-03-07 17:13:33.000000000 +0100
716 +++ gdb-6.8.50.20090302/gdb/config.in 2009-03-07 17:25:06.000000000 +0100
718 /* Define to BFD's default target vector. */
719 #undef DEFAULT_BFD_VEC
721 +/* librpm version specific library name to dlopen. */
722 +#undef DLOPEN_LIBRPM
724 /* Define to 1 if translation of program messages to the user's native
725 language is requested. */
728 /* Define if Python 2.6 is being used. */
729 #undef HAVE_LIBPYTHON2_6
731 +/* Define if librpm library is being used. */
734 /* Define if libunwind library is being used. */
735 #undef HAVE_LIBUNWIND
737 Index: gdb-6.8.50.20090302/gdb/configure
738 ===================================================================
739 --- gdb-6.8.50.20090302.orig/gdb/configure 2009-03-07 17:13:33.000000000 +0100
740 +++ gdb-6.8.50.20090302/gdb/configure 2009-03-07 17:25:06.000000000 +0100
741 @@ -314,7 +314,7 @@ ac_subdirs_all="$ac_subdirs_all doc test
742 ac_subdirs_all="$ac_subdirs_all gdbtk"
743 ac_subdirs_all="$ac_subdirs_all multi-ice"
744 ac_subdirs_all="$ac_subdirs_all gdbserver"
745 -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP RANLIB ac_ct_RANLIB build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os am__leading_dot DEPDIR CCDEPMODE MAKE GMAKE_TRUE GMAKE_FALSE SET_MAKE USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS DATADIRNAME INSTOBJEXT GENCAT CATOBJEXT localedir GL_COND_LIBTOOL_TRUE GL_COND_LIBTOOL_FALSE GNULIB_MEMMEM GNULIB_MEMPCPY GNULIB_MEMRCHR GNULIB_STPCPY GNULIB_STPNCPY GNULIB_STRCHRNUL GNULIB_STRDUP GNULIB_STRNDUP GNULIB_STRNLEN GNULIB_STRPBRK GNULIB_STRSEP GNULIB_STRSTR GNULIB_STRCASESTR GNULIB_STRTOK_R GNULIB_MBSLEN GNULIB_MBSNLEN GNULIB_MBSCHR GNULIB_MBSRCHR GNULIB_MBSSTR GNULIB_MBSCASECMP GNULIB_MBSNCASECMP GNULIB_MBSPCASECMP GNULIB_MBSCASESTR GNULIB_MBSCSPN GNULIB_MBSPBRK GNULIB_MBSSPN GNULIB_MBSSEP GNULIB_MBSTOK_R GNULIB_STRERROR GNULIB_STRSIGNAL HAVE_DECL_MEMMEM HAVE_MEMPCPY HAVE_DECL_MEMRCHR HAVE_STPCPY HAVE_STPNCPY HAVE_STRCHRNUL HAVE_DECL_STRDUP HAVE_STRNDUP HAVE_DECL_STRNDUP HAVE_DECL_STRNLEN HAVE_STRPBRK HAVE_STRSEP HAVE_STRCASESTR HAVE_DECL_STRTOK_R HAVE_DECL_STRERROR HAVE_DECL_STRSIGNAL REPLACE_STRERROR REPLACE_STRSIGNAL REPLACE_MEMMEM REPLACE_STRCASESTR REPLACE_STRSTR HAVE_LONG_LONG_INT HAVE_UNSIGNED_LONG_LONG_INT HAVE_INTTYPES_H HAVE_SYS_TYPES_H INCLUDE_NEXT NEXT_STDINT_H HAVE_STDINT_H HAVE_SYS_INTTYPES_H HAVE_SYS_BITYPES_H BITSIZEOF_PTRDIFF_T BITSIZEOF_SIG_ATOMIC_T BITSIZEOF_SIZE_T BITSIZEOF_WCHAR_T BITSIZEOF_WINT_T HAVE_SIGNED_SIG_ATOMIC_T HAVE_SIGNED_WCHAR_T HAVE_SIGNED_WINT_T PTRDIFF_T_SUFFIX SIG_ATOMIC_T_SUFFIX SIZE_T_SUFFIX WCHAR_T_SUFFIX WINT_T_SUFFIX STDINT_H NEXT_STRING_H GNULIB_WCWIDTH HAVE_DECL_WCWIDTH REPLACE_WCWIDTH WCHAR_H HAVE_WCHAR_H NEXT_WCHAR_H LIBGNU_LIBDEPS LIBGNU_LTLIBDEPS GNULIB_STDINT_H PACKAGE INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK AMTAR am__tar am__untar am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH am__fastdepCC_TRUE am__fastdepCC_FALSE GDB_DATADIR_PATH pythondir subdirs TARGET_OBS PKGVERSION REPORT_BUGS_TO REPORT_BUGS_TEXI LN_S YACC AR ac_ct_AR DLLTOOL ac_ct_DLLTOOL WINDRES ac_ct_WINDRES MIG ac_ct_MIG LIBICONV LIBICONV_INCLUDE LIBICONV_LIBDIR READLINE READLINE_DEPS READLINE_CFLAGS HAVE_LIBEXPAT LIBEXPAT LTLIBEXPAT PYTHON_CFLAGS ALLOCA CONFIG_LDFLAGS TARGET_SYSTEM_ROOT TARGET_SYSTEM_ROOT_DEFINE WARN_CFLAGS WERROR_CFLAGS SER_HARDWIRE WIN32LIBS LIBGUI GUI_CFLAGS_X WIN32LDAPP TCL_VERSION TCL_PATCH_LEVEL TCL_BIN_DIR TCL_SRC_DIR TCL_LIB_FILE TCL_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC TCL_INCLUDE TCL_LIBRARY TCL_DEPS TK_VERSION TK_BIN_DIR TK_SRC_DIR TK_LIB_FILE TK_LIB_FLAG TK_LIB_SPEC TK_STUB_LIB_FILE TK_STUB_LIB_FLAG TK_STUB_LIB_SPEC TK_INCLUDE TK_LIBRARY TK_DEPS TK_XINCLUDES X_CFLAGS X_LDFLAGS X_LIBS GDBTKLIBS GDBTK_CFLAGS GDBTK_SRC_DIR SIM SIM_OBS ENABLE_CFLAGS PROFILE_CFLAGS CONFIG_OBS CONFIG_DEPS CONFIG_SRCS CONFIG_ALL CONFIG_CLEAN CONFIG_INSTALL CONFIG_UNINSTALL target_subdir frags nm_h LIBOBJS LTLIBOBJS gl_LIBOBJS gl_LTLIBOBJS gltests_LIBOBJS gltests_LTLIBOBJS'
746 +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP RANLIB ac_ct_RANLIB build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os am__leading_dot DEPDIR CCDEPMODE MAKE GMAKE_TRUE GMAKE_FALSE SET_MAKE USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS DATADIRNAME INSTOBJEXT GENCAT CATOBJEXT localedir GL_COND_LIBTOOL_TRUE GL_COND_LIBTOOL_FALSE GNULIB_MEMMEM GNULIB_MEMPCPY GNULIB_MEMRCHR GNULIB_STPCPY GNULIB_STPNCPY GNULIB_STRCHRNUL GNULIB_STRDUP GNULIB_STRNDUP GNULIB_STRNLEN GNULIB_STRPBRK GNULIB_STRSEP GNULIB_STRSTR GNULIB_STRCASESTR GNULIB_STRTOK_R GNULIB_MBSLEN GNULIB_MBSNLEN GNULIB_MBSCHR GNULIB_MBSRCHR GNULIB_MBSSTR GNULIB_MBSCASECMP GNULIB_MBSNCASECMP GNULIB_MBSPCASECMP GNULIB_MBSCASESTR GNULIB_MBSCSPN GNULIB_MBSPBRK GNULIB_MBSSPN GNULIB_MBSSEP GNULIB_MBSTOK_R GNULIB_STRERROR GNULIB_STRSIGNAL HAVE_DECL_MEMMEM HAVE_MEMPCPY HAVE_DECL_MEMRCHR HAVE_STPCPY HAVE_STPNCPY HAVE_STRCHRNUL HAVE_DECL_STRDUP HAVE_STRNDUP HAVE_DECL_STRNDUP HAVE_DECL_STRNLEN HAVE_STRPBRK HAVE_STRSEP HAVE_STRCASESTR HAVE_DECL_STRTOK_R HAVE_DECL_STRERROR HAVE_DECL_STRSIGNAL REPLACE_STRERROR REPLACE_STRSIGNAL REPLACE_MEMMEM REPLACE_STRCASESTR REPLACE_STRSTR HAVE_LONG_LONG_INT HAVE_UNSIGNED_LONG_LONG_INT HAVE_INTTYPES_H HAVE_SYS_TYPES_H INCLUDE_NEXT NEXT_STDINT_H HAVE_STDINT_H HAVE_SYS_INTTYPES_H HAVE_SYS_BITYPES_H BITSIZEOF_PTRDIFF_T BITSIZEOF_SIG_ATOMIC_T BITSIZEOF_SIZE_T BITSIZEOF_WCHAR_T BITSIZEOF_WINT_T HAVE_SIGNED_SIG_ATOMIC_T HAVE_SIGNED_WCHAR_T HAVE_SIGNED_WINT_T PTRDIFF_T_SUFFIX SIG_ATOMIC_T_SUFFIX SIZE_T_SUFFIX WCHAR_T_SUFFIX WINT_T_SUFFIX STDINT_H NEXT_STRING_H GNULIB_WCWIDTH HAVE_DECL_WCWIDTH REPLACE_WCWIDTH WCHAR_H HAVE_WCHAR_H NEXT_WCHAR_H LIBGNU_LIBDEPS LIBGNU_LTLIBDEPS GNULIB_STDINT_H PACKAGE INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK AMTAR am__tar am__untar am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH am__fastdepCC_TRUE am__fastdepCC_FALSE GDB_DATADIR_PATH pythondir PKG_CONFIG ac_pt_PKG_CONFIG RPM_CFLAGS RPM_LIBS subdirs TARGET_OBS PKGVERSION REPORT_BUGS_TO REPORT_BUGS_TEXI LN_S YACC AR ac_ct_AR DLLTOOL ac_ct_DLLTOOL WINDRES ac_ct_WINDRES MIG ac_ct_MIG LIBICONV LIBICONV_INCLUDE LIBICONV_LIBDIR READLINE READLINE_DEPS READLINE_CFLAGS HAVE_LIBEXPAT LIBEXPAT LTLIBEXPAT PYTHON_CFLAGS ALLOCA CONFIG_LDFLAGS TARGET_SYSTEM_ROOT TARGET_SYSTEM_ROOT_DEFINE WARN_CFLAGS WERROR_CFLAGS SER_HARDWIRE WIN32LIBS LIBGUI GUI_CFLAGS_X WIN32LDAPP TCL_VERSION TCL_PATCH_LEVEL TCL_BIN_DIR TCL_SRC_DIR TCL_LIB_FILE TCL_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC TCL_INCLUDE TCL_LIBRARY TCL_DEPS TK_VERSION TK_BIN_DIR TK_SRC_DIR TK_LIB_FILE TK_LIB_FLAG TK_LIB_SPEC TK_STUB_LIB_FILE TK_STUB_LIB_FLAG TK_STUB_LIB_SPEC TK_INCLUDE TK_LIBRARY TK_DEPS TK_XINCLUDES X_CFLAGS X_LDFLAGS X_LIBS GDBTKLIBS GDBTK_CFLAGS GDBTK_SRC_DIR SIM SIM_OBS ENABLE_CFLAGS PROFILE_CFLAGS CONFIG_OBS CONFIG_DEPS CONFIG_SRCS CONFIG_ALL CONFIG_CLEAN CONFIG_INSTALL CONFIG_UNINSTALL target_subdir frags nm_h LIBOBJS LTLIBOBJS gl_LIBOBJS gl_LTLIBOBJS gltests_LIBOBJS gltests_LTLIBOBJS'
747 ac_subst_files='host_makefile_frag'
750 @@ -776,6 +776,18 @@ ac_env_CPP_set=${CPP+set}
751 ac_env_CPP_value=$CPP
752 ac_cv_env_CPP_set=${CPP+set}
753 ac_cv_env_CPP_value=$CPP
754 +ac_env_PKG_CONFIG_set=${PKG_CONFIG+set}
755 +ac_env_PKG_CONFIG_value=$PKG_CONFIG
756 +ac_cv_env_PKG_CONFIG_set=${PKG_CONFIG+set}
757 +ac_cv_env_PKG_CONFIG_value=$PKG_CONFIG
758 +ac_env_RPM_CFLAGS_set=${RPM_CFLAGS+set}
759 +ac_env_RPM_CFLAGS_value=$RPM_CFLAGS
760 +ac_cv_env_RPM_CFLAGS_set=${RPM_CFLAGS+set}
761 +ac_cv_env_RPM_CFLAGS_value=$RPM_CFLAGS
762 +ac_env_RPM_LIBS_set=${RPM_LIBS+set}
763 +ac_env_RPM_LIBS_value=$RPM_LIBS
764 +ac_cv_env_RPM_LIBS_set=${RPM_LIBS+set}
765 +ac_cv_env_RPM_LIBS_value=$RPM_LIBS
768 # Report the --help message.
769 @@ -886,6 +898,8 @@ Optional Packages:
771 --with-pythondir install Python data files in this path
773 + --with-rpm query rpm database for missing debuginfos
774 + [yes/no,], [def.], [auto=librpm.so]
775 --with-libunwind Use libunwind frame unwinding support
776 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
777 --with-bugurl=URL Direct users to URL to report a bug
778 @@ -913,6 +927,9 @@ Some influential environment variables:
779 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
780 headers in a nonstandard directory <include dir>
782 + PKG_CONFIG path to pkg-config utility
783 + RPM_CFLAGS C compiler flags for RPM, overriding pkg-config
784 + RPM_LIBS linker flags for RPM, overriding pkg-config
786 Use these variables to override the choices made by `configure' or to help
787 it to find libraries and programs with nonstandard names/locations.
788 @@ -6556,7 +6573,6 @@ am__api_version="1.9"
789 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
790 # OS/2's system install, which has a completely different semantic
791 # ./install, which can be erroneously created by make from ./install.sh.
792 -# Reject install programs that cannot install multiple files.
793 echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
794 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
795 if test -z "$INSTALL"; then
796 @@ -6590,18 +6606,8 @@ case $as_dir/ in
797 # program-specific install script used by HP pwplus--don't use.
800 - rm -rf conftest.one conftest.two conftest.dir
801 - echo one > conftest.one
802 - echo two > conftest.two
804 - if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
805 - test -s conftest.one && test -s conftest.two &&
806 - test -s conftest.dir/conftest.one &&
807 - test -s conftest.dir/conftest.two
809 - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
812 + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
817 @@ -6610,16 +6616,15 @@ case $as_dir/ in
821 -rm -rf conftest.one conftest.two conftest.dir
824 if test "${ac_cv_path_install+set}" = set; then
825 INSTALL=$ac_cv_path_install
827 - # As a last resort, use the slow shell script. Don't cache a
828 - # value for INSTALL within a source directory, because that will
829 + # As a last resort, use the slow shell script. We don't cache a
830 + # path for INSTALL within a source directory, because that will
831 # break other packages using the cache if that directory is
832 - # removed, or if the value is a relative name.
833 + # removed, or if the path is relative.
834 INSTALL=$ac_install_sh
837 @@ -7202,6 +7207,559 @@ _ACEOF
841 +# Integration with rpm library to support missing debuginfo suggestions.
842 +# --without-rpm: Disable any rpm support.
843 +# --with-rpm=libname.so: Try to dynamically open `libname.so' during runtime.
844 +# Even with runtime missing `libname.so' GDB will still other run correctly.
845 +# Missing `libname.so' during ./configure will abort the configuration.
846 +# --with-rpm=librpm.so: Like `--with-rpm=libname.so' but try to find specific
847 +# minor version first such as `librpm-4.6.so' as minor version differences
848 +# mean API+ABI incompatibility. If the specific match versioned library name
849 +# could not be found still open dynamically at least `librpm.so'.
850 +# --with-rpm: Like `--with-rpm=librpm.so' but if any of its detection fails try
851 +# to find librpm for compilation-time linking by pkg-config. GDB binary will
852 +# be probably linked with the version specific library (as `librpm-4.6.so').
853 +# Failure to find librpm by pkg-config will abort the configuration.
854 +# (default) --with-rpm=auto: Like `--with-rpm=librpm.so' but if even pkg-config
855 +# cannot find librpm use to the rpmless compilation (like `--without-rpm').
858 +# Check whether --with-rpm or --without-rpm was given.
859 +if test "${with_rpm+set}" = set; then
860 + withval="$with_rpm"
868 +if test "x$with_rpm" != "xno"; then
869 + if test "x$with_rpm" = "xyes"; then
872 + DLOPEN_REQUIRE=false
873 + elif test "x$with_rpm" = "xauto"; then
876 + DLOPEN_REQUIRE=false
880 + DLOPEN_REQUIRE=true
882 + LIBRPM_STRING='"'"$LIBRPM"'"'
884 + echo "$as_me:$LINENO: checking specific librpm version" >&5
885 +echo $ECHO_N "checking specific librpm version... $ECHO_C" >&6
886 + HAVE_DLOPEN_LIBRPM=false
889 + if test "$cross_compiling" = yes; then
890 + { { echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
891 +echo "$as_me: error: in \`$ac_pwd':" >&2;}
892 +{ { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
893 +See \`config.log' for more details." >&5
894 +echo "$as_me: error: cannot run test program while cross compiling
895 +See \`config.log' for more details." >&2;}
896 + { (exit 1); exit 1; }; }; }
898 + cat >conftest.$ac_ext <<_ACEOF
901 +cat confdefs.h >>conftest.$ac_ext
902 +cat >>conftest.$ac_ext <<_ACEOF
903 +/* end confdefs.h. */
905 +#include <rpm/rpmlib.h>
914 + const char *const *rpmverp;
917 + f = fopen ("conftest.out", "w");
920 + fprintf (stderr, "Cannot write \"%s\": %s\n", "conftest.out",
924 + h = dlopen ($LIBRPM_STRING, RTLD_LAZY);
927 + fprintf (stderr, "dlopen (\"%s\"): %s\n", $LIBRPM_STRING, dlerror ());
930 + rpmverp = dlsym (h, "RPMVERSION");
933 + fprintf (stderr, "dlsym (\"RPMVERSION\"): %s\n", dlerror ());
936 + fprintf (stderr, "RPMVERSION is: \"");
937 + fprintf (stderr, "%s\"\n", *rpmverp);
939 + /* Try to find the specific librpm version only for "librpm.so" as we do
940 + not know how to assemble the version string otherwise. */
942 + if (strcmp ("librpm.so", $LIBRPM_STRING) != 0)
944 + fprintf (f, "%s\n", $LIBRPM_STRING);
953 + if (sscanf (*rpmverp, "%d.%d", &major, &minor) != 2)
955 + fprintf (stderr, "Unable to parse RPMVERSION.\n");
956 + fprintf (f, "%s\n", $LIBRPM_STRING);
959 + /* Avoid the square brackets by malloc. */
960 + h2_name = malloc (64);
961 + sprintf (h2_name, "librpm-%d.%d.so", major, minor);
962 + h2 = dlopen (h2_name, RTLD_LAZY);
965 + fprintf (stderr, "dlopen (\"%s\"): %s\n", h2_name, dlerror ());
966 + fprintf (f, "%s\n", $LIBRPM_STRING);
971 + fprintf (stderr, "dlopen of \"%s\" and \"%s\" are different.\n",
972 + $LIBRPM_STRING, h2_name);
973 + fprintf (f, "%s\n", $LIBRPM_STRING);
976 + /* Found the valid .so name with a specific version. */
977 + fprintf (f, "%s\n", h2_name);
985 +rm -f conftest$ac_exeext
986 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
987 + (eval $ac_link) 2>&5
989 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
990 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
991 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
992 + (eval $ac_try) 2>&5
994 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
995 + (exit $ac_status); }; }; then
997 + DLOPEN_LIBRPM="`cat conftest.out`"
998 + if test "x$DLOPEN_LIBRPM" != "x"; then
999 + HAVE_DLOPEN_LIBRPM=true
1000 + echo "$as_me:$LINENO: result: $DLOPEN_LIBRPM" >&5
1001 +echo "${ECHO_T}$DLOPEN_LIBRPM" >&6
1005 + echo "$as_me: program exited with status $ac_status" >&5
1006 +echo "$as_me: failed program was:" >&5
1007 +sed 's/^/| /' conftest.$ac_ext >&5
1010 +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
1012 + rm -f conftest.out
1016 + if $HAVE_DLOPEN_LIBRPM; then
1018 + echo "$as_me:$LINENO: checking rpm library API compatibility" >&5
1019 +echo $ECHO_N "checking rpm library API compatibility... $ECHO_C" >&6
1020 + # The compilation requires -Werror to verify anything.
1021 + save_CFLAGS="$CFLAGS"
1022 + CFLAGS="$CFLAGS -Werror"
1023 + cat >conftest.$ac_ext <<_ACEOF
1026 +cat confdefs.h >>conftest.$ac_ext
1027 +cat >>conftest.$ac_ext <<_ACEOF
1028 +/* end confdefs.h. */
1030 +/* Duplicate here the declarations to verify they match "symfile.c". */
1031 +#include <rpm/rpmlib.h>
1032 +#include <rpm/rpmts.h>
1033 +#include <rpm/rpmdb.h>
1034 +#include <rpm/header.h>
1035 +extern char * headerFormat(Header h, const char * fmt, errmsg_t * errmsg);
1036 +extern int rpmReadConfigFiles(const char * file, const char * target);
1037 +extern rpmdbMatchIterator rpmdbFreeIterator(rpmdbMatchIterator mi);
1038 +extern Header rpmdbNextIterator(rpmdbMatchIterator mi);
1039 +extern rpmts rpmtsCreate(void);
1040 +extern rpmts rpmtsFree(rpmts ts);
1041 +extern rpmdbMatchIterator rpmtsInitIterator(const rpmts ts, rpmTag rpmtag,
1042 + const void * keyp, size_t keylen);
1052 +rm -f conftest.$ac_objext
1053 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
1054 + (eval $ac_compile) 2>conftest.er1
1056 + grep -v '^ *+' conftest.er1 >conftest.err
1057 + rm -f conftest.er1
1058 + cat conftest.err >&5
1059 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
1060 + (exit $ac_status); } &&
1061 + { ac_try='test -z "$ac_c_werror_flag"
1062 + || test ! -s conftest.err'
1063 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1064 + (eval $ac_try) 2>&5
1066 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
1067 + (exit $ac_status); }; } &&
1068 + { ac_try='test -s conftest.$ac_objext'
1069 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1070 + (eval $ac_try) 2>&5
1072 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
1073 + (exit $ac_status); }; }; then
1075 + LIBRPM_COMPAT=true
1076 + echo "$as_me:$LINENO: result: yes" >&5
1077 +echo "${ECHO_T}yes" >&6
1080 + echo "$as_me: failed program was:" >&5
1081 +sed 's/^/| /' conftest.$ac_ext >&5
1084 + LIBRPM_COMPAT=false
1085 + echo "$as_me:$LINENO: result: no" >&5
1086 +echo "${ECHO_T}no" >&6
1089 +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
1090 + CFLAGS="$save_CFLAGS"
1092 + if ! $LIBRPM_COMPAT; then
1093 + HAVE_DLOPEN_LIBRPM=false
1097 + if $HAVE_DLOPEN_LIBRPM; then
1098 + DLOPEN_LIBRPM_STRING='"'"$DLOPEN_LIBRPM"'"'
1100 +cat >>confdefs.h <<_ACEOF
1101 +#define DLOPEN_LIBRPM $DLOPEN_LIBRPM_STRING
1105 +cat >>confdefs.h <<\_ACEOF
1106 +#define HAVE_LIBRPM 1
1110 + echo "$as_me:$LINENO: result: no" >&5
1111 +echo "${ECHO_T}no" >&6
1113 + if $DLOPEN_REQUIRE; then
1114 + { { echo "$as_me:$LINENO: error: Specific name $LIBRPM was requested but it could not be opened." >&5
1115 +echo "$as_me: error: Specific name $LIBRPM was requested but it could not be opened." >&2;}
1116 + { (exit 1); exit 1; }; }
1120 +if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
1121 + if test -n "$ac_tool_prefix"; then
1122 + # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
1123 +set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
1124 +echo "$as_me:$LINENO: checking for $ac_word" >&5
1125 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1126 +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
1127 + echo $ECHO_N "(cached) $ECHO_C" >&6
1129 + case $PKG_CONFIG in
1130 + [\\/]* | ?:[\\/]*)
1131 + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
1134 + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1135 +for as_dir in $PATH
1138 + test -z "$as_dir" && as_dir=.
1139 + for ac_exec_ext in '' $ac_executable_extensions; do
1140 + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1141 + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
1142 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1151 +PKG_CONFIG=$ac_cv_path_PKG_CONFIG
1153 +if test -n "$PKG_CONFIG"; then
1154 + echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
1155 +echo "${ECHO_T}$PKG_CONFIG" >&6
1157 + echo "$as_me:$LINENO: result: no" >&5
1158 +echo "${ECHO_T}no" >&6
1162 +if test -z "$ac_cv_path_PKG_CONFIG"; then
1163 + ac_pt_PKG_CONFIG=$PKG_CONFIG
1164 + # Extract the first word of "pkg-config", so it can be a program name with args.
1165 +set dummy pkg-config; ac_word=$2
1166 +echo "$as_me:$LINENO: checking for $ac_word" >&5
1167 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1168 +if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
1169 + echo $ECHO_N "(cached) $ECHO_C" >&6
1171 + case $ac_pt_PKG_CONFIG in
1172 + [\\/]* | ?:[\\/]*)
1173 + ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
1176 + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1177 +for as_dir in $PATH
1180 + test -z "$as_dir" && as_dir=.
1181 + for ac_exec_ext in '' $ac_executable_extensions; do
1182 + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1183 + ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
1184 + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1193 +ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
1195 +if test -n "$ac_pt_PKG_CONFIG"; then
1196 + echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5
1197 +echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
1199 + echo "$as_me:$LINENO: result: no" >&5
1200 +echo "${ECHO_T}no" >&6
1203 + PKG_CONFIG=$ac_pt_PKG_CONFIG
1205 + PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
1209 +if test -n "$PKG_CONFIG"; then
1210 + _pkg_min_version=0.9.0
1211 + echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5
1212 +echo $ECHO_N "checking pkg-config is at least version $_pkg_min_version... $ECHO_C" >&6
1213 + if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
1214 + echo "$as_me:$LINENO: result: yes" >&5
1215 +echo "${ECHO_T}yes" >&6
1217 + echo "$as_me:$LINENO: result: no" >&5
1218 +echo "${ECHO_T}no" >&6
1225 +echo "$as_me:$LINENO: checking for RPM" >&5
1226 +echo $ECHO_N "checking for RPM... $ECHO_C" >&6
1228 +if test -n "$RPM_CFLAGS"; then
1229 + pkg_cv_RPM_CFLAGS="$RPM_CFLAGS"
1230 + elif test -n "$PKG_CONFIG"; then
1231 + if test -n "$PKG_CONFIG" && \
1232 + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"rpm\"") >&5
1233 + ($PKG_CONFIG --exists --print-errors "rpm") 2>&5
1235 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
1236 + (exit $ac_status); }; then
1237 + pkg_cv_RPM_CFLAGS=`$PKG_CONFIG --cflags "rpm" 2>/dev/null`
1242 + pkg_failed=untried
1244 +if test -n "$RPM_LIBS"; then
1245 + pkg_cv_RPM_LIBS="$RPM_LIBS"
1246 + elif test -n "$PKG_CONFIG"; then
1247 + if test -n "$PKG_CONFIG" && \
1248 + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"rpm\"") >&5
1249 + ($PKG_CONFIG --exists --print-errors "rpm") 2>&5
1251 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
1252 + (exit $ac_status); }; then
1253 + pkg_cv_RPM_LIBS=`$PKG_CONFIG --libs "rpm" 2>/dev/null`
1258 + pkg_failed=untried
1263 +if test $pkg_failed = yes; then
1265 +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
1266 + _pkg_short_errors_supported=yes
1268 + _pkg_short_errors_supported=no
1270 + if test $_pkg_short_errors_supported = yes; then
1271 + RPM_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "rpm" 2>&1`
1273 + RPM_PKG_ERRORS=`$PKG_CONFIG --print-errors "rpm" 2>&1`
1275 + # Put the nasty error message in config.log where it belongs
1276 + echo "$RPM_PKG_ERRORS" >&5
1278 + echo "$as_me:$LINENO: result: no" >&5
1279 +echo "${ECHO_T}no" >&6
1281 +elif test $pkg_failed = untried; then
1284 + RPM_CFLAGS=$pkg_cv_RPM_CFLAGS
1285 + RPM_LIBS=$pkg_cv_RPM_LIBS
1286 + echo "$as_me:$LINENO: result: yes" >&5
1287 +echo "${ECHO_T}yes" >&6
1291 + if $HAVE_LIBRPM; then
1293 + echo "$as_me:$LINENO: checking rpm library API compatibility" >&5
1294 +echo $ECHO_N "checking rpm library API compatibility... $ECHO_C" >&6
1295 + # The compilation requires -Werror to verify anything.
1296 + save_CFLAGS="$CFLAGS"
1297 + CFLAGS="$CFLAGS -Werror"
1298 + cat >conftest.$ac_ext <<_ACEOF
1301 +cat confdefs.h >>conftest.$ac_ext
1302 +cat >>conftest.$ac_ext <<_ACEOF
1303 +/* end confdefs.h. */
1305 +/* Duplicate here the declarations to verify they match "symfile.c". */
1306 +#include <rpm/rpmlib.h>
1307 +#include <rpm/rpmts.h>
1308 +#include <rpm/rpmdb.h>
1309 +#include <rpm/header.h>
1310 +extern char * headerFormat(Header h, const char * fmt, errmsg_t * errmsg);
1311 +extern int rpmReadConfigFiles(const char * file, const char * target);
1312 +extern rpmdbMatchIterator rpmdbFreeIterator(rpmdbMatchIterator mi);
1313 +extern Header rpmdbNextIterator(rpmdbMatchIterator mi);
1314 +extern rpmts rpmtsCreate(void);
1315 +extern rpmts rpmtsFree(rpmts ts);
1316 +extern rpmdbMatchIterator rpmtsInitIterator(const rpmts ts, rpmTag rpmtag,
1317 + const void * keyp, size_t keylen);
1327 +rm -f conftest.$ac_objext
1328 +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
1329 + (eval $ac_compile) 2>conftest.er1
1331 + grep -v '^ *+' conftest.er1 >conftest.err
1332 + rm -f conftest.er1
1333 + cat conftest.err >&5
1334 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
1335 + (exit $ac_status); } &&
1336 + { ac_try='test -z "$ac_c_werror_flag"
1337 + || test ! -s conftest.err'
1338 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1339 + (eval $ac_try) 2>&5
1341 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
1342 + (exit $ac_status); }; } &&
1343 + { ac_try='test -s conftest.$ac_objext'
1344 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1345 + (eval $ac_try) 2>&5
1347 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
1348 + (exit $ac_status); }; }; then
1350 + LIBRPM_COMPAT=true
1351 + echo "$as_me:$LINENO: result: yes" >&5
1352 +echo "${ECHO_T}yes" >&6
1355 + echo "$as_me: failed program was:" >&5
1356 +sed 's/^/| /' conftest.$ac_ext >&5
1359 + LIBRPM_COMPAT=false
1360 + echo "$as_me:$LINENO: result: no" >&5
1361 +echo "${ECHO_T}no" >&6
1364 +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
1365 + CFLAGS="$save_CFLAGS"
1367 + if ! $LIBRPM_COMPAT; then
1369 + RPM_PKG_ERRORS="Found $LIBRPM API is incompatibile with this GDB"
1373 + if $HAVE_LIBRPM; then
1375 +cat >>confdefs.h <<\_ACEOF
1376 +#define HAVE_LIBRPM 1
1379 + CFLAGS="$CFLAGS $RPM_CFLAGS"
1380 + LIBS="$LIBS $RPM_LIBS"
1382 + if $RPM_REQUIRE; then
1383 + { { echo "$as_me:$LINENO: error: $RPM_PKG_ERRORS" >&5
1384 +echo "$as_me: error: $RPM_PKG_ERRORS" >&2;}
1385 + { (exit 1); exit 1; }; }
1387 + { echo "$as_me:$LINENO: WARNING: $RPM_PKG_ERRORS" >&5
1388 +echo "$as_me: WARNING: $RPM_PKG_ERRORS" >&2;}
1397 @@ -8623,7 +9181,6 @@ done
1398 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1399 # OS/2's system install, which has a completely different semantic
1400 # ./install, which can be erroneously created by make from ./install.sh.
1401 -# Reject install programs that cannot install multiple files.
1402 echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
1403 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
1404 if test -z "$INSTALL"; then
1405 @@ -8657,18 +9214,8 @@ case $as_dir/ in
1406 # program-specific install script used by HP pwplus--don't use.
1409 - rm -rf conftest.one conftest.two conftest.dir
1410 - echo one > conftest.one
1411 - echo two > conftest.two
1412 - mkdir conftest.dir
1413 - if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
1414 - test -s conftest.one && test -s conftest.two &&
1415 - test -s conftest.dir/conftest.one &&
1416 - test -s conftest.dir/conftest.two
1418 - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
1421 + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
1426 @@ -8677,16 +9224,15 @@ case $as_dir/ in
1430 -rm -rf conftest.one conftest.two conftest.dir
1433 if test "${ac_cv_path_install+set}" = set; then
1434 INSTALL=$ac_cv_path_install
1436 - # As a last resort, use the slow shell script. Don't cache a
1437 - # value for INSTALL within a source directory, because that will
1438 + # As a last resort, use the slow shell script. We don't cache a
1439 + # path for INSTALL within a source directory, because that will
1440 # break other packages using the cache if that directory is
1441 - # removed, or if the value is a relative name.
1442 + # removed, or if the path is relative.
1443 INSTALL=$ac_install_sh
1446 @@ -22270,6 +22816,10 @@ s,@am__fastdepCC_TRUE@,$am__fastdepCC_TR
1447 s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t
1448 s,@GDB_DATADIR_PATH@,$GDB_DATADIR_PATH,;t t
1449 s,@pythondir@,$pythondir,;t t
1450 +s,@PKG_CONFIG@,$PKG_CONFIG,;t t
1451 +s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
1452 +s,@RPM_CFLAGS@,$RPM_CFLAGS,;t t
1453 +s,@RPM_LIBS@,$RPM_LIBS,;t t
1454 s,@subdirs@,$subdirs,;t t
1455 s,@TARGET_OBS@,$TARGET_OBS,;t t
1456 s,@PKGVERSION@,$PKGVERSION,;t t
1457 Index: gdb-6.8.50.20090302/gdb/configure.ac
1458 ===================================================================
1459 --- gdb-6.8.50.20090302.orig/gdb/configure.ac 2009-03-07 17:13:33.000000000 +0100
1460 +++ gdb-6.8.50.20090302/gdb/configure.ac 2009-03-07 17:25:06.000000000 +0100
1461 @@ -162,6 +162,199 @@ else
1465 +# Integration with rpm library to support missing debuginfo suggestions.
1466 +# --without-rpm: Disable any rpm support.
1467 +# --with-rpm=libname.so: Try to dynamically open `libname.so' during runtime.
1468 +# Even with runtime missing `libname.so' GDB will still other run correctly.
1469 +# Missing `libname.so' during ./configure will abort the configuration.
1470 +# --with-rpm=librpm.so: Like `--with-rpm=libname.so' but try to find specific
1471 +# minor version first such as `librpm-4.6.so' as minor version differences
1472 +# mean API+ABI incompatibility. If the specific match versioned library name
1473 +# could not be found still open dynamically at least `librpm.so'.
1474 +# --with-rpm: Like `--with-rpm=librpm.so' but if any of its detection fails try
1475 +# to find librpm for compilation-time linking by pkg-config. GDB binary will
1476 +# be probably linked with the version specific library (as `librpm-4.6.so').
1477 +# Failure to find librpm by pkg-config will abort the configuration.
1478 +# (default) --with-rpm=auto: Like `--with-rpm=librpm.so' but if even pkg-config
1479 +# cannot find librpm use to the rpmless compilation (like `--without-rpm').
1482 + [AS_HELP_STRING([--with-rpm],
1483 + [query rpm database for missing debuginfos [yes/no, def. auto=librpm.so]])], [], [with_rpm="auto"])
1485 +m4_pattern_allow([^AC_MSG_ERROR$])
1486 +m4_pattern_allow([^AC_MSG_WARN$])
1487 +if test "x$with_rpm" != "xno"; then
1488 + if test "x$with_rpm" = "xyes"; then
1489 + LIBRPM="librpm.so"
1491 + DLOPEN_REQUIRE=false
1492 + elif test "x$with_rpm" = "xauto"; then
1493 + LIBRPM="librpm.so"
1495 + DLOPEN_REQUIRE=false
1497 + LIBRPM="$with_rpm"
1499 + DLOPEN_REQUIRE=true
1501 + LIBRPM_STRING='"'"$LIBRPM"'"'
1503 + AC_MSG_CHECKING([specific librpm version])
1504 + HAVE_DLOPEN_LIBRPM=false
1507 + AC_RUN_IFELSE(AC_LANG_PROGRAM([[
1508 +#include <rpm/rpmlib.h>
1513 + const char *const *rpmverp;
1516 + f = fopen ("conftest.out", "w");
1519 + fprintf (stderr, "Cannot write \"%s\": %s\n", "conftest.out",
1520 + strerror (errno));
1523 + h = dlopen ($LIBRPM_STRING, RTLD_LAZY);
1526 + fprintf (stderr, "dlopen (\"%s\"): %s\n", $LIBRPM_STRING, dlerror ());
1529 + rpmverp = dlsym (h, "RPMVERSION");
1532 + fprintf (stderr, "dlsym (\"RPMVERSION\"): %s\n", dlerror ());
1535 + fprintf (stderr, "RPMVERSION is: \"");
1536 + fprintf (stderr, "%s\"\n", *rpmverp);
1538 + /* Try to find the specific librpm version only for "librpm.so" as we do
1539 + not know how to assemble the version string otherwise. */
1541 + if (strcmp ("librpm.so", $LIBRPM_STRING) != 0)
1543 + fprintf (f, "%s\n", $LIBRPM_STRING);
1552 + if (sscanf (*rpmverp, "%d.%d", &major, &minor) != 2)
1554 + fprintf (stderr, "Unable to parse RPMVERSION.\n");
1555 + fprintf (f, "%s\n", $LIBRPM_STRING);
1558 + /* Avoid the square brackets by malloc. */
1559 + h2_name = malloc (64);
1560 + sprintf (h2_name, "librpm-%d.%d.so", major, minor);
1561 + h2 = dlopen (h2_name, RTLD_LAZY);
1564 + fprintf (stderr, "dlopen (\"%s\"): %s\n", h2_name, dlerror ());
1565 + fprintf (f, "%s\n", $LIBRPM_STRING);
1570 + fprintf (stderr, "dlopen of \"%s\" and \"%s\" are different.\n",
1571 + $LIBRPM_STRING, h2_name);
1572 + fprintf (f, "%s\n", $LIBRPM_STRING);
1575 + /* Found the valid .so name with a specific version. */
1576 + fprintf (f, "%s\n", h2_name);
1580 + DLOPEN_LIBRPM="`cat conftest.out`"
1581 + if test "x$DLOPEN_LIBRPM" != "x"; then
1582 + HAVE_DLOPEN_LIBRPM=true
1583 + AC_MSG_RESULT($DLOPEN_LIBRPM)
1586 + rm -f conftest.out
1588 + m4_define([CHECK_LIBRPM_COMPAT], [
1589 + AC_MSG_CHECKING([rpm library API compatibility])
1590 + # The compilation requires -Werror to verify anything.
1591 + save_CFLAGS="$CFLAGS"
1592 + CFLAGS="$CFLAGS -Werror"
1593 + AC_COMPILE_IFELSE(AC_LANG_PROGRAM([[
1594 +/* Duplicate here the declarations to verify they match "symfile.c". */
1595 +#include <rpm/rpmlib.h>
1596 +#include <rpm/rpmts.h>
1597 +#include <rpm/rpmdb.h>
1598 +#include <rpm/header.h>
1599 +extern char * headerFormat(Header h, const char * fmt, errmsg_t * errmsg);
1600 +extern int rpmReadConfigFiles(const char * file, const char * target);
1601 +extern rpmdbMatchIterator rpmdbFreeIterator(rpmdbMatchIterator mi);
1602 +extern Header rpmdbNextIterator(rpmdbMatchIterator mi);
1603 +extern rpmts rpmtsCreate(void);
1604 +extern rpmts rpmtsFree(rpmts ts);
1605 +extern rpmdbMatchIterator rpmtsInitIterator(const rpmts ts, rpmTag rpmtag,
1606 + const void * keyp, size_t keylen);
1608 + LIBRPM_COMPAT=true
1609 + AC_MSG_RESULT(yes)
1611 + LIBRPM_COMPAT=false
1614 + CFLAGS="$save_CFLAGS"
1617 + if $HAVE_DLOPEN_LIBRPM; then
1618 + CHECK_LIBRPM_COMPAT
1619 + if ! $LIBRPM_COMPAT; then
1620 + HAVE_DLOPEN_LIBRPM=false
1624 + if $HAVE_DLOPEN_LIBRPM; then
1625 + DLOPEN_LIBRPM_STRING='"'"$DLOPEN_LIBRPM"'"'
1626 + AC_DEFINE_UNQUOTED(DLOPEN_LIBRPM, $DLOPEN_LIBRPM_STRING, [librpm version specific library name to dlopen.])
1627 + AC_DEFINE(HAVE_LIBRPM, 1, [Define if librpm library is being used.])
1631 + if $DLOPEN_REQUIRE; then
1632 + AC_MSG_ERROR([Specific name $LIBRPM was requested but it could not be opened.])
1634 + PKG_CHECK_MODULES(RPM, rpm, [HAVE_LIBRPM=true], [HAVE_LIBRPM=false])
1636 + if $HAVE_LIBRPM; then
1637 + CHECK_LIBRPM_COMPAT
1638 + if ! $LIBRPM_COMPAT; then
1640 + RPM_PKG_ERRORS="Found $LIBRPM API is incompatibile with this GDB"
1644 + if $HAVE_LIBRPM; then
1645 + AC_DEFINE(HAVE_LIBRPM, 1, [Define if librpm library is being used.])
1646 + CFLAGS="$CFLAGS $RPM_CFLAGS"
1647 + LIBS="$LIBS $RPM_LIBS"
1649 + if $RPM_REQUIRE; then
1650 + AC_MSG_ERROR($RPM_PKG_ERRORS)
1652 + AC_MSG_WARN($RPM_PKG_ERRORS)
1659 AC_CONFIG_SUBDIRS(doc testsuite)