This commit is contained in:
John Cupitt 2019-08-05 13:53:00 +01:00
parent 0d2c14c967
commit bdc61d5675

View File

@ -501,6 +501,20 @@ PKG_CHECK_MODULES(THREADS, glib-2.0 >= 2.32,
]
)
# if available, we use pthread_setattr_default_np() to raise the per-thread
# stack size .. musl (Alpine's libc), for example, has only 80kb stack per
# thread by default
save_LIBS="$LIBS"
save_CFLAGS="$CFLAGS"
LIBS="$LIBS $GTHREAD_LIBS"
CFLAGS="$CFLAGS $GTHREAD_CFLAGS"
AC_CHECK_FUNCS(pthread_setattr_default_np,
[AC_DEFINE(HAVE_PTHREAD_DEFAULT_NP,1, [have pthread_setattr_default_np().])
]
)
LIBS="$save_LIBS"
CFLAGS="$save_CFLAGS"
# from 2.36 the type system inits itself
PKG_CHECK_MODULES(TYPE_INIT, glib-2.0 < 2.36,
[AC_DEFINE(HAVE_TYPE_INIT,1,[define if your glib needs g_type_init().])
@ -539,19 +553,6 @@ PKG_CHECK_MODULES(HAVE_CHECKED_MUL, glib-2.0 >= 2.48,
# check for gtk-doc
GTK_DOC_CHECK([1.14],[--flavour no-tmpl])
# must be after gthread, since that should have discovered the link flags for
# pthread for us
save_LIBS="$LIBS"
save_CFLAGS="$CFLAGS"
LIBS="$LIBS $GTHREAD_LIBS"
CFLAGS="$CFLAGS $GTHREAD_CFLAGS"
AC_CHECK_FUNCS(pthread_setattr_default_np,
[AC_DEFINE(HAVE_PTHREAD_DEFAULT_NP,1, [have pthread_setattr_default_np().])
]
)
LIBS="$save_LIBS"
CFLAGS="$save_CFLAGS"
# we need expat ... we'd love to use expat.pc, but sadly this is only available
# for recent linuxes, so we have to use the old and horrible expat.m4
AM_WITH_EXPAT