mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-18 01:41:13 +00:00
Fix -lpthread vs -pthread detection.
-lpthread needs to be in LIBS, not LDFLAGS
This commit is contained in:
parent
0173ba07b4
commit
8a96e91315
1 changed files with 3 additions and 3 deletions
|
@ -1,9 +1,9 @@
|
||||||
if test "x$ac_cv_header_pthread_h" = "xyes"; then
|
if test "x$ac_cv_header_pthread_h" = "xyes"; then
|
||||||
save_ldflags="$LDFLAGS"
|
save_LIBS="$LIBS"
|
||||||
case "$host_os" in
|
case "$host_os" in
|
||||||
*qnx*) dnl qnx have all pthread* functions in the libc.
|
*qnx*) dnl qnx have all pthread* functions in the libc.
|
||||||
;;
|
;;
|
||||||
*) LDFLAGS="$LDFLAGS -lpthread"
|
*) LIBS="$LIBS -lpthread"
|
||||||
AC_TRY_LINK(
|
AC_TRY_LINK(
|
||||||
[#include <pthread.h>],
|
[#include <pthread.h>],
|
||||||
[pthread_attr_t type;
|
[pthread_attr_t type;
|
||||||
|
@ -13,7 +13,7 @@ if test "x$ac_cv_header_pthread_h" = "xyes"; then
|
||||||
)
|
)
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
LDFLAGS="$save_ldflags"
|
LIBS="$save_LIBS"
|
||||||
PTHREAD_CFLAGS=-D_REENTRANT
|
PTHREAD_CFLAGS=-D_REENTRANT
|
||||||
fi
|
fi
|
||||||
AC_SUBST(PTHREAD_LDFLAGS)
|
AC_SUBST(PTHREAD_LDFLAGS)
|
||||||
|
|
Loading…
Reference in a new issue