From bd48f668b3c8d5de53e42b73ef4e4136d384672d Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Thu, 22 Sep 2005 01:40:07 +0000 Subject: Set needed flags for MT-safe API's called from libXau --- ChangeLog | 5 +++++ configure.ac | 18 ++++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/ChangeLog b/ChangeLog index 0f38579..6d51b0d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-09-21 Alan Coopersmith + + * configure.ac: + Set needed flags for MT-safe API's called from libXau + 2005-07-08 Keith Packard * .cvsignore: diff --git a/configure.ac b/configure.ac index a497beb..a5ec7d7 100644 --- a/configure.ac +++ b/configure.ac @@ -44,6 +44,24 @@ AC_SUBST(XAU_LIBS) kerberos=false AM_CONDITIONAL(KERBEROS, test x$kerberos = xtrue) +AC_ARG_ENABLE(xthreads, + AC_HELP_STRING([--disable-xthreads], + [Disable libXau support for Multithreading]), + [xthreads=$enableval],[xthreads=yes]) + +if test "x$xthreads" = "xyes" ; then + AC_DEFINE(XTHREADS,1,[Whether libXau is compiled with thread support]) + AC_CHECK_LIB(c, gethostbyname_r, AC_DEFINE(XUSE_MTSAFE_API,1, + [Whether libXau needs to use MT safe API's])) + +dnl XXX incomplete, please fill this in + case $host_os in + solaris*) + XTHREAD_CFLAGS="-D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS" ;; + esac + XAU_CFLAGS="$XAU_CFLAGS $XTHREAD_CFLAGS" +fi + if test "x$GCC" = "xyes"; then GCC_WARNINGS="-Wall -Wpointer-arith -Wstrict-prototypes \ -Wmissing-prototypes -Wmissing-declarations \ -- cgit v1.2.3