summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/rpm/rpm/remove-compiled-tests.patch
blob: 3663692d2de625014210b7edd2e324d48e461846 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443

Upstream-Status: Inappropriate [configuration]

Index: rpm-5.1.9/configure.ac
===================================================================
--- rpm-5.1.9.orig/configure.ac	2009-04-18 17:47:02.000000000 +0100
+++ rpm-5.1.9/configure.ac	2010-07-06 14:47:28.985462456 +0100
@@ -643,38 +643,22 @@
 dnl look for libc features
 PROVIDES_ERRNO=no
 AC_MSG_CHECKING(if <netdb.h> defines h_errno)
-AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <netdb.h>]], [[printf("%d",h_errno)]])],[PROVIDES_ERRNO=yes],[])
-AC_MSG_RESULT($PROVIDES_ERRNO)
-if test $PROVIDES_ERRNO = yes; then
-	AC_DEFINE(HAVE_HERRNO, 1, [ Define as 1 if <netdb.h> defines h_errno])
-fi
+AC_DEFINE(HAVE_HERRNO, 1, [ Define as 1 if <netdb.h> defines h_errno])
 
 dnl If a system doesn't have S_IFSOCK, define it as 0 which will
 dnl make S_ISSOCK always return false (nice, eh?)
 AC_MSG_CHECKING(if <sys/stat.h> defines S_IFSOCK)
-AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/stat.h>]], [[printf("%d", S_IFSOCK)]])],[HAS_S_IFSOCK=yes],[HAS_S_IFSOCK=no])
-AC_MSG_RESULT($HAS_S_IFSOCK)
-if test $HAS_S_IFSOCK = yes; then
-	AC_DEFINE(HAVE_S_IFSOCK, 1, [Define as 1 if <sys/stat.h> defines S_IFSOCK])
-fi
+AC_DEFINE(HAVE_S_IFSOCK, 1, [Define as 1 if <sys/stat.h> defines S_IFSOCK])
 
 dnl Some Unix's are missing S_ISLNK, S_ISSOCK
 AC_MSG_CHECKING(if <sys/stat.h> defines S_ISLNK)
-AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/stat.h>]], [[printf("%d", S_ISLNK(0755))]])],[HAS_S_ISLNK=yes],[HAS_S_ISLNK=no])
-AC_MSG_RESULT($HAS_S_ISLNK)
-if test $HAS_S_ISLNK = yes; then
-	AC_DEFINE(HAVE_S_ISLNK, 1, [Define as 1 if <sys/stat.h> defines S_ISLNK])
-fi
+AC_DEFINE(HAVE_S_ISLNK, 1, [Define as 1 if <sys/stat.h> defines S_ISLNK])
 
 AC_MSG_CHECKING(if <sys/stat.h> defines S_ISSOCK)
-AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/stat.h>]], [[printf("%d", S_ISSOCK(0755))]])],[HAS_S_ISSOCK=yes],[HAS_S_ISSOCK=no])
-AC_MSG_RESULT($HAS_S_ISSOCK)
-if test $HAS_S_ISSOCK = yes; then
-	AC_DEFINE(HAVE_S_ISSOCK, 1, [Define as 1 if <sys/stat.h> defines S_ISSOCK])
-fi
+AC_DEFINE(HAVE_S_ISSOCK, 1, [Define as 1 if <sys/stat.h> defines S_ISSOCK])
 
 AC_MSG_CHECKING(if timezone is defined)
-AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <time.h>]], [[printf("%ld", timezone)]])],[HAS_TIMEZONE=yes],[HAS_TIMEZONE=no])
+$HAS_TIMEZONE=yes
 AC_MSG_RESULT($HAS_TIMEZONE)
 
 dnl check for missing typedefs
@@ -726,53 +710,12 @@
         AC_MSG_RESULT(yes)
         AC_CHECK_HEADERS([libelf.h gelf.h])
         if test ".$ac_cv_header_libelf_h" = .no; then
-            dnl # <libelf.h> on Solaris is incompatible with LFS. If we couldn't
-            dnl # include <libelf.h>, see if we can when _FILE_OFFSET_BITS is
-            dnl # set for non-LFS. Same applies for <gelf.h>, since it probably
-            dnl # includes <libelf.h>
-            AC_MSG_CHECKING([if libelf.h conflicts with _LARGEFILE_SOURCE])
-            AC_COMPILE_IFELSE([
-                AC_LANG_PROGRAM([[
-#undef _LARGEFILE64_SOURCE
-#undef _LARGEFILE_SOURCE
-#if !defined(_LP64)
-# undef _FILE_OFFSET_BITS
-# define _FILE_OFFSET_BITS 32
-#endif
-#include <libelf.h>
-                ]], [[
-                    Elf_Data foo;
-                ]])
-            ], [
-                AC_DEFINE(HAVE_LIBELF_H, 1, [Define to 1 if you have libelf.h])
-                ac_cv_header_libelf_h=yes
-                AC_DEFINE(LIBELF_H_LFS_CONFLICT, 1, [Define to 1 if libelf.h is incompatible with LFS API])
-                AC_MSG_RESULT(yes)
-            ], [
-                AC_MSG_RESULT(no)
-            ])
+            AC_DEFINE(HAVE_LIBELF_H, 1, [Define to 1 if you have libelf.h])
+            ac_cv_header_libelf_h=yes
         fi
         if test ".$ac_cv_header_gelf_h" = .no; then
-            AC_MSG_CHECKING([if gelf.h conflicts with _LARGEFILE_SOURCE])
-            AC_COMPILE_IFELSE([
-                AC_LANG_PROGRAM([[
-#undef _LARGEFILE64_SOURCE
-#undef _LARGEFILE_SOURCE
-#if !defined(_LP64)
-# undef _FILE_OFFSET_BITS
-# define _FILE_OFFSET_BITS 32
-#endif
-#include <gelf.h>
-                ]], [[
-                    Elf32_Verdef foo;
-                ]])
-            ], [
-                AC_DEFINE(HAVE_GELF_H, 1, [Define to 1 if you have gelf.h])
-                ac_cv_header_gelf_h=yes
-                AC_MSG_RESULT(yes)
-            ], [
-                AC_MSG_RESULT(no)
-          ])
+            AC_DEFINE(HAVE_GELF_H, 1, [Define to 1 if you have gelf.h])
+            ac_cv_header_gelf_h=yes
         fi
         if test ".$ac_cv_header_gelf_h" = .yes; then
             AC_CHECK_LIB([elf], [elf_version], [
@@ -854,78 +797,9 @@
                   python_version=""
                   ;;
         esac
-	for python_ver in $python_version ; do
-             if test "$python_ver" != "2.x" ; then
-                  AC_MSG_CHECKING([for Python ${python_ver} API])
-                  save_CFLAGS="${CFLAGS}"
-                  for i in "$prefix" "/usr/local" "/usr"; do
-                  CFLAGS="${save_CFLAGS} -I$i/include/python${python_ver}"
-                  AC_RUN_IFELSE([AC_LANG_SOURCE(
-                  [[#include "Python.h"
-                     main() { exit(strncmp("${python_ver}", PY_VERSION, 3)); } ]])
-                  ], [
-                     PYTHON_VERSION="${python_ver}"
-                     AC_MSG_RESULT(yes)
-                     PYTHON_PREFIX="${i}"
-                     break
-                  ], [ 
-                  ], [
-                     dnl if we're cross compiling, assume the user has a clue
-                     if test "$withval" = "$python_ver"; then
-                         PYTHON_VERSION="${python_ver}"
-                         AC_MSG_RESULT(yes)
-                         break
-                     fi
-                  ])
-                  done
-                  CFLAGS="${save_CFLAGS}"
-                  if test ".$PYTHON_VERSION" == "."; then
-                     dnl check Mac OS X framework
-                     save_CFLAGS="${CFLAGS}"
-                     for f in "~" "" "/System" "/Network"; do
-                     CFLAGS="${save_CFLAGS} -I$f/Library/Frameworks/Python.framework/Versions/${python_ver}/include/python${python_ver}"
-                     AC_RUN_IFELSE([AC_LANG_SOURCE(
-                     [[#include "Python.h"
-                        main() { exit(strncmp("${python_ver}", PY_VERSION, 3)); } ]])
-                     ], [
-                        PYTHON_VERSION="${python_ver}"
-                        AC_MSG_RESULT([yes (using Python.framework)])
-                        PYTHON_PREFIX="$f/Library/Frameworks/Python.framework/Versions/${python_ver}"
-                        break
-                     ], [
-                     ])
-                     done
-                     CFLAGS="${save_CFLAGS}"
-                  fi
-                  if test ".$PYTHON_VERSION" == "."; then
-                     AC_MSG_RESULT(no)
-                  fi
-             else
-                  AC_MSG_CHECKING([for Python 2.x API])
-                  AC_RUN_IFELSE([AC_LANG_SOURCE(
-                  [[#include <python/Python.h>
-                     main() { exit(strncmp("2.", PY_VERSION, 2)); } ]])
-                  ], [
-                     PYTHON_VERSION=""
-                     AC_MSG_RESULT(yes)
-                  ], [ 
-                     AC_MSG_RESULT(no)
-                  ], [
-                     dnl if we're cross compiling, assume the user has a clue
-                     if test "$withval" = "$python_ver"; then
-                         PYTHON_VERSION="${python_ver}"
-                         AC_MSG_RESULT(yes)
-                     else
-                         AC_MSG_RESULT(no)
-                     fi
-                  ])
-             fi
-             if test ".$PYTHON_VERSION" != "."; then
-                  WITH_PYTHON_SUBDIR=python
-                  WITH_PYTHON_SUBPACKAGE=1
-                  break
-             fi
-	done
+	PYTHON_VERSION="${python_ver}"
+	WITH_PYTHON_SUBDIR=python
+	WITH_PYTHON_SUBPACKAGE=1
     fi
     AC_ARG_WITH(python-inc-dir, AS_HELP_STRING([--with-python-inc-dir=DIR], [directory with Python include files]),
 	    [WITH_PYTHON_INCDIR="$withval"], [WITH_PYTHON_INCDIR="`(python -c 'from distutils.sysconfig import get_python_inc; print get_python_inc()') 2>/dev/null`"])
@@ -1157,15 +1031,8 @@
 	  AC_SUBST(WITH_PCRE_LIBS)
       else
 	dnl # make sure PCRE POSIX API can be really _USED_ by RPM
-	LIBS_SAVED="$LIBS"
 	LIBS="-lpcreposix $LIBS"
-	AC_LINK_IFELSE([
-          AC_LANG_PROGRAM([#include <pcreposix.h>], [(void)regcomp(0, 0, 0)])
-	], [
-          AC_DEFINE(WITH_PCRE_POSIX, 1, [Define as 1 if PCRE's POSIX API is available])
-	], [
-          LIBS="$LIBS_SAVED"
-	])
+        AC_DEFINE(WITH_PCRE_POSIX, 1, [Define as 1 if PCRE's POSIX API is available])
       fi
       dnl # enable PCRE native API support for embedded Lua
       if test ".$WITH_LUA" = .yes; then
@@ -1234,30 +1101,7 @@
 
 dnl # figure out what root's primary group is
 AC_MSG_CHECKING([root's primary group])
-AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h>
-#include <sys/types.h>
-#include <pwd.h>
-#include <grp.h>
-int main()
-{
-	struct passwd *root = NULL;
-	struct group *roots_group = NULL;
-	FILE * tempfile = NULL;
-	root = getpwuid( (uid_t) 0 );
-	if (root != NULL) {
-		roots_group = getgrgid(root->pw_gid);
-		if (roots_group != NULL) {
-			tempfile = fopen("conftest_rootg", "w");
-			if (tempfile != NULL) {
-				fprintf(tempfile, "%s\n", roots_group->gr_name);
-				fclose(tempfile);
-				exit(0);
-			}
-		}
-	}
-	exit(1);
-}]])],[ROOT_GROUP=`cat conftest_rootg`; rm -f conftest_rootg],[ROOT_GROUP="root"],[ROOT_GROUP="root"
-])
+$ROOT_GROUP="root"
 AC_MSG_RESULT([$ROOT_GROUP])
 AC_SUBST(ROOT_GROUP)
 
Index: rpm-5.1.9/pcre/configure.ac
===================================================================
--- rpm-5.1.9.orig/pcre/configure.ac	2009-01-14 20:19:31.000000000 +0000
+++ rpm-5.1.9/pcre/configure.ac	2010-07-06 14:51:50.769586089 +0100
@@ -278,34 +278,6 @@
 # The files below are C++ header files.
 pcre_have_type_traits="0"
 pcre_have_bits_type_traits="0"
-if test "x$enable_cpp" = "xyes" -a -n "$CXX"
-then
-AC_LANG_PUSH(C++)
-
-# Older versions of pcre defined pcrecpp::no_arg, but in new versions
-# it's called pcrecpp::RE::no_arg.  For backwards ABI compatibility,
-# we want to make one an alias for the other.  Different systems do
-# this in different ways.  Some systems, for instance, can do it via
-# a linker flag: -alias (for os x 10.5) or -i (for os x <=10.4).
-OLD_LDFLAGS="$LDFLAGS"
-for flag in "-alias,__ZN7pcrecpp2RE6no_argE,__ZN7pcrecpp6no_argE" \
-            "-i__ZN7pcrecpp6no_argE:__ZN7pcrecpp2RE6no_argE"; do
-  AC_MSG_CHECKING([for alias support in the linker])
-  LDFLAGS="$OLD_LDFLAGS -Wl,$flag"
-  # We try to run the linker with this new ld flag.  If the link fails,
-  # we give up and remove the new flag from LDFLAGS.
-  AC_LINK_IFELSE(AC_LANG_PROGRAM([namespace pcrecpp {
-                                    class RE { static int no_arg; };
-                                    int RE::no_arg;
-                                  }],
-                                 []),
-                 [AC_MSG_RESULT([yes]);
-                  EXTRA_LIBPCRECPP_LDFLAGS="$EXTRA_LIBPCRECPP_LDFLAGS -Wl,$flag";
-                  break;],
-                 AC_MSG_RESULT([no]))
-done
-LDFLAGS="$OLD_LDFLAGS"
-
 # We could be more clever here, given we're doing AC_SUBST with this
 # (eg set a var to be the name of the include file we want). But we're not
 # so it's easy to change back to 'regular' autoconf vars if we needed to.
@@ -316,7 +288,6 @@
 AC_CHECK_HEADERS(type_traits.h, [pcre_have_type_traits="1"],
                                 [pcre_have_type_traits="0"])
 
-AC_LANG_POP
 fi
 # Using AC_SUBST eliminates the need to include config.h in a public .h file
 AC_SUBST(pcre_have_type_traits)
Index: rpm-5.1.9/db/dist/configure.ac
===================================================================
--- rpm-5.1.9.orig/db/dist/configure.ac	2008-06-15 08:16:21.000000000 +0100
+++ rpm-5.1.9/db/dist/configure.ac	2010-07-06 15:36:39.262461127 +0100
@@ -602,24 +602,6 @@
 aux*)	AC_LIBOBJ([getopt]);;
 esac
 
-# Linux has a broken O_DIRECT flag, but you can't detect it at configure time.
-# Linux and SGI require buffer alignment we may not match, otherwise writes
-# will fail.  Default to not using the O_DIRECT flag.
-if test "$db_cv_o_direct" = "yes"; then
-	AC_CACHE_CHECK([for open/O_DIRECT], db_cv_open_o_direct, [
-	AC_TRY_LINK([
-	#include <sys/types.h>
-	#include <fcntl.h>], [
-		open("a", O_RDONLY | O_DIRECT, 0);
-	], [db_cv_open_o_direct=yes], [db_cv_open_o_direct=no])])
-	if test \
-	    "$db_cv_o_direct" = "yes" -a "$db_cv_open_o_direct" = "yes"; then
-		AC_DEFINE(HAVE_O_DIRECT)
-		AH_TEMPLATE(HAVE_O_DIRECT,
-		    [Define to 1 if you have the O_DIRECT flag.])
-	fi
-fi
-
 # Check for largefile support.
 AC_SYS_LARGEFILE
 
Index: rpm-5.1.9/xz/configure.ac
===================================================================
--- rpm-5.1.9.orig/xz/configure.ac	2009-02-16 17:07:46.000000000 +0000
+++ rpm-5.1.9/xz/configure.ac	2010-07-06 15:41:22.632467951 +0100
@@ -457,26 +457,9 @@
 #endif
 ])
 
-# Even if we have byteswap.h, we may lack the specific macros/functions.
-if test x$ac_cv_header_byteswap_h = xyes ; then
-	m4_foreach([FUNC], [bswap_16,bswap_32,bswap_64], [
-		AC_MSG_CHECKING([if FUNC is available])
-		AC_LINK_IFELSE([AC_LANG_SOURCE([
-#include <byteswap.h>
-int
-main(void)
-{
-	FUNC[](42);
-	return 0;
-}
-		])], [
-			AC_DEFINE(HAVE_[]m4_toupper(FUNC), [1],
-					[Define to 1 if] FUNC [is available.])
-			AC_MSG_RESULT([yes])
-		], [AC_MSG_RESULT([no])])
-
-	])dnl
-fi
+AC_DEFINE(HAVE_BSWAP_16, 1)
+AC_DEFINE(HAVE_BSWAP_32, 1)
+AC_DEFINE(HAVE_BSWAP_64, 1)
 
 
 ###############################################################################
@@ -527,90 +510,16 @@
 # xz command line tool uses this to automatically limit its memory usage.
 # - sysconf() gives all the needed info on GNU+Linux and Solaris.
 # - BSDs use sysctl().
-AC_MSG_CHECKING([how to detect the amount of physical memory])
-AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
-#include <unistd.h>
-int
-main()
-{
-	long i;
-	i = sysconf(_SC_PAGESIZE);
-	i = sysconf(_SC_PHYS_PAGES);
-	return 0;
-}
-]])], [
-	AC_DEFINE([HAVE_PHYSMEM_SYSCONF], [1],
+AC_DEFINE([HAVE_PHYSMEM_SYSCONF], [1],
 		[Define to 1 if the amount of physical memory can be detected
 		with sysconf(_SC_PAGESIZE) and sysconf(_SC_PHYS_PAGES).])
-	AC_MSG_RESULT([sysconf])
-], [
-AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
-#include <sys/types.h>
-#ifdef HAVE_SYS_PARAM_H
-#	include <sys/param.h>
-#endif
-#include <sys/sysctl.h>
-int
-main()
-{
-	int name[2] = { CTL_HW, HW_PHYSMEM };
-	unsigned long mem;
-	size_t mem_ptr_size = sizeof(mem);
-	sysctl(name, 2, &mem, &mem_ptr_size, NULL, NULL);
-	return 0;
-}
-]])], [
-	AC_DEFINE([HAVE_PHYSMEM_SYSCTL], [1],
-		[Define to 1 if the amount of physical memory can be detected
-		with sysctl().])
-	AC_MSG_RESULT([sysctl])
-], [
-	AC_MSG_RESULT([unknown])
-])])
 
 # Check how to find out the number of available CPU cores in the system.
 # sysconf(_SC_NPROCESSORS_ONLN) works on most systems, except that BSDs
 # use sysctl().
-AC_MSG_CHECKING([how to detect the number of available CPU cores])
-AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
-#include <unistd.h>
-int
-main()
-{
-	long i;
-	i = sysconf(_SC_NPROCESSORS_ONLN);
-	return 0;
-}
-]])], [
-	AC_DEFINE([HAVE_NCPU_SYSCONF], [1],
+AC_DEFINE([HAVE_NCPU_SYSCONF], [1],
 		[Define to 1 if the number of available CPU cores can be
 		detected with sysconf(_SC_NPROCESSORS_ONLN).])
-	AC_MSG_RESULT([sysconf])
-], [
-AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
-#include <sys/types.h>
-#ifdef HAVE_SYS_PARAM_H
-#	include <sys/param.h>
-#endif
-#include <sys/sysctl.h>
-int
-main()
-{
-	int name[2] = { CTL_HW, HW_NCPU };
-	int cpus;
-	size_t cpus_size = sizeof(cpus);
-	sysctl(name, 2, &cpus, &cpus_size, NULL, NULL);
-	return 0;
-}
-]])], [
-	AC_DEFINE([HAVE_NCPU_SYSCTL], [1],
-		[Define to 1 if the number of available CPU cores can be
-		detected with sysctl().])
-	AC_MSG_RESULT([sysctl])
-], [
-	AC_MSG_RESULT([unknown])
-])])
-
 
 ###############################################################################
 # If using GCC, set some additional CFLAGS: