Bump for 4.0-11
[LibreOffice.git] / libxmlsec / xmlsec1-oldlibtool.patch
blob7d59ce101cce347eb0df5d71e3826cf7baa849d0
1 --- /dev/null 2012-11-27 15:14:41.892226008 +0100
2 +++ misc/xmlsec1-1.2.14/compile 2012-11-29 12:27:14.000000000 +0100
3 @@ -0,0 +1,142 @@
4 +#! /bin/sh
5 +# Wrapper for compilers which do not understand `-c -o'.
7 +scriptversion=2005-05-14.22
9 +# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
10 +# Written by Tom Tromey <tromey@cygnus.com>.
12 +# This program is free software; you can redistribute it and/or modify
13 +# it under the terms of the GNU General Public License as published by
14 +# the Free Software Foundation; either version 2, or (at your option)
15 +# any later version.
17 +# This program is distributed in the hope that it will be useful,
18 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
19 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 +# GNU General Public License for more details.
22 +# You should have received a copy of the GNU General Public License
23 +# along with this program; if not, write to the Free Software
24 +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
26 +# As a special exception to the GNU General Public License, if you
27 +# distribute this file as part of a program that contains a
28 +# configuration script generated by Autoconf, you may include it under
29 +# the same distribution terms that you use for the rest of that program.
31 +# This file is maintained in Automake, please report
32 +# bugs to <bug-automake@gnu.org> or send patches to
33 +# <automake-patches@gnu.org>.
35 +case $1 in
36 + '')
37 + echo "$0: No command. Try \`$0 --help' for more information." 1>&2
38 + exit 1;
39 + ;;
40 + -h | --h*)
41 + cat <<\EOF
42 +Usage: compile [--help] [--version] PROGRAM [ARGS]
44 +Wrapper for compilers which do not understand `-c -o'.
45 +Remove `-o dest.o' from ARGS, run PROGRAM with the remaining
46 +arguments, and rename the output as expected.
48 +If you are trying to build a whole package this is not the
49 +right script to run: please start by reading the file `INSTALL'.
51 +Report bugs to <bug-automake@gnu.org>.
52 +EOF
53 + exit $?
54 + ;;
55 + -v | --v*)
56 + echo "compile $scriptversion"
57 + exit $?
58 + ;;
59 +esac
61 +ofile=
62 +cfile=
63 +eat=
65 +for arg
66 +do
67 + if test -n "$eat"; then
68 + eat=
69 + else
70 + case $1 in
71 + -o)
72 + # configure might choose to run compile as `compile cc -o foo foo.c'.
73 + # So we strip `-o arg' only if arg is an object.
74 + eat=1
75 + case $2 in
76 + *.o | *.obj)
77 + ofile=$2
78 + ;;
79 + *)
80 + set x "$@" -o "$2"
81 + shift
82 + ;;
83 + esac
84 + ;;
85 + *.c)
86 + cfile=$1
87 + set x "$@" "$1"
88 + shift
89 + ;;
90 + *)
91 + set x "$@" "$1"
92 + shift
93 + ;;
94 + esac
95 + fi
96 + shift
97 +done
99 +if test -z "$ofile" || test -z "$cfile"; then
100 + # If no `-o' option was seen then we might have been invoked from a
101 + # pattern rule where we don't need one. That is ok -- this is a
102 + # normal compilation that the losing compiler can handle. If no
103 + # `.c' file was seen then we are probably linking. That is also
104 + # ok.
105 + exec "$@"
108 +# Name of file we expect compiler to create.
109 +cofile=`echo "$cfile" | sed -e 's|^.*/||' -e 's/\.c$/.o/'`
111 +# Create the lock directory.
112 +# Note: use `[/.-]' here to ensure that we don't use the same name
113 +# that we are using for the .o file. Also, base the name on the expected
114 +# object file name, since that is what matters with a parallel build.
115 +lockdir=`echo "$cofile" | sed -e 's|[/.-]|_|g'`.d
116 +while true; do
117 + if mkdir "$lockdir" >/dev/null 2>&1; then
118 + break
119 + fi
120 + sleep 1
121 +done
122 +# FIXME: race condition here if user kills between mkdir and trap.
123 +trap "rmdir '$lockdir'; exit 1" 1 2 15
125 +# Run the compile.
126 +"$@"
127 +ret=$?
129 +if test -f "$cofile"; then
130 + mv "$cofile" "$ofile"
131 +elif test -f "${cofile}bj"; then
132 + mv "${cofile}bj" "$ofile"
135 +rmdir "$lockdir"
136 +exit $ret
138 +# Local Variables:
139 +# mode: shell-script
140 +# sh-indentation: 2
141 +# eval: (add-hook 'write-file-hooks 'time-stamp)
142 +# time-stamp-start: "scriptversion="
143 +# time-stamp-format: "%:y-%02m-%02d.%02H"
144 +# time-stamp-end: "$"
145 +# End: