summaryrefslogtreecommitdiffstats
path: root/meta/packages/musicbrainz/files/autofoo.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/packages/musicbrainz/files/autofoo.patch')
-rw-r--r--meta/packages/musicbrainz/files/autofoo.patch180
1 files changed, 180 insertions, 0 deletions
diff --git a/meta/packages/musicbrainz/files/autofoo.patch b/meta/packages/musicbrainz/files/autofoo.patch
new file mode 100644
index 0000000000..e323047963
--- /dev/null
+++ b/meta/packages/musicbrainz/files/autofoo.patch
@@ -0,0 +1,180 @@
1---
2 ac_func_accept_argtypes.m4 | 94 +++++++++++++++++++++++++++++++++++++++++++++
3 configure.in | 64 ------------------------------
4 2 files changed, 96 insertions(+), 62 deletions(-)
5
6Index: libmusicbrainz-2.1.3/ac_func_accept_argtypes.m4
7===================================================================
8--- /dev/null 1970-01-01 00:00:00.000000000 +0000
9+++ libmusicbrainz-2.1.3/ac_func_accept_argtypes.m4 2007-08-01 22:08:44.000000000 +0100
10@@ -0,0 +1,94 @@
11+##### http://autoconf-archive.cryp.to/ac_func_accept_argtypes.html
12+#
13+# SYNOPSIS
14+#
15+# AC_FUNC_ACCEPT_ARGTYPES
16+#
17+# DESCRIPTION
18+#
19+# Checks the data types of the three arguments to accept(). Results
20+# are placed into the symbols ACCEPT_TYPE_ARG[123], consistent with
21+# the following example:
22+#
23+# #define ACCEPT_ARG1 int
24+# #define ACCEPT_ARG2 struct sockaddr *
25+# #define ACCEPT_ARG3 socklen_t *
26+#
27+# This macro requires AC_CHECK_HEADERS to have already verified the
28+# presence or absence of sys/types.h and sys/socket.h.
29+#
30+# NOTE: This is just a modified version of the
31+# AC_FUNC_SELECT_ARGTYPES macro. Credit for that one goes to David
32+# MacKenzie et. al.
33+#
34+# LAST MODIFICATION
35+#
36+# 2006-10-22
37+#
38+# COPYLEFT
39+#
40+# Copyright (c) 2006 Daniel Richard G. <skunk@iskunk.org>
41+#
42+# This program is free software; you can redistribute it and/or
43+# modify it under the terms of the GNU General Public License as
44+# published by the Free Software Foundation; either version 2 of the
45+# License, or (at your option) any later version.
46+#
47+# This program is distributed in the hope that it will be useful, but
48+# WITHOUT ANY WARRANTY; without even the implied warranty of
49+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
50+# General Public License for more details.
51+#
52+# You should have received a copy of the GNU General Public License
53+# along with this program; if not, write to the Free Software
54+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
55+# 02111-1307, USA.
56+#
57+# As a special exception, the respective Autoconf Macro's copyright
58+# owner gives unlimited permission to copy, distribute and modify the
59+# configure scripts that are the output of Autoconf when processing
60+# the Macro. You need not follow the terms of the GNU General Public
61+# License when using or distributing such scripts, even though
62+# portions of the text of the Macro appear in them. The GNU General
63+# Public License (GPL) does govern all other use of the material that
64+# constitutes the Autoconf Macro.
65+#
66+# This special exception to the GPL applies to versions of the
67+# Autoconf Macro released by the Autoconf Macro Archive. When you
68+# make and distribute a modified version of the Autoconf Macro, you
69+# may extend this special exception to the GPL to apply to your
70+# modified version as well.
71+
72+AC_DEFUN([AC_FUNC_ACCEPT_ARGTYPES],
73+[AC_MSG_CHECKING([types of arguments for accept()])
74+ AC_CACHE_VAL(ac_cv_func_accept_arg1,dnl
75+ [AC_CACHE_VAL(ac_cv_func_accept_arg2,dnl
76+ [AC_CACHE_VAL(ac_cv_func_accept_arg3,dnl
77+ [for ac_cv_func_accept_arg1 in 'int' 'unsigned int'; do
78+ for ac_cv_func_accept_arg2 in 'struct sockaddr' 'void'; do
79+ for ac_cv_func_accept_arg3 in 'socklen_t' 'size_t' 'unsigned int' 'int'; do
80+ AC_TRY_COMPILE(dnl
81+[#ifdef HAVE_SYS_TYPES_H
82+#include <sys/types.h>
83+#endif
84+#ifdef HAVE_SYS_SOCKET_H
85+#include <sys/socket.h>
86+#endif
87+extern accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2 *, $ac_cv_func_accept_arg3 *);],,dnl
88+ [ac_not_found=no ; break 3], ac_not_found=yes)
89+ done
90+ done
91+ done
92+ ])dnl AC_CACHE_VAL
93+ ])dnl AC_CACHE_VAL
94+ ])dnl AC_CACHE_VAL
95+ if test "$ac_not_found" = yes; then
96+ ac_cv_func_accept_arg1=int
97+ ac_cv_func_accept_arg2='struct sockaddr'
98+ ac_cv_func_accept_arg3='socklen_t'
99+ fi
100+ AC_MSG_RESULT([$ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3])
101+ AC_DEFINE_UNQUOTED(ACCEPT_ARG1,$ac_cv_func_accept_arg1, "Argument 1 to accept()")
102+ AC_DEFINE_UNQUOTED(ACCEPT_ARG2,$ac_cv_func_accept_arg2, "Argument 2 to accept()")
103+ AC_DEFINE_UNQUOTED(ACCEPT_ARG3,$ac_cv_func_accept_arg3, "Argument 3 to accept()")
104+])
105Index: libmusicbrainz-2.1.3/configure.in
106===================================================================
107--- libmusicbrainz-2.1.3.orig/configure.in 2007-08-01 21:14:59.000000000 +0100
108+++ libmusicbrainz-2.1.3/configure.in 2007-08-01 21:46:03.000000000 +0100
109@@ -76,69 +76,9 @@ AC_DEFUN([AC_PROTOTYPE],[
110 popdef([function])
111 ])
112
113-AC_DEFUN([AC_PROTOTYPE_REVERSE],[ifelse($#,0,,$#,1,[[$1]],[AC_PROTOTYPE_REVERSE(builtin([shift],$@)),[$1]])])
114-
115-AC_DEFUN([AC_PROTOTYPE_SUBST],[ifelse($2,,[$1],[AC_PROTOTYPE_SUBST(patsubst([$1],[$2],[$2[]_VAL]),builtin([shift],builtin([shift],$@)))])])
116-
117-AC_DEFUN([AC_PROTOTYPE_TAGS],[ifelse($1,,[],[$1, AC_PROTOTYPE_TAGS(builtin([shift],builtin([shift],$@)))])])
118-AC_DEFUN([AC_PROTOTYPE_DEFINES],[ifelse($1,,[],[AC_DEFINE(function[]_$1, $1_VAL) AC_PROTOTYPE_DEFINES(builtin([shift],$@))])])
119-
120-AC_DEFUN([AC_PROTOTYPE_STATUS],[ifelse($1,,[],[$1 => $1_VAL AC_PROTOTYPE_STATUS(builtin([shift],$@))])])
121-
122-AC_DEFUN([AC_PROTOTYPE_EACH],[
123- ifelse($2,, [
124- ], [
125- pushdef([$1_VAL], $2)
126- AC_PROTOTYPE_LOOP(rest)
127- popdef([$1_VAL])
128- AC_PROTOTYPE_EACH($1, builtin([shift], builtin([shift], $@)))
129- ])
130-])
131-
132-AC_DEFUN([AC_PROTOTYPE_LOOP],[
133- ifelse(builtin([eval], $# > 3), 1,
134- [
135- pushdef([rest],[builtin([shift],builtin([shift],$@))])
136- AC_PROTOTYPE_EACH($2,$1)
137- popdef([rest])
138- ], [
139- AC_MSG_CHECKING($3 AC_PROTOTYPE_STATUS(tags))
140- ac_save_CPPFLAGS="$CPPFLAGS"
141- ifelse(AC_LANG(C++),,if test "$GXX" = "yes" ; then CPPFLAGS="$CPPFLAGS -Werror" ; fi)
142- ifelse(AC_LANG(C),,if test "$GCC" = "yes" ; then CPPFLAGS="$CPPFLAGS -Werror" ; fi)
143- AC_TRY_COMPILE($2, $1, [
144- CPPFLAGS="$ac_save_CPPFLAGS"
145- AC_MSG_RESULT(ok)
146- AC_PROTOTYPE_DEFINES(tags)
147- break;
148- ], [
149- CPPFLAGS="$ac_save_CPPFLAGS"
150- AC_MSG_RESULT(not ok)
151- ])
152- ]
153- )
154-])
155-
156-AC_DEFUN([AC_PROTOTYPE_ACCEPT],[
157-AC_PROTOTYPE(accept,
158- [
159- #include <sys/types.h>
160- #include <sys/socket.h>
161- ],
162- [
163- int a = 0;
164- ARG2 * b = 0;
165- ARG3 * c = 0;
166- accept(a, b, c);
167- ],
168- ARG2, [struct sockaddr, void],
169- ARG3, [socklen_t, size_t, int, unsigned int, long unsigned int])
170-])
171-
172-AC_PROTOTYPE_ACCEPT
173+m4_include(ac_func_accept_argtypes.m4)
174+AC_FUNC_ACCEPT_ARGTYPES()
175
176-AC_DEFINE_UNQUOTED([ACCEPT_ARG2],,"Argument 2 to accept()")
177-AC_DEFINE_UNQUOTED([ACCEPT_ARG3],,"Argument 3 to accept()")
178 AC_DEFINE_UNQUOTED(PREFIX, "${prefix}", [Application install prefix])
179
180 AC_OUTPUT([