diff options
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/configure.in b/configure.in index 88e0ba4f8d..394fc67c54 100644 --- a/configure.in +++ b/configure.in @@ -291,11 +291,19 @@ fi # Threads +CFLAGS="$saved_cflags" +LDFLAGS="$saved_ldflags" + if test "x$with_threads" = "xposix" || test "x$with_threads" = "xyes"; then AC_CHECK_LIB(pthread, pthread_attr_init, - AC_DEFINE(USE_PTHREADS) + [AC_DEFINE(USE_PTHREADS) x_libs="$x_libs -lpthread" - CFLAGS="$CFLAGS -D_REENTRANT") + CFLAGS="$CFLAGS -D_REENTRANT"], + # AIX has libpthreads, cause they're special. Special friends (TM) + AC_CHECK_LIB(pthreads, pthread_attr_init, + [AC_DEFINE(USE_PTHREADS) + x_libs="$x_libs -lpthreads" + CFLAGS="$CFLAGS -D_REENTRANT -D_THREAD_SAFE"])) fi AC_SUBST(x_cflags) @@ -304,9 +312,6 @@ AC_SUBST(x_ldflags) AC_SUBST(x_libs) AC_SUBST(xinput_progs) -CFLAGS="$saved_cflags" -LDFLAGS="$saved_ldflags" - if test "x$enable_shm" = "xyes"; then # Check for shared memory AC_CHECK_HEADER(sys/ipc.h, AC_DEFINE(HAVE_IPC_H), no_sys_ipc=yes) @@ -408,9 +413,6 @@ AC_HEADER_STDC # Checks for typedefs, structures, and compiler characteristics. AC_C_CONST -# Checks for endianness (needed by GdkRgb). -AC_C_BIGENDIAN - # Checks for library functions. AC_TYPE_SIGNAL AC_FUNC_MMAP |