summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorAlan Coopersmith <Alan.Coopersmith@sun.com>2005-09-22 01:40:07 +0000
committerAlan Coopersmith <Alan.Coopersmith@sun.com>2005-09-22 01:40:07 +0000
commitbd48f668b3c8d5de53e42b73ef4e4136d384672d (patch)
treebbb90882c6b4903653664bf3db475f1b995c65df /configure.ac
parent82affd3fdeafe063406d80e439c16b5d7ee66020 (diff)
Set needed flags for MT-safe API's called from libXau
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac18
1 files changed, 18 insertions, 0 deletions
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 \