summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac10
1 files changed, 8 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index e35d16f..65884c3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -55,8 +55,14 @@ AC_ARG_ENABLE(xthreads,
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]))
+ AC_CHECK_LIB(c, gethostbyname_r, [mtsafe=yes])
+ if test "x$mtsafe" = "x" ; then
+ AC_CHECK_LIB(nsl, gethostbyname_r, [mtsafe=yes])
+ fi
+ if test "x$mtsafe" = "xyes" ; then
+ AC_DEFINE(XUSE_MTSAFE_API, 1,
+ [Whether libXau needs to use MT safe API's])
+ fi
dnl XXX incomplete, please fill this in
case $host_os in