[Libreoffice-commits] core.git: Branch 'feature/gccwrapper' - 12 commits - liblangtag/ar-lib liblangtag/ExternalPackage_langtag.mk liblangtag/ExternalProject_langtag.mk liblangtag/liblangtag-0.4.0-ar-lib.patch liblangtag/Module_liblangtag.mk liblangtag/StaticLibrary_langtag.mk liblangtag/UnpackedTarball_langtag.mk libvisio/ExternalProject_libvisio.mk Repository.mk solenv/Executable_gcc-wrapper.mk solenv/Executable_g++-wrapper.mk solenv/Executable_ld-wrapper.mk solenv/gbuild solenv/gcc-wrappers solenv/Module_solenv.mk solenv/StaticLibrary_wrapper.mk
Peter Foley
pefoley2 at verizon.net
Tue Mar 12 14:36:33 PDT 2013
Repository.mk | 2
liblangtag/ExternalPackage_langtag.mk | 4
liblangtag/ExternalProject_langtag.mk | 5
liblangtag/Module_liblangtag.mk | 11
liblangtag/StaticLibrary_langtag.mk | 73 --
liblangtag/UnpackedTarball_langtag.mk | 4
liblangtag/ar-lib | 270 ++++++++
liblangtag/liblangtag-0.4.0-ar-lib.patch | 982 +++++++++++++++++++++++++++++++
libvisio/ExternalProject_libvisio.mk | 2
solenv/Executable_g++-wrapper.mk | 4
solenv/Executable_gcc-wrapper.mk | 4
solenv/Executable_ld-wrapper.mk | 16
solenv/Module_solenv.mk | 2
solenv/StaticLibrary_wrapper.mk | 16
solenv/gbuild/ExternalProject.mk | 11
solenv/gcc-wrappers/g++.cxx | 15
solenv/gcc-wrappers/gcc.cxx | 15
solenv/gcc-wrappers/ld.cxx | 14
solenv/gcc-wrappers/wrapper.cxx | 109 +--
solenv/gcc-wrappers/wrapper.hxx | 24
20 files changed, 1394 insertions(+), 189 deletions(-)
New commits:
commit 9dfc9393201210c4acbdc661ef57a728cf40809d
Author: Peter Foley <pefoley2 at verizon.net>
Date: Tue Mar 12 17:13:47 2013 -0400
do not need ar or ld wrappers
Change-Id: I77f87ea9343a22bbbb5b6bbe64c71764af14d58e
diff --git a/Repository.mk b/Repository.mk
index 708cf73..d898a6c 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -110,8 +110,6 @@ $(eval $(call gb_Helper_register_executables,OOO,\
gengal \
gcc-wrapper \
g++-wrapper \
- ld-wrapper \
- ar-wrapper \
guiloader \
guistdio \
langsupport \
diff --git a/solenv/Executable_ar-wrapper.mk b/solenv/Executable_ar-wrapper.mk
deleted file mode 100755
index 6cd6e65..0000000
--- a/solenv/Executable_ar-wrapper.mk
+++ /dev/null
@@ -1,20 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#
-# This file is part of the LibreOffice project.
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-
-$(eval $(call gb_Executable_Executable,ar-wrapper))
-
-$(eval $(call gb_Executable_add_exception_objects,ar-wrapper,\
- solenv/gcc-wrappers/ar \
-))
-
-$(eval $(call gb_Executable_use_static_libraries,ar-wrapper,\
- wrapper \
-))
-
-# vim:set noet sw=4 ts=4:
diff --git a/solenv/Executable_ld-wrapper.mk b/solenv/Executable_ld-wrapper.mk
deleted file mode 100755
index 0e077e1..0000000
--- a/solenv/Executable_ld-wrapper.mk
+++ /dev/null
@@ -1,20 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#
-# This file is part of the LibreOffice project.
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-
-$(eval $(call gb_Executable_Executable,ld-wrapper))
-
-$(eval $(call gb_Executable_add_exception_objects,ld-wrapper,\
- solenv/gcc-wrappers/ld \
-))
-
-$(eval $(call gb_Executable_use_static_libraries,ld-wrapper,\
- wrapper \
-))
-
-# vim:set noet sw=4 ts=4:
diff --git a/solenv/Module_solenv.mk b/solenv/Module_solenv.mk
index 5a256ac..92747cd 100644
--- a/solenv/Module_solenv.mk
+++ b/solenv/Module_solenv.mk
@@ -44,8 +44,6 @@ $(eval $(call gb_Module_add_targets,solenv,\
StaticLibrary_wrapper \
Executable_gcc-wrapper \
Executable_g++-wrapper \
- Executable_ld-wrapper \
- Executable_ar-wrapper \
))
endif
diff --git a/solenv/gcc-wrappers/ar.cxx b/solenv/gcc-wrappers/ar.cxx
deleted file mode 100755
index f05c629..0000000
--- a/solenv/gcc-wrappers/ar.cxx
+++ /dev/null
@@ -1,58 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
-* This file is part of the LibreOffice project.
-*
-* This Source Code Form is subject to the terms of the Mozilla Public
-* License, v. 2.0. If a copy of the MPL was not distributed with this
-* file, You can obtain one at http://mozilla.org/MPL/2.0/.
-*/
-
-#include "wrapper.hxx"
-
-string processarargs(vector<string> rawargs, string command) {
- // suppress the msvc banner
- string args=" -nologo";
- for(vector<string>::iterator i = rawargs.begin(); i != rawargs.end(); ++i) {
- args.append(" ");
- if(*i == "x") {
- // work around limitations of lib.exe
- string liblist;
- string listargs=" -nologo -list ";
- ++i;
- listargs.append(*i);
- if(startprocess(command,listargs,&liblist)) {
- cerr << "Error: could not get list of objects" << endl;
- exit(1);
- }
- string output;
- size_t start=0;
- while(true) {
- size_t end=liblist.find("\r\n",start);
- if(end==string::npos)
- break;
- output.append(" /extract:");
- output.append(liblist.substr(start,end-start));
- start=end+2;
- }
- cout << "AR=" << output << endl;
- args.append("x");
-
- }
- else
- args.append(*i);
- }
- return args;
-}
-
-int main(int argc, char *argv[]) {
- vector<string> rawargs(argv + 1, argv + argc);
-
- string command=getexe("REAL_AR");
-
- string args=processarargs(rawargs,command);
-
- return startprocess(command,args,0);
-
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/solenv/gcc-wrappers/g++.cxx b/solenv/gcc-wrappers/g++.cxx
index 321f34e..d2ee3d5 100755
--- a/solenv/gcc-wrappers/g++.cxx
+++ b/solenv/gcc-wrappers/g++.cxx
@@ -18,7 +18,7 @@ int main(int argc, char *argv[]) {
setupccenv();
- return startprocess(command,args,0);
+ return startprocess(command,args);
}
diff --git a/solenv/gcc-wrappers/gcc.cxx b/solenv/gcc-wrappers/gcc.cxx
index 7d7e592..b8983cf 100755
--- a/solenv/gcc-wrappers/gcc.cxx
+++ b/solenv/gcc-wrappers/gcc.cxx
@@ -18,7 +18,7 @@ int main(int argc, char *argv[]) {
setupccenv();
- return startprocess(command,args,0);
+ return startprocess(command,args);
}
diff --git a/solenv/gcc-wrappers/ld.cxx b/solenv/gcc-wrappers/ld.cxx
deleted file mode 100755
index 09eda7a..0000000
--- a/solenv/gcc-wrappers/ld.cxx
+++ /dev/null
@@ -1,33 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
-* This file is part of the LibreOffice project.
-*
-* This Source Code Form is subject to the terms of the Mozilla Public
-* License, v. 2.0. If a copy of the MPL was not distributed with this
-* file, You can obtain one at http://mozilla.org/MPL/2.0/.
-*/
-
-#include "wrapper.hxx"
-
-string processldargs(vector<string> rawargs) {
- // suppress the msvc banner
- string args=" -nologo";
- for(vector<string>::iterator i = rawargs.begin(); i != rawargs.end(); ++i) {
- args.append(" ");
- args.append(*i);
- }
- return args;
-}
-
-int main(int argc, char *argv[]) {
- vector<string> rawargs(argv + 1, argv + argc);
-
- string command=getexe("REAL_LD");
-
- string args=processldargs(rawargs);
-
- return startprocess(command,args,0);
-
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/solenv/gcc-wrappers/wrapper.cxx b/solenv/gcc-wrappers/wrapper.cxx
index f29b0d4..dfcf2a6 100644
--- a/solenv/gcc-wrappers/wrapper.cxx
+++ b/solenv/gcc-wrappers/wrapper.cxx
@@ -96,7 +96,7 @@ string processccargs(vector<string> rawargs) {
return args;
}
-int startprocess(string command, string args, string* output) {
+int startprocess(string command, string args) {
STARTUPINFO si;
PROCESS_INFORMATION pi;
SECURITY_ATTRIBUTES sa;
@@ -155,10 +155,7 @@ int startprocess(string command, string args, string* output) {
exit(1);
}
if(readlen!=0) {
- if(!output)
WriteFile(stdout_handle,buffer,readlen,&writelen,NULL);
- else
- output->append(buffer,readlen);
}
}
GetExitCodeProcess(pi.hProcess, &ret);
diff --git a/solenv/gcc-wrappers/wrapper.hxx b/solenv/gcc-wrappers/wrapper.hxx
index eb3b065..9850741 100755
--- a/solenv/gcc-wrappers/wrapper.hxx
+++ b/solenv/gcc-wrappers/wrapper.hxx
@@ -19,6 +19,6 @@ void setupccenv();
string processccargs(vector<string> rawargs);
-int startprocess(string command, string args, string* output);
+int startprocess(string command, string args);
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit c53bb7a061f86a81b41d90372654b3a332f61a40
Author: Peter Foley <pefoley2 at verizon.net>
Date: Tue Mar 12 16:52:52 2013 -0400
do not really need ld-wrapper
Change-Id: Iac5bbd1a78a51f273af1042faf00f40af7d9f7f0
diff --git a/solenv/gbuild/ExternalProject.mk b/solenv/gbuild/ExternalProject.mk
index 20c7d4a..56da21c 100644
--- a/solenv/gbuild/ExternalProject.mk
+++ b/solenv/gbuild/ExternalProject.mk
@@ -206,8 +206,7 @@ AUTOCONF_WRAPPERS := \
CC="$(call gb_Executable_get_target,gcc-wrapper)" \
REAL_CXX="$(shell cygpath -w $(CXX))" \
CXX="$(call gb_Executable_get_target,g++-wrapper)" \
- LD="$(call gb_Executable_get_target,ld-wrapper)" \
- REAL_LD="$(shell cygpath -w $(COMPATH)/bin/link.exe)"
+ LD="$(shell cygpath -w $(COMPATH)/bin/link.exe) -nologo"
define gb_ExternalProject_run
$(call gb_Helper_print_on_error,cd $(EXTERNAL_WORKDIR)/$(3) && \
commit f09f4963fd9ad79c3eafccbe7a9b2472860438f2
Author: Peter Foley <pefoley2 at verizon.net>
Date: Mon Mar 11 20:55:05 2013 -0400
use ar-lib for liblangtag
Change-Id: I3355a9052674239a72b57d4dc582de7ba198bc7c
diff --git a/liblangtag/ExternalPackage_langtag.mk b/liblangtag/ExternalPackage_langtag.mk
index a424f83..d56193e 100644
--- a/liblangtag/ExternalPackage_langtag.mk
+++ b/liblangtag/ExternalPackage_langtag.mk
@@ -11,6 +11,10 @@ $(eval $(call gb_ExternalPackage_ExternalPackage,langtag,langtag))
$(eval $(call gb_ExternalPackage_use_external_project,langtag,langtag))
+ifeq ($(COM),MSC)
+$(eval $(call gb_ExternalPackage_add_file,langtag,lib/liblangtag.lib,liblangtag/.libs/liblangtag.lib))
+else
$(eval $(call gb_ExternalPackage_add_file,langtag,lib/liblangtag.a,liblangtag/.libs/liblangtag.a))
+endif
# vim: set noet sw=4 ts=4:
diff --git a/liblangtag/UnpackedTarball_langtag.mk b/liblangtag/UnpackedTarball_langtag.mk
index f610ea3..cb4708d 100644
--- a/liblangtag/UnpackedTarball_langtag.mk
+++ b/liblangtag/UnpackedTarball_langtag.mk
@@ -51,6 +51,10 @@ else
$(eval $(call gb_UnpackedTarball_add_patches,langtag,\
liblangtag/liblangtag-0.4.0-msc-configure.patch \
liblangtag/liblangtag-0.4.0-cross.patch \
+ liblangtag/liblangtag-0.4.0-ar-lib.patch \
+))
+$(eval $(call gb_UnpackedTarball_add_files,langtag,,\
+ liblangtag/ar-lib \
))
endif
endif
diff --git a/liblangtag/ar-lib b/liblangtag/ar-lib
new file mode 100755
index 0000000..0f62c6f
--- /dev/null
+++ b/liblangtag/ar-lib
@@ -0,0 +1,270 @@
+#! /bin/sh
+# Wrapper for Microsoft lib.exe
+
+me=ar-lib
+scriptversion=2012-03-01.08; # UTC
+
+# Copyright (C) 2010, 2012 Free Software Foundation, Inc.
+# Written by Peter Rosin <peda at lysator.liu.se>.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# This file is maintained in Automake, please report
+# bugs to <bug-automake at gnu.org> or send patches to
+# <automake-patches at gnu.org>.
+
+
+# func_error message
+func_error ()
+{
+ echo "$me: $1" 1>&2
+ exit 1
+}
+
+file_conv=
+
+# func_file_conv build_file
+# Convert a $build file to $host form and store it in $file
+# Currently only supports Windows hosts.
+func_file_conv ()
+{
+ file=$1
+ case $file in
+ / | /[!/]*) # absolute file, and not a UNC file
+ if test -z "$file_conv"; then
+ # lazily determine how to convert abs files
+ case `uname -s` in
+ MINGW*)
+ file_conv=mingw
+ ;;
+ CYGWIN*)
+ file_conv=cygwin
+ ;;
+ *)
+ file_conv=wine
+ ;;
+ esac
+ fi
+ case $file_conv in
+ mingw)
+ file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
+ ;;
+ cygwin)
+ file=`cygpath -m "$file" || echo "$file"`
+ ;;
+ wine)
+ file=`winepath -w "$file" || echo "$file"`
+ ;;
+ esac
+ ;;
+ esac
+}
+
+# func_at_file at_file operation archive
+# Iterate over all members in AT_FILE performing OPERATION on ARCHIVE
+# for each of them.
+# When interpreting the content of the @FILE, do NOT use func_file_conv,
+# since the user would need to supply preconverted file names to
+# binutils ar, at least for MinGW.
+func_at_file ()
+{
+ operation=$2
+ archive=$3
+ at_file_contents=`cat "$1"`
+ eval set x "$at_file_contents"
+ shift
+
+ for member
+ do
+ $AR -NOLOGO $operation:"$member" "$archive" || exit $?
+ done
+}
+
+case $1 in
+ '')
+ func_error "no command. Try '$0 --help' for more information."
+ ;;
+ -h | --h*)
+ cat <<EOF
+Usage: $me [--help] [--version] PROGRAM ACTION ARCHIVE [MEMBER...]
+
+Members may be specified in a file named with @FILE.
+EOF
+ exit $?
+ ;;
+ -v | --v*)
+ echo "$me, version $scriptversion"
+ exit $?
+ ;;
+esac
+
+if test $# -lt 3; then
+ func_error "you must specify a program, an action and an archive"
+fi
+
+AR=$1
+shift
+while :
+do
+ if test $# -lt 2; then
+ func_error "you must specify a program, an action and an archive"
+ fi
+ case $1 in
+ -lib | -LIB \
+ | -ltcg | -LTCG \
+ | -machine* | -MACHINE* \
+ | -subsystem* | -SUBSYSTEM* \
+ | -verbose | -VERBOSE \
+ | -wx* | -WX* )
+ AR="$AR $1"
+ shift
+ ;;
+ *)
+ action=$1
+ shift
+ break
+ ;;
+ esac
+done
+orig_archive=$1
+shift
+func_file_conv "$orig_archive"
+archive=$file
+
+# strip leading dash in $action
+action=${action#-}
+
+delete=
+extract=
+list=
+quick=
+replace=
+index=
+create=
+
+while test -n "$action"
+do
+ case $action in
+ d*) delete=yes ;;
+ x*) extract=yes ;;
+ t*) list=yes ;;
+ q*) quick=yes ;;
+ r*) replace=yes ;;
+ s*) index=yes ;;
+ S*) ;; # the index is always updated implicitly
+ c*) create=yes ;;
+ u*) ;; # TODO: don't ignore the update modifier
+ v*) ;; # TODO: don't ignore the verbose modifier
+ *)
+ func_error "unknown action specified"
+ ;;
+ esac
+ action=${action#?}
+done
+
+case $delete$extract$list$quick$replace,$index in
+ yes,* | ,yes)
+ ;;
+ yesyes*)
+ func_error "more than one action specified"
+ ;;
+ *)
+ func_error "no action specified"
+ ;;
+esac
+
+if test -n "$delete"; then
+ if test ! -f "$orig_archive"; then
+ func_error "archive not found"
+ fi
+ for member
+ do
+ case $1 in
+ @*)
+ func_at_file "${1#@}" -REMOVE "$archive"
+ ;;
+ *)
+ func_file_conv "$1"
+ $AR -NOLOGO -REMOVE:"$file" "$archive" || exit $?
+ ;;
+ esac
+ done
+
+elif test -n "$extract"; then
+ if test ! -f "$orig_archive"; then
+ func_error "archive not found"
+ fi
+ if test $# -gt 0; then
+ for member
+ do
+ case $1 in
+ @*)
+ func_at_file "${1#@}" -EXTRACT "$archive"
+ ;;
+ *)
+ func_file_conv "$1"
+ $AR -NOLOGO -EXTRACT:"$file" "$archive" || exit $?
+ ;;
+ esac
+ done
+ else
+ $AR -NOLOGO -LIST "$archive" | sed -e 's/\\/\\\\/g' | while read member
+ do
+ $AR -NOLOGO -EXTRACT:"$member" "$archive" || exit $?
+ done
+ fi
+
+elif test -n "$quick$replace"; then
+ if test ! -f "$orig_archive"; then
+ if test -z "$create"; then
+ echo "$me: creating $orig_archive"
+ fi
+ orig_archive=
+ else
+ orig_archive=$archive
+ fi
+
+ for member
+ do
+ case $1 in
+ @*)
+ func_file_conv "${1#@}"
+ set x "$@" "@$file"
+ ;;
+ *)
+ func_file_conv "$1"
+ set x "$@" "$file"
+ ;;
+ esac
+ shift
+ shift
+ done
+
+ if test -n "$orig_archive"; then
+ $AR -NOLOGO -OUT:"$archive" "$orig_archive" "$@" || exit $?
+ else
+ $AR -NOLOGO -OUT:"$archive" "$@" || exit $?
+ fi
+
+elif test -n "$list"; then
+ if test ! -f "$orig_archive"; then
+ func_error "archive not found"
+ fi
+ $AR -NOLOGO -LIST "$archive" || exit $?
+fi
diff --git a/liblangtag/liblangtag-0.4.0-ar-lib.patch b/liblangtag/liblangtag-0.4.0-ar-lib.patch
new file mode 100644
index 0000000..a929f5f
--- /dev/null
+++ b/liblangtag/liblangtag-0.4.0-ar-lib.patch
@@ -0,0 +1,982 @@
+--- build/langtag/Makefile.in 2012-10-21 23:47:24.000000000 -0400
++++ build/langtag/Makefile.in 2013-03-11 20:44:23.978000000 -0400
+@@ -60,8 +60,8 @@
+ $(srcdir)/liblangtag-gobject.pc.in \
+ $(srcdir)/liblangtag-uninstalled.pc.in \
+ $(srcdir)/liblangtag.pc.in $(top_srcdir)/configure AUTHORS \
+- COPYING ChangeLog INSTALL NEWS config.guess config.sub depcomp \
+- install-sh ltmain.sh missing mkinstalldirs
++ COPYING ChangeLog INSTALL NEWS ar-lib config.guess config.sub \
++ depcomp install-sh ltmain.sh missing mkinstalldirs
+ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+ am__aclocal_m4_deps = $(top_srcdir)/m4macros/ax_pthread.m4 \
+ $(top_srcdir)/m4macros/gtk-doc.m4 \
+--- build/langtag/aclocal.m4 2012-10-21 23:47:22.000000000 -0400
++++ build/langtag/aclocal.m4 2013-03-11 20:44:16.964000000 -0400
+@@ -343,7 +343,8 @@
+ # ----------------------------------
+ AC_DEFUN([PKG_PROG_PKG_CONFIG],
+ [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
+-m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
++m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
++m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
+ AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
+ AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
+ AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
+@@ -389,7 +390,8 @@
+ pkg_cv_[]$1="$$1"
+ elif test -n "$PKG_CONFIG"; then
+ PKG_CHECK_EXISTS([$3],
+- [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
++ [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
++ test "x$?" != "x0" && pkg_failed=yes ],
+ [pkg_failed=yes])
+ else
+ pkg_failed=untried
+@@ -452,7 +454,7 @@
+ Consider adjusting the PKG_CONFIG_PATH environment variable if you
+ installed software in a non-standard prefix.
+
+-_PKG_TEXT])
++_PKG_TEXT])[]dnl
+ ])
+ elif test $pkg_failed = untried; then
+ AC_MSG_RESULT([no])
+@@ -463,7 +465,7 @@
+
+ _PKG_TEXT
+
+-To get pkg-config, see <http://pkg-config.freedesktop.org/>.])
++To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
+ ])
+ else
+ $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
+@@ -473,6 +475,61 @@
+ fi[]dnl
+ ])# PKG_CHECK_MODULES
+
++
++# PKG_INSTALLDIR(DIRECTORY)
++# -------------------------
++# Substitutes the variable pkgconfigdir as the location where a module
++# should install pkg-config .pc files. By default the directory is
++# $libdir/pkgconfig, but the default can be changed by passing
++# DIRECTORY. The user can override through the --with-pkgconfigdir
++# parameter.
++AC_DEFUN([PKG_INSTALLDIR],
++[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
++m4_pushdef([pkg_description],
++ [pkg-config installation directory @<:@]pkg_default[@:>@])
++AC_ARG_WITH([pkgconfigdir],
++ [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
++ [with_pkgconfigdir=]pkg_default)
++AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
++m4_popdef([pkg_default])
++m4_popdef([pkg_description])
++]) dnl PKG_INSTALLDIR
++
++
++# PKG_NOARCH_INSTALLDIR(DIRECTORY)
++# -------------------------
++# Substitutes the variable noarch_pkgconfigdir as the location where a
++# module should install arch-independent pkg-config .pc files. By
++# default the directory is $datadir/pkgconfig, but the default can be
++# changed by passing DIRECTORY. The user can override through the
++# --with-noarch-pkgconfigdir parameter.
++AC_DEFUN([PKG_NOARCH_INSTALLDIR],
++[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
++m4_pushdef([pkg_description],
++ [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
++AC_ARG_WITH([noarch-pkgconfigdir],
++ [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
++ [with_noarch_pkgconfigdir=]pkg_default)
++AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
++m4_popdef([pkg_default])
++m4_popdef([pkg_description])
++]) dnl PKG_NOARCH_INSTALLDIR
++
++
++# PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
++# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
++# -------------------------------------------
++# Retrieves the value of the pkg-config variable for the given module.
++AC_DEFUN([PKG_CHECK_VAR],
++[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
++AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
++
++_PKG_CONFIG([$1], [variable="][$3]["], [$2])
++AS_VAR_COPY([$1], [pkg_cv_][$1])
++
++AS_VAR_IF([$1], [""], [$5], [$4])dnl
++])# PKG_CHECK_VAR
++
+ # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software
+ # Foundation, Inc.
+ #
+@@ -512,6 +569,67 @@
+ [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+ _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
+
++# Copyright (C) 2011 Free Software Foundation, Inc.
++#
++# This file is free software; the Free Software Foundation
++# gives unlimited permission to copy and/or distribute it,
++# with or without modifications, as long as this notice is preserved.
++
++# serial 1
++
++# AM_PROG_AR([ACT-IF-FAIL])
++# -------------------------
++# Try to determine the archiver interface, and trigger the ar-lib wrapper
++# if it is needed. If the detection of archiver interface fails, run
++# ACT-IF-FAIL (default is to abort configure with a proper error message).
++AC_DEFUN([AM_PROG_AR],
++[AC_BEFORE([$0], [LT_INIT])dnl
++AC_BEFORE([$0], [AC_PROG_LIBTOOL])dnl
++AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
++AC_REQUIRE_AUX_FILE([ar-lib])dnl
++AC_CHECK_TOOLS([AR], [ar lib "link -lib"], [false])
++: ${AR=ar}
++
++AC_CACHE_CHECK([the archiver ($AR) interface], [am_cv_ar_interface],
++ [am_cv_ar_interface=ar
++ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int some_variable = 0;]])],
++ [am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&AS_MESSAGE_LOG_FD'
++ AC_TRY_EVAL([am_ar_try])
++ if test "$ac_status" -eq 0; then
++ am_cv_ar_interface=ar
++ else
++ am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&AS_MESSAGE_LOG_FD'
++ AC_TRY_EVAL([am_ar_try])
++ if test "$ac_status" -eq 0; then
++ am_cv_ar_interface=lib
++ else
++ am_cv_ar_interface=unknown
++ fi
++ fi
++ rm -f conftest.lib libconftest.a
++ ])
++ ])
++
++case $am_cv_ar_interface in
++ar)
++ ;;
++lib)
++ # Microsoft lib, so override with the ar-lib wrapper script.
++ # FIXME: It is wrong to rewrite AR.
++ # But if we don't then we get into trouble of one sort or another.
++ # A longer-term fix would be to have automake use am__AR in this case,
++ # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something
++ # similar.
++ AR="$am_aux_dir/ar-lib $AR"
++ ;;
++unknown)
++ m4_default([$1],
++ [AC_MSG_ERROR([could not determine $AR interface])])
++ ;;
++esac
++AC_SUBST([AR])dnl
++])
++
+ # AM_AUX_DIR_EXPAND -*- Autoconf -*-
+
+ # Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
+--- build/langtag/configure 2013-03-11 20:36:29.241000000 -0400
++++ build/langtag/configure 2013-03-11 20:44:21.552000000 -0400
+@@ -681,8 +681,6 @@
+ DSYMUTIL
+ MANIFEST_TOOL
+ RANLIB
+-ac_ct_AR
+-AR
+ DLLTOOL
+ OBJDUMP
+ LN_S
+@@ -694,6 +692,15 @@
+ EGREP
+ GREP
+ SED
++host_os
++host_vendor
++host_cpu
++host
++build_os
++build_vendor
++build_cpu
++build
++LIBTOOL
+ am__fastdepCC_FALSE
+ am__fastdepCC_TRUE
+ CCDEPMODE
+@@ -711,15 +718,8 @@
+ LDFLAGS
+ CFLAGS
+ CC
+-host_os
+-host_vendor
+-host_cpu
+-host
+-build_os
+-build_vendor
+-build_cpu
+-build
+-LIBTOOL
++ac_ct_AR
++AR
+ MAINT
+ MAINTAINER_MODE_FALSE
+ MAINTAINER_MODE_TRUE
+@@ -793,11 +793,11 @@
+ enable_option_checking
+ enable_silent_rules
+ enable_maintainer_mode
++enable_dependency_tracking
+ enable_shared
+ enable_static
+ with_pic
+ enable_fast_install
+-enable_dependency_tracking
+ with_gnu_ld
+ with_sysroot
+ enable_libtool_lock
+@@ -1458,12 +1458,12 @@
+ --disable-silent-rules verbose build output (undo: `make V=0')
+ --enable-maintainer-mode enable make rules and dependencies not useful
+ (and sometimes confusing) to the casual installer
++ --disable-dependency-tracking speeds up one-time build
++ --enable-dependency-tracking do not reject slow dependency extractors
+ --enable-shared[=PKGS] build shared libraries [default=yes]
+ --enable-static[=PKGS] build static libraries [default=yes]
+ --enable-fast-install[=PKGS]
+ optimize for fast installation [default=yes]
+- --disable-dependency-tracking speeds up one-time build
+- --enable-dependency-tracking do not reject slow dependency extractors
+ --disable-libtool-lock avoid locking (might break parallel builds)
+ --enable-compile-warnings=[no/minimum/yes/maximum/error]
+ Turn on compiler warnings
+@@ -2967,171 +2967,6 @@
+
+
+
+-case `pwd` in
+- *\ * | *\ *)
+- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
+-$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
+-esac
+-
+-
+-
+-macro_version='2.4.2'
+-macro_revision='1.3337'
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-ltmain="$ac_aux_dir/ltmain.sh"
+-
+-# Make sure we can run config.sub.
+-$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
+- as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
+-
+-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
+-$as_echo_n "checking build system type... " >&6; }
+-if ${ac_cv_build+:} false; then :
+- $as_echo_n "(cached) " >&6
+-else
+- ac_build_alias=$build_alias
+-test "x$ac_build_alias" = x &&
+- ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
+-test "x$ac_build_alias" = x &&
+- as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
+-ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
+- as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
+-
+-fi
+-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
+-$as_echo "$ac_cv_build" >&6; }
+-case $ac_cv_build in
+-*-*-*) ;;
+-*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
+-esac
+-build=$ac_cv_build
+-ac_save_IFS=$IFS; IFS='-'
+-set x $ac_cv_build
+-shift
+-build_cpu=$1
+-build_vendor=$2
+-shift; shift
+-# Remember, the first character of IFS is used to create $*,
+-# except with old shells:
+-build_os=$*
+-IFS=$ac_save_IFS
+-case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+-
+-
+-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
+-$as_echo_n "checking host system type... " >&6; }
+-if ${ac_cv_host+:} false; then :
+- $as_echo_n "(cached) " >&6
+-else
+- if test "x$host_alias" = x; then
+- ac_cv_host=$ac_cv_build
+-else
+- ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
+- as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
+-fi
+-
+-fi
+-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
+-$as_echo "$ac_cv_host" >&6; }
+-case $ac_cv_host in
+-*-*-*) ;;
+-*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
+-esac
+-host=$ac_cv_host
+-ac_save_IFS=$IFS; IFS='-'
+-set x $ac_cv_host
+-shift
+-host_cpu=$1
+-host_vendor=$2
+-shift; shift
+-# Remember, the first character of IFS is used to create $*,
+-# except with old shells:
+-host_os=$*
+-IFS=$ac_save_IFS
+-case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
+-
+-
+-# Backslashify metacharacters that are still active within
+-# double-quoted strings.
+-sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
+-
+-# Same as above, but do not quote variable references.
+-double_quote_subst='s/\(["`\\]\)/\\\1/g'
+-
+-# Sed substitution to delay expansion of an escaped shell variable in a
+-# double_quote_subst'ed string.
+-delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
+-
+-# Sed substitution to delay expansion of an escaped single quote.
+-delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
+-
+-# Sed substitution to avoid accidental globbing in evaled expressions
+-no_glob_subst='s/\*/\\\*/g'
+-
+-ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+-ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
+-ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
+-
+-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
+-$as_echo_n "checking how to print strings... " >&6; }
+-# Test print first, because it will be a builtin if present.
+-if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
+- test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
+- ECHO='print -r --'
+-elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
+- ECHO='printf %s\n'
+-else
+- # Use this function as a fallback that always works.
+- func_fallback_echo ()
+- {
+- eval 'cat <<_LTECHO_EOF
+-$1
+-_LTECHO_EOF'
+- }
+- ECHO='func_fallback_echo'
+-fi
+-
+-# func_echo_all arg...
+-# Invoke $ECHO with all args, space-separated.
+-func_echo_all ()
+-{
+- $ECHO ""
+-}
+-
+-case "$ECHO" in
+- printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5
+-$as_echo "printf" >&6; } ;;
+- print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
+-$as_echo "print -r" >&6; } ;;
+- *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5
+-$as_echo "cat" >&6; } ;;
+-esac
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+ DEPDIR="${am__leading_dot}deps"
+
+ ac_config_commands="$ac_config_commands depfiles"
+@@ -4113,6 +3948,332 @@
+ fi
+
+
++
++if test -n "$ac_tool_prefix"; then
++ for ac_prog in ar lib "link -lib"
++ do
++ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
++set dummy $ac_tool_prefix$ac_prog; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if ${ac_cv_prog_AR+:} false; then :
++ $as_echo_n "(cached) " >&6
++else
++ if test -n "$AR"; then
++ ac_cv_prog_AR="$AR" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ for ac_exec_ext in '' $ac_executable_extensions; do
++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++ ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++ break 2
++ fi
++done
++ done
++IFS=$as_save_IFS
++
++fi
++fi
++AR=$ac_cv_prog_AR
++if test -n "$AR"; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
++$as_echo "$AR" >&6; }
++else
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
++
++
++ test -n "$AR" && break
++ done
++fi
++if test -z "$AR"; then
++ ac_ct_AR=$AR
++ for ac_prog in ar lib "link -lib"
++do
++ # Extract the first word of "$ac_prog", so it can be a program name with args.
++set dummy $ac_prog; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if ${ac_cv_prog_ac_ct_AR+:} false; then :
++ $as_echo_n "(cached) " >&6
++else
++ if test -n "$ac_ct_AR"; then
++ ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ for ac_exec_ext in '' $ac_executable_extensions; do
++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++ ac_cv_prog_ac_ct_AR="$ac_prog"
++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++ break 2
++ fi
++done
++ done
++IFS=$as_save_IFS
++
++fi
++fi
++ac_ct_AR=$ac_cv_prog_ac_ct_AR
++if test -n "$ac_ct_AR"; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
++$as_echo "$ac_ct_AR" >&6; }
++else
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
++
++
++ test -n "$ac_ct_AR" && break
++done
++
++ if test "x$ac_ct_AR" = x; then
++ AR="false"
++ else
++ case $cross_compiling:$ac_tool_warned in
++yes:)
++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
++ac_tool_warned=yes ;;
++esac
++ AR=$ac_ct_AR
++ fi
++fi
++
++: ${AR=ar}
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the archiver ($AR) interface" >&5
++$as_echo_n "checking the archiver ($AR) interface... " >&6; }
++if ${am_cv_ar_interface+:} false; then :
++ $as_echo_n "(cached) " >&6
++else
++ am_cv_ar_interface=ar
++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h. */
++int some_variable = 0;
++_ACEOF
++if ac_fn_c_try_compile "$LINENO"; then :
++ am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&5'
++ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5
++ (eval $am_ar_try) 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }
++ if test "$ac_status" -eq 0; then
++ am_cv_ar_interface=ar
++ else
++ am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&5'
++ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5
++ (eval $am_ar_try) 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }
++ if test "$ac_status" -eq 0; then
++ am_cv_ar_interface=lib
++ else
++ am_cv_ar_interface=unknown
++ fi
++ fi
++ rm -f conftest.lib libconftest.a
++
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_ar_interface" >&5
++$as_echo "$am_cv_ar_interface" >&6; }
++
++case $am_cv_ar_interface in
++ar)
++ ;;
++lib)
++ # Microsoft lib, so override with the ar-lib wrapper script.
++ # FIXME: It is wrong to rewrite AR.
++ # But if we don't then we get into trouble of one sort or another.
++ # A longer-term fix would be to have automake use am__AR in this case,
++ # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something
++ # similar.
++ AR="$am_aux_dir/ar-lib $AR"
++ ;;
++unknown)
++ as_fn_error $? "could not determine $AR interface" "$LINENO" 5
++ ;;
++esac
++
++case `pwd` in
++ *\ * | *\ *)
++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
++$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
++esac
++
++
++
++macro_version='2.4.2'
++macro_revision='1.3337'
++
++
++
++
++
++
++
++
++
++
++
++
++
++ltmain="$ac_aux_dir/ltmain.sh"
++
++# Make sure we can run config.sub.
++$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
++ as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
++$as_echo_n "checking build system type... " >&6; }
++if ${ac_cv_build+:} false; then :
++ $as_echo_n "(cached) " >&6
++else
++ ac_build_alias=$build_alias
++test "x$ac_build_alias" = x &&
++ ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
++test "x$ac_build_alias" = x &&
++ as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
++ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
++ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
++
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
++$as_echo "$ac_cv_build" >&6; }
++case $ac_cv_build in
++*-*-*) ;;
++*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
++esac
++build=$ac_cv_build
++ac_save_IFS=$IFS; IFS='-'
++set x $ac_cv_build
++shift
++build_cpu=$1
++build_vendor=$2
++shift; shift
++# Remember, the first character of IFS is used to create $*,
++# except with old shells:
++build_os=$*
++IFS=$ac_save_IFS
++case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
++
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
++$as_echo_n "checking host system type... " >&6; }
++if ${ac_cv_host+:} false; then :
++ $as_echo_n "(cached) " >&6
++else
++ if test "x$host_alias" = x; then
++ ac_cv_host=$ac_cv_build
++else
++ ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
++ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
++fi
++
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
++$as_echo "$ac_cv_host" >&6; }
++case $ac_cv_host in
++*-*-*) ;;
++*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
++esac
++host=$ac_cv_host
++ac_save_IFS=$IFS; IFS='-'
++set x $ac_cv_host
++shift
++host_cpu=$1
++host_vendor=$2
++shift; shift
++# Remember, the first character of IFS is used to create $*,
++# except with old shells:
++host_os=$*
++IFS=$ac_save_IFS
++case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
++
++
++# Backslashify metacharacters that are still active within
++# double-quoted strings.
++sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
++
++# Same as above, but do not quote variable references.
++double_quote_subst='s/\(["`\\]\)/\\\1/g'
++
++# Sed substitution to delay expansion of an escaped shell variable in a
++# double_quote_subst'ed string.
++delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
++
++# Sed substitution to delay expansion of an escaped single quote.
++delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
++
++# Sed substitution to avoid accidental globbing in evaled expressions
++no_glob_subst='s/\*/\\\*/g'
++
++ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
++ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
++ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
++$as_echo_n "checking how to print strings... " >&6; }
++# Test print first, because it will be a builtin if present.
++if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
++ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
++ ECHO='print -r --'
++elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
++ ECHO='printf %s\n'
++else
++ # Use this function as a fallback that always works.
++ func_fallback_echo ()
++ {
++ eval 'cat <<_LTECHO_EOF
++$1
++_LTECHO_EOF'
++ }
++ ECHO='func_fallback_echo'
++fi
++
++# func_echo_all arg...
++# Invoke $ECHO with all args, space-separated.
++func_echo_all ()
++{
++ $ECHO ""
++}
++
++case "$ECHO" in
++ printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5
++$as_echo "printf" >&6; } ;;
++ print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
++$as_echo "print -r" >&6; } ;;
++ *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5
++$as_echo "cat" >&6; } ;;
++esac
++
++
++
++
++
++
++
++
++
++
++
++
++
++
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
+ $as_echo_n "checking for a sed that does not truncate output... " >&6; }
+ if ${ac_cv_path_SED+:} false; then :
+@@ -5538,7 +5699,6 @@
+
+
+
+-
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in ar
+ do
+@@ -12605,8 +12765,8 @@
+ if ac_fn_c_try_link "$LINENO"; then :
+ as_fn_error $? "liblangtag has to be built with -march=i486 or later." "$LINENO" 5
+ else
+- lt_cv_has_atomic=no
+- CFLAGS="$_save_cflags"
++ lt_cv_has_atomic=no
++ CFLAGS="$_save_cflags"
+ fi
+ rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+@@ -12838,6 +12998,7 @@
+
+
+
++
+ if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+@@ -12966,6 +13127,7 @@
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_LIBXML2_CFLAGS=`$PKG_CONFIG --cflags "libxml-2.0 >= $LIBXML2_REQUIRED" 2>/dev/null`
++ test "x$?" != "x0" && pkg_failed=yes
+ else
+ pkg_failed=yes
+ fi
+@@ -12982,6 +13144,7 @@
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_LIBXML2_LIBS=`$PKG_CONFIG --libs "libxml-2.0 >= $LIBXML2_REQUIRED" 2>/dev/null`
++ test "x$?" != "x0" && pkg_failed=yes
+ else
+ pkg_failed=yes
+ fi
+@@ -13001,9 +13164,9 @@
+ _pkg_short_errors_supported=no
+ fi
+ if test $_pkg_short_errors_supported = yes; then
+- LIBXML2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libxml-2.0 >= $LIBXML2_REQUIRED" 2>&1`
++ LIBXML2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libxml-2.0 >= $LIBXML2_REQUIRED" 2>&1`
+ else
+- LIBXML2_PKG_ERRORS=`$PKG_CONFIG --print-errors "libxml-2.0 >= $LIBXML2_REQUIRED" 2>&1`
++ LIBXML2_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libxml-2.0 >= $LIBXML2_REQUIRED" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$LIBXML2_PKG_ERRORS" >&5
+@@ -13018,7 +13181,6 @@
+ Alternatively, you may set the environment variables LIBXML2_CFLAGS
+ and LIBXML2_LIBS to avoid the need to call pkg-config.
+ See the pkg-config man page for more details." "$LINENO" 5
+-
+ elif test $pkg_failed = untried; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+ $as_echo "no" >&6; }
+@@ -13034,7 +13196,6 @@
+
+ To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+ See \`config.log' for more details" "$LINENO" 5; }
+-
+ else
+ LIBXML2_CFLAGS=$pkg_cv_LIBXML2_CFLAGS
+ LIBXML2_LIBS=$pkg_cv_LIBXML2_LIBS
+@@ -13057,6 +13218,7 @@
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_GOBJECT_CFLAGS=`$PKG_CONFIG --cflags "gobject-2.0 >= $GOBJECT_REQUIRED" 2>/dev/null`
++ test "x$?" != "x0" && pkg_failed=yes
+ else
+ pkg_failed=yes
+ fi
+@@ -13073,6 +13235,7 @@
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_GOBJECT_LIBS=`$PKG_CONFIG --libs "gobject-2.0 >= $GOBJECT_REQUIRED" 2>/dev/null`
++ test "x$?" != "x0" && pkg_failed=yes
+ else
+ pkg_failed=yes
+ fi
+@@ -13092,9 +13255,9 @@
+ _pkg_short_errors_supported=no
+ fi
+ if test $_pkg_short_errors_supported = yes; then
+- GOBJECT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "gobject-2.0 >= $GOBJECT_REQUIRED" 2>&1`
++ GOBJECT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gobject-2.0 >= $GOBJECT_REQUIRED" 2>&1`
+ else
+- GOBJECT_PKG_ERRORS=`$PKG_CONFIG --print-errors "gobject-2.0 >= $GOBJECT_REQUIRED" 2>&1`
++ GOBJECT_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gobject-2.0 >= $GOBJECT_REQUIRED" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$GOBJECT_PKG_ERRORS" >&5
+@@ -13128,6 +13291,7 @@
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_CHECK_CFLAGS=`$PKG_CONFIG --cflags "check >= $CHECK_REQUIRED" 2>/dev/null`
++ test "x$?" != "x0" && pkg_failed=yes
+ else
+ pkg_failed=yes
+ fi
+@@ -13144,6 +13308,7 @@
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_CHECK_LIBS=`$PKG_CONFIG --libs "check >= $CHECK_REQUIRED" 2>/dev/null`
++ test "x$?" != "x0" && pkg_failed=yes
+ else
+ pkg_failed=yes
+ fi
+@@ -13163,9 +13328,9 @@
+ _pkg_short_errors_supported=no
+ fi
+ if test $_pkg_short_errors_supported = yes; then
+- CHECK_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "check >= $CHECK_REQUIRED" 2>&1`
++ CHECK_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "check >= $CHECK_REQUIRED" 2>&1`
+ else
+- CHECK_PKG_ERRORS=`$PKG_CONFIG --print-errors "check >= $CHECK_REQUIRED" 2>&1`
++ CHECK_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "check >= $CHECK_REQUIRED" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$CHECK_PKG_ERRORS" >&5
+@@ -13195,6 +13360,10 @@
+ fi
+
+
++case $host_os in
++ cygwin* | mingw*)
++ ;;
++ *)
+
+
+ ac_ext=c
+@@ -13203,10 +13372,6 @@
+ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+-case $host_os in
+- cygwin* | mingw*)
+- ;;
+- *)
+ ax_pthread_ok=no
+
+ # We used to check for pthread.h first, but this fails if pthread.h
+@@ -13588,8 +13753,6 @@
+ ax_pthread_ok=no
+ as_fn_error $? "*** pthread library are required" "$LINENO" 5
+ fi
+-;;
+-esac
+ ac_ext=c
+ ac_cpp='$CPP $CPPFLAGS'
+ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+@@ -13597,6 +13760,8 @@
+ ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
++ ;;
++esac
+
+
+
+@@ -13879,6 +14044,7 @@
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_GTKDOC_DEPS_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0" 2>/dev/null`
++ test "x$?" != "x0" && pkg_failed=yes
+ else
+ pkg_failed=yes
+ fi
+@@ -13895,6 +14061,7 @@
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_GTKDOC_DEPS_LIBS=`$PKG_CONFIG --libs "glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0" 2>/dev/null`
++ test "x$?" != "x0" && pkg_failed=yes
+ else
+ pkg_failed=yes
+ fi
+@@ -13914,9 +14081,9 @@
+ _pkg_short_errors_supported=no
+ fi
+ if test $_pkg_short_errors_supported = yes; then
+- GTKDOC_DEPS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0" 2>&1`
++ GTKDOC_DEPS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0" 2>&1`
+ else
+- GTKDOC_DEPS_PKG_ERRORS=`$PKG_CONFIG --print-errors "glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0" 2>&1`
++ GTKDOC_DEPS_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$GTKDOC_DEPS_PKG_ERRORS" >&5
+@@ -13931,7 +14098,6 @@
+ Alternatively, you may set the environment variables GTKDOC_DEPS_CFLAGS
+ and GTKDOC_DEPS_LIBS to avoid the need to call pkg-config.
+ See the pkg-config man page for more details." "$LINENO" 5
+-
+ elif test $pkg_failed = untried; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+ $as_echo "no" >&6; }
+@@ -13947,7 +14113,6 @@
+
+ To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+ See \`config.log' for more details" "$LINENO" 5; }
+-
+ else
+ GTKDOC_DEPS_CFLAGS=$pkg_cv_GTKDOC_DEPS_CFLAGS
+ GTKDOC_DEPS_LIBS=$pkg_cv_GTKDOC_DEPS_LIBS
+
+--- build/langtag/configure.ac 2013-03-11 20:36:29.238000000 -0400
++++ build/langtag/configure.ac 2013-03-11 20:38:35.690000000 -0400
+@@ -14,6 +14,7 @@
+ AM_CONFIG_HEADER([config.h])
+ AC_CONFIG_MACRO_DIR([m4macros])
+
++AM_PROG_AR
+ AC_PROG_LIBTOOL
+ AC_PROG_CC
commit 635eff2143345e0087da5c3ea8e12f6f0c66fcee
Author: Peter Foley <pefoley2 at verizon.net>
Date: Mon Mar 11 18:43:58 2013 -0400
discovered AM_PROG_AR
Change-Id: I8cf4e8cf2a9c6b2f2077238265be0d785407c5d9
diff --git a/solenv/gbuild/ExternalProject.mk b/solenv/gbuild/ExternalProject.mk
index 08d52a6..20c7d4a 100644
--- a/solenv/gbuild/ExternalProject.mk
+++ b/solenv/gbuild/ExternalProject.mk
@@ -207,9 +207,7 @@ AUTOCONF_WRAPPERS := \
REAL_CXX="$(shell cygpath -w $(CXX))" \
CXX="$(call gb_Executable_get_target,g++-wrapper)" \
LD="$(call gb_Executable_get_target,ld-wrapper)" \
- REAL_LD="$(shell cygpath -w $(COMPATH)/bin/link.exe)" \
- AR="$(call gb_Executable_get_target,ar-wrapper)" \
- REAL_AR="$(shell cygpath -w $(COMPATH)/bin/lib.exe)"
+ REAL_LD="$(shell cygpath -w $(COMPATH)/bin/link.exe)"
define gb_ExternalProject_run
$(call gb_Helper_print_on_error,cd $(EXTERNAL_WORKDIR)/$(3) && \
commit c7f10949a3509f14453e44615b98ec1ea1337676
Author: Peter Foley <pefoley2 at verizon.net>
Date: Mon Mar 11 18:42:21 2013 -0400
more ar-wrapper fixes
Change-Id: If711f5f994d0fe7b84f9e13bd3b04aa33871a108
diff --git a/solenv/gcc-wrappers/ar.cxx b/solenv/gcc-wrappers/ar.cxx
index 8722ed1..f05c629 100755
--- a/solenv/gcc-wrappers/ar.cxx
+++ b/solenv/gcc-wrappers/ar.cxx
@@ -16,16 +16,26 @@ string processarargs(vector<string> rawargs, string command) {
args.append(" ");
if(*i == "x") {
// work around limitations of lib.exe
- string output;
+ string liblist;
string listargs=" -nologo -list ";
++i;
listargs.append(*i);
- if(startprocess(command,listargs,&output)) {
+ if(startprocess(command,listargs,&liblist)) {
cerr << "Error: could not get list of objects" << endl;
exit(1);
}
- vector<string> objects;
+ string output;
+ size_t start=0;
+ while(true) {
+ size_t end=liblist.find("\r\n",start);
+ if(end==string::npos)
+ break;
+ output.append(" /extract:");
+ output.append(liblist.substr(start,end-start));
+ start=end+2;
+ }
cout << "AR=" << output << endl;
+ args.append("x");
}
else
diff --git a/solenv/gcc-wrappers/g++.cxx b/solenv/gcc-wrappers/g++.cxx
index a8b2430..321f34e 100755
--- a/solenv/gcc-wrappers/g++.cxx
+++ b/solenv/gcc-wrappers/g++.cxx
@@ -18,7 +18,7 @@ int main(int argc, char *argv[]) {
setupccenv();
- return startprocess(command,args,"stdout");
+ return startprocess(command,args,0);
}
diff --git a/solenv/gcc-wrappers/gcc.cxx b/solenv/gcc-wrappers/gcc.cxx
index 3afc51a..7d7e592 100755
--- a/solenv/gcc-wrappers/gcc.cxx
+++ b/solenv/gcc-wrappers/gcc.cxx
@@ -18,7 +18,7 @@ int main(int argc, char *argv[]) {
setupccenv();
- return startprocess(command,args,"stdout");
+ return startprocess(command,args,0);
}
diff --git a/solenv/gcc-wrappers/ld.cxx b/solenv/gcc-wrappers/ld.cxx
index a3278a3..09eda7a 100755
--- a/solenv/gcc-wrappers/ld.cxx
+++ b/solenv/gcc-wrappers/ld.cxx
@@ -26,7 +26,7 @@ int main(int argc, char *argv[]) {
string args=processldargs(rawargs);
- return startprocess(command,args,"stdout");
+ return startprocess(command,args,0);
}
commit 1647abdadbe345f66d92da299552b1091c92f485
Author: Peter Foley <pefoley2 at verizon.net>
Date: Sun Mar 10 17:48:05 2013 -0400
ar-wrapper can now get object list
Change-Id: Idb61d0e52fd5b4da9d7fb4a0ebc7886c30f9073a
diff --git a/solenv/gcc-wrappers/ar.cxx b/solenv/gcc-wrappers/ar.cxx
index 48a7ca2..8722ed1 100755
--- a/solenv/gcc-wrappers/ar.cxx
+++ b/solenv/gcc-wrappers/ar.cxx
@@ -15,15 +15,21 @@ string processarargs(vector<string> rawargs, string command) {
for(vector<string>::iterator i = rawargs.begin(); i != rawargs.end(); ++i) {
args.append(" ");
if(*i == "x") {
- string output;
- string listargs=" -nologo -list";
- ++i;
- listargs.append(*i);
- int ret=startprocess(command,listargs,output);
- cout << "AR=" << output << endl;
+ // work around limitations of lib.exe
+ string output;
+ string listargs=" -nologo -list ";
+ ++i;
+ listargs.append(*i);
+ if(startprocess(command,listargs,&output)) {
+ cerr << "Error: could not get list of objects" << endl;
+ exit(1);
+ }
+ vector<string> objects;
+ cout << "AR=" << output << endl;
+
}
else
- args.append(*i);
+ args.append(*i);
}
return args;
}
@@ -35,7 +41,7 @@ int main(int argc, char *argv[]) {
string args=processarargs(rawargs,command);
- return startprocess(command,args,"stdout");
+ return startprocess(command,args,0);
}
diff --git a/solenv/gcc-wrappers/wrapper.cxx b/solenv/gcc-wrappers/wrapper.cxx
index c9299d2..f29b0d4 100644
--- a/solenv/gcc-wrappers/wrapper.cxx
+++ b/solenv/gcc-wrappers/wrapper.cxx
@@ -9,6 +9,10 @@
#include "wrapper.hxx"
+#include <windows.h>
+
+#define BUFLEN 2048
+
string getexe(string exename) {
char* cmdbuf;
size_t cmdlen;
@@ -92,7 +96,7 @@ string processccargs(vector<string> rawargs) {
return args;
}
-int startprocess(string command, string args, string output) {
+int startprocess(string command, string args, string* output) {
STARTUPINFO si;
PROCESS_INFORMATION pi;
SECURITY_ATTRIBUTES sa;
@@ -151,10 +155,10 @@ int startprocess(string command, string args, string output) {
exit(1);
}
if(readlen!=0) {
- if(output=="stdout")
+ if(!output)
WriteFile(stdout_handle,buffer,readlen,&writelen,NULL);
else
- output.append(buffer,readlen);
+ output->append(buffer,readlen);
}
}
GetExitCodeProcess(pi.hProcess, &ret);
diff --git a/solenv/gcc-wrappers/wrapper.hxx b/solenv/gcc-wrappers/wrapper.hxx
index 7b44cd8..eb3b065 100755
--- a/solenv/gcc-wrappers/wrapper.hxx
+++ b/solenv/gcc-wrappers/wrapper.hxx
@@ -11,10 +11,6 @@
#include <iostream>
#include <vector>
-#include <windows.h>
-
-#define BUFLEN 2048
-
using namespace std;
string getexe(string exename);
@@ -23,6 +19,6 @@ void setupccenv();
string processccargs(vector<string> rawargs);
-int startprocess(string command, string args, string output);
+int startprocess(string command, string args, string* output);
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit adf6bed58108f9182faf32e118f9881a1a88b02a
Author: Peter Foley <pefoley2 at verizon.net>
Date: Sun Mar 10 17:14:14 2013 -0400
fix crash
Change-Id: I054574e6541b3191d7a2e5a3cacd6242674998ca
diff --git a/solenv/gcc-wrappers/wrapper.cxx b/solenv/gcc-wrappers/wrapper.cxx
index 9e6d5ed..c9299d2 100644
--- a/solenv/gcc-wrappers/wrapper.cxx
+++ b/solenv/gcc-wrappers/wrapper.cxx
@@ -112,9 +112,6 @@ int startprocess(string command, string args, string output) {
exit(1);
}
- // if you don't close this the process will hang
- CloseHandle(childout_write);
-
si.cb=sizeof(si);
si.dwFlags |= STARTF_USESTDHANDLES;
si.hStdOutput=childout_write;
@@ -138,6 +135,9 @@ int startprocess(string command, string args, string output) {
exit(1);
}
+ // if you don't close this the process will hang
+ CloseHandle(childout_write);
+
// Get Process output
char buffer[BUFLEN];
DWORD readlen, writelen, ret;
commit 4986efb205c6b8c96d5e16fe82f386cdd0cacb0b
Author: Peter Foley <pefoley2 at verizon.net>
Date: Sun Mar 10 15:19:47 2013 -0400
including cxx files is bad
Change-Id: I8ed9628226c53746cf391a17921d543e8ae957de
diff --git a/Repository.mk b/Repository.mk
index ea07783..708cf73 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -140,6 +140,7 @@ $(eval $(call gb_Helper_register_static_libraries,PLAINLIBS, \
directxcanvas \
winextendloaderenv \
winlauncher \
+ wrapper \
))
else
diff --git a/solenv/Executable_ar-wrapper.mk b/solenv/Executable_ar-wrapper.mk
index ff07f63..6cd6e65 100755
--- a/solenv/Executable_ar-wrapper.mk
+++ b/solenv/Executable_ar-wrapper.mk
@@ -13,4 +13,8 @@ $(eval $(call gb_Executable_add_exception_objects,ar-wrapper,\
solenv/gcc-wrappers/ar \
))
+$(eval $(call gb_Executable_use_static_libraries,ar-wrapper,\
+ wrapper \
+))
+
# vim:set noet sw=4 ts=4:
diff --git a/solenv/Executable_g++-wrapper.mk b/solenv/Executable_g++-wrapper.mk
index a64069a..526ff3a 100755
--- a/solenv/Executable_g++-wrapper.mk
+++ b/solenv/Executable_g++-wrapper.mk
@@ -13,4 +13,8 @@ $(eval $(call gb_Executable_add_exception_objects,g++-wrapper,\
solenv/gcc-wrappers/g++ \
))
+$(eval $(call gb_Executable_use_static_libraries,g++-wrapper,\
+ wrapper \
+))
+
# vim:set noet sw=4 ts=4:
diff --git a/solenv/Executable_gcc-wrapper.mk b/solenv/Executable_gcc-wrapper.mk
index 43c6ee9..ae76a33 100644
--- a/solenv/Executable_gcc-wrapper.mk
+++ b/solenv/Executable_gcc-wrapper.mk
@@ -13,4 +13,8 @@ $(eval $(call gb_Executable_add_exception_objects,gcc-wrapper,\
solenv/gcc-wrappers/gcc \
))
+$(eval $(call gb_Executable_use_static_libraries,gcc-wrapper,\
+ wrapper \
+))
+
# vim:set noet sw=4 ts=4:
diff --git a/solenv/Executable_ld-wrapper.mk b/solenv/Executable_ld-wrapper.mk
index 86d0758..0e077e1 100755
--- a/solenv/Executable_ld-wrapper.mk
+++ b/solenv/Executable_ld-wrapper.mk
@@ -13,4 +13,8 @@ $(eval $(call gb_Executable_add_exception_objects,ld-wrapper,\
solenv/gcc-wrappers/ld \
))
+$(eval $(call gb_Executable_use_static_libraries,ld-wrapper,\
+ wrapper \
+))
+
# vim:set noet sw=4 ts=4:
diff --git a/solenv/Module_solenv.mk b/solenv/Module_solenv.mk
index 2ca6c8e..5a256ac 100644
--- a/solenv/Module_solenv.mk
+++ b/solenv/Module_solenv.mk
@@ -41,6 +41,7 @@ endif
ifeq ($(COM),MSC)
$(eval $(call gb_Module_add_targets,solenv,\
+ StaticLibrary_wrapper \
Executable_gcc-wrapper \
Executable_g++-wrapper \
Executable_ld-wrapper \
diff --git a/solenv/StaticLibrary_wrapper.mk b/solenv/StaticLibrary_wrapper.mk
new file mode 100755
index 0000000..8fe81ef
--- /dev/null
+++ b/solenv/StaticLibrary_wrapper.mk
@@ -0,0 +1,16 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_StaticLibrary_StaticLibrary,wrapper))
+
+$(eval $(call gb_StaticLibrary_add_exception_objects,wrapper,\
+ solenv/gcc-wrappers/wrapper \
+))
+
+# vim:set noet sw=4 ts=4:
diff --git a/solenv/gcc-wrappers/ar.cxx b/solenv/gcc-wrappers/ar.cxx
index 124d2c3..48a7ca2 100755
--- a/solenv/gcc-wrappers/ar.cxx
+++ b/solenv/gcc-wrappers/ar.cxx
@@ -7,25 +7,36 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-#include <string>
-#include <vector>
+#include "wrapper.hxx"
-using namespace std;
-
-
-#define REAL_EXE "REAL_AR"
-#define REAL_AR
-
-string processarargs(vector<string> rawargs) {
+string processarargs(vector<string> rawargs, string command) {
// suppress the msvc banner
string args=" -nologo";
for(vector<string>::iterator i = rawargs.begin(); i != rawargs.end(); ++i) {
args.append(" ");
+ if(*i == "x") {
+ string output;
+ string listargs=" -nologo -list";
+ ++i;
+ listargs.append(*i);
+ int ret=startprocess(command,listargs,output);
+ cout << "AR=" << output << endl;
+ }
+ else
args.append(*i);
}
return args;
}
-#include "wrapper.cxx"
+int main(int argc, char *argv[]) {
+ vector<string> rawargs(argv + 1, argv + argc);
+
+ string command=getexe("REAL_AR");
+
+ string args=processarargs(rawargs,command);
+
+ return startprocess(command,args,"stdout");
+
+}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/solenv/gcc-wrappers/g++.cxx b/solenv/gcc-wrappers/g++.cxx
index 5589f0c..a8b2430 100755
--- a/solenv/gcc-wrappers/g++.cxx
+++ b/solenv/gcc-wrappers/g++.cxx
@@ -7,8 +7,19 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-#define REAL_EXE "REAL_CXX"
+#include "wrapper.hxx"
-#include "wrapper.cxx"
+int main(int argc, char *argv[]) {
+ vector<string> rawargs(argv + 1, argv + argc);
+
+ string command=getexe("REAL_CXX");
+
+ string args=processccargs(rawargs);
+
+ setupccenv();
+
+ return startprocess(command,args,"stdout");
+
+}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/solenv/gcc-wrappers/gcc.cxx b/solenv/gcc-wrappers/gcc.cxx
index 7f1c6c7..3afc51a 100755
--- a/solenv/gcc-wrappers/gcc.cxx
+++ b/solenv/gcc-wrappers/gcc.cxx
@@ -7,8 +7,19 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-#define REAL_EXE "REAL_CC"
+#include "wrapper.hxx"
-#include "wrapper.cxx"
+int main(int argc, char *argv[]) {
+ vector<string> rawargs(argv + 1, argv + argc);
+
+ string command=getexe("REAL_CC");
+
+ string args=processccargs(rawargs);
+
+ setupccenv();
+
+ return startprocess(command,args,"stdout");
+
+}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/solenv/gcc-wrappers/ld.cxx b/solenv/gcc-wrappers/ld.cxx
index e7da793..a3278a3 100755
--- a/solenv/gcc-wrappers/ld.cxx
+++ b/solenv/gcc-wrappers/ld.cxx
@@ -7,13 +7,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-#include <string>
-#include <vector>
-
-using namespace std;
-
-#define REAL_EXE "REAL_LD"
-#define REAL_LD
+#include "wrapper.hxx"
string processldargs(vector<string> rawargs) {
// suppress the msvc banner
@@ -25,6 +19,15 @@ string processldargs(vector<string> rawargs) {
return args;
}
-#include "wrapper.cxx"
+int main(int argc, char *argv[]) {
+ vector<string> rawargs(argv + 1, argv + argc);
+
+ string command=getexe("REAL_LD");
+
+ string args=processldargs(rawargs);
+
+ return startprocess(command,args,"stdout");
+
+}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/solenv/gcc-wrappers/wrapper.cxx b/solenv/gcc-wrappers/wrapper.cxx
index 962ae09..9e6d5ed 100644
--- a/solenv/gcc-wrappers/wrapper.cxx
+++ b/solenv/gcc-wrappers/wrapper.cxx
@@ -7,17 +7,22 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-#include <string>
-#include <iostream>
-#include <vector>
+#include "wrapper.hxx"
-#include <windows.h>
-
-#define BUFLEN 2048
-
-using namespace std;
+string getexe(string exename) {
+ char* cmdbuf;
+ size_t cmdlen;
+ _dupenv_s(&cmdbuf,&cmdlen,exename.c_str());
+ if(!cmdbuf) {
+ cout << "Error " << exename << " not defined. Did you forget to source the enviroment?" << endl;
+ exit(1);
+ }
+ string command(cmdbuf);
+ free(cmdbuf);
+ return command;
+}
-void setupenv() {
+void setupccenv() {
// Set-up library path
string libpath="LIB=";
char* libbuf;
@@ -35,20 +40,20 @@ void setupenv() {
char* incbuf;
size_t inclen;
_dupenv_s(&incbuf,&inclen,"SOLARINC");
- string incvar(incbuf);
+ string inctmp(incbuf);
free(incbuf);
// 3 = strlen(" -I")
for(size_t pos=0; pos != string::npos;) {
- size_t endpos=incvar.find(" -I",pos+3);
+ size_t endpos=inctmp.find(" -I",pos+3);
size_t len=endpos-pos-3;
if(endpos==string::npos)
- includepath.append(incvar,pos+3,endpos);
+ includepath.append(inctmp,pos+3,endpos);
else if(len>0) {
- includepath.append(incvar,pos+3,len);
+ includepath.append(inctmp,pos+3,len);
includepath.append(";");
}
- pos=incvar.find(" -I",pos+len);
+ pos=inctmp.find(" -I",pos+len);
}
if(_putenv(includepath.c_str())<0) {
cerr << "Error: could not export INCLUDE" << endl;
@@ -59,7 +64,7 @@ void setupenv() {
string processccargs(vector<string> rawargs) {
// suppress the msvc banner
string args=" -nologo";
- // TODO: should these options be enabled globally or just for libvisio?
+ // TODO: should these options be enabled globally?
args.append(" -EHsc");
args.append(" -MD");
@@ -74,7 +79,7 @@ string processccargs(vector<string> rawargs) {
else if(*i == "-g")
args.append("-Zi");
else if(!(*i).compare(0,2,"-D")) {
- // need to re-escape strings for cpp
+ // need to re-escape strings for preprocessor
for(size_t pos=(*i).find("\"",0); pos!=string::npos; pos=(*i).find("\"",pos)) {
(*i).replace(pos,0,"\\");
pos+=2;
@@ -87,31 +92,35 @@ string processccargs(vector<string> rawargs) {
return args;
}
-int startprocess(string command, string args) {
+int startprocess(string command, string args, string output) {
STARTUPINFO si;
PROCESS_INFORMATION pi;
SECURITY_ATTRIBUTES sa;
- HANDLE stdout_read;
- HANDLE stdout_write;
+ HANDLE childout_read;
+ HANDLE childout_write;
memset(&sa,0,sizeof(sa));
+ memset(&si,0,sizeof(si));
+ memset(&pi,0,sizeof(pi));
+
sa.nLength=sizeof(sa);
sa.bInheritHandle=TRUE;
- if(!CreatePipe(&stdout_read,&stdout_write,&sa,0)) {
+ if(!CreatePipe(&childout_read,&childout_write,&sa,0)) {
cerr << "Error: could not create sdtout pipe" << endl;
exit(1);
}
- memset(&si,0,sizeof(si));
+ // if you don't close this the process will hang
+ CloseHandle(childout_write);
+
si.cb=sizeof(si);
si.dwFlags |= STARTF_USESTDHANDLES;
- si.hStdOutput=stdout_write;
- si.hStdError=stdout_write;
-
- memset(&pi,0,sizeof(pi));
+ si.hStdOutput=childout_write;
+ si.hStdError=childout_write;
+ // Commandline may be modified by CreateProcess
char* cmdline=_strdup(args.c_str());
if(!CreateProcess(command.c_str(), // Process Name
@@ -129,23 +138,24 @@ int startprocess(string command, string args) {
exit(1);
}
- // if you don't close this the process will hang
- CloseHandle(stdout_write);
-
// Get Process output
char buffer[BUFLEN];
DWORD readlen, writelen, ret;
- HANDLE stdouthandle=GetStdHandle(STD_OUTPUT_HANDLE);
+ HANDLE stdout_handle=GetStdHandle(STD_OUTPUT_HANDLE);
while(true) {
- int success=ReadFile(stdout_read,buffer,BUFLEN,&readlen,NULL);
+ int success=ReadFile(childout_read,buffer,BUFLEN,&readlen,NULL);
if(GetLastError()==ERROR_BROKEN_PIPE)
break;
if(!success) {
cerr << "Error: could not read from subprocess stdout" << endl;
exit(1);
}
- if(readlen!=0)
- WriteFile(stdouthandle,buffer,readlen,&writelen,NULL);
+ if(readlen!=0) {
+ if(output=="stdout")
+ WriteFile(stdout_handle,buffer,readlen,&writelen,NULL);
+ else
+ output.append(buffer,readlen);
+ }
}
GetExitCodeProcess(pi.hProcess, &ret);
CloseHandle(pi.hThread);
@@ -153,35 +163,4 @@ int startprocess(string command, string args) {
return int(ret);
}
-int main(int argc, char *argv[]) {
- vector<string> rawargs(argv + 1, argv + argc);
-
- char* cmdbuf;
- size_t cmdlen;
- _dupenv_s(&cmdbuf,&cmdlen,REAL_EXE);
- if(!cmdbuf) {
- cout << "Error " << REAL_EXE << " not defined. Did you forget to source the enviroment?" << endl;
- exit(1);
- }
- string command(cmdbuf);
- free(cmdbuf);
-
- string args;
-#ifdef REAL_LD
- args=processldargs(rawargs);
-#elif defined(REAL_AR)
- args=processarargs(rawargs);
-#else
- args=processccargs(rawargs);
-#endif
-
- setupenv();
-
- //cout << "CC=" << command << " ARGS=" << args << endl;
-
- int ret=startprocess(command,args);
- return ret;
-
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/solenv/gcc-wrappers/wrapper.hxx b/solenv/gcc-wrappers/wrapper.hxx
new file mode 100755
index 0000000..7b44cd8
--- /dev/null
+++ b/solenv/gcc-wrappers/wrapper.hxx
@@ -0,0 +1,28 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+* This file is part of the LibreOffice project.
+*
+* This Source Code Form is subject to the terms of the Mozilla Public
+* License, v. 2.0. If a copy of the MPL was not distributed with this
+* file, You can obtain one at http://mozilla.org/MPL/2.0/.
+*/
+
+#include <string>
+#include <iostream>
+#include <vector>
+
+#include <windows.h>
+
+#define BUFLEN 2048
+
+using namespace std;
+
+string getexe(string exename);
+
+void setupccenv();
+
+string processccargs(vector<string> rawargs);
+
+int startprocess(string command, string args, string output);
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 6c43383ba60ca8d181ea632ccae83224edf6e8c6
Author: Peter Foley <pefoley2 at verizon.net>
Date: Sun Mar 10 10:38:18 2013 -0400
add ar-wrapper
Change-Id: I3e9a6232e3906a4b71b102cd61edf97688441394
diff --git a/Repository.mk b/Repository.mk
index 5050250..ea07783 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -111,6 +111,7 @@ $(eval $(call gb_Helper_register_executables,OOO,\
gcc-wrapper \
g++-wrapper \
ld-wrapper \
+ ar-wrapper \
guiloader \
guistdio \
langsupport \
diff --git a/solenv/Executable_ar-wrapper.mk b/solenv/Executable_ar-wrapper.mk
new file mode 100755
index 0000000..ff07f63
--- /dev/null
+++ b/solenv/Executable_ar-wrapper.mk
@@ -0,0 +1,16 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_Executable_Executable,ar-wrapper))
+
+$(eval $(call gb_Executable_add_exception_objects,ar-wrapper,\
+ solenv/gcc-wrappers/ar \
+))
+
+# vim:set noet sw=4 ts=4:
diff --git a/solenv/Module_solenv.mk b/solenv/Module_solenv.mk
index 8791bd5..2ca6c8e 100644
--- a/solenv/Module_solenv.mk
+++ b/solenv/Module_solenv.mk
@@ -44,6 +44,7 @@ $(eval $(call gb_Module_add_targets,solenv,\
Executable_gcc-wrapper \
Executable_g++-wrapper \
Executable_ld-wrapper \
+ Executable_ar-wrapper \
))
endif
diff --git a/solenv/gbuild/ExternalProject.mk b/solenv/gbuild/ExternalProject.mk
index 20c7d4a..08d52a6 100644
--- a/solenv/gbuild/ExternalProject.mk
+++ b/solenv/gbuild/ExternalProject.mk
@@ -207,7 +207,9 @@ AUTOCONF_WRAPPERS := \
REAL_CXX="$(shell cygpath -w $(CXX))" \
CXX="$(call gb_Executable_get_target,g++-wrapper)" \
LD="$(call gb_Executable_get_target,ld-wrapper)" \
- REAL_LD="$(shell cygpath -w $(COMPATH)/bin/link.exe)"
+ REAL_LD="$(shell cygpath -w $(COMPATH)/bin/link.exe)" \
+ AR="$(call gb_Executable_get_target,ar-wrapper)" \
+ REAL_AR="$(shell cygpath -w $(COMPATH)/bin/lib.exe)"
define gb_ExternalProject_run
$(call gb_Helper_print_on_error,cd $(EXTERNAL_WORKDIR)/$(3) && \
diff --git a/solenv/gcc-wrappers/ar.cxx b/solenv/gcc-wrappers/ar.cxx
new file mode 100755
index 0000000..124d2c3
--- /dev/null
+++ b/solenv/gcc-wrappers/ar.cxx
@@ -0,0 +1,31 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+* This file is part of the LibreOffice project.
+*
+* This Source Code Form is subject to the terms of the Mozilla Public
+* License, v. 2.0. If a copy of the MPL was not distributed with this
+* file, You can obtain one at http://mozilla.org/MPL/2.0/.
+*/
+
+#include <string>
+#include <vector>
+
+using namespace std;
+
+
+#define REAL_EXE "REAL_AR"
+#define REAL_AR
+
+string processarargs(vector<string> rawargs) {
+ // suppress the msvc banner
+ string args=" -nologo";
+ for(vector<string>::iterator i = rawargs.begin(); i != rawargs.end(); ++i) {
+ args.append(" ");
+ args.append(*i);
+ }
+ return args;
+}
+
+#include "wrapper.cxx"
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/solenv/gcc-wrappers/ld.cxx b/solenv/gcc-wrappers/ld.cxx
index 25faaa1..e7da793 100755
--- a/solenv/gcc-wrappers/ld.cxx
+++ b/solenv/gcc-wrappers/ld.cxx
@@ -7,7 +7,23 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
+#include <string>
+#include <vector>
+
+using namespace std;
+
#define REAL_EXE "REAL_LD"
+#define REAL_LD
+
+string processldargs(vector<string> rawargs) {
+ // suppress the msvc banner
+ string args=" -nologo";
+ for(vector<string>::iterator i = rawargs.begin(); i != rawargs.end(); ++i) {
+ args.append(" ");
+ args.append(*i);
+ }
+ return args;
+}
#include "wrapper.cxx"
diff --git a/solenv/gcc-wrappers/wrapper.cxx b/solenv/gcc-wrappers/wrapper.cxx
index b77109c..962ae09 100644
--- a/solenv/gcc-wrappers/wrapper.cxx
+++ b/solenv/gcc-wrappers/wrapper.cxx
@@ -56,16 +56,6 @@ void setupenv() {
}
}
-string processldargs(vector<string> rawargs) {
- // suppress the msvc banner
- string args=" -nologo";
- for(vector<string>::iterator i = rawargs.begin(); i != rawargs.end(); ++i) {
- args.append(" ");
- args.append(*i);
- }
- return args;
-}
-
string processccargs(vector<string> rawargs) {
// suppress the msvc banner
string args=" -nologo";
@@ -177,10 +167,13 @@ int main(int argc, char *argv[]) {
free(cmdbuf);
string args;
- if(!strcmp(REAL_EXE,"REAL_LD"))
+#ifdef REAL_LD
args=processldargs(rawargs);
- else
+#elif defined(REAL_AR)
+ args=processarargs(rawargs);
+#else
args=processccargs(rawargs);
+#endif
setupenv();
commit d272a6ec45922421135f230b91269f5afb9b6797
Author: Peter Foley <pefoley2 at verizon.net>
Date: Sun Mar 10 10:11:04 2013 -0400
use gcc-wrapper for liblangtag
Change-Id: Ibfba71d0f89eb53b73c9779388c18adadf4e0408
diff --git a/liblangtag/ExternalProject_langtag.mk b/liblangtag/ExternalProject_langtag.mk
index 051e035..6f6923c 100644
--- a/liblangtag/ExternalProject_langtag.mk
+++ b/liblangtag/ExternalProject_langtag.mk
@@ -10,8 +10,11 @@
$(eval $(call gb_ExternalProject_ExternalProject,langtag))
$(eval $(call gb_ExternalProject_use_unpacked,langtag,langtag))
+
$(eval $(call gb_ExternalProject_use_external,langtag,libxml2))
+$(eval $(call gb_ExternalProject_use_autoconf,langtag,build))
+
$(eval $(call gb_ExternalProject_register_targets,langtag,\
build \
))
@@ -21,7 +24,7 @@ $(call gb_ExternalProject_get_state_target,langtag,build):
./configure --disable-modules --disable-test --disable-introspection --disable-shared --enable-static --with-pic \
$(if $(filter TRUE,$(HAVE_GCC_BUILTIN_ATOMIC)),"lt_cv_has_atomic=yes","lt_cv_has_atomic=no") \
$(if $(filter YES,$(CROSS_COMPILING)),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \
- $(if $(filter NO,$(SYSTEM_LIBXML)),LIBXML2_CFLAGS="-I$(call gb_UnpackedTarball_get_dir,xml2)/include",\
+ $(if $(filter NO,$(SYSTEM_LIBXML)),LIBXML2_CFLAGS="-I$(call gb_UnpackedTarball_get_dir,xml2)/include" LIBXML2_LIBS=" ",\
$(if $(filter MACOSX,$(OS)),LIBXML2_CFLAGS="$(LIBXML_CFLAGS)" LIBXML2_LIBS="$(LIBXML_LIBS)")) \
$(if $(filter MACOSX,$(OS)),--prefix=/@.__________________________________________________OOO) \
$(if $(filter-out LINUX FREEBSD,$(OS)),,LDFLAGS="-Wl$(COMMA)-z$(COMMA)origin -Wl$(COMMA)-rpath,\\"\$$\$$ORIGIN:'\'\$$\$$ORIGIN/../ure-link/lib) \
diff --git a/liblangtag/Module_liblangtag.mk b/liblangtag/Module_liblangtag.mk
index 8d75f2d..b5e9cc3 100644
--- a/liblangtag/Module_liblangtag.mk
+++ b/liblangtag/Module_liblangtag.mk
@@ -15,20 +15,11 @@ ifeq ($(SYSTEM_LIBLANGTAG),NO)
$(eval $(call gb_Module_add_targets,liblangtag,\
UnpackedTarball_langtag \
ExternalPackage_langtag_data \
- Zip_liblangtag_data \
-))
-
-ifeq ($(COM),MSC)
-$(eval $(call gb_Module_add_targets,liblangtag,\
- StaticLibrary_langtag \
-))
-else
-$(eval $(call gb_Module_add_targets,liblangtag,\
ExternalPackage_langtag \
ExternalProject_langtag \
+ Zip_liblangtag_data \
))
endif
endif
-endif
# vim: set noet sw=4 ts=4:
diff --git a/liblangtag/StaticLibrary_langtag.mk b/liblangtag/StaticLibrary_langtag.mk
deleted file mode 100755
index fed7565..0000000
--- a/liblangtag/StaticLibrary_langtag.mk
+++ /dev/null
@@ -1,73 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#
-# This file is part of the LibreOffice project.
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-
-$(eval $(call gb_StaticLibrary_StaticLibrary,langtag))
-
-$(eval $(call gb_StaticLibrary_set_warnings_not_errors,langtag))
-
-$(eval $(call gb_StaticLibrary_use_unpacked,langtag,langtag))
-
-$(eval $(call gb_StaticLibrary_use_external,langtag,libxml2))
-
-$(eval $(call gb_StaticLibrary_set_include,langtag,\
- $$(INCLUDE) \
- -I$(call gb_UnpackedTarball_get_dir,langtag) \
- -I$(call gb_UnpackedTarball_get_dir,langtag)/liblangtag \
-))
-
-# Hardcoded for MSVC
-$(eval $(call gb_StaticLibrary_add_defs,langtag,\
- -D__LANGTAG_COMPILATION \
- -DREGDATADIR \
- -DLT_HAVE___INLINE \
- -DLT_CAN_INLINE \
- -DALIGNOF_VOID_P=4 \
-))
-
-$(eval $(call gb_StaticLibrary_add_generated_cobjects,langtag,\
- UnpackedTarball/langtag/liblangtag/lt-database \
- UnpackedTarball/langtag/liblangtag/lt-error \
- UnpackedTarball/langtag/liblangtag/lt-ext-module \
- UnpackedTarball/langtag/liblangtag/lt-ext-module-data \
- UnpackedTarball/langtag/liblangtag/lt-extension \
- UnpackedTarball/langtag/liblangtag/lt-extlang \
- UnpackedTarball/langtag/liblangtag/lt-extlang-db \
- UnpackedTarball/langtag/liblangtag/lt-grandfathered \
- UnpackedTarball/langtag/liblangtag/lt-grandfathered-db \
- UnpackedTarball/langtag/liblangtag/lt-lang \
- UnpackedTarball/langtag/liblangtag/lt-lang-db \
- UnpackedTarball/langtag/liblangtag/lt-list \
- UnpackedTarball/langtag/liblangtag/lt-mem \
- UnpackedTarball/langtag/liblangtag/lt-messages \
- UnpackedTarball/langtag/liblangtag/lt-redundant \
- UnpackedTarball/langtag/liblangtag/lt-redundant-db \
- UnpackedTarball/langtag/liblangtag/lt-region \
- UnpackedTarball/langtag/liblangtag/lt-region-db \
- UnpackedTarball/langtag/liblangtag/lt-script \
- UnpackedTarball/langtag/liblangtag/lt-script-db \
- UnpackedTarball/langtag/liblangtag/lt-string \
- UnpackedTarball/langtag/liblangtag/lt-tag \
- UnpackedTarball/langtag/liblangtag/lt-trie \
- UnpackedTarball/langtag/liblangtag/lt-utils \
- UnpackedTarball/langtag/liblangtag/lt-variant \
- UnpackedTarball/langtag/liblangtag/lt-variant-db \
- UnpackedTarball/langtag/liblangtag/lt-xml \
-))
-
-$(eval $(call gb_StaticLibrary_add_generated_cobjects,langtag,\
- UnpackedTarball/langtag/extensions/lt-ext-ldml-t \
- , -DLT_MODULE_PREFIX=lt_module_ext_t \
-))
-
-$(eval $(call gb_StaticLibrary_add_generated_cobjects,langtag,\
- UnpackedTarball/langtag/extensions/lt-ext-ldml-u \
- , -DLT_MODULE_PREFIX=lt_module_ext_u \
-))
-
-# vim: set noet sw=4 ts=4:
commit ebd559379c6197fe89dab39b6cbb6f2032c252b3
Author: Peter Foley <pefoley2 at verizon.net>
Date: Sun Mar 10 10:09:38 2013 -0400
properly escape preproc defines
Change-Id: I9867820906c3c657a8751e86601742b7b9f08bec
diff --git a/solenv/gcc-wrappers/wrapper.cxx b/solenv/gcc-wrappers/wrapper.cxx
index bb2a154..b77109c 100644
--- a/solenv/gcc-wrappers/wrapper.cxx
+++ b/solenv/gcc-wrappers/wrapper.cxx
@@ -13,7 +13,7 @@
#include <windows.h>
-#define buflen 2048
+#define BUFLEN 2048
using namespace std;
@@ -83,6 +83,14 @@ string processccargs(vector<string> rawargs) {
}
else if(*i == "-g")
args.append("-Zi");
+ else if(!(*i).compare(0,2,"-D")) {
+ // need to re-escape strings for cpp
+ for(size_t pos=(*i).find("\"",0); pos!=string::npos; pos=(*i).find("\"",pos)) {
+ (*i).replace(pos,0,"\\");
+ pos+=2;
+ }
+ args.append(*i);
+ }
else
args.append(*i);
}
@@ -135,11 +143,11 @@ int startprocess(string command, string args) {
CloseHandle(stdout_write);
// Get Process output
- char buffer[buflen];
+ char buffer[BUFLEN];
DWORD readlen, writelen, ret;
HANDLE stdouthandle=GetStdHandle(STD_OUTPUT_HANDLE);
while(true) {
- int success=ReadFile(stdout_read,buffer,buflen,&readlen,NULL);
+ int success=ReadFile(stdout_read,buffer,BUFLEN,&readlen,NULL);
if(GetLastError()==ERROR_BROKEN_PIPE)
break;
if(!success) {
@@ -176,7 +184,7 @@ int main(int argc, char *argv[]) {
setupenv();
- //cerr << "CC=" << command << " ARGS=" << args << endl;
+ //cout << "CC=" << command << " ARGS=" << args << endl;
int ret=startprocess(command,args);
return ret;
commit a26d0524c5bc96dd4ea783c88555911eed8a919c
Author: Peter Foley <pefoley2 at verizon.net>
Date: Sat Mar 9 11:38:24 2013 -0500
do not export wrapper variables unless autoconf has been expressly enabled
Change-Id: I23a3f7124f1a8cd8c016aaa0d76ca1800e8cbc34
diff --git a/libvisio/ExternalProject_libvisio.mk b/libvisio/ExternalProject_libvisio.mk
index 047a64ba..2095e61 100644
--- a/libvisio/ExternalProject_libvisio.mk
+++ b/libvisio/ExternalProject_libvisio.mk
@@ -11,7 +11,7 @@ $(eval $(call gb_ExternalProject_ExternalProject,libvisio))
$(eval $(call gb_ExternalProject_use_unpacked,libvisio,visio))
-$(eval $(call gb_ExternalProject_use_autoconf,libvisio))
+$(eval $(call gb_ExternalProject_use_autoconf,libvisio,build))
$(eval $(call gb_ExternalProject_register_targets,libvisio,\
build \
diff --git a/solenv/gbuild/ExternalProject.mk b/solenv/gbuild/ExternalProject.mk
index d7dddaa..20c7d4a 100644
--- a/solenv/gbuild/ExternalProject.mk
+++ b/solenv/gbuild/ExternalProject.mk
@@ -181,10 +181,14 @@ $(call gb_ExternalProject_get_preparation_target,$(1)) : \
endef
# Use the gcc wrappers for a autoconf based project
+#
+# gb_ExternalProject_register_targets project state_target
define gb_ExternalProject_use_autoconf
ifeq ($(COM),MSC)
$(call gb_ExternalProject_get_preparation_target,$(1)) : $(call gb_Executable_get_runtime_dependencies,gcc-wrapper) \
- $(call gb_Executable_get_runtime_dependencies,g++-wrapper)
+ $(call gb_Executable_get_runtime_dependencies,g++-wrapper) \
+ $(call gb_Executable_get_runtime_dependencies,ld-wrapper)
+$(call gb_ExternalProject_get_state_target,$(1),$(2)): WRAPPERS := $(AUTOCONF_WRAPPERS)
endif
endef
@@ -207,7 +211,7 @@ AUTOCONF_WRAPPERS := \
define gb_ExternalProject_run
$(call gb_Helper_print_on_error,cd $(EXTERNAL_WORKDIR)/$(3) && \
- $(if $(filter MSC,$(COM)),export $(AUTOCONF_WRAPPERS) &&) \
+ $(if $(filter MSC,$(COM)),$(if $(WRAPPERS),export $(WRAPPERS) &&)) \
$(2) && touch $@,$(EXTERNAL_WORKDIR)/$(if $(3),$(3)/,)$(if $(4),$(4),$(1).log))
endef
More information about the Libreoffice-commits
mailing list