summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@sun.com>2008-07-08 15:08:35 -0700
committerAlan Coopersmith <alan.coopersmith@sun.com>2008-07-08 15:08:35 -0700
commita0b2aac596ea2cbe4d0ec1ef8c406ad98f0c499d (patch)
tree928379eb4affda625b8b0ad6500b578e6df91c2c
parent1bc9f04963a8a236cc190e75e32282774b556932 (diff)
downloadxorg-lib-libXau-a0b2aac596ea2cbe4d0ec1ef8c406ad98f0c499d.tar.gz
SVR4 (including Solaris) puts gethostbyname_r in libnsl instead of libc
-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