Browse Source

libctf: use libtool for link test in configure

The configure check for ELF support in BFD uses the AC_TRY_LINK.  If
libbfd's dependencies change, this macro will need to be updated
manually with explicit additions to LDFLAGS and LIBS.

This patch updates the check to use libtool instead.

ChangeLog:

	* libctf/configure.ac: Use libtool instead.
	* libctf/configure: Regenerated.
gdb-13-branch
Indu Bhagat 4 years ago
parent
commit
80a3733432
  1. 1364
      libctf/configure
  2. 4
      libctf/configure.ac

1364
libctf/configure

File diff suppressed because it is too large

4
libctf/configure.ac

@ -44,6 +44,7 @@ AC_DISABLE_SHARED
LT_INIT
AC_SYS_LARGEFILE
LT_OUTPUT
MISSING=`cd $ac_aux_dir && ${PWDCMD-pwd}`/missing
AC_CHECK_PROGS([ACLOCAL], [aclocal], [$MISSING aclocal])
@ -83,9 +84,11 @@ AM_CONDITIONAL(ENABLE_LIBCTF_HASH_DEBUGGING, test "${enable_libctf_hash_debuggin
OLD_CFLAGS=$CFLAGS
OLD_LDFLAGS=$LDFLAGS
OLD_LIBS=$LIBS
OLD_CC=$CC
# Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
# points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
# always want our bfd.
CC="./libtool --quiet --mode=link $OLD_CC"
CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
@ -103,6 +106,7 @@ AC_CACHE_CHECK([for ELF support in BFD], ac_cv_libctf_bfd_elf,
CFLAGS=$OLD_CFLAGS
LDFLAGS=$OLD_LDFLAGS
LIBS=$OLD_LIBS
CC=$OLD_CC
if test $ac_cv_libctf_bfd_elf = yes; then
AC_DEFINE([HAVE_BFD_ELF], 1,

Loading…
Cancel
Save