3 # Patch managed by http://www.holgerschurig.de/patcher.html
6 --- pkgconfig-0.15.0/glib-1.2.8/Makefile.am~configure.patch
7 +++ pkgconfig-0.15.0/glib-1.2.8/Makefile.am
10 CONFIGURE_DEPENDENCIES = acglib.m4
12 -BUILT_SOURCES = stamp-gc-h #note: not glibconfig.h
13 +BUILT_SOURCES += stamp-gc-h #note: not glibconfig.h
14 glibconfig.h: stamp-gc-h
16 stamp-gc-h: config.status
17 --- pkgconfig-0.15.0/glib-1.2.8/configure.in~configure.patch
18 +++ pkgconfig-0.15.0/glib-1.2.8/configure.in
20 dnl ***********************************
21 dnl *** include special GLib macros ***
22 dnl ***********************************
23 -builtin(include, acglib.m4)dnl
24 +dnl no need, just use aclocal -I . --CL
25 +dnl builtin(include, acglib.m4)dnl
27 # require autoconf 2.13
31 # init autoconf (and check for presence of glist.c)
34 cflags_set=${CFLAGS+set}
36 # we rewrite this file
37 +if test "x$cross_compiling" != "xyes"; then
38 rm -f glibconfig-sysdefs.h
43 +AH_TEMPLATE([ENABLE_MEM_CHECK],
44 + [Define if enabling memory checking])
45 +AH_TEMPLATE([ENABLE_MEM_PROFILE], [])
46 +AH_TEMPLATE([GLIB_BINARY_AGE], [])
47 +AH_TEMPLATE([GLIB_BYTE_CONTENTS_GMUTEX], [])
48 +AH_TEMPLATE([GLIB_INTERFACE_AGE], [])
49 +AH_TEMPLATE([GLIB_MAJOR_VERSION], [])
50 +AH_TEMPLATE([GLIB_MINOR_VERSION], [])
51 +AH_TEMPLATE([GLIB_MICRO_VERSION], [])
52 +AH_TEMPLATE([GLIB_SIZEOF_GMUTEX], [])
53 +AH_TEMPLATE([G_COMPILED_WITH_DEBUGGING], [])
54 +AH_TEMPLATE([G_HAVE_INLINE], [])
55 +AH_TEMPLATE([G_HAVE___INLINE], [])
56 +AH_TEMPLATE([G_HAVE___INLINE__], [])
57 +AH_TEMPLATE([G_THREAD_SOURCE], [])
58 +AH_TEMPLATE([G_VA_COPY], [])
59 +AH_TEMPLATE([G_VA_COPY_AS_ARRAY], [])
60 +AH_TEMPLATE([HAVE_BROKEN_WCTYPE], [])
61 +AH_TEMPLATE([HAVE_GETPWUID_R], [])
62 +AH_TEMPLATE([HAVE_GETPWUID_R_POSIX], [])
63 +AH_TEMPLATE([HAVE_PTHREAD_COND_TIMEDWAIT_POSIX], [])
64 +AH_TEMPLATE([HAVE_PTHREAD_GETSPECIFIC_POSIX], [])
65 +AH_TEMPLATE([HAVE_PTHREAD_MUTEX_TRYLOCK_POSIX], [])
66 +AH_TEMPLATE([HAVE_WCHAR_H], [])
67 +AH_TEMPLATE([HAVE_WCTYPE_H], [])
68 +AH_TEMPLATE([NO_FD_SET], [])
69 +AH_TEMPLATE([NO_SYS_ERRLIST], [])
70 +AH_TEMPLATE([NO_SYS_SIGLIST], [])
71 +AH_TEMPLATE([NO_SYS_SIGLIST_DECL], [])
72 +AH_TEMPLATE([REALLOC_0_WORKS], [])
75 dnl we need to AC_DIVERT_PUSH/AC_DIVERT_POP these variable definitions so they
76 dnl are available for $ac_help expansion (don't we all *love* autoconf?)
77 -AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
78 +#AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)
81 # The following version number definitions apply to GLib, GModule and GThread
82 # as a whole, so if changes occoured in any of them, they are all
85 GLIB_VERSION=$GLIB_MAJOR_VERSION.$GLIB_MINOR_VERSION.$GLIB_MICRO_VERSION
90 AC_SUBST(GLIB_MAJOR_VERSION)
91 AC_SUBST(GLIB_MINOR_VERSION)
93 dnl Initialize maintainer mode
98 dnl figure debugging default, prior to $ac_help setup
100 -AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
101 +#AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
102 if test `expr $GLIB_MINOR_VERSION \% 2` = 1 ; then
105 debug_default=minimum
110 dnl declare --enable-* args and collect ac_help strings
111 AC_ARG_ENABLE(debug, [ --enable-debug=[no/minimum/yes] turn on debugging [default=$debug_default]],,enable_debug=$debug_default)
113 CFLAGS=$glib_save_CFLAGS
115 [No ANSI prototypes found in library. (-std1 didn't work.)])
116 + , AC_MSG_WARN([Skipping test due to crosscompilation])
118 + , AC_MSG_WARN([Skipping test due to crosscompilation])
122 @@ -384,11 +422,13 @@
123 return realloc (0, sizeof (int)) == 0;
125 glib_cv_sane_realloc=yes
126 - AC_DEFINE(REALLOC_0_WORKS)
128 glib_cv_sane_realloc=no
131 +if test "x$glib_cv_sane_realloc" = "xyes"; then
132 + AC_DEFINE(REALLOC_0_WORKS)
134 AC_MSG_RESULT($glib_cv_sane_realloc)
139 if test "x$glib_cv_va_copy" = "xyes"; then
140 AC_DEFINE(G_VA_COPY, va_copy)
141 -else if test "x$glib_cv___va_copy" = "xyes"; then
143 +if test "x$glib_cv___va_copy" = "xyes"; then
144 AC_DEFINE(G_VA_COPY, __va_copy)
149 AC_MSG_RESULT($glib_cv_va_val_copy)
151 +AC_MSG_WARN([hi mom])
153 dnl ***********************
154 dnl *** g_module checks ***
155 @@ -483,21 +525,27 @@
156 G_MODULE_NEED_USCORE=0
157 G_MODULE_HAVE_DLERROR=0
158 dnl *** dlopen() and dlsym() in system libraries
159 +AC_CHECK_FUNC(dlopen,[
160 + AC_CHECK_FUNC(dlsym,[
161 + G_MODULE_IMPL=G_MODULE_IMPL_DL
165 if test -z "$G_MODULE_IMPL"; then
166 - AC_CHECK_FUNC(dlopen,
167 - AC_CHECK_FUNC(dlsym,
168 + AC_CHECK_FUNC(dlopen,[
169 + AC_CHECK_FUNC(dlsym,[
170 G_MODULE_IMPL=G_MODULE_IMPL_DL
176 dnl *** dlopen() and dlsym() in libdl
177 if test -z "$G_MODULE_IMPL"; then
178 - AC_CHECK_LIB(dl, dlopen,
179 - AC_CHECK_LIB(dl, dlsym,
180 + AC_CHECK_LIB(dl, dlopen,[
181 + AC_CHECK_LIB(dl, dlsym,[
183 G_MODULE_IMPL=G_MODULE_IMPL_DL
189 dnl *** shl_load() in libdld (HP-UX)
190 if test -z "$G_MODULE_IMPL"; then
192 AC_SUBST(G_MODULE_HAVE_DLERROR)
193 AC_SUBST(G_MODULE_NEED_USCORE)
194 AC_SUBST(GLIB_DEBUG_FLAGS)
195 +AC_MSG_WARN([hi mom])
198 dnl ***********************
199 @@ -812,38 +861,50 @@
201 if test x"$have_threads" = xposix; then
202 LIBS="$LIBS $G_THREAD_LIBS"
203 - AC_MSG_CHECKING(whether pthread_getspecific is posix like)
204 # PCThreads has pthread_getspecific(pthread_key_t, void **);
205 - AC_TRY_COMPILE([#include <pthread.h>],
206 - [pthread_getspecific(0,NULL);],
207 - [AC_MSG_RESULT(no)],
208 - [AC_MSG_RESULT(yes)
209 - AC_DEFINE(HAVE_PTHREAD_GETSPECIFIC_POSIX)])
210 - AC_MSG_CHECKING(whether pthread_mutex_trylock is posix like)
211 + AC_CACHE_CHECK([whether pthread_getspecific is posix like],
212 + [glib_cv_sys_pthread_getspecific_posix],
213 + AC_TRY_COMPILE([#include <pthread.h>],
214 + [pthread_getspecific(0,NULL);],
215 + [glib_cv_sys_pthread_getspecific_posix=no],
216 + [glib_cv_sys_pthread_getspecific_posix=yes])
218 + if test x"$glib_cv_sys_pthread_getspecific_posix" = xyes; then
219 + AC_DEFINE(HAVE_PTHREAD_GETSPECIFIC_POSIX)
221 # DCE Threads return 1 as success, posix 0. what a mess.
222 - AC_TRY_RUN([#include <pthread.h>
223 - pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
225 - return !pthread_mutex_trylock (&mutex); }],
226 - [AC_MSG_RESULT(no)],
227 - [AC_MSG_RESULT(yes)
228 - AC_DEFINE(HAVE_PTHREAD_MUTEX_TRYLOCK_POSIX)])
229 - AC_MSG_CHECKING(whether pthread_cond_timedwait is posix like)
230 + AC_CACHE_CHECK([whether pthread_mutex_trylock is posix like],
231 + [glib_cv_sys_pthread_mutex_trylock_posix],
232 + AC_TRY_RUN([#include <pthread.h>
233 + pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
235 + return !pthread_mutex_trylock (&mutex); }],
236 + [glib_cv_sys_pthread_mutex_trylock_posix=no],
237 + [glib_cv_sys_pthread_mutex_trylock_posix=yes])
239 + if test x"$glib_cv_sys_pthread_mutex_trylock_posix" = xyes; then
240 + AC_DEFINE(HAVE_PTHREAD_MUTEX_TRYLOCK_POSIX)
242 # DCE Threads return -1 as failure, posix ETIMEDOUT.
243 - AC_TRY_RUN([#include <pthread.h>
245 - pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
246 - pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
247 - struct timeval tval;
248 - struct timespec tspec;
249 - gettimeofday (&tval, NULL);
250 - tspec.tv_sec = tval.tv_sec;
252 - return pthread_cond_timedwait (&cond,&mutex,&tspec)
254 - [AC_MSG_RESULT(no)],
255 - [AC_MSG_RESULT(yes)
256 - AC_DEFINE(HAVE_PTHREAD_COND_TIMEDWAIT_POSIX)])
257 + AC_CACHE_CHECK([whether pthread_cond_timedwait is posix like],
258 + [glib_cv_sys_pthread_cond_timedwait_posix],
259 + AC_TRY_RUN([#include <pthread.h>
261 + pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
262 + pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
263 + struct timeval tval;
264 + struct timespec tspec;
265 + gettimeofday (&tval, NULL);
266 + tspec.tv_sec = tval.tv_sec;
268 + return pthread_cond_timedwait (&cond,&mutex,&tspec)
270 + [glib_cv_sys_pthread_cond_timedwait_posix=no],
271 + [glib_cv_sys_pthread_cond_timedwait_posix=yes])
273 + if test x"$glib_cv_sys_pthread_cond_timedwait_posix" = xyes; then
274 + AC_DEFINE(HAVE_PTHREAD_COND_TIMEDWAIT_POSIX)
277 LIBS="$glib_save_LIBS"
278 CFLAGS="$glib_save_CFLAGS"
279 @@ -887,13 +948,14 @@
280 dnl ****************************************
281 dnl *** GLib POLL* compatibility defines ***
282 dnl ****************************************
283 +if test x"$cross_compiling" != xyes; then
285 [#include <sys/types.h>
286 #include <sys/poll.h>],
287 POLLIN:1 POLLOUT:4 POLLPRI:2 POLLERR:8 POLLHUP:16 POLLNVAL:32,
288 glibconfig-sysdefs.h,
293 dnl ******************************
294 dnl *** output the whole stuff ***
296 echo '#define GLIB_HAVE_SYS_POLL_H' >> $outfile
299 - cat >> $outfile <<_______EOF
300 + cat >> $outfile <<EOF
302 #define G_MINFLOAT $glib_mf
303 #define G_MAXFLOAT $glib_Mf
304 @@ -963,60 +1025,60 @@
305 #define G_MINLONG $glib_ml
306 #define G_MAXLONG $glib_Ml
312 ### this should always be true in a modern C/C++ compiler
313 - cat >>$outfile <<_______EOF
314 + cat >>$outfile <<EOF
315 typedef signed char gint8;
316 typedef unsigned char guint8;
321 if test -n "$gint16"; then
322 - cat >>$outfile <<_______EOF
323 + cat >>$outfile <<EOF
324 typedef signed $gint16 gint16;
325 typedef unsigned $gint16 guint16;
331 if test -n "$gint32"; then
332 - cat >>$outfile <<_______EOF
333 + cat >>$outfile <<EOF
334 typedef signed $gint32 gint32;
335 typedef unsigned $gint32 guint32;
341 if test -n "$gint64"; then
342 - cat >>$outfile <<_______EOF
343 + cat >>$outfile <<EOF
344 ${glib_warning_guard}#define G_HAVE_GINT64 1
346 ${glib_extension}typedef signed $gint64 gint64;
347 ${glib_extension}typedef unsigned $gint64 guint64;
349 #define G_GINT64_CONSTANT(val) $gint64_constant
355 if test -z "$glib_unknown_void_p"; then
356 - cat >>$outfile <<_______EOF
357 + cat >>$outfile <<EOF
359 #define GPOINTER_TO_INT(p) ((gint) ${glib_gpi_cast} (p))
360 #define GPOINTER_TO_UINT(p) ((guint) ${glib_gpui_cast} (p))
362 #define GINT_TO_POINTER(i) ((gpointer) ${glib_gpi_cast} (i))
363 #define GUINT_TO_POINTER(u) ((gpointer) ${glib_gpui_cast} (u))
367 echo '#error SIZEOF_VOID_P unknown - This should never happen' >>$outfile
372 - cat >>$outfile <<_______EOF
373 + cat >>$outfile <<EOF
377 @@ -1028,11 +1090,11 @@
378 #else /* !__cplusplus */
380 #endif /* !__cplusplus */
385 if test x$g_mutex_has_default = xyes; then
386 - cat >>$outfile <<_______EOF
387 + cat >>$outfile <<EOF
388 $g_enable_threads_def G_THREADS_ENABLED
389 #define G_THREADS_IMPL_$g_threads_impl_def
390 typedef struct _GStaticMutex GStaticMutex;
391 @@ -1050,15 +1112,15 @@
392 #define g_static_mutex_get_mutex(mutex) \
393 (g_thread_use_default_impl ? ((GMutex*) &((mutex)->aligned_pad_u)) : \
394 g_static_mutex_get_mutex_impl (&((mutex)->runtime_mutex)))
398 - cat >>$outfile <<_______EOF
399 + cat >>$outfile <<EOF
400 $g_enable_threads_def G_THREADS_ENABLED
401 #define G_THREADS_IMPL_$g_threads_impl_def
402 typedef struct _GMutex* GStaticMutex;
403 #define G_STATIC_MUTEX_INIT NULL
404 #define g_static_mutex_get_mutex(mutex) (g_static_mutex_get_mutex_impl (mutex))
410 @@ -1067,15 +1129,15 @@
411 g_bit_sizes="$g_bit_sizes 64"
413 for bits in $g_bit_sizes; do
414 - cat >>$outfile <<_______EOF
415 + cat >>$outfile <<EOF
416 #define GINT${bits}_TO_${g_bs_native}(val) ((gint${bits}) (val))
417 #define GUINT${bits}_TO_${g_bs_native}(val) ((guint${bits}) (val))
418 #define GINT${bits}_TO_${g_bs_alien}(val) ((gint${bits}) GUINT${bits}_SWAP_LE_BE (val))
419 #define GUINT${bits}_TO_${g_bs_alien}(val) (GUINT${bits}_SWAP_LE_BE (val))
424 - cat >>$outfile <<_______EOF
425 + cat >>$outfile <<EOF
426 #define GLONG_TO_LE(val) ((glong) GINT${glongbits}_TO_LE (val))
427 #define GULONG_TO_LE(val) ((gulong) GUINT${glongbits}_TO_LE (val))
428 #define GLONG_TO_BE(val) ((glong) GINT${glongbits}_TO_BE (val))
429 @@ -1086,14 +1148,14 @@
430 #define GUINT_TO_BE(val) ((guint) GUINT${gintbits}_TO_BE (val))
431 #define G_BYTE_ORDER $g_byte_order
436 if test -r glibconfig-sysdefs.h; then
437 cat glibconfig-sysdefs.h >>$outfile
441 - cat >>$outfile <<_______EOF
442 + cat >>$outfile <<EOF
446 @@ -1103,7 +1165,7 @@
447 #endif /* __cplusplus */
449 #endif /* GLIBCONFIG_H */
454 if cmp -s $outfile glibconfig.h; then
455 --- pkgconfig-0.15.0/glib-1.2.8/gmodule/Makefile.am~configure.patch
456 +++ pkgconfig-0.15.0/glib-1.2.8/gmodule/Makefile.am
458 libgplugin_b_la_LIBADD = @G_MODULE_LIBS@ # $(libglib)
460 noinst_PROGRAMS = testgmodule
461 -testgmodule_LDFLAGS += @G_MODULE_LDFLAGS@
462 +testgmodule_LDFLAGS = @G_MODULE_LDFLAGS@
463 testgmodule_LDADD = libgmodule.la $(libglib) @G_MODULE_LIBS@
465 .PHONY: files release
466 --- pkgconfig-0.15.0/pkg.m4~configure.patch
467 +++ pkgconfig-0.15.0/pkg.m4
469 dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not)
470 dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page
471 dnl also defines GSTUFF_PKG_ERRORS on error
472 -AC_DEFUN(PKG_CHECK_MODULES, [
473 +AC_DEFUN([PKG_CHECK_MODULES], [
476 if test -z "$PKG_CONFIG"; then
477 --- pkgconfig-0.15.0/configure.in~configure.patch
478 +++ pkgconfig-0.15.0/configure.in
481 AC_INIT(pkg-config.1)
483 +AC_CONFIG_AUX_DIR(.)
484 AM_INIT_AUTOMAKE(pkgconfig, 0.15.0)
490 AC_SUBST(GLIB_CFLAGS)
492 - AC_CONFIG_AUX_DIR(.)
494 AC_CONFIG_SUBDIRS(glib-1.2.8)