summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure456
1 files changed, 39 insertions, 417 deletions
diff --git a/configure b/configure
index e032e262..d5890ac5 100755
--- a/configure
+++ b/configure
@@ -647,9 +647,6 @@ stap_LIBS
elfutils_abs_srcdir
BUILD_ELFUTILS_FALSE
BUILD_ELFUTILS_TRUE
-RPM_LIBS
-RPM_CFLAGS
-rpm_LIBS
BUILD_GRAPHER_FALSE
BUILD_GRAPHER_TRUE
CXXCPP
@@ -824,9 +821,7 @@ gtkmm_CFLAGS
gtkmm_LIBS
libglade_CFLAGS
libglade_LIBS
-CXXCPP
-RPM_CFLAGS
-RPM_LIBS'
+CXXCPP'
ac_subdirs_all='testsuite'
# Initialize some variables set by options.
@@ -1492,8 +1487,7 @@ Optional Packages:
--with-publican-brand=BRAND
building publican documentation guides using given
brand (defaults to "fedora").
- --with-rpm query rpm database for missing debuginfos [yes/no,
- def. auto=librpm.so]
+ --with-rpm query rpm database for missing debuginfos
--with-elfutils=DIRECTORY
find elfutils source code in DIRECTORY
@@ -1517,8 +1511,6 @@ Some influential environment variables:
libglade_LIBS
linker flags for libglade, overriding pkg-config
CXXCPP C++ preprocessor
- RPM_CFLAGS C compiler flags for RPM, overriding pkg-config
- RPM_LIBS linker flags for RPM, overriding pkg-config
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
@@ -8164,22 +8156,6 @@ fi
-# Integration with rpm library to support missing debuginfo suggestions.
-# --without-rpm: Disable any rpm support.
-# --with-rpm=libname.so: Try to dynamically open `libname.so' during runtime.
-# Even with runtime missing `libname.so' GDB will still other run correctly.
-# Missing `libname.so' during ./configure will abort the configuration.
-# --with-rpm=librpm.so: Like `--with-rpm=libname.so' but try to find specific
-# minor version first such as `librpm-4.6.so' as minor version differences
-# mean API+ABI incompatibility. If the specific match versioned library name
-# could not be found still open dynamically at least `librpm.so'.
-# --with-rpm: Like `--with-rpm=librpm.so' but if any of its detection fails try
-# to find librpm for compilation-time linking by pkg-config. GDB binary will
-# be probably linked with the version specific library (as `librpm-4.6.so').
-# Failure to find librpm by pkg-config will abort the configuration.
-# (default) --with-rpm=auto: Like `--with-rpm=librpm.so' but if even pkg-config
-# cannot find librpm use to the rpmless compilation (like `--without-rpm').
-
# Check whether --with-rpm was given.
if test "${with_rpm+set}" = set; then
@@ -8188,127 +8164,38 @@ else
with_rpm="auto"
fi
+if test "$with_rpm" != "no"; then
-
-
-if test "x$with_rpm" != "xno"; then
- if test "x$with_rpm" = "xyes"; then
- LIBRPM="librpm.so"
- RPM_REQUIRE=true
- DLOPEN_REQUIRE=false
- elif test "x$with_rpm" = "xauto"; then
- LIBRPM="librpm.so"
- RPM_REQUIRE=false
- DLOPEN_REQUIRE=false
- else
- LIBRPM="$with_rpm"
- RPM_REQUIRE=true
- DLOPEN_REQUIRE=true
- fi
- LIBRPM_STRING='"'"$LIBRPM"'"'
-
- { $as_echo "$as_me:$LINENO: checking specific librpm version" >&5
-$as_echo_n "checking specific librpm version... " >&6; }
- HAVE_DLOPEN_LIBRPM=false
- save_LIBS="$LIBS"
- LIBS="$LIBS -ldl"
- if test "$cross_compiling" = yes; then
- { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot run test program while cross compiling
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }; }
+{ $as_echo "$as_me:$LINENO: checking for rpmtsInitIterator in -lrpm" >&5
+$as_echo_n "checking for rpmtsInitIterator in -lrpm... " >&6; }
+if test "${ac_cv_lib_rpm_rpmtsInitIterator+set}" = set; then
+ $as_echo_n "(cached) " >&6
else
- cat >conftest.$ac_ext <<_ACEOF
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lrpm $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <rpm/rpmlib.h>
-#include <dlfcn.h>
-#include <errno.h>
-
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char rpmtsInitIterator ();
int
main ()
{
-
- void *h;
- const char *const *rpmverp;
- FILE *f;
-
- f = fopen ("conftest.out", "w");
- if (!f)
- {
- fprintf (stderr, "Cannot write \"%s\": %s\n", "conftest.out",
- strerror (errno));
- return 1;
- }
- h = dlopen ($LIBRPM_STRING, RTLD_LAZY);
- if (!h)
- {
- fprintf (stderr, "dlopen (\"%s\"): %s\n", $LIBRPM_STRING, dlerror ());
- return 1;
- }
- rpmverp = dlsym (h, "RPMVERSION");
- if (!rpmverp)
- {
- fprintf (stderr, "dlsym (\"RPMVERSION\"): %s\n", dlerror ());
- return 1;
- }
- fprintf (stderr, "RPMVERSION is: \"");
- fprintf (stderr, "%s\"\n", *rpmverp);
-
- /* Try to find the specific librpm version only for "librpm.so" as we do
- not know how to assemble the version string otherwise. */
-
- if (strcmp ("librpm.so", $LIBRPM_STRING) != 0)
- {
- fprintf (f, "%s\n", $LIBRPM_STRING);
- return 0;
- }
- else
- {
- char *h2_name;
- void *h2;
- int major, minor;
-
- if (sscanf (*rpmverp, "%d.%d", &major, &minor) != 2)
- {
- fprintf (stderr, "Unable to parse RPMVERSION.\n");
- fprintf (f, "%s\n", $LIBRPM_STRING);
- return 0;
- }
- /* Avoid the square brackets by malloc. */
- h2_name = malloc (64);
- sprintf (h2_name, "librpm-%d.%d.so", major, minor);
- h2 = dlopen (h2_name, RTLD_LAZY);
- if (!h2)
- {
- fprintf (stderr, "dlopen (\"%s\"): %s\n", h2_name, dlerror ());
- fprintf (f, "%s\n", $LIBRPM_STRING);
- return 0;
- }
- if (h2 != h)
- {
- fprintf (stderr, "dlopen of \"%s\" and \"%s\" are different.\n",
- $LIBRPM_STRING, h2_name);
- fprintf (f, "%s\n", $LIBRPM_STRING);
- return 0;
- }
- /* Found the valid .so name with a specific version. */
- fprintf (f, "%s\n", h2_name);
- return 0;
- }
-
+return rpmtsInitIterator ();
;
return 0;
}
_ACEOF
-rm -f conftest$ac_exeext
+rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -8316,89 +8203,7 @@ case "(($ac_try" in
esac
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
- (eval "$ac_link") 2>&5
- ac_status=$?
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
-
- DLOPEN_LIBRPM="`cat conftest.out`"
- if test "x$DLOPEN_LIBRPM" != "x"; then
- HAVE_DLOPEN_LIBRPM=true
- { $as_echo "$as_me:$LINENO: result: $DLOPEN_LIBRPM" >&5
-$as_echo "$DLOPEN_LIBRPM" >&6; }
- fi
-
-else
- $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -rf conftest.dSYM
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-
-
- rm -f conftest.out
-
-
-
-
- if $HAVE_DLOPEN_LIBRPM; then
-
- { $as_echo "$as_me:$LINENO: checking rpm library API compatibility" >&5
-$as_echo_n "checking rpm library API compatibility... " >&6; }
- # The compilation requires -Werror to verify anything.
- save_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -Werror"
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-/* Duplicate here the declarations to verify they match "symfile.c". */
-#include <rpm/rpmlib.h>
-#include <rpm/rpmts.h>
-#include <rpm/rpmdb.h>
-#include <rpm/header.h>
-extern char * headerFormat(Header h, const char * fmt, errmsg_t * errmsg);
-extern int rpmReadConfigFiles(const char * file, const char * target);
-extern rpmdbMatchIterator rpmdbFreeIterator(rpmdbMatchIterator mi);
-extern Header rpmdbNextIterator(rpmdbMatchIterator mi);
-extern rpmts rpmtsCreate(void);
-extern rpmts rpmtsFree(rpmts ts);
-extern rpmdbMatchIterator rpmtsInitIterator(const rpmts ts, rpmTag rpmtag,
- const void * keyp, size_t keylen);
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_compile") 2>conftest.er1
+ (eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
@@ -8407,221 +8212,38 @@ $as_echo "$ac_try_echo") >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
-
- LIBRPM_COMPAT=true
- rpm_LIBS=-lrpm
- { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ ac_cv_lib_rpm_rpmtsInitIterator=yes
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-
- LIBRPM_COMPAT=false
- rpm_LIBS=
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-
+ ac_cv_lib_rpm_rpmtsInitIterator=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- CFLAGS="$save_CFLAGS"
-
- if ! $LIBRPM_COMPAT; then
- HAVE_DLOPEN_LIBRPM=false
- fi
- fi
-
- if $HAVE_DLOPEN_LIBRPM; then
- DLOPEN_LIBRPM_STRING='"'"$DLOPEN_LIBRPM"'"'
-
-cat >>confdefs.h <<_ACEOF
-#define DLOPEN_LIBRPM $DLOPEN_LIBRPM_STRING
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_LIBRPM 1
-_ACEOF
-
- else
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
- LIBS="$save_LIBS"
- if $DLOPEN_REQUIRE; then
- { { $as_echo "$as_me:$LINENO: error: Specific name $LIBRPM was requested but it could not be opened." >&5
-$as_echo "$as_me: error: Specific name $LIBRPM was requested but it could not be opened." >&2;}
- { (exit 1); exit 1; }; }
- fi
-
-pkg_failed=no
-{ $as_echo "$as_me:$LINENO: checking for RPM" >&5
-$as_echo_n "checking for RPM... " >&6; }
-
-if test -n "$RPM_CFLAGS"; then
- pkg_cv_RPM_CFLAGS="$RPM_CFLAGS"
- elif test -n "$PKG_CONFIG"; then
- if test -n "$PKG_CONFIG" && \
- { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"rpm\"") >&5
- ($PKG_CONFIG --exists --print-errors "rpm") 2>&5
- ac_status=$?
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- pkg_cv_RPM_CFLAGS=`$PKG_CONFIG --cflags "rpm" 2>/dev/null`
-else
- pkg_failed=yes
-fi
- else
- pkg_failed=untried
-fi
-if test -n "$RPM_LIBS"; then
- pkg_cv_RPM_LIBS="$RPM_LIBS"
- elif test -n "$PKG_CONFIG"; then
- if test -n "$PKG_CONFIG" && \
- { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"rpm\"") >&5
- ($PKG_CONFIG --exists --print-errors "rpm") 2>&5
- ac_status=$?
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- pkg_cv_RPM_LIBS=`$PKG_CONFIG --libs "rpm" 2>/dev/null`
-else
- pkg_failed=yes
-fi
- else
- pkg_failed=untried
-fi
-
-
-
-if test $pkg_failed = yes; then
-
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
- _pkg_short_errors_supported=yes
-else
- _pkg_short_errors_supported=no
-fi
- if test $_pkg_short_errors_supported = yes; then
- RPM_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "rpm" 2>&1`
- else
- RPM_PKG_ERRORS=`$PKG_CONFIG --print-errors "rpm" 2>&1`
- fi
- # Put the nasty error message in config.log where it belongs
- echo "$RPM_PKG_ERRORS" >&5
-
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
- HAVE_LIBRPM=false
-elif test $pkg_failed = untried; then
- HAVE_LIBRPM=false
-else
- RPM_CFLAGS=$pkg_cv_RPM_CFLAGS
- RPM_LIBS=$pkg_cv_RPM_LIBS
- { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
- HAVE_LIBRPM=true
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
fi
-
- if $HAVE_LIBRPM; then
-
- { $as_echo "$as_me:$LINENO: checking rpm library API compatibility" >&5
-$as_echo_n "checking rpm library API compatibility... " >&6; }
- # The compilation requires -Werror to verify anything.
- save_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -Werror"
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-/* Duplicate here the declarations to verify they match "symfile.c". */
-#include <rpm/rpmlib.h>
-#include <rpm/rpmts.h>
-#include <rpm/rpmdb.h>
-#include <rpm/header.h>
-extern char * headerFormat(Header h, const char * fmt, errmsg_t * errmsg);
-extern int rpmReadConfigFiles(const char * file, const char * target);
-extern rpmdbMatchIterator rpmdbFreeIterator(rpmdbMatchIterator mi);
-extern Header rpmdbNextIterator(rpmdbMatchIterator mi);
-extern rpmts rpmtsCreate(void);
-extern rpmts rpmtsFree(rpmts ts);
-extern rpmdbMatchIterator rpmtsInitIterator(const rpmts ts, rpmTag rpmtag,
- const void * keyp, size_t keylen);
-
-int
-main ()
-{
-
- ;
- return 0;
-}
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_rpm_rpmtsInitIterator" >&5
+$as_echo "$ac_cv_lib_rpm_rpmtsInitIterator" >&6; }
+if test "x$ac_cv_lib_rpm_rpmtsInitIterator" = x""yes; then
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBRPM 1
_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
-
- LIBRPM_COMPAT=true
- rpm_LIBS=-lrpm
- { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
- LIBRPM_COMPAT=false
- rpm_LIBS=
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+ LIBS="-lrpm $LIBS"
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- CFLAGS="$save_CFLAGS"
-
- if ! $LIBRPM_COMPAT; then
- HAVE_LIBRPM=false
- RPM_PKG_ERRORS="Found $LIBRPM API is incompatibile with this GDB"
- fi
- fi
-
- if $HAVE_LIBRPM; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_LIBRPM 1
-_ACEOF
-
- CFLAGS="$CFLAGS $RPM_CFLAGS"
- LIBS="$LIBS $RPM_LIBS"
- else
- if $RPM_REQUIRE; then
- { { $as_echo "$as_me:$LINENO: error: $RPM_PKG_ERRORS" >&5
-$as_echo "$as_me: error: $RPM_PKG_ERRORS" >&2;}
+ if test "x$have_librpm" != "xyes" -a "$with_rpm" == "yes"; then
+ { { $as_echo "$as_me:$LINENO: error: cannot find librpm" >&5
+$as_echo "$as_me: error: cannot find librpm" >&2;}
{ (exit 1); exit 1; }; }
- else
- { $as_echo "$as_me:$LINENO: WARNING: $RPM_PKG_ERRORS" >&5
-$as_echo "$as_me: WARNING: $RPM_PKG_ERRORS" >&2;}
- fi
- fi
fi
fi