pkgsrc/devel/pkg-config/patches/patch-cb
wiz 1a6f982900 Update to 0.23:
- Add support for setting sysroot through PKG_CONFIG_SYSROOT_DIR in
   the environment.
 - Update included glib to 1.2.10.
 - Other minor fixes, including a segfault.
2008-03-04 09:22:27 +00:00

193 lines
5 KiB
Text

$NetBSD: patch-cb,v 1.3 2008/03/04 09:22:27 wiz Exp $
--- glib-1.2.10/configure.in.orig 2008-01-16 22:52:24.000000000 +0000
+++ glib-1.2.10/configure.in
@@ -178,26 +178,6 @@ if test "x$GCC" = "xyes"; then
fi
changequote([,])dnl
-dnl DU4 native cc currently needs -std1 for ANSI mode (instead of K&R)
-AC_MSG_CHECKING([for extra flags to get ANSI library prototypes])
-glib_save_LIBS=$LIBS
-LIBS="$LIBS -lm"
-AC_TRY_RUN([#include <math.h>
- int main (void) { return (log(1) != log(1.)); }],
- AC_MSG_RESULT(none needed),
- glib_save_CFLAGS=$CFLAGS
- CFLAGS="$CFLAGS -std1"
- AC_TRY_RUN([#include <math.h>
- int main (void) { return (log(1) != log(1.)); }],
- AC_MSG_RESULT(-std1),
- AC_MSG_RESULT()
- CFLAGS=$glib_save_CFLAGS
- AC_MSG_WARN(
- [No ANSI prototypes found in library. (-std1 didn't work.)])
- )
-)
-LIBS=$glib_save_LIBS
-
dnl NeXTStep cc seems to need this
AC_MSG_CHECKING([for extra flags for POSIX compliance])
AC_TRY_COMPILE([#include <dirent.h>], [DIR *dir;],
@@ -234,14 +214,13 @@ dnl truely know which ones of `inline',
dnl actually supported.
AC_MSG_CHECKING(for __inline)
AC_CACHE_VAL(glib_cv_has__inline,[
- AC_TRY_RUN([
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE([
__inline int foo () { return 0; }
int main () { return foo (); }
- ],
- glib_cv_has__inline=yes
- ,
- glib_cv_has__inline=no
- ,)
+ ])],
+ [glib_cv_has__inline=yes]
+ [glib_cv_has__inline=no])
])
AC_MSG_RESULT($glib_cv_has__inline)
case x$glib_cv_has__inline in
@@ -249,14 +228,13 @@ xyes) AC_DEFINE(G_HAVE___INLINE)
esac
AC_MSG_CHECKING(for __inline__)
AC_CACHE_VAL(glib_cv_has__inline__,[
- AC_TRY_RUN([
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE([
__inline__ int foo () { return 0; }
int main () { return foo (); }
- ],
- glib_cv_has__inline__=yes
- ,
- glib_cv_has__inline__=no
- ,)
+ ])],
+ [glib_cv_has__inline__=yes]
+ [glib_cv_has__inline__=no])
])
AC_MSG_RESULT($glib_cv_has__inline__)
case x$glib_cv_has__inline__ in
@@ -264,14 +242,13 @@ xyes) AC_DEFINE(G_HAVE___INLINE__)
esac
AC_MSG_CHECKING(for inline)
AC_CACHE_VAL(glib_cv_hasinline,[
- AC_TRY_RUN([
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE([
inline int foo () { return 0; }
int main () { return foo (); }
- ],
- glib_cv_hasinline=yes
- ,
- glib_cv_hasinline=no
- ,)
+ ])],
+ [glib_cv_has_inline=yes]
+ [glib_cv_has_inline=no])
])
AC_MSG_RESULT($glib_cv_hasinline)
case x$glib_cv_hasinline in
@@ -422,7 +399,8 @@ dnl we currently check for all three va_
dnl all results in config.log for bug reports.
AC_MSG_CHECKING(for an implementation of va_copy())
AC_CACHE_VAL(glib_cv_va_copy,[
- AC_TRY_RUN([
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([
#include <stdarg.h>
void f (int i, ...) {
va_list args1, args2;
@@ -432,19 +410,15 @@ AC_CACHE_VAL(glib_cv_va_copy,[
exit (1);
va_end (args1); va_end (args2);
}
- int main() {
- f (0, 42);
- return 0;
- }],
- glib_cv_va_copy=yes
- ,
- glib_cv_va_copy=no
- ,)
+ ])],
+ [glib_cv_va_copy=yes],
+ [glib_cv_va_copy=no])
])
AC_MSG_RESULT($glib_cv_va_copy)
AC_MSG_CHECKING(for an implementation of __va_copy())
AC_CACHE_VAL(glib_cv___va_copy,[
- AC_TRY_RUN([
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([
#include <stdarg.h>
void f (int i, ...) {
va_list args1, args2;
@@ -454,19 +428,15 @@ AC_CACHE_VAL(glib_cv___va_copy,[
exit (1);
va_end (args1); va_end (args2);
}
- int main() {
- f (0, 42);
- return 0;
- }],
- glib_cv___va_copy=yes
- ,
- glib_cv___va_copy=no
- ,)
+ ])],
+ [glib_cv_va___copy=yes],
+ [glib_cv_va___copy=no])
])
AC_MSG_RESULT($glib_cv___va_copy)
AC_MSG_CHECKING(whether va_lists can be copied by value)
AC_CACHE_VAL(glib_cv_va_val_copy,[
- AC_TRY_RUN([
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([
#include <stdarg.h>
void f (int i, ...) {
va_list args1, args2;
@@ -476,14 +446,9 @@ AC_CACHE_VAL(glib_cv_va_val_copy,[
exit (1);
va_end (args1); va_end (args2);
}
- int main() {
- f (0, 42);
- return 0;
- }],
- glib_cv_va_val_copy=yes
- ,
- glib_cv_va_val_copy=no
- ,)
+ ])],
+ [glib_cv_va_val_copy=yes],
+ [glib_cv_va_val_copy=no])
])
if test "x$glib_cv_va_copy" = "xyes"; then
AC_DEFINE(G_VA_COPY, va_copy)
@@ -946,13 +911,22 @@ GLIB_IF_VAR_EQ(mutex_has_default, yes,
dnl ****************************************
dnl *** GLib POLL* compatibility defines ***
dnl ****************************************
+if test "$cross_compiling" = yes; then
+ { echo "#define GLIB_SYSDEF_POLLIN =1"
+ echo "#define GLIB_SYSDEF_POLLPRI =2"
+ echo "#define GLIB_SYSDEF_POLLOUT =4"
+ echo "#define GLIB_SYSDEF_POLLERR =8"
+ echo "#define GLIB_SYSDEF_POLLHUP =16"
+ echo "#define GLIB_SYSDEF_POLLNVAL =32"
+ } > glibconfig-sysdefs.h
+else
GLIB_SYSDEFS(
[#include <sys/types.h>
#include <sys/poll.h>],
POLLIN:1 POLLOUT:4 POLLPRI:2 POLLERR:8 POLLHUP:16 POLLNVAL:32,
glibconfig-sysdefs.h,
=)
-
+fi
dnl ******************************
dnl *** output the whole stuff ***