#1187 Fixing ./configure build breaker concerning libpthread

v0.27.3
Robin Mills 9 years ago
parent 7adaf71d44
commit 0f18d97381

@ -273,15 +273,17 @@ if test "$USE_XMP_TOOLKIT" = "yes"; then
EXPAT_CPPFLAGS= EXPAT_CPPFLAGS=
EXPAT_LDFLAGS= EXPAT_LDFLAGS=
EXPAT_LIBS= EXPAT_LIBS=
PTHREAD_LIBS=
if test "$with_expat" != "no"; then if test "$with_expat" != "no"; then
AC_CHECK_HEADERS(expat.h, AC_CHECK_HEADERS(expat.h,
AC_CHECK_LIB(expat, XML_ParserCreate,[ AC_CHECK_LIB(expat, XML_ParserCreate,[f
AC_DEFINE([HAVE_EXPAT], [], [Have Expat XML parser library]) AC_DEFINE([HAVE_EXPAT], [], [Have Expat XML parser library])
EXPAT_LIBS="-lexpat" EXPAT_LIBS="-lexpat"
if test "x${EXPAT_DIR}" != "x"; then if test "x${EXPAT_DIR}" != "x"; then
EXPAT_CPPFLAGS="-I${EXPAT_DIR}/include" EXPAT_CPPFLAGS="-I${EXPAT_DIR}/include"
EXPAT_LDFLAGS="-L${EXPAT_DIR}/lib" EXPAT_LDFLAGS="-L${EXPAT_DIR}/lib"
fi],[found_expat=no]),[found_expat=no]) fi],[found_expat=no]),[found_expat=no])
PTHREAD="-lpthread"
fi fi
if test "$with_expat" = "no" -o "$found_expat" = "no"; then if test "$with_expat" = "no" -o "$found_expat" = "no"; then
AC_MSG_ERROR(either specify a valid expat installation with --with-expat=DIR or disable XMP support with --disable-xmp) AC_MSG_ERROR(either specify a valid expat installation with --with-expat=DIR or disable XMP support with --disable-xmp)
@ -291,6 +293,8 @@ if test "$USE_XMP_TOOLKIT" = "yes"; then
AC_SUBST(EXPAT_CPPFLAGS) AC_SUBST(EXPAT_CPPFLAGS)
AC_SUBST(EXPAT_LDFLAGS) AC_SUBST(EXPAT_LDFLAGS)
AC_SUBST(EXPAT_LIBS) AC_SUBST(EXPAT_LIBS)
AC_CHECK_LIB(pthread, pthread_create, [PTHREAD_LIBS+=-lpthread])
AC_SUBST(PTHREAD_LIBS)
fi fi
AC_SUBST(ENABLE_XMP) AC_SUBST(ENABLE_XMP)
@ -315,7 +319,7 @@ case "$host_os" in
*mingw* | *cygwin*) *mingw* | *cygwin*)
LDFLAGS="$LDFLAGS -no-undefined -lpsapi -lwldap32 -lws2_32" ;; LDFLAGS="$LDFLAGS -no-undefined -lpsapi -lwldap32 -lws2_32" ;;
*) *)
LDFLAGS="$LDFLAGS -ldl" ;; LDFLAGS="$LDFLAGS -ldl -lpthread" ;;
esac esac
# 1099 # 1099

Loading…
Cancel
Save