aboutsummaryrefslogtreecommitdiff
path: root/gdb/configure
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2015-03-31 08:24:02 -0700
committerH.J. Lu <hjl.tools@gmail.com>2015-03-31 08:24:18 -0700
commit711a72d3d6f8cd3c3f408e718ff19aa4bfd2144e (patch)
tree87513c7ddcc1337bf2e2fe85f3328ef4151c6d66 /gdb/configure
parent518a69099cf8eca95a86c4d1ff4b8d8c30cf3c6b (diff)
downloadgdb-711a72d3d6f8cd3c3f408e718ff19aa4bfd2144e.zip
gdb-711a72d3d6f8cd3c3f408e718ff19aa4bfd2144e.tar.gz
gdb-711a72d3d6f8cd3c3f408e718ff19aa4bfd2144e.tar.bz2
Add --with-system-zlib in gdb
This patch adds --with-system-zlib and removes --with-zlib in gdb. * Makefile.in (ZLIB): New. (ZLIBINC): Likewise. (INTERNAL_CFLAGS_BASE): Add $(ZLIBINC). (CLIBS): Add $(ZLIB). * acinclude.m4: (GDB_AC_CHECK_BFD): Add $zlibdir to LDFLAGS. Add -lz to LIBS. * gdb_bfd.c: Don't check HAVE_ZLIB_H to include <zlib.h>. * top.c (print_gdb_configuration): Remove --with-zlib and --without-zlib. * config.in: Regenerated. * configure: Likewise.
Diffstat (limited to 'gdb/configure')
-rwxr-xr-xgdb/configure97
1 files changed, 15 insertions, 82 deletions
diff --git a/gdb/configure b/gdb/configure
index db239b3..d3d093d 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -680,6 +680,8 @@ READLINE_TEXI_INCFLAG
READLINE_CFLAGS
READLINE_DEPS
READLINE
+zlibinc
+zlibdir
MIG
WINDRES
DLLTOOL
@@ -817,7 +819,7 @@ with_curses
enable_profiling
with_pkgversion
with_bugurl
-with_zlib
+with_system_zlib
with_libiconv_prefix
with_iconv_bin
with_system_readline
@@ -1536,7 +1538,7 @@ Optional Packages:
library
--with-pkgversion=PKG Use PKG in the version string in place of "GDB"
--with-bugurl=URL Direct users to URL to report a bug
- --with-zlib include zlib support (auto/yes/no) default=auto
+ --with-system-zlib use installed libz
--with-libiconv-prefix=DIR
search for libiconv in DIR/include and DIR/lib
--with-iconv-bin=PATH specify where to find the iconv program
@@ -7017,88 +7019,19 @@ fi
# Link in zlib if we can. This allows us to read compressed debug sections.
- # See if the user specified whether he wants zlib support or not.
+ # Use the system's zlib library.
+ zlibdir=-L../zlib
+ zlibinc="-I\$(srcdir)/../zlib"
-# Check whether --with-zlib was given.
-if test "${with_zlib+set}" = set; then :
- withval=$with_zlib;
-else
- with_zlib=auto
-fi
+# Check whether --with-system-zlib was given.
+if test "${with_system_zlib+set}" = set; then :
+ withval=$with_system_zlib; zlibdir=
+ zlibinc=
-
- if test "$with_zlib" != "no"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing zlibVersion" >&5
-$as_echo_n "checking for library containing zlibVersion... " >&6; }
-if test "${ac_cv_search_zlibVersion+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_func_search_save_LIBS=$LIBS
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.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 zlibVersion ();
-int
-main ()
-{
-return zlibVersion ();
- ;
- return 0;
-}
-_ACEOF
-for ac_lib in '' z; do
- if test -z "$ac_lib"; then
- ac_res="none required"
- else
- ac_res=-l$ac_lib
- LIBS="-l$ac_lib $ac_func_search_save_LIBS"
- fi
- if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_search_zlibVersion=$ac_res
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext
- if test "${ac_cv_search_zlibVersion+set}" = set; then :
- break
fi
-done
-if test "${ac_cv_search_zlibVersion+set}" = set; then :
-else
- ac_cv_search_zlibVersion=no
-fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_zlibVersion" >&5
-$as_echo "$ac_cv_search_zlibVersion" >&6; }
-ac_res=$ac_cv_search_zlibVersion
-if test "$ac_res" != no; then :
- test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
- for ac_header in zlib.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
-if test "x$ac_cv_header_zlib_h" = x""yes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_ZLIB_H 1
-_ACEOF
-
-fi
-
-done
-fi
- if test "$with_zlib" = "yes" -a "$ac_cv_header_zlib_h" != "yes"; then
- as_fn_error "zlib (libz) library was explicitly requested but not found" "$LINENO" 5
- fi
- fi
# On FreeBSD we may need libutil for kinfo_getvmmap (used by fbsd-nat.c).
@@ -13596,9 +13529,9 @@ esac
# points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
# always want our bfd.
CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
- LDFLAGS="-L../bfd -L../libiberty $LDFLAGS"
+ LDFLAGS="-L../bfd -L../libiberty $zlibdir $LDFLAGS"
intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
- LIBS="-lbfd -liberty $intl $LIBS"
+ LIBS="-lbfd -liberty -lz $intl $LIBS"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
$as_echo_n "checking for ELF support in BFD... " >&6; }
if test "${gdb_cv_var_elf+set}" = set; then :
@@ -13706,9 +13639,9 @@ fi
# points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
# always want our bfd.
CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
- LDFLAGS="-L../bfd -L../libiberty $LDFLAGS"
+ LDFLAGS="-L../bfd -L../libiberty $zlibdir $LDFLAGS"
intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
- LIBS="-lbfd -liberty $intl $LIBS"
+ LIBS="-lbfd -liberty -lz $intl $LIBS"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5
$as_echo_n "checking for Mach-O support in BFD... " >&6; }
if test "${gdb_cv_var_macho+set}" = set; then :