From: <vac...@us...> - 2008-11-25 15:50:57
|
Revision: 98 http://xmlwrapp.svn.sourceforge.net/xmlwrapp/?rev=98&view=rev Author: vaclavslavik Date: 2008-11-25 15:50:51 +0000 (Tue, 25 Nov 2008) Log Message: ----------- ported Unix build system to Autotools Modified Paths: -------------- trunk/ChangeLog trunk/src/libxml/document.cxx Added Paths: ----------- trunk/Makefile.am trunk/admin/ trunk/bootstrap trunk/configure.ac trunk/examples/01-tree_parsing/Makefile.am trunk/examples/02-event_parsing/Makefile.am trunk/examples/03-xml_generation/Makefile.am trunk/examples/04-xslt/Makefile.am trunk/examples/Makefile.am trunk/include/Makefile.am trunk/src/Makefile.am trunk/tests/Makefile.am trunk/tests/attributes/Makefile.am trunk/tests/document/Makefile.am trunk/tests/event/Makefile.am trunk/tests/node/Makefile.am trunk/tests/tree/Makefile.am trunk/tests/xslt/Makefile.am trunk/xmlwrapp-config.in trunk/xmlwrapp.pc.in Removed Paths: ------------- trunk/configure.pl trunk/tools/cxxflags trunk/tools/genconfig trunk/tools/mkmf Property Changed: ---------------- trunk/ trunk/examples/ trunk/examples/01-tree_parsing/ trunk/examples/02-event_parsing/ trunk/examples/03-xml_generation/ trunk/examples/04-xslt/ trunk/include/ trunk/src/ trunk/tests/ trunk/tests/attributes/ trunk/tests/document/ trunk/tests/event/ trunk/tests/node/ trunk/tests/tree/ trunk/tests/xslt/ Property changes on: trunk ___________________________________________________________________ Modified: svn:ignore - Makefile README.xmlwrapp_sourceforge *.pdf *.ps xmlwrapp-config xmlwrapp.pc docbookmk-0.0.11.tar.gz download t t.pdf t.ps t.txt packxmlwrapp.pl xmlwrapp.carry xmlwrapp_exclude.pm tmp + Makefile Makefile.in xmlwrapp-config xmlwrapp.pc config.log config.status stamp-h1 libtool Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2008-11-24 02:37:42 UTC (rev 97) +++ trunk/ChangeLog 2008-11-25 15:50:51 UTC (rev 98) @@ -3,6 +3,8 @@ Fixed libxmlwrapp to not depend on libxslt if XSLT support is enabled (Vadim Zeitlin, #1927398). + Ported Unix build system to Autotools. + Version 0.5.1 Various compilation fixes. Added: trunk/Makefile.am =================================================================== --- trunk/Makefile.am (rev 0) +++ trunk/Makefile.am 2008-11-25 15:50:51 UTC (rev 98) @@ -0,0 +1,7 @@ + +SUBDIRS = include src examples tests + +pkgconfigdir=$(libdir)/pkgconfig +pkgconfig_DATA = xmlwrapp.pc + +bin_SCRIPTS = xmlwrapp-config Property changes on: trunk/Makefile.am ___________________________________________________________________ Added: svn:keywords + Id Added: svn:eol-style + native Property changes on: trunk/admin ___________________________________________________________________ Added: svn:ignore + depcomp missing config.guess ltmain.sh config.sub install-sh Added: trunk/bootstrap =================================================================== --- trunk/bootstrap (rev 0) +++ trunk/bootstrap 2008-11-25 15:50:51 UTC (rev 98) @@ -0,0 +1,60 @@ +#!/bin/sh + +# Script to execute to initialize xmlwrapp build system after checking out +# pristine sources from a version control system: this script creates all +# generated files which are needed for the build but not stored under version +# control. + +# Copyright (C) 2005, 2006, 2007, 2008 Vadim Zeitlin +# All Rights Reserved +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name of the Author nor the names of its contributors +# may be used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR +# OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF +# USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT +# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. + +# $Id$ + +if [ ! -f configure.ac -o ! -f Makefile.am -o ! -f xmlwrapp.pc.in ]; then + echo "Please run this script from the xmlwrapp source directory." + exit 2 +fi + +# use --foreign with automake because we lack standard GNU NEWS and AUTHOR +# files, if they're added we can "upgrade" to (default) GNU strictness. Use +# --copy to allow simultaneous use on windows under mingw and cygwin platforms. +# Symlinking of files under mingw does not work out for cygwin and vice-versa. +echo "Setting up build system for xmlwrapp:" +echo " - aclocal " && aclocal ${wx+-I} $wx && \ +echo " - libtoolize " && libtoolize --copy --automake && \ +echo " - autoconf " && autoconf && \ +echo " - autoheader " && autoheader && \ +echo " - automake " && automake --add-missing --copy --foreign && \ +echo "Build setup successful, type \"configure\" to configure xmlwrapp now." && \ +exit 0 + +echo "Automatic build files setup failed!" + +exit 1 Property changes on: trunk/bootstrap ___________________________________________________________________ Added: svn:executable + * Added: trunk/configure.ac =================================================================== --- trunk/configure.ac (rev 0) +++ trunk/configure.ac 2008-11-25 15:50:51 UTC (rev 98) @@ -0,0 +1,125 @@ +dnl configure.ac script for xmlwrapp, process with autoconf to create configure +dnl +dnl Copyright (C) 2008 Vaclav Slavik <vs...@fa...>, +dnl 2008 Vadim Zeitlin <va...@tt...> +dnl All Rights Reserved +dnl +dnl Redistribution and use in source and binary forms, with or without +dnl modification, are permitted provided that the following conditions +dnl are met: +dnl +dnl 1. Redistributions of source code must retain the above copyright +dnl notice, this list of conditions and the following disclaimer. +dnl 2. Redistributions in binary form must reproduce the above copyright +dnl notice, this list of conditions and the following disclaimer in +dnl the documentation and/or other materials provided with the +dnl distribution. +dnl 3. Neither the name of the Author nor the names of its contributors +dnl may be used to endorse or promote products derived from this software +dnl without specific prior written permission. +dnl +dnl THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' +dnl AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +dnl TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +dnl PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR +dnl OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +dnl SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +dnl LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF +dnl USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +dnl AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +dnl OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT +dnl OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +dnl SUCH DAMAGE. + +dnl === Prologue === + +AC_REVISION($Id$)dnl + +AC_PREREQ(2.56) +AC_INIT(xmlwrapp, 0.6.0, [xml...@li...]) + +AC_CONFIG_SRCDIR([xmlwrapp.pc.in]) +AC_CONFIG_AUX_DIR([admin]) + +AM_INIT_AUTOMAKE +AM_MAINTAINER_MODE + +dnl remember, "build" is where we compile, "host" is where the resulting +dnl program runs (which may be different from "build" for cross-compilation) +AC_CANONICAL_HOST + + +dnl === Command line options === + +AC_ARG_ENABLE(xslt, + [AC_HELP_STRING([--disable-xslt], + [don't build libxsltwrapp library])], + [case "x${enableval}" in + x) build_xslt=no ;; + xyes) build_xslt=yes ;; + xno) build_xslt=no ;; + *) AC_MSG_ERROR(bad value ${enableval} for --enable-xslt) ;; + esac], + [build_xslt=yes]) + + +dnl === Program checks === + +AC_PROG_CXX +AC_PROG_LD +AC_PROG_LIBTOOL + + +dnl === Library checks === + +dnl use C++ compiler as we're checking for C++ libraries/headers from now on +dnl (we couldn't do it before as libtool tests must be done with C compiler) +AC_LANG(C++) + +PKG_CHECK_MODULES(LIBXML, [libxml-2.0 >= 2.4.28]) + +if test "x$build_xslt" = "xyes" ; then + PKG_CHECK_MODULES(LIBXSLT, [libxslt >= 1.0.23]) + PKG_CHECK_MODULES(LIBEXSLT, [libexslt]) +fi + + +dnl === Compiler-specific stuff === + +if test "x$GCC" == "xyes"; then + dnl Enable some useful warnings that GCC supports: + CXXFLAGS="$CXXFLAGS -W -Wall -Wcast-align -Wwrite-strings" +fi + + +dnl === Generate output files === + +XMLWRAPP_LINK_FLAGS="-lxmlwrapp $LIBXML_LIBS" +if test "x$build_xslt" = "xyes" ; then + XMLWRAPP_LINK_FLAGS="-lxsltwrapp $LIBEXSLT_LIBS $LIBXSLT_LIBS $XMLWRAPP_LINK_FLAGS" +fi + +AM_CONDITIONAL(WITH_XSLT, [ test "x$build_xslt" = "xyes" ]) + +AC_SUBST(XMLWRAPP_LINK_FLAGS) + +AC_CONFIG_FILES([ + xmlwrapp.pc + xmlwrapp-config + Makefile + include/Makefile + src/Makefile + examples/Makefile + examples/01-tree_parsing/Makefile + examples/02-event_parsing/Makefile + examples/03-xml_generation/Makefile + examples/04-xslt/Makefile + tests/Makefile + tests/attributes/Makefile + tests/document/Makefile + tests/event/Makefile + tests/node/Makefile + tests/tree/Makefile + tests/xslt/Makefile +]) +AC_OUTPUT Deleted: trunk/configure.pl =================================================================== --- trunk/configure.pl 2008-11-24 02:37:42 UTC (rev 97) +++ trunk/configure.pl 2008-11-25 15:50:51 UTC (rev 98) @@ -1,600 +0,0 @@ -#! /usr/bin/perl -###################################################################### -# Copyright (C) 2001-2003 Peter J Jones (pj...@pm...) -# All Rights Reserved -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# 3. Neither the name of the Author nor the names of its contributors -# may be used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR -# OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF -# USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT -# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -# SUCH DAMAGE. -################################################################################ -# -# configure.pl (bootstrap xmlwrapp) -# Peter J Jones (pj...@pm...) -# -################################################################################ -# -# Includes -# -################################################################################ -use strict; -use Getopt::Long; -use Cwd qw(cwd chdir); -################################################################################ -# -# Constants -# -################################################################################ -use constant DATE => 'Tue Jan 15 08:56:06 2002'; -use constant ID => '$Id: configure.pl,v 1.6 2005-11-15 21:30:43 tbrowder2 Exp $'; -################################################################################ -# -# Global Variables -# -################################################################################ -$Getopt::Long::bundling = 1; - -my $cwd = cwd(); -my %clo; -my $dirsep = "/"; - -my $mkmf = "${cwd}${dirsep}tools${dirsep}mkmf"; -my $cxxflags = "${cwd}${dirsep}tools${dirsep}cxxflags"; -my $genconfig = "${cwd}${dirsep}tools${dirsep}genconfig"; -my $master_inc = "${cwd}${dirsep}include"; - -my $mkmf_flags; -my $libname = "xmlwrapp"; -my $install_spec= "docs${dirsep}install.spec"; -my $src_sub_dir = 'libxml'; -my @test_dirs = qw(tree event node document attributes); -my $xmlwrapp_ver; -my $xmlwrapp_mjr; - -my $xslt_libname = "xsltwrapp"; -my $xslt_sub_dir = 'libxslt'; -my $xsltwrapp_okay = 0; -my $xsltwrapp_mjr; - -my $have_pkg_config = 0; -my @external_libs; -my @external_incs; -################################################################################ -# -# Code Start -# -################################################################################ -$|++; - -if (not defined $ENV{'CXX'}) { - print STDERR "**** Your CXX environment variable is not set. ****\n"; - print STDERR "**** xmlwrapp needs this variable to find your C++ compiler. ****\n"; - exit; -} - -GetOptions( - \%clo, - - 'help|h', - - 'developer|d', - 'contrib', - - 'xml2-config=s', - 'xslt-config=s', - - 'disable-shared', - 'disable-examples', - 'enable-tests|t', - 'disable-xslt', - - 'prefix=s', - 'bindir=s', - 'libdir=s', - 'incdir=s', -) or usage(); -$clo{'help'} && usage(); - -sub usage { - print "Usage: $0 [options]\n", <<EOT; - -h, --help This message - --developer Turn on features for a xmlwrapp developer - --contrib Configure for being bundled inside another project - --disable-shared Don't build a shared library - --disable-examples Don't build the example programs - --enable-tests Enable the building of test programs - - --xml2-config file Run file to get info about libxml2 [xml2-config] - - --prefix path Set install prefix to path [/usr/local] - --bindir path Set bin install location to path [PREFIX/bin] - --libdir path Set lib install location to path [PREFIX/lib] - --incdir path Set include install location to path [PREFIX/include] -EOT - exit 1; -} - -# set some defaults -$clo{'prefix'} ||= "/usr/local"; -$clo{'bindir'} ||= "$clo{'prefix'}${dirsep}bin"; -$clo{'libdir'} ||= "$clo{'prefix'}${dirsep}lib"; -$clo{'incdir'} ||= "$clo{'prefix'}${dirsep}include"; -$clo{'disable-shared'} = 1 if $clo{'contrib'}; - -if ($clo{'contrib'}) { - $clo{'disable-shared'} = 1; - $clo{'disable-examples'} = 1; -} - -# setup defaults for mkmf -$mkmf_flags = "--include $master_inc --cxxflags $cxxflags --quiet "; -if ($clo{'developer'}) {$mkmf_flags .= " --developer";} - -# look for libxml2 -if ($clo{'disable-xslt'} or check_libxslt() != 1) { - check_libxml2(); -} - -# find out the current version -parse_version_file(); - -# generate the config script -generate_config_script(); - -# generate the xmlwrapp_config.h header -generate_config_header(); - -# start generating makefiles -generate_top_makefile(); -generate_test_makefiles(); -generate_example_makefiles(); -generate_src_makefiles(); - -if (!$clo{'contrib'}) { - print "+---------------------------------------------------------------+\n"; - print "| Join the users mailing list for help with xmlwrapp. |\n"; - print "| Visit 'http://sourceforge.net/projects/xmlwrapp'. |\n"; - print "| Click on 'Lists'. |\n"; - print "+---------------------------------------------------------------+\n"; -} -################################################################################ -sub parse_version_file { - unless (open(VERSION, "docs${dirsep}VERSION")) { - print STDERR "$0: can't open VERSION file 'docs${dirsep}VERSION': $!\n"; - exit 1; - } - - my $first_line = <VERSION>; - close VERSION; - - ($xmlwrapp_ver, $xmlwrapp_mjr, $xsltwrapp_mjr, undef) = split(/\s+/, $first_line, 4); -} -################################################################################ -sub check_libxslt { - my $output; - - print "Checking for libxslt version ... "; - $clo{'xslt-config'} ||= 'xslt-config'; - chomp($output = `$clo{'xslt-config'} --version 2>&1`); - - if ($? != 0 or not defined $output or not length($output)) { - print "no\n"; - return 0; - } - - if ($output =~ /^(\d+\.\d+)\.(\d+)$/) { - if (($1 > 1.0) or ($1 == 1.0 and $2 >= 23)) { - print "$output >= 1.0.23\n"; - } else { - print "$output < 1.0.23\n"; - print STDERR "**** your version of libxslt is too old.\n"; - print STDERR "**** you can configure with --disable-xslt to drop XSLT support.\n"; - exit 1; - } - } else { - print "xmlwrapp bug\n"; - print STDERR "**** I can't parse the version string, this is a bug!\n"; - exit 1; - } - - load_flags_from_xml_config("xslt"); - $xsltwrapp_okay = 1; - push(@test_dirs, "xslt"); - - return 1; -} -################################################################################ -sub check_libxml2 { - my $output; - - print "Checking for libxml2 version ... "; - $clo{'xml2-config'} ||= 'xml2-config'; - chomp($output = `$clo{'xml2-config'} --version 2>&1`); - - unless ($output) { - print "[fail]\n"; - print STDERR "**** can't find xml2-config, try using --xml2-config\n"; - exit 1; - } - - if ($output =~ /^(\d+\.\d+)\.(\d+)$/) { - if (($1 >= 2.5) || $1 == 2.4 && $2 >= 28) { - print "$output >= 2.4.28\n"; - } else { - print "$output < 2.4.28\n"; - print STDERR "**** your version of libxml2 is too old, please upgrade\n"; - exit 1; - } - } else { - print "what is that?\n"; - print STDERR "**** I can't seem to parse the libxml2 version, please submit a bug\n"; - exit 1; - } - - load_flags_from_xml_config("xml2"); -} -################################################################################ -sub load_flags_from_xml_config { - my $xmllib = shift; - my $config = "$xmllib-config"; - my $output; - - print "Finding XML '$xmllib' include directory ... "; - chomp($output = `$clo{$config} --cflags 2>&1`); - - if ($xmllib eq 'xslt' && 1) { - # hack - $output = $output . ' -I/usr/local/include/libxml2'; - if (0) { - my $cmd = $clo{$config}; - print "DEBUG: cmd = '$cmd'...\n"; - print "DEBUG: xml2 flags = '$output'...\n"; - exit; - } - } - if ($? != 0 or not defined $output or not length($output)) { - print "fail\n"; - print "**** error running $clo{$config} --cflags, sorry\n"; - exit 1; - } - - $output =~ s/-I//g; - my @include_dirs = split(/\s+/, $output); - my $main_include_dir = undef; - my $xslt_include_dir = undef; - - # add a few standard directories just in case - push(@include_dirs, '/usr/include'); - - foreach my $dir (@include_dirs) { - if (-d "$dir${dirsep}libxml" and not defined $main_include_dir) { - $main_include_dir = $dir; - } - - if (-e "$dir${dirsep}libxslt${dirsep}transform.h" and not defined $xslt_include_dir) { - $xslt_include_dir = $dir; - } - - if (-e "$dir${dirsep}giconv.h") { - push(@external_incs, $dir); - } - - if (-e "$dir${dirsep}iconv.h") { - push(@external_incs, $dir); - } - } - - if ($xmllib eq 'xslt' and not defined $xslt_include_dir) { - print STDERR "**** can't find include dir for libxslt, what does $clo{'$xmllib-config'} --cflags say?\n"; - exit 1; - } - elsif($xmllib eq 'xslt') { - push(@external_incs, $xslt_include_dir); - } - - if (not defined $main_include_dir) { - print "fail\n"; - print STDERR "**** can't find include dir for libxml2, what does $clo{'$xmllib-config'} --cflags say?\n"; - exit 1; - } - else { - print "$main_include_dir\n"; - push(@external_incs, $main_include_dir); - } - - print "Finding XML libraries ... "; - chomp($output = `$clo{$config} --libs 2>&1`); - - if ($? != 0 or not defined $output or not length($output)) { - print "fail\n"; - print "**** error running $clo{$config} --libs, sorry\n"; - exit 1; - } - else { - print "done\n"; - } - - $output =~ s/^\s+//; $output =~ s/\s+$//; - my $last_L; - - if ($xmllib eq 'xslt' and $output !~ /-lexslt/) { - $output =~ s/-lxslt/-lxslt -lexslt/; - } - - while ($output =~ /-([Ll])(\S+)/cg) { - if ($1 eq 'L') { - $last_L = $2; - next; - } - - if ($last_L) { - push(@external_libs, [$last_L, $2]); - } else { - push(@external_libs, $2); - } - } -} -################################################################################ -sub generate_top_makefile { - my $extra_dirs = "tests" if $clo{'enable-tests'}; - $extra_dirs .= " examples" if not $clo{'disable-examples'}; - - my $extra_flags = ''; - $extra_flags .= ' --with-test tests' if $clo{'enable-tests'}; - - unless (open(SPEC, ">$install_spec")) { - print STDERR "\n$0: can't open $install_spec: $!\n"; - exit 1; - } - - # set some install paths - print SPEC "bindir=$clo{'bindir'}\n"; - print SPEC "libdir=$clo{'libdir'}\n"; - print SPEC "includedir=$clo{'incdir'}\n"; - - # add files - print SPEC "binary $libname-config\n"; - print SPEC "pkgconfig $libname.pc\n" if $have_pkg_config == 1; - print SPEC "include-dir include/$libname $libname\n"; - print SPEC "static-lib src/$src_sub_dir $libname\n"; - print SPEC "shared-lib src/$src_sub_dir $libname $xmlwrapp_mjr\n" unless $clo{'disable-shared'}; - - if ($xsltwrapp_okay == 1) { - print SPEC "include-dir include/$xslt_libname $xslt_libname\n"; - print SPEC "static-lib src/$xslt_sub_dir $xslt_libname\n"; - print SPEC "shared-lib src/$xslt_sub_dir $xslt_libname $xsltwrapp_mjr\n" unless $clo{'disable-shared'}; - } - - close SPEC; - - print "Creating Makefile ...\n"; - system("$^X $mkmf $mkmf_flags --install $install_spec $extra_flags --wrapper src $extra_dirs"); - unlink($install_spec); -} -################################################################################ -sub generate_src_makefiles { - ## - # src/Makefile - if (! chdir("$cwd${dirsep}src")) { - print STDERR "\n**** hey, I can't cd into my src directory: $!\n"; - exit 1; - } - - my $src_dirs = "$src_sub_dir"; - $src_dirs .= " $xslt_sub_dir" if $xsltwrapp_okay == 1; - - print "Creating src/Makefile ...\n"; - system("$^X $mkmf $mkmf_flags --wrapper $src_dirs"); - chdir($cwd); - - ## - # src/libxml2/Makefile - if (! chdir("$cwd${dirsep}src${dirsep}$src_sub_dir")) { - print STDERR "\n**** hey, I can't cd into my src/$src_sub_dir directory: $!\n"; - exit 1; - } - - my $extra_flags = "--shared-lib $libname --major $xmlwrapp_mjr" unless $clo{'disable-shared'}; - foreach my $dir (@external_incs) { $extra_flags .= " --include $dir"; } - - print "Creating src/$src_sub_dir/Makefile ...\n"; - system("$^X $mkmf $mkmf_flags --static-lib $libname $extra_flags *.cxx"); - chdir($cwd); - - ## - # src/libxslt/Makefile - if (! chdir("$cwd${dirsep}src${dirsep}$xslt_sub_dir")) { - print STDERR "\n**** hey, I can't cd into my src/$xslt_sub_dir directory: $!\n"; - exit 1; - } - - my $extra_flags = "--shared-lib $xslt_libname --major $xsltwrapp_mjr" unless $clo{'disable-shared'}; - foreach my $dir (@external_incs) { $extra_flags .= " --include $dir"; } - - print "Creating src/$xslt_sub_dir/Makefile ...\n"; - system("$^X $mkmf $mkmf_flags --static-lib $xslt_libname $extra_flags *.cxx"); - chdir($cwd); -} -################################################################################ -sub generate_test_makefiles { - return unless $clo{'enable-tests'}; - - if (! chdir("$cwd${dirsep}tests")) { - print STDERR "\n$0: can't cd to tests: $!\n"; - exit 1; - } - - my $with_test = join(',', @test_dirs); - print "Creating tests/Makefile ...\n"; - system("$^X $mkmf $mkmf_flags --with-test '$with_test' --wrapper @test_dirs"); - chdir($cwd); - - # static link with xmlwrapp so that it does not need to be installed - my $extra_flags = ""; - $extra_flags .= "--slinkwith $cwd${dirsep}src/$xslt_sub_dir,$xslt_libname " if $xsltwrapp_okay == 1; - $extra_flags .= "--slinkwith $cwd${dirsep}src/$src_sub_dir,$libname "; - - # link with all external libs - foreach my $lib (@external_libs) { - if (ref $lib) { - $extra_flags .= " --linkwith $lib->[0],$lib->[1]"; - } else { - $extra_flags .= " --linkwith $lib"; - } - } - - $extra_flags .= " --test-cmds '$^X runtest.pl'"; - - foreach my $test (@test_dirs) { - if (! chdir("$cwd${dirsep}tests${dirsep}$test")) { - print STDERR "\n$0: can't cd to $cwd${dirsep}tests${dirsep}$test: $!\n"; - exit 1; - } - - print "Creating tests/$test/Makefile ...\n"; - system("$^X $mkmf $mkmf_flags --many-exec $extra_flags *.cxx"); - chdir($cwd); - } -} -################################################################################ -sub generate_example_makefiles { - return if $clo{'disable-examples'}; - - if (! chdir("$cwd${dirsep}examples")) { - print STDERR "\n$0: can't cd to examples: $!\n"; - exit 1; - } - - my @raw_example_dirs = grep {!/^(CVS|Makefile)$/} glob("*"); - my @example_dirs; - - foreach (@raw_example_dirs) { - if (/xslt/i and $xsltwrapp_okay != 1) { next; } - push(@example_dirs, $_); - } - - print "Creating examples/Makefile ...\n"; - system("$^X $mkmf $mkmf_flags --wrapper @example_dirs"); - chdir($cwd); - - # static link with xmlwrapp so that it does not need to be installed - my $extra_flags; - $extra_flags .= "--slinkwith $cwd${dirsep}src/$xslt_sub_dir,$xslt_libname " if $xsltwrapp_okay == 1; - $extra_flags .= "--slinkwith $cwd${dirsep}src${dirsep}$src_sub_dir,$libname "; - - # link with all external libs - foreach my $lib (@external_libs) { - if (ref $lib) { - $extra_flags .= " --linkwith $lib->[0],$lib->[1]"; - } else { - $extra_flags .= " --linkwith $lib"; - } - } - - foreach my $example (@example_dirs) { - if (! chdir("$cwd${dirsep}examples${dirsep}$example")) { - print STDERR "\n$0: can't cd to $cwd${dirsep}examples${dirsep}$example: $!\n"; - exit 1; - } - - print "Creating examples/$example/Makefile ...\n"; - system("$^X $mkmf $mkmf_flags --one-exec example $extra_flags *.cxx"); - chdir($cwd); - } -} -################################################################################ -sub generate_config_script { - my ($all_incs, $all_libs); - - if ($clo{'contrib'}) { - $all_incs = "-I$cwd${dirsep}include "; - $all_libs = ""; - - my @lib_names; - push(@lib_names, $xslt_libname) if $xsltwrapp_okay == 1; - push(@lib_names, $libname); - - foreach my $lib_name (@lib_names) { - my $full_libname = `$^X $cxxflags --static-lib-prefix`; - $full_libname =~ s/^\s+//; $full_libname =~ s/\s+$//; - $full_libname .= $lib_name; - $full_libname .= `$^X $cxxflags --static-lib-extension`; - $full_libname =~ s/^\s+//; $full_libname =~ s/\s+$//; - - my $subdir = $lib_name eq $xslt_libname ? $xslt_sub_dir : $src_sub_dir; - $all_libs .= "$cwd${dirsep}src${dirsep}$subdir${dirsep}$full_libname "; - } - } else { - $all_incs = "-I$clo{'incdir'} "; - $all_libs .= `$^X $cxxflags --linkwith $clo{'libdir'},$xslt_libname` if $xsltwrapp_okay == 1; - $all_libs .= `$^X $cxxflags --linkwith $clo{'libdir'},$libname`; - } - - # add external libraries - foreach my $lib (@external_libs) { - if (ref $lib) { - $all_libs .= `$^X $cxxflags --linkwith $lib->[0],$lib->[1]`; - } else { - $all_libs .= `$^X $cxxflags --linkwith $lib`; - } - } - - # clean and encode - foreach ($all_incs, $all_libs) { - s/^\s+//; s/\s+$//; s/\s+/ /g; s/-/^/g; - } - - my $command = "$^X $genconfig --version $xmlwrapp_ver --name $libname"; - $command .= " --libs \"$all_libs\" --cxxflags \"$all_incs\""; - $command .= " --desc 'A C++ wrapper around libxml2 and libxslt' "; - $command .= " -o $libname-config"; - - # check for pkg-config - if (system("pkg-config --version > /dev/null 2>&1") == 0 || system("$clo{'bindir'}/pkg-config --version > /dev/null 2>&1") == 0) { - $have_pkg_config = 1; - $command .= " --prefix='$clo{prefix}' --bindir='$clo{bindir}' --libdir='$clo{libdir}' --incdir='$clo{incdir}' --pkgconfig='$libname.pc'"; - } - - print "Creating xmlwrapp-config script ... \n"; - system("$command"); -} -################################################################################ -sub generate_config_header { - if (not open(CH, ">src${dirsep}xmlwrapp_config.h")) { - print STDERR "$0: error creating src/xmlwrapp_config.h: $!\n"; - exit 1; - } - - print CH "#ifndef _xmlwrapp_config_h_\n"; - print CH "#define _xmlwrapp_config_h_\n"; - - if ($xsltwrapp_okay == 1) { - print CH "#define XMLWRAPP_WITH_XSLT\n"; - } - - print CH "#endif\n"; - close CH; -} -################################################################################ Property changes on: trunk/examples ___________________________________________________________________ Modified: svn:ignore - Makefile + Makefile Makefile.in Property changes on: trunk/examples/01-tree_parsing ___________________________________________________________________ Modified: svn:ignore - Makefile example + example Makefile Makefile.in .deps .libs Added: trunk/examples/01-tree_parsing/Makefile.am =================================================================== --- trunk/examples/01-tree_parsing/Makefile.am (rev 0) +++ trunk/examples/01-tree_parsing/Makefile.am 2008-11-25 15:50:51 UTC (rev 98) @@ -0,0 +1,6 @@ + +noinst_PROGRAMS = example + +example_SOURCES = example.cxx +example_CPPFLAGS = -I$(top_srcdir)/include +example_LDADD = ../../src/libxmlwrapp.la Property changes on: trunk/examples/01-tree_parsing/Makefile.am ___________________________________________________________________ Added: svn:keywords + Id Added: svn:eol-style + native Property changes on: trunk/examples/02-event_parsing ___________________________________________________________________ Modified: svn:ignore - Makefile example + example Makefile Makefile.in .deps .libs Added: trunk/examples/02-event_parsing/Makefile.am =================================================================== --- trunk/examples/02-event_parsing/Makefile.am (rev 0) +++ trunk/examples/02-event_parsing/Makefile.am 2008-11-25 15:50:51 UTC (rev 98) @@ -0,0 +1,6 @@ + +noinst_PROGRAMS = example + +example_SOURCES = example.cxx +example_CPPFLAGS = -I$(top_srcdir)/include +example_LDADD = ../../src/libxmlwrapp.la Property changes on: trunk/examples/02-event_parsing/Makefile.am ___________________________________________________________________ Added: svn:keywords + Id Added: svn:eol-style + native Property changes on: trunk/examples/03-xml_generation ___________________________________________________________________ Modified: svn:ignore - Makefile example + example Makefile Makefile.in .deps .libs Added: trunk/examples/03-xml_generation/Makefile.am =================================================================== --- trunk/examples/03-xml_generation/Makefile.am (rev 0) +++ trunk/examples/03-xml_generation/Makefile.am 2008-11-25 15:50:51 UTC (rev 98) @@ -0,0 +1,6 @@ + +noinst_PROGRAMS = example + +example_SOURCES = example.cxx +example_CPPFLAGS = -I$(top_srcdir)/include +example_LDADD = ../../src/libxmlwrapp.la Property changes on: trunk/examples/03-xml_generation/Makefile.am ___________________________________________________________________ Added: svn:keywords + Id Added: svn:eol-style + native Property changes on: trunk/examples/04-xslt ___________________________________________________________________ Modified: svn:ignore - Makefile example + example Makefile Makefile.in .deps .libs Added: trunk/examples/04-xslt/Makefile.am =================================================================== --- trunk/examples/04-xslt/Makefile.am (rev 0) +++ trunk/examples/04-xslt/Makefile.am 2008-11-25 15:50:51 UTC (rev 98) @@ -0,0 +1,10 @@ + +if WITH_XSLT + +noinst_PROGRAMS = example + +example_SOURCES = example.cxx +example_CPPFLAGS = -I$(top_srcdir)/include +example_LDADD = ../../src/libxsltwrapp.la ../../src/libxmlwrapp.la + +endif Property changes on: trunk/examples/04-xslt/Makefile.am ___________________________________________________________________ Added: svn:keywords + Id Added: svn:eol-style + native Added: trunk/examples/Makefile.am =================================================================== --- trunk/examples/Makefile.am (rev 0) +++ trunk/examples/Makefile.am 2008-11-25 15:50:51 UTC (rev 98) @@ -0,0 +1,6 @@ + +SUBDIRS = \ + 01-tree_parsing \ + 02-event_parsing \ + 03-xml_generation \ + 04-xslt Property changes on: trunk/examples/Makefile.am ___________________________________________________________________ Added: svn:keywords + Id Added: svn:eol-style + native Property changes on: trunk/include ___________________________________________________________________ Added: svn:ignore + Makefile Makefile.in Added: trunk/include/Makefile.am =================================================================== --- trunk/include/Makefile.am (rev 0) +++ trunk/include/Makefile.am 2008-11-25 15:50:51 UTC (rev 98) @@ -0,0 +1,19 @@ + +xmlwrapp_includedir= $(includedir)/xmlwrapp +xmlwrapp_include_HEADERS = \ + xmlwrapp/attributes.h \ + xmlwrapp/_cbfo.h \ + xmlwrapp/document.h \ + xmlwrapp/event_parser.h \ + xmlwrapp/init.h \ + xmlwrapp/node.h \ + xmlwrapp/tree_parser.h \ + xmlwrapp/xmlwrapp.h + +if WITH_XSLT +xsltwrapp_includedir= $(includedir)/xsltwrapp +xsltwrapp_include_HEADERS = \ + xsltwrapp/init.h \ + xsltwrapp/stylesheet.h \ + xsltwrapp/xsltwrapp.h +endif Property changes on: trunk/include/Makefile.am ___________________________________________________________________ Added: svn:keywords + Id Added: svn:eol-style + native Property changes on: trunk/src ___________________________________________________________________ Modified: svn:ignore - Makefile xmlwrapp_config.h + Makefile Makefile.in .libs .deps Added: trunk/src/Makefile.am =================================================================== --- trunk/src/Makefile.am (rev 0) +++ trunk/src/Makefile.am 2008-11-25 15:50:51 UTC (rev 98) @@ -0,0 +1,44 @@ + +AM_CPPFLAGS = -I$(top_srcdir)/include + +if WITH_XSLT +lib_LTLIBRARIES = libxmlwrapp.la libxsltwrapp.la +else +lib_LTLIBRARIES = libxmlwrapp.la +endif + +libxmlwrapp_la_CPPFLAGS = $(AM_CPPFLAGS) $(LIBXML_CFLAGS) +libxmlwrapp_la_LIBADD = $(LIBXML_LIBS) +libxmlwrapp_la_LDFLAGS = -version-info 5:1:0 + +libxmlwrapp_la_SOURCES = \ + libxml/ait_impl.cxx \ + libxml/ait_impl.h \ + libxml/attributes.cxx \ + libxml/document.cxx \ + libxml/dtd_impl.cxx \ + libxml/dtd_impl.h \ + libxml/event_parser.cxx \ + libxml/init.cxx \ + libxml/node.cxx \ + libxml/node_iterator.cxx \ + libxml/node_iterator.h \ + libxml/node_manip.cxx \ + libxml/node_manip.h \ + libxml/tree_parser.cxx \ + libxml/utility.cxx \ + libxml/utility.h + + +if WITH_XSLT + +libxsltwrapp_la_CPPFLAGS = $(AM_CPPFLAGS) $(LIBEXSLT_CFLAGS) $(LIBXSLT_CFLAGS) +libxsltwrapp_la_LIBADD = libxmlwrapp.la $(LIBEXSLT_LIBS) $(LIBXSLT_LIBS) +libxsltwrapp_la_LDFLAGS = -version-info 2:1:0 + +libxsltwrapp_la_SOURCES = \ + libxslt/init.cxx \ + libxslt/result.h \ + libxslt/stylesheet.cxx + +endif Property changes on: trunk/src/Makefile.am ___________________________________________________________________ Added: svn:keywords + Id Added: svn:eol-style + native Modified: trunk/src/libxml/document.cxx =================================================================== --- trunk/src/libxml/document.cxx 2008-11-24 02:37:42 UTC (rev 97) +++ trunk/src/libxml/document.cxx 2008-11-25 15:50:51 UTC (rev 98) @@ -41,11 +41,6 @@ #include "dtd_impl.h" #include "node_manip.h" -// configure.pl generated file -#ifndef WIN32 -# include "../xmlwrapp_config.h" -#endif - // standard includes #include <new> #include <memory> Property changes on: trunk/tests ___________________________________________________________________ Modified: svn:ignore - Makefile + Makefile Makefile.in Added: trunk/tests/Makefile.am =================================================================== --- trunk/tests/Makefile.am (rev 0) +++ trunk/tests/Makefile.am 2008-11-25 15:50:51 UTC (rev 98) @@ -0,0 +1,8 @@ + +SUBDIRS = \ + attributes \ + document \ + event \ + node \ + tree \ + xslt Property changes on: trunk/tests/Makefile.am ___________________________________________________________________ Added: svn:keywords + Id Added: svn:eol-style + native Property changes on: trunk/tests/attributes ___________________________________________________________________ Modified: svn:ignore - Makefile test_attr-01 test_attr-02 test_attr-03 test_attr-04 test_attr-05 test_attr-06 test_attr-07 test_attr-08 test_attr-09 test_attr-10 + Makefile Makefile.in .deps .libs test_attr-01 test_attr-02 test_attr-03 test_attr-04 test_attr-05 test_attr-06 test_attr-07 test_attr-08 test_attr-09 test_attr-10 Added: trunk/tests/attributes/Makefile.am =================================================================== --- trunk/tests/attributes/Makefile.am (rev 0) +++ trunk/tests/attributes/Makefile.am 2008-11-25 15:50:51 UTC (rev 98) @@ -0,0 +1,28 @@ + +AM_CPPFLAGS = -I$(top_srcdir)/include +LIBS = ../../src/libxmlwrapp.la + +TESTS = runtest.pl + +noinst_PROGRAMS = \ + test_attr-01 \ + test_attr-02 \ + test_attr-03 \ + test_attr-04 \ + test_attr-05 \ + test_attr-06 \ + test_attr-07 \ + test_attr-08 \ + test_attr-09 \ + test_attr-10 + +test_attr_01_SOURCES = test_attr-01.cxx +test_attr_02_SOURCES = test_attr-02.cxx +test_attr_03_SOURCES = test_attr-03.cxx +test_attr_04_SOURCES = test_attr-04.cxx +test_attr_05_SOURCES = test_attr-05.cxx +test_attr_06_SOURCES = test_attr-06.cxx +test_attr_07_SOURCES = test_attr-07.cxx +test_attr_08_SOURCES = test_attr-08.cxx +test_attr_09_SOURCES = test_attr-09.cxx +test_attr_10_SOURCES = test_attr-10.cxx Property changes on: trunk/tests/attributes/Makefile.am ___________________________________________________________________ Added: svn:keywords + Id Added: svn:eol-style + native Property changes on: trunk/tests/document ___________________________________________________________________ Modified: svn:ignore - Makefile test_document-01 test_document-02 test_document-03 test_document-04 test_document-05 test_document-06 test_document-07 test_document-08 test_document-09 test_document-10 test_document-11 test_document-12 test_document-13 test_document-14 test_document-15 test_document-16 test_document-17 test_document-18 test_document-19 test_document-20 test_document-21 test_document-22 + Makefile Makefile.in .deps .libs test_document-01 test_document-02 test_document-03 test_document-04 test_document-05 test_document-06 test_document-07 test_document-08 test_document-09 test_document-10 test_document-11 test_document-12 test_document-13 test_document-14 test_document-15 test_document-16 test_document-17 test_document-18 test_document-19 test_document-20 test_document-21 test_document-22 Added: trunk/tests/document/Makefile.am =================================================================== --- trunk/tests/document/Makefile.am (rev 0) +++ trunk/tests/document/Makefile.am 2008-11-25 15:50:51 UTC (rev 98) @@ -0,0 +1,52 @@ + +AM_CPPFLAGS = -I$(top_srcdir)/include +LIBS = ../../src/libxmlwrapp.la + +TESTS = runtest.pl + +noinst_PROGRAMS = \ + test_document-01 \ + test_document-02 \ + test_document-03 \ + test_document-04 \ + test_document-05 \ + test_document-06 \ + test_document-07 \ + test_document-08 \ + test_document-09 \ + test_document-10 \ + test_document-11 \ + test_document-12 \ + test_document-13 \ + test_document-14 \ + test_document-15 \ + test_document-16 \ + test_document-17 \ + test_document-18 \ + test_document-19 \ + test_document-20 \ + test_document-21 \ + test_document-22 + +test_document_01_SOURCES = test_document-01.cxx +test_document_02_SOURCES = test_document-02.cxx +test_document_03_SOURCES = test_document-03.cxx +test_document_04_SOURCES = test_document-04.cxx +test_document_05_SOURCES = test_document-05.cxx +test_document_06_SOURCES = test_document-06.cxx +test_document_07_SOURCES = test_document-07.cxx +test_document_08_SOURCES = test_document-08.cxx +test_document_09_SOURCES = test_document-09.cxx +test_document_10_SOURCES = test_document-10.cxx +test_document_11_SOURCES = test_document-11.cxx +test_document_12_SOURCES = test_document-12.cxx +test_document_13_SOURCES = test_document-13.cxx +test_document_14_SOURCES = test_document-14.cxx +test_document_15_SOURCES = test_document-15.cxx +test_document_16_SOURCES = test_document-16.cxx +test_document_17_SOURCES = test_document-17.cxx +test_document_18_SOURCES = test_document-18.cxx +test_document_19_SOURCES = test_document-19.cxx +test_document_20_SOURCES = test_document-20.cxx +test_document_21_SOURCES = test_document-21.cxx +test_document_22_SOURCES = test_document-22.cxx Property changes on: trunk/tests/document/Makefile.am ___________________________________________________________________ Added: svn:keywords + Id Added: svn:eol-style + native Property changes on: trunk/tests/event ___________________________________________________________________ Modified: svn:ignore - Makefile test_event-01 test_event-02 test_event-03 + Makefile Makefile.in .deps .libs test_event-01 test_event-02 test_event-03 Added: trunk/tests/event/Makefile.am =================================================================== --- trunk/tests/event/Makefile.am (rev 0) +++ trunk/tests/event/Makefile.am 2008-11-25 15:50:51 UTC (rev 98) @@ -0,0 +1,14 @@ + +AM_CPPFLAGS = -I$(top_srcdir)/include +LIBS = ../../src/libxmlwrapp.la + +TESTS = runtest.pl + +noinst_PROGRAMS = \ + test_event-01 \ + test_event-02 \ + test_event-03 + +test_event_01_SOURCES = test_event-01.cxx +test_event_02_SOURCES = test_event-02.cxx +test_event_03_SOURCES = test_event-03.cxx Property changes on: trunk/tests/event/Makefile.am ___________________________________________________________________ Added: svn:keywords + Id Added: svn:eol-style + native Property changes on: trunk/tests/node ___________________________________________________________________ Modified: svn:ignore - Makefile test_node-01 test_node-02a test_node-02b test_node-02c test_node-02d test_node-03a test_node-03b test_node-04a test_node-04b test_node-05a test_node-05b test_node-05c test_node-05d test_node-06 test_node-07 test_node-08 test_node-09 test_node-10 test_node-11 test_node-12 test_node-13 + Makefile Makefile.in .deps .libs test_node-01 test_node-02a test_node-02b test_node-02c test_node-02d test_node-03a test_node-03b test_node-04a test_node-04b test_node-05a test_node-05b test_node-05c test_node-05d test_node-06 test_node-07 test_node-08 test_node-09 test_node-10 test_node-11 test_node-12 test_node-13 Added: trunk/tests/node/Makefile.am =================================================================== --- trunk/tests/node/Makefile.am (rev 0) +++ trunk/tests/node/Makefile.am 2008-11-25 15:50:51 UTC (rev 98) @@ -0,0 +1,50 @@ + +AM_CPPFLAGS = -I$(top_srcdir)/include +LIBS = ../../src/libxmlwrapp.la + +TESTS = runtest.pl + +noinst_PROGRAMS = \ + test_node-01 \ + test_node-02a \ + test_node-02b \ + test_node-02c \ + test_node-02d \ + test_node-03a \ + test_node-03b \ + test_node-04a \ + test_node-04b \ + test_node-05a \ + test_node-05b \ + test_node-05c \ + test_node-05d \ + test_node-06 \ + test_node-07 \ + test_node-08 \ + test_node-09 \ + test_node-10 \ + test_node-11 \ + test_node-12 \ + test_node-13 + +test_node_01_SOURCES = test_node-01.cxx +test_node_02a_SOURCES = test_node-02a.cxx +test_node_02b_SOURCES = test_node-02b.cxx +test_node_02c_SOURCES = test_node-02c.cxx +test_node_02d_SOURCES = test_node-02d.cxx +test_node_03a_SOURCES = test_node-03a.cxx +test_node_03b_SOURCES = test_node-03b.cxx +test_node_04a_SOURCES = test_node-04a.cxx +test_node_04b_SOURCES = test_node-04b.cxx +test_node_05a_SOURCES = test_node-05a.cxx +test_node_05b_SOURCES = test_node-05b.cxx +test_node_05c_SOURCES = test_node-05c.cxx +test_node_05d_SOURCES = test_node-05d.cxx +test_node_06_SOURCES = test_node-06.cxx +test_node_07_SOURCES = test_node-07.cxx +test_node_08_SOURCES = test_node-08.cxx +test_node_09_SOURCES = test_node-09.cxx +test_node_10_SOURCES = test_node-10.cxx +test_node_11_SOURCES = test_node-11.cxx +test_node_12_SOURCES = test_node-12.cxx +test_node_13_SOURCES = test_node-13.cxx Property changes on: trunk/tests/node/Makefile.am ___________________________________________________________________ Added: svn:keywords + Id Added: svn:eol-style + native Property changes on: trunk/tests/tree ___________________________________________________________________ Modified: svn:ignore - Makefile test_tree-01 test_tree-02 test_tree-03 test_tree-04 test_tree-05 test_tree-06 + Makefile Makefile.in .deps .libs test_tree-01 test_tree-02 test_tree-03 test_tree-04 test_tree-05 test_tree-06 Added: trunk/tests/tree/Makefile.am =================================================================== --- trunk/tests/tree/Makefile.am (rev 0) +++ trunk/tests/tree/Makefile.am 2008-11-25 15:50:51 UTC (rev 98) @@ -0,0 +1,20 @@ + +AM_CPPFLAGS = -I$(top_srcdir)/include +LIBS = ../../src/libxmlwrapp.la + +TESTS = runtest.pl + +noinst_PROGRAMS = \ + test_tree-01 \ + test_tree-02 \ + test_tree-03 \ + test_tree-04 \ + test_tree-05 \ + test_tree-06 + +test_tree_01_SOURCES = test_tree-01.cxx +test_tree_02_SOURCES = test_tree-02.cxx +test_tree_03_SOURCES = test_tree-03.cxx +test_tree_04_SOURCES = test_tree-04.cxx +test_tree_05_SOURCES = test_tree-05.cxx +test_tree_06_SOURCES = test_tree-06.cxx Property changes on: trunk/tests/tree/Makefile.am ___________________________________________________________________ Added: svn:keywords + Id Added: svn:eol-style + native Property changes on: trunk/tests/xslt ___________________________________________________________________ Modified: svn:ignore - Makefile test_xslt-01 test_xslt-02 test_xslt-03 test_xslt-04 test_xslt-05 + Makefile Makefile.in .deps .libs test_xslt-01 test_xslt-02 test_xslt-03 test_xslt-04 test_xslt-05 Added: trunk/tests/xslt/Makefile.am =================================================================== --- trunk/tests/xslt/Makefile.am (rev 0) +++ trunk/tests/xslt/Makefile.am 2008-11-25 15:50:51 UTC (rev 98) @@ -0,0 +1,22 @@ + +if WITH_XSLT + +AM_CPPFLAGS = -I$(top_srcdir)/include +LIBS = ../../src/libxsltwrapp.la ../../src/libxmlwrapp.la + +TESTS = runtest.pl + +noinst_PROGRAMS = \ + test_xslt-01 \ + test_xslt-02 \ + test_xslt-03 \ + test_xslt-04 \ + test_xslt-05 + +test_xslt_01_SOURCES = test_xslt-01.cxx +test_xslt_02_SOURCES = test_xslt-02.cxx +test_xslt_03_SOURCES = test_xslt-03.cxx +test_xslt_04_SOURCES = test_xslt-04.cxx +test_xslt_05_SOURCES = test_xslt-05.cxx + +endif Property changes on: trunk/tests/xslt/Makefile.am ___________________________________________________________________ Added: svn:keywords + Id Added: svn:eol-style + native Deleted: trunk/tools/cxxflags =================================================================== --- trunk/tools/cxxflags 2008-11-24 02:37:42 UTC (rev 97) +++ trunk/tools/cxxflags 2008-11-25 15:50:51 UTC (rev 98) @@ -1,396 +0,0 @@ -#! /usr/bin/perl -###################################################################### -# Copyright (C) 2001-2002 Peter J Jones (pj...@pm...) -# All Rights Reserved -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# 3. Neither the name of the Author nor the names of its contributors -# may be used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR -# OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF -# USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT -# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -# SUCH DAMAGE. -################################################################################ -# -# cxxflags (Helper script to get compiler flags) -# Peter J Jones (pj...@pm...) -# -# This file is part of cxxtools (http://pmade.org/pjones/software/cxxtools/) -# -################################################################################ -# -# Includes -# -################################################################################ -use strict; -use Getopt::Long; -################################################################################ -# -# Constants -# -################################################################################ -use constant DATE => 'Sat Aug 18 12:09:00 2001'; -use constant ID => '$Id: cxxflags,v 1.1.1.1 2003-08-04 04:57:28 pjones Exp $'; -################################################################################ -# -# Global Variables -# -################################################################################ -use vars qw($VERSION); -$VERSION = '0.0.1'; - -my %clo; - -my %flags = ( - 'getid' => '', - 'debug' => '', - 'depend' => '', - 'pic' => '', - 'optimize' => '', - 'ar' => '', - 'arflags' => '', - 'arextra' => '', - 'sar' => '', - 'sarflags' => '', - 'warn' => '', - 'general' => '', - 'object-ext' => '', - 'static-ext' => '', - 'shared-ext' => '', - 'static-pre' => '', - 'shared-pre' => '', - 'shared-mjr' => '', - 'exec-ext' => '', - 'mkexec' => '', - 'mkstatic' => '', - 'mkshared' => '', - 'linker' => '', - 'linkwith' => '', - 'mtcompile' => '', - 'mtlink' => '', -); -################################################################################ -# -# Code Start -# -################################################################################ -GetOptions( - \%clo, - 'help|h!', - 'cxx=s', - 'getid!', - 'setid=s', - - 'arflags|A!', - 'ar|a!', - 'arextra', - 'sar!', - 'sarflags!', - 'debug!', - 'depend|d!', - 'exec-extension!', - 'general!', - 'linker!', - 'linkwith=s@', - 'mkexec=s', - 'mkstatic=s', - 'mkshared=s', - 'mkshared-name=s', - 'major=i', - 'object-extension!', - 'optimize|O!', - 'pic|p!', - 'static-lib-extension!', - 'shared-lib-extension!', - 'static-lib-prefix!', - 'shared-lib-prefix!', - 'warn!', - 'mtcompile!', - 'mtlink!', - -) or usage(); $clo{'help'} and usage(); - -sub usage { - print "Usage: $0 [options]\n", <<EOT; - --cxx string The path to the compiler to use instead of \$CXX - --getid Get the current compiler ID - --setid id Don't run the compiler, assume it has the given id - - --ar, a Get the name of the tool for making archives - --arflags, A Get the flags for the ar tool - --arextra Get any commands to run after ar (ie ranlib) - --sar Get the name of the tool to create shared libs - --sarflags Get the flags for the sar tool - --debug Get flags for debugging - --depend, d Get the make depend compiler flags - --exec-extension Get the file extension for binary executables - --general Get general compiler flags that should always be used - --linker Get the name of the linker - --linkwith lib Get linker line for library - --linkwith path,lib Get linker libe for library in path - --mkexec file Get flag to output executable with given name - --mkstatic file Get flag to output static library with given name - --mkshared file Get flag to output shared library with given name - --mkshared-name file Get the complete name for a shared lib - --major number Set the major number for a shared lib - --mtcomplile Get flags for compiling multithreaded code - --mtlink Get flags for linking multithreaded objects - --object-extension Get the file extension for object files - --optimize, O Get the compilers level two optimization flags - --pic, p Get the flags for Position Independ Code - --static-lib-extension Get the file extension for a static library - --shared-lib-extension Get the file extension for a shared library - --static-lib-prefix Get the prefix for static libraries - --shared-lib-prefix Get the prefix for shared libraries - --warn Get compiler flags for generating warnings -EOT - exit; -} - -$clo{'cxx'} ||= $ENV{'CXX'} || 'c++'; -$clo{'linkwith'} ||= []; -$clo{'major'} ||= '1'; - -stat_compiler(); - -################################################################################ - -# -# this got out of hand ! -# -$clo{'debug'} and print "$flags{'debug'} "; -$clo{'depend'} and print "$flags{'depend'} "; -$clo{'pic'} and print "$flags{'pic'} "; -$clo{'optimize'} and print "$flags{'optimize'} "; -$clo{'ar'} and print "$flags{'ar'} "; -$clo{'arflags'} and print "$flags{'arflags'} "; -$clo{'arextra'} and print "$flags{'arextra'} "; -$clo{'sar'} and print "$flags{'sar'} "; -$clo{'sarflags'} and print "$flags{'sarflags'} "; -$clo{'warn'} and print "$flags{'warn'} "; -$clo{'general'} and print "$flags{'general'} "; -$clo{'object-extension'} and print "$flags{'object-ext'} "; -$clo{'static-lib-extension'}and print "$flags{'static-ext'} "; -$clo{'shared-lib-extension'}and print "$flags{'shared-ext'} "; -$clo{'static-lib-prefix'} and print "$flags{'static-pre'} "; -$clo{'shared-lib-prefix'} and print "$flags{'shared-pre'} "; -$clo{'mkshared-name'} and print "$flags{'shared-mjr'} "; -$clo{'exec-extension'} and print "$flags{'exec-ext'} "; -$clo{'mkexec'} and print "$flags{'mkexec'} "; -$clo{'mkstatic'} and print "$flags{'mkstatic'} "; -$clo{'mkshared'} and print "$flags{'mkshared'} "; -$clo{'linker'} and print "$flags{'linker'} "; -$clo{'linkwith'} and print "$flags{'linkwith'} "; -$clo{'mtcompile'} and print "$flags{'mtcompile'} "; -$clo{'mtlink'} and print "$flags{'mtlink'} "; -$clo{'getid'} and print "$flags{'getid'} "; - print "\n"; -################################################################################ - -sub stat_compiler { - my $output; - - if ($^O =~ /solaris/i) { - $flags{'mtcompile'} .= " -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT"; - } - - ################################################################################ - # gcc - if ($clo{'setid'} and $clo{'setid'} =~ /^gcc/) { - $output = $clo{'setid'}; - } else { - $output = `$clo{'cxx'} -v 2>&1`; - } - - if ($output =~ /gcc/) { - my $linker = 'gnu'; # default for now - - if ($^O =~ /solaris/i) { - if ($clo{'setid'}) { - if ($clo{'setid'} eq 'gcc-sun') { $linker = 'sun'; } - } else { - $output = `$clo{'cxx'} -Wl,-v 2>&1`; - - if ($output =~ /\[-h\s+name\]/ and $output =~ /\[-G\]/) { - $linker = 'sun'; - } - } - } elsif ($^O =~ /darwin/i) { - $linker = 'mach'; - } - - $flags{'debug'} = "-g"; - $flags{'depend'} = '-M'; - $flags{'optimize'} = '-O2'; - $flags{'ar'} = $ENV{'AR'} || 'ar'; - $flags{'arflags'} = $ENV{'ARFLAGS'} || 'rc'; - $flags{'sar'} = $clo{'cxx'}; - $flags{'sarflags'} = $ENV{'LDFLAGS'} || ''; - $flags{'warn'} = '-Wall -W -Wcast-align -Wwrite-strings'; - $flags{'object-ext'} = '.o'; - $flags{'static-ext'} = '.a'; - $flags{'shared-ext'} = '.so'; - $flags{'static-pre'} = "lib"; - $flags{'shared-pre'} = "lib"; - $flags{'linker'} = $clo{'cxx'}; - $flags{'mkexec'} = "-o $clo{'mkexec'}" if $clo{'mkexec'}; - $flags{'mkstatic'} = $clo{'mkstatic'} if $clo{'mkstatic'}; - - if ($clo{'mkshared'} or $clo{'mkshared-name'}) { - $flags{'shared-mjr'} = "lib$clo{'mkshared-name'}.so.$clo{'major'}" if $clo{'mkshared-name'}; - - if ($clo{'mkshared'}) { - if ($linker eq 'gnu') { - $flags{'mkshared'} = "-shared -o $clo{'mkshared'} -Wl,-soname,$clo{'mkshared'}.$clo{'major'}"; - } elsif ($linker eq 'sun') { - $flags{'mkshared'} = "-o $clo{'mkshared'} -Wl,-G,-h,$clo{'mkshared'}.$clo{'major'}"; - } elsif ($linker eq 'mach') { - $flags{'mkshared'} = "-o $clo{'mkshared'} -dynamiclib -compatibility_version $clo{'major'} -current_version $clo{'major'}"; - } else { - print STDERR "$0: your linker is not supported.\n"; - print STDERR "$0: you might want to install the GNU linker.\n"; - } - } - } - - foreach (@{$clo{'linkwith'}}) { - my ($path, $lib) = split(/,/, $_, 2); - if ($lib) { - $lib =~ s/^lib//; - $flags{'linkwith'} .= "-L$path -l$lib "; - } else { - $path =~ s/^lib//; - $flags{'linkwith'} .= "-l$path"; - } - } - - if ($^O =~ /freebsd/i) { - $flags{'mtlink'} .= " -pthread"; - $flags{'arextra'}.= "ranlib"; - $flags{'pic'} = '-fpic -shared'; - } elsif ($^O =~ /darwin/i) { - $flags{'pic'} = ''; - $flags{'shared.ext'} = '.dylib'; - $flags{'exec-ext'} = ''; - $flags{'arextra'} = "ranlib"; - } elsif ($^O =~ /cygwin/i) { - $flags{'pic'} = ''; - } else { - $flags{'mtlink'} .= " -lpthread"; - $flags{'pic'} = '-fpic -shared'; - } - - $flags{'getid'} = "gcc-$linker"; - return; - } - - ################################################################################ - # Microsoft Visual C++ (cl.exe) - if ($clo{'setid'} && $clo{'setid'} =~ /^microsoft/) { - $output = 'Microsoft'; - } else { - $output = `$clo{'cxx'} -verbose=version 2>&1`; - } - if ($output =~ /Microsoft/) { - - $flags{'debug'} = '/Od /Gz /Zi'; - $flags{'debug'} .= '/GA' if ($clo{'mkstatic'}); - $flags{'debug'} .= '/GD' if ($clo{'mkshared'}); - $flags{'depend'} ... [truncated message content] |