Message ID | CAMe9rOpDXyqznHsk_kTBqRtTFXogWNrNK40jJ5WmiA30=ZYyCg@mail.gmail.com |
---|---|
State | New |
Headers | show |
On 01 Apr 2015 05:04, H.J. Lu wrote: > --- a/config/zlib.m4 > +++ b/config/zlib.m4 > @@ -9,8 +9,10 @@ AC_DEFUN([AM_ZLIB], > zlibinc="-I\$(srcdir)/../zlib" > AC_ARG_WITH(system-zlib, > [AS_HELP_STRING([--with-system-zlib], [use installed libz])], > - zlibdir= > - zlibinc= > + if test x$with_system_zlib = xyes ; then > + zlibdir= > + zlibinc= > + fi > ) this is inside the 3rd arg, so normally you check $withval. this code will still work as the generated shell does: if test "${with_system_zlib+set}" = set; then : withval=$with_system_zlib; [3rd arg content] fi > bfd/ChangeLog | 4 ++++ > bfd/configure | 6 ++++-- > binutils/ChangeLog | 4 ++++ > binutils/configure | 6 ++++-- > gas/ChangeLog | 4 ++++ > gas/configure | 6 ++++-- > gdb/ChangeLog | 4 ++++ > gdb/configure | 6 ++++-- you need to regenerate the sim tree too -mike
On April 1, 2015 6:54:31 PM GMT+02:00, Mike Frysinger <vapier@gentoo.org> wrote: >On 01 Apr 2015 05:04, H.J. Lu wrote: >> --- a/config/zlib.m4 >> +++ b/config/zlib.m4 >> @@ -9,8 +9,10 @@ AC_DEFUN([AM_ZLIB], >> zlibinc="-I\$(srcdir)/../zlib" >> AC_ARG_WITH(system-zlib, >> [AS_HELP_STRING([--with-system-zlib], [use installed libz])], >> - zlibdir= >> - zlibinc= >> + if test x$with_system_zlib = xyes ; then >> + zlibdir= >> + zlibinc= >> + fi >> ) > >this is inside the 3rd arg, so normally you check $withval. this code >will >still work as the generated shell does: >if test "${with_system_zlib+set}" = set; then : Why doesn't this expand to test -n "${with_system_zlib+set}" nowadays, BTW? Would be faster to parse and supposedly sums up quite a bit, fwiw. Cheers, > withval=$with_system_zlib; [3rd arg content] >fi > >> bfd/ChangeLog | 4 ++++ >> bfd/configure | 6 ++++-- >> binutils/ChangeLog | 4 ++++ >> binutils/configure | 6 ++++-- >> gas/ChangeLog | 4 ++++ >> gas/configure | 6 ++++-- >> gdb/ChangeLog | 4 ++++ >> gdb/configure | 6 ++++-- > >you need to regenerate the sim tree too >-mike
On Wed, Apr 1, 2015 at 9:54 AM, Mike Frysinger <vapier@gentoo.org> wrote: > On 01 Apr 2015 05:04, H.J. Lu wrote: >> --- a/config/zlib.m4 >> +++ b/config/zlib.m4 >> @@ -9,8 +9,10 @@ AC_DEFUN([AM_ZLIB], >> zlibinc="-I\$(srcdir)/../zlib" >> AC_ARG_WITH(system-zlib, >> [AS_HELP_STRING([--with-system-zlib], [use installed libz])], >> - zlibdir= >> - zlibinc= >> + if test x$with_system_zlib = xyes ; then >> + zlibdir= >> + zlibinc= >> + fi >> ) > > this is inside the 3rd arg, so normally you check $withval. this code will > still work as the generated shell does: > if test "${with_system_zlib+set}" = set; then : > withval=$with_system_zlib; [3rd arg content] > fi > >> bfd/ChangeLog | 4 ++++ >> bfd/configure | 6 ++++-- >> binutils/ChangeLog | 4 ++++ >> binutils/configure | 6 ++++-- >> gas/ChangeLog | 4 ++++ >> gas/configure | 6 ++++-- >> gdb/ChangeLog | 4 ++++ >> gdb/configure | 6 ++++-- > > you need to regenerate the sim tree too > -mike I pushed it onto maser.
On 01 Apr 2015 19:05, Bernhard Reutner-Fischer wrote: > On April 1, 2015 6:54:31 PM GMT+02:00, Mike Frysinger wrote: > >On 01 Apr 2015 05:04, H.J. Lu wrote: > >> --- a/config/zlib.m4 > >> +++ b/config/zlib.m4 > >> @@ -9,8 +9,10 @@ AC_DEFUN([AM_ZLIB], > >> zlibinc="-I\$(srcdir)/../zlib" > >> AC_ARG_WITH(system-zlib, > >> [AS_HELP_STRING([--with-system-zlib], [use installed libz])], > >> - zlibdir= > >> - zlibinc= > >> + if test x$with_system_zlib = xyes ; then > >> + zlibdir= > >> + zlibinc= > >> + fi > >> ) > > > >this is inside the 3rd arg, so normally you check $withval. this code > >will > >still work as the generated shell does: > >if test "${with_system_zlib+set}" = set; then : > > Why doesn't this expand to test -n "${with_system_zlib+set}" > nowadays, BTW? Would be faster to parse and supposedly sums up quite a bit, fwiw. question for the autoconf list ? although note that this is autoconf-2.64 as that is what the tree has locked itself to currently. -mike
From cf39cfc52ebd683d55fc396a77355f34b5094c04 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" <hjl.tools@gmail.com> Date: Wed, 1 Apr 2015 04:57:28 -0700 Subject: [PATCH 3/3] Add --with-system-zlib to top level configure The top level configure supports --with-system-zlib. This patch makes configure --help to display --with-system-zlib. * configure.ac: Add --with-system-zlib. * configure: Regenerated. --- ChangeLog | 5 +++++ configure | 8 ++++++++ configure.ac | 2 ++ 3 files changed, 15 insertions(+) diff --git a/ChangeLog b/ChangeLog index 37450f4..457a6bb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2015-04-01 H.J. Lu <hongjiu.lu@intel.com> + + * configure.ac: Add --with-system-zlib. + * configure: Regenerated. + 2015-03-31 H.J. Lu <hongjiu.lu@intel.com> * src-release.sh: Don't configure with --with-target-subdir=. diff --git a/configure b/configure index b719d38..97250fa 100755 --- a/configure +++ b/configure @@ -747,6 +747,7 @@ ospace_frag' ac_user_opts=' enable_option_checking with_build_libsubdir +with_system_zlib enable_as_accelerator_for enable_offload_targets enable_gold @@ -1518,6 +1519,7 @@ Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-build-libsubdir=DIR Directory where to find libraries for build system + --with-system-zlib use installed libz --with-mpc=PATH specify prefix directory for installed MPC package. Equivalent to --with-mpc-include=PATH/include plus --with-mpc-lib=PATH/lib @@ -2854,6 +2856,12 @@ if test x$with_gnu_as = xno ; then fi use_included_zlib= + +# Check whether --with-system-zlib was given. +if test "${with_system_zlib+set}" = set; then : + withval=$with_system_zlib; +fi + # Make sure we don't let ZLIB be added if we didn't want it. if test x$with_system_zlib = xyes ; then use_included_zlib=no diff --git a/configure.ac b/configure.ac index a4e4c7d..ef5f5b1 100644 --- a/configure.ac +++ b/configure.ac @@ -245,6 +245,8 @@ if test x$with_gnu_as = xno ; then fi use_included_zlib= +AC_ARG_WITH(system-zlib, +[AS_HELP_STRING([--with-system-zlib], [use installed libz])]) # Make sure we don't let ZLIB be added if we didn't want it. if test x$with_system_zlib = xyes ; then use_included_zlib=no -- 2.1.0