Roger Pau Monne
2012-Feb-21 03:19 UTC
[PATCH v8] build: add autoconf to replace custom checks in tools/check
Added autotools magic to replace custom check scripts. The previous checks have been ported to autoconf, and some additional ones have been added (plus the suggestions from running autoscan). Two files are created as a result from executing configure script, config/Tools.mk and config.h. conf/Tools.mk is included by tools/Rules.mk, and contains most of the options previously defined in .config, that can now be set passing parameters or defining environment variables when executing configure script. config.h is only used by libxl/xl to detect yajl_version.h. Changes since v7: * Fixed bug that prevented the creation of "dist" directory (Ian Campbell). Changes since v6: * Readded autogen.sh. Changes since v5: * Remove dummy configure generation from autogen.sh since it''s already on the source tree. * Removed autogen.sh since it was only a wrapper for calling autoconf. * Remove comment regarding yajl_version.h from configure.ac. Changes since v4: * Updated to tip. * Include config.h from compiler command line when building libxl and xl to assure yajl_version.h presence and correctly detect yajl version. * Added glib-2.0 check with appropiate m4 macros. * Purged config.h.in from unnecessary defines that could mess with the build system. * Removed tools/config.sub, tools/config.guess, tools/configure and configure to make the patch fit mailing list limit. Changes since v3: * Copied config.guess and config.sub from automake 1.11. * Added a test to check for uuid.h on BSD and uuid/uuid.h on Linux. Changes since v2: * Changed order of config/Tools.mk include. * Added "-e" to autogen.sh shebang. * Added necessary files (config.*) and output from Autoheader and Autoconf. * Removed Autoconf from build dependencies and updated README. Changes since v1: * Moved autoconf stuff inside tools folder. * Add Makefile rules for cleaning. * Removed Automake dependency. * Create autogen.sh to automatically create configure script when building from source repository. * Cached values of options passed from command line. * Add necessary ignores to .hgignore. * Added Autoconf to the list of dependencies. * Changed hypen to underscore in XML2 and CURL variable names. * Added script to get version from xen/Makefile. * Set Ocaml tools to optional. * Added procedence of m4/ocaml.m4. Signed-off-by: Roger Pau Monne <roger.pau@entel.upc.edu> .hgignore | 6 + Config.mk | 39 ------ Makefile | 3 +- README | 4 + autogen.sh | 3 + config/Tools.mk.in | 50 +++++++ configure | 2 + tools/Makefile | 3 +- tools/Rules.mk | 7 +- tools/blktap/drivers/Makefile | 2 +- tools/blktap/drivers/check_gcrypt | 14 -- tools/check/Makefile | 26 ---- tools/check/README | 20 --- tools/check/check_brctl | 13 -- tools/check/check_crypto_lib | 11 - tools/check/check_curl | 13 -- tools/check/check_iproute | 15 -- tools/check/check_libaio_devel | 11 - tools/check/check_libaio_lib | 9 - tools/check/check_openssl_devel | 6 - tools/check/check_python | 13 -- tools/check/check_python_devel | 17 -- tools/check/check_python_xml | 12 - tools/check/check_udev | 22 --- tools/check/check_uuid_devel | 7 - tools/check/check_x11_devel | 9 - tools/check/check_xgettext | 6 - tools/check/check_xml2 | 14 -- tools/check/check_yajl_devel | 8 - tools/check/check_zlib_devel | 6 - tools/check/check_zlib_lib | 12 - tools/check/chk | 63 --------- tools/check/funcs.sh | 106 ---------------- tools/config.h.in | 16 ++ tools/configure.ac | 192 ++++++++++++++++++++++++++++++ tools/debugger/gdbsx/xg/Makefile | 1 - tools/install.sh | 1 + tools/libfsimage/Makefile | 6 +- tools/libfsimage/check-libext2fs | 21 --- tools/libxen/Makefile | 8 +- tools/libxl/Makefile | 7 +- tools/libxl/libxl_json.h | 2 +- tools/m4/default_lib.m4 | 8 + tools/m4/disable_feature.m4 | 13 ++ tools/m4/enable_feature.m4 | 13 ++ tools/m4/ocaml.m4 | 241 ++++++++++++++++++++++++++++++++++++++ tools/m4/path_or_fail.m4 | 6 + tools/m4/pkg.m4 | 157 ++++++++++++++++++++++++ tools/m4/python_devel.m4 | 18 ++ tools/m4/python_version.m4 | 12 + tools/m4/python_xml.m4 | 10 + tools/m4/set_cflags_ldflags.m4 | 20 +++ tools/m4/udev.m4 | 32 +++++ tools/m4/uuid.m4 | 10 + version.sh | 5 + 55 files changed, 840 insertions(+), 511 deletions(-) _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
Ian Jackson
2012-Feb-21 17:11 UTC
Re: [PATCH v8] build: add autoconf to replace custom checks in tools/check
Roger Pau Monne writes ("[PATCH v8] build: add autoconf to replace custom checks in tools/check"):> Added autotools magic to replace custom check scripts. The previous > checks have been ported to autoconf, and some additional ones have > been added (plus the suggestions from running autoscan). Two files are > created as a result from executing configure script, config/Tools.mk > and config.h.Thanks, I have now managed to successfuly test this. It''s looking good. I have made a change to the test system to deal with it (as otherwise of course all the builds will fail), and I will apply your autoconf patch when I get a push on the test system. I''ll also apply the .gitignore patch below. Ian. commit 6e9893f665a3f6fc6eef45fc53cf446f8c0856c4 Author: Ian Jackson <ian.jackson@eu.citrix.com> Date: Tue Feb 21 16:12:46 2012 +0000 .gitignore: add autoconf-related files Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> diff --git a/.gitignore b/.gitignore index d1a503b..8810b35 100644 --- a/.gitignore +++ b/.gitignore @@ -105,6 +105,12 @@ stubdom/lwip/ stubdom/ioemu/ stubdom/stubdompath.sh tools/*/build/lib*/*.py +tools/autom4te.cache +tools/config.h +tools/config.log +tools/config.status +tools/config.cache +config/Tools.mk tools/blktap2/daemon/blktapctrl tools/blktap2/drivers/img2qcow tools/blktap2/drivers/lock-util
Roger Pau Monné
2012-Feb-21 18:38 UTC
Re: [PATCH v8] build: add autoconf to replace custom checks in tools/check
2012/2/21 Ian Jackson <Ian.Jackson@eu.citrix.com>:> Roger Pau Monne writes ("[PATCH v8] build: add autoconf to replace custom checks in tools/check"): >> Added autotools magic to replace custom check scripts. The previous >> checks have been ported to autoconf, and some additional ones have >> been added (plus the suggestions from running autoscan). Two files are >> created as a result from executing configure script, config/Tools.mk >> and config.h. > > Thanks, I have now managed to successfuly test this. It's looking > good. > > I have made a change to the test system to deal with it (as otherwise > of course all the builds will fail), and I will apply your autoconf > patch when I get a push on the test system.Thats good, I'm happy that this is finally looking ok.> I'll also apply the .gitignore patch below.Isn't that already on my patch?> Ian. > > commit 6e9893f665a3f6fc6eef45fc53cf446f8c0856c4 > Author: Ian Jackson <ian.jackson@eu.citrix.com> > Date: Tue Feb 21 16:12:46 2012 +0000 > > .gitignore: add autoconf-related files > > Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> > > diff --git a/.gitignore b/.gitignore > index d1a503b..8810b35 100644 > --- a/.gitignore > +++ b/.gitignore > @@ -105,6 +105,12 @@ stubdom/lwip/ > stubdom/ioemu/ > stubdom/stubdompath.sh > tools/*/build/lib*/*.py > +tools/autom4te.cache > +tools/config.h > +tools/config.log > +tools/config.status > +tools/config.cache > +config/Tools.mk > tools/blktap2/daemon/blktapctrl > tools/blktap2/drivers/img2qcow > tools/blktap2/drivers/lock-util_______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
Ian Jackson
2012-Feb-21 20:19 UTC
Re: [PATCH v8] build: add autoconf to replace custom checks in tools/check
Roger Pau Monné writes ("Re: [PATCH v8] build: add autoconf to replace custom checks in tools/check"):> 2012/2/21 Ian Jackson <Ian.Jackson@eu.citrix.com>: > > I''ll also apply the .gitignore patch below. > > Isn''t that already on my patch?No, yours has the .hgignore. If I (and my git) are not mistaken. Ian.
Olaf Hering
2012-Feb-23 16:16 UTC
Re: [PATCH v8] build: add autoconf to replace custom checks in tools/check
On Tue, Feb 21, Roger Pau Monne wrote:> +AS_IF([test "x$pythontools" = "xy"], [ > + AS_IF([echo "$PYTHON" | grep -q "^/"], [ > + PYTHONPATH=$PYTHON > + PYTHON=`basename $PYTHONPATH` > + ],[test -z "$PYTHON"], [PYTHON="python"], > + [AC_MSG_ERROR([PYTHON specified, but is not an absolute path])]) > + AX_PATH_PROG_OR_FAIL([PYTHONPATH], [$PYTHON]) > + AX_CHECK_PYTHON_VERSION([2], [3]) > + AX_CHECK_PYTHON_XML() > + AX_CHECK_PYTHON_DEVEL() > +])Is the AX_CHECK_PYTHON_XML check really required for compilation? It seems to check for xml.dom.minidom which is used in xend at runtime. Olaf
Olaf Hering
2012-Feb-23 17:36 UTC
Re: [PATCH v8] build: add autoconf to replace custom checks in tools/check
On Tue, Feb 21, Roger Pau Monne wrote:> -${PYTHON} -c '' > -import sys > -sys.exit(sys.version_info[0] < 2 or sys.version_info[1] < 3) > -'' || fail "need python version >= 2.3"> +`$PYTHON -c ''import sys; exit(eval("sys.version_info < ($1, $2)"))''`Old python can not handle that new syntax: $ python Python 2.4.2 (#1, Feb 16 2011, 12:49:02) [GCC 4.1.2 20070115 (SUSE Linux)] on linux2 Type "help", "copyright", "credits" or "license" for more information.>>> import sys >>> exit(eval("sys.version_info < (2, 3)"))Traceback (most recent call last): File "<stdin>", line 1, in ? TypeError: ''str'' object is not callable>>>
Jeffrey Karrels
2012-Feb-27 21:20 UTC
Re: [PATCH v8] build: add autoconf to replace custom checks in tools/check
All, I was attempting to perform a ''make dist'' and installing from the ''dist'' onto another machine. It looks like the last line of the install.sh script in the dist folder wants to check the prerequisites from the ''check'' directory. I wanted to ask what the dist install methodology is with the autoconf configuration. I can give a hand, just wanted to check if people were working on this and what the thoughts were. ###/dist/install.sh cd $src/../check ./chk install echo "All done." On Thu, Feb 23, 2012 at 9:36 AM, Olaf Hering <olaf@aepfle.de> wrote:> On Tue, Feb 21, Roger Pau Monne wrote: > > > -${PYTHON} -c '' > > -import sys > > -sys.exit(sys.version_info[0] < 2 or sys.version_info[1] < 3) > > -'' || fail "need python version >= 2.3" > > > +`$PYTHON -c ''import sys; exit(eval("sys.version_info < ($1, $2)"))''` > > > Old python can not handle that new syntax: > > $ python > Python 2.4.2 (#1, Feb 16 2011, 12:49:02) > [GCC 4.1.2 20070115 (SUSE Linux)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> import sys > >>> exit(eval("sys.version_info < (2, 3)")) > Traceback (most recent call last): > File "<stdin>", line 1, in ? > TypeError: ''str'' object is not callable > >>> > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
Jeffrey Karrels
2012-Feb-28 18:09 UTC
Re: [PATCH v8] build: add autoconf to replace custom checks in tools/check
>Added autotools magic to replace custom check scriptsLet me start over on this one... What is the install methodology with the replacement of the custom checks with "autotools magic?" I am working on a dist build and realized that the dist build goes over and grabs the checks out of the tools directory to check the installation. So if I were to: #hg clone -r 24869 http://xenbits.xen.org/hg/xen-unstable.hg #cd xen-unstable #./configure #make dist #tar cvfz something.tar.gz dist #scp something.tar.gz xen@newhost:/temp #ssh xen@newhost #.... #./install.sh ... Checking to see whether prerequisite tools are installed... ./install.sh: line 53: cd: ./install/../check: No such file or directory ./install.sh: line 54: ./chk: No such file or directory All done. #ls dist COPYING install install.sh README #tail -n 6 dist/install.sh echo "Checking to see whether prerequisite tools are installed..." cd $src/../check ./chk install echo "All done." exit 0
Roger Pau Monné
2012-Feb-28 18:48 UTC
Re: [PATCH v8] build: add autoconf to replace custom checks in tools/check
2012/2/28 Jeffrey Karrels <karrelsj@gmail.com>:>>Added autotools magic to replace custom check scripts > > Let me start over on this one... What is the install methodology with > the replacement of the custom checks with "autotools magic?" I am > working on a dist build and realized that the dist build goes over and > grabs the checks out of the tools directory to check the installation. > So if I were to: > > #hg clone -r 24869 http://xenbits.xen.org/hg/xen-unstable.hg > #cd xen-unstable > #./configure > #make dist > #tar cvfz something.tar.gz dist > #scp something.tar.gz xen@newhost:/temp > #ssh xen@newhost > #.... > #./install.sh > ... > Checking to see whether prerequisite tools are installed... > ./install.sh: line 53: cd: ./install/../check: No such file or directory > ./install.sh: line 54: ./chk: No such file or directory > All done.This should fix it (I haven't tested): 8<-------------------------------------------- install: remove old checks from install.sh Signed-off-by: Roger Pau Monne <roger.pau@entel.upc.edu> diff -r e1fdc5509bb4 install.sh --- a/install.sh Wed Feb 22 04:15:34 2012 +0100 +++ b/install.sh Wed Feb 22 04:46:07 2012 +0100 @@ -49,9 +49,4 @@ rm -rf "$tmp" echo "All done." -echo "Checking to see whether prerequisite tools are installed..." -cd $src/../check -./chk install -echo "All done." - exit 0 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
Jeffrey Karrels
2012-Feb-28 22:32 UTC
Re: [PATCH v8] build: add autoconf to replace custom checks in tools/check
> This should fix it (I haven''t tested): >That was what I did as well. Seems to work fine for me. Thanks.
Ian Jackson
2012-Feb-29 14:44 UTC
Re: [PATCH v8] build: add autoconf to replace custom checks in tools/check
Roger Pau Monné writes ("Re: [Xen-devel] [PATCH v8] build: add autoconf to replace custom checks in tools/check"):> install: remove old checks from install.sh > > Signed-off-by: Roger Pau Monne <roger.pau@entel.upc.edu>Looks good to me. Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com> Ian.