[libbluray-devel] commit: Win32: Do not check for pthread (Jean-Baptiste Kempf )
git at videolan.org
git at videolan.org
Tue Aug 24 16:21:18 CEST 2010
libbluray | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Tue Aug 24 16:15:49 2010 +0200| [ec3c5befa1ab51183fe7d3e5ebf68fcddb9471d0] | committer: Jean-Baptiste Kempf
Win32: Do not check for pthread
> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=ec3c5befa1ab51183fe7d3e5ebf68fcddb9471d0
---
configure.ac | 30 +++++++++++++++++++++++++++---
1 files changed, 27 insertions(+), 3 deletions(-)
diff --git a/configure.ac b/configure.ac
index b9b01ba..c274bb6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6,6 +6,26 @@ AC_CANONICAL_SYSTEM
AM_INIT_AUTOMAKE([foreign])
AM_CONFIG_HEADER(config.h)
+case "${host_os}" in
+ "")
+ SYS=unknown
+ ;;
+ *mingw32* | *cygwin* | *wince* | *mingwce*)
+ case "${host_os}" in
+ *wince* | *mingwce* | *mingw32ce*)
+ SYS=mingwce
+ ;;
+ *mingw32*)
+ SYS=mingw32
+ AC_DEFINE([_WIN32_WINNT], 0x0501, [Define to '0x0500' for Windows XP APIs.])
+ ;;
+ esac
+ ;;
+ *)
+ SYS="${host_os}"
+ ;;
+esac
+
# messages
library_not_found="Could not find required library!"
function_not_found="Could not find required function!"
@@ -71,7 +91,9 @@ AC_TYPE_SIGNAL
AC_CHECK_HEADERS([stdarg.h sys/types.h dirent.h errno.h libgen.h malloc.h])
AC_CHECK_HEADERS([stdlib.h mntent.h linux/cdrom.h inttypes.h])
AC_CHECK_HEADERS([sys/time.h time.h])
-AC_CHECK_HEADERS(pthread.h,, [AC_MSG_ERROR([pthread.h required])])
+if test "${SYS}" != "mingw32" ; then
+ AC_CHECK_HEADERS(pthread.h,, [AC_MSG_ERROR([pthread.h required])])
+fi
# required structures
AC_STRUCT_DIRENT_D_TYPE
@@ -83,8 +105,10 @@ AC_SYS_LARGEFILE
AC_CHECK_FUNC([snprintf],, [AC_MSG_ERROR($function_not_found)])
# required libraries
-# pthreads
-AC_CHECK_LIB(pthread, pthread_create, [LIBS="$LIBS -lpthread"])
+# pthreads (not on win32)
+if test "${SYS}" != "mingw32" ; then
+ AC_CHECK_LIB(pthread, pthread_create, [LIBS="$LIBS -lpthread"])
+fi
# dlopen check
if [[ $use_dlopen_crypto_libs = "auto" ]]; then
More information about the libbluray-devel
mailing list