diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2015-03-31 03:55:56 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2015-03-31 03:56:12 -0700 |
commit | 0138187e9fc351c6d4615bbe2ab020a3ac646b50 (patch) | |
tree | 5863d905a08e1fca6445b29b1f8aada03c805b86 /gas/configure | |
parent | 0ee42ecde7aadb3e68ae5b944f7b1b6a859ebcfd (diff) | |
download | gdb-0138187e9fc351c6d4615bbe2ab020a3ac646b50.zip gdb-0138187e9fc351c6d4615bbe2ab020a3ac646b50.tar.gz gdb-0138187e9fc351c6d4615bbe2ab020a3ac646b50.tar.bz2 |
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 <zlib.h>.
(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.
Diffstat (limited to 'gas/configure')
-rwxr-xr-x | gas/configure | 94 |
1 files changed, 10 insertions, 84 deletions
diff --git a/gas/configure b/gas/configure index 75d8a52..07bcee0 100755 --- a/gas/configure +++ b/gas/configure @@ -602,6 +602,7 @@ ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS +zlibinc LIBM ALLOCA GENINSRC_NEVER_FALSE @@ -766,7 +767,7 @@ enable_werror enable_build_warnings enable_nls enable_maintainer_mode -with_zlib +with_system_zlib ' ac_precious_vars='build_alias host_alias @@ -1422,7 +1423,7 @@ Optional Packages: --with-pic try to use only PIC/non-PIC objects [default=use both] --with-gnu-ld assume the C compiler uses GNU ld [default=no] - --with-zlib include zlib support (auto/yes/no) default=auto + --with-system-zlib use installed libz Some influential environment variables: CC C compiler command @@ -10967,7 +10968,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10970 "configure" +#line 10971 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11073,7 +11074,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11076 "configure" +#line 11077 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -14319,90 +14320,15 @@ $as_echo "#define USE_BINARY_FOPEN 1" >>confdefs.h ;; esac -# Link in zlib if we can. This allows us to write compressed debug sections. +# Use the system's zlib library. +zlibinc="-I\$(srcdir)/../zlib" - # See if the user specified whether he wants zlib support or not. +# Check whether --with-system-zlib was given. +if test "${with_system_zlib+set}" = set; then : + withval=$with_system_zlib; zlibinc= -# Check whether --with-zlib was given. -if test "${with_zlib+set}" = set; then : - withval=$with_zlib; -else - with_zlib=auto -fi - - - 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 # Support for VMS timestamps via cross compile |