From 0138187e9fc351c6d4615bbe2ab020a3ac646b50 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Tue, 31 Mar 2015 03:55:56 -0700 Subject: Add --with-system-zlib in gas This patch adds --with-system-zlib and remove --with-zlib in gas. gas/ * Makefile.am (ZLIBINC): New. (AM_CFLAGS): Add $(ZLIBINC). * as.c: (show_usage): Don't check HAVE_ZLIB_H. (parse_args): Likewise. * compress-debug.c: Don't check HAVE_ZLIB_H to include . (compress_init): Don't check HAVE_ZLIB_H. (compress_data): Likewise. (compress_finish): Likewise. * configure.ac (AM_ZLIB): Removed. (zlibinc): New. AC_SUBST. Add --with-system-zlib. * Makefile.in: Regenerated. * config.in: Likewise. * configure: Likewise. * doc/Makefile.in: Likewise. gas/testsuite/ * gas/i386/dw2-compress-1.d: Expect .zdebug_info. --- gas/configure.ac | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'gas/configure.ac') diff --git a/gas/configure.ac b/gas/configure.ac index 8e05fb8..fbe8c0b 100644 --- a/gas/configure.ac +++ b/gas/configure.ac @@ -816,8 +816,13 @@ AC_CHECK_DECLS([free, getenv, malloc, mempcpy, realloc, stpcpy, strstr, vsnprint BFD_BINARY_FOPEN -# Link in zlib if we can. This allows us to write compressed debug sections. -AM_ZLIB +# Use the system's zlib library. +zlibinc="-I\$(srcdir)/../zlib" +AC_ARG_WITH(system-zlib, +[AS_HELP_STRING([--with-system-zlib], [use installed libz])], +zlibinc= +) +AC_SUBST(zlibinc) # Support for VMS timestamps via cross compile -- cgit v1.1