Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDick Porter <dick@acm.org>2001-11-09 19:39:50 +0300
committerDick Porter <dick@acm.org>2001-11-09 19:39:50 +0300
commitf93100c06316b0f435b2d77f48388b0b00bdee29 (patch)
tree0dc8576a3a0e8121bc382935cdd759654dd1aa97 /configure.in
parent9c047b806d22fc7ff71b8536b2c2aec23d9a27c0 (diff)
2001-11-09 Dick Porter <dick@ximian.com>
* configure.in: Try and get large file support, but it's not fatal if it's not there (the io-layer just ignores the high word in that case.) Check for windows builds, and only bother to look for pthreads and large files if we're not building for cygwin or native win32. Not having pthread support on Posix systems is now a fatal error. * autogen.sh: Fix ACLOCAL_FLAGS - it wasn't being passed to aclocal 2001-11-08 Dick Porter <dick@ximian.com> * Initial checkin. This is a library emulating the win32 threading and IO API. 2001-11-09 Dick Porter <dick@ximian.com> * Makefile.am (mint_LDADD): Don't need THREAD_LIBS any more 2001-11-09 Dick Porter <dick@ximian.com> * Makefile.am (testjit_LDADD): Don't need THREAD_LIBS any more 2001-11-09 Dick Porter <dick@ximian.com> * Makefile.am (pedump_LDADD): Don't need THREAD_LIBS any more svn path=/trunk/mono/; revision=1310
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in108
1 files changed, 93 insertions, 15 deletions
diff --git a/configure.in b/configure.in
index a50c9ffaba5..2d12e7eb7d6 100644
--- a/configure.in
+++ b/configure.in
@@ -35,19 +35,101 @@ GMODULE_LIBS=`glib-config --libs gmodule`
AC_SUBST(GMODULE_CFLAGS)
AC_SUBST(GMODULE_LIBS)
-dnl *****************************
-dnl *** Checks for libpthread ***
-dnl *****************************
-AC_CHECK_LIB(pthread, pthread_create, [
- THREAD_LIBS=-lpthread
+dnl ****************************************
+dnl *** Check if we're building on win32 ***
+dnl ****************************************
+AC_MSG_CHECKING([if building for some Win32 platform])
+case "$host" in
+ *-*-mingw*|*-*-cygwin*)
+ platform_win32=yes
+ AC_DEFINE(PLATFORM_WIN32)
+ ;;
+ *)
+ platform_win32=no
+ ;;
+esac
+AC_MSG_RESULT($platform_win32)
+AM_CONDITIONAL(PLATFORM_WIN32, test x$platform_win32 = xyes)
+
+if test x$platform_win32 = xyes; then
+ AC_MSG_CHECKING([if building for native Win32])
+ case "$host" in
+ *-*-mingw*)
+ platform_win32_native=yes
+ AC_DEFINE(PLATFORM_WIN32_NATIVE)
+ ;;
+ *)
+ platform_win32_native=no
+ ;;
+ esac
+ AC_MSG_RESULT($platform_win32_native)
+ AM_CONDITIONAL(PLATFORM_WIN32_NATIVE,
+ test x$platform_win32_native = xyes)
+fi
+
+
+if test x$platform_win32 = xno; then
+ dnl ******************************************************************
+ dnl *** Check for large file support ***
+ dnl *** (If we were using autoconf 2.50 we'd use AC_SYS_LARGEFILE) ***
+ dnl ******************************************************************
+
+ # Check that off_t can represent 2**63 - 1 correctly, working around
+ # potential compiler bugs. Defines LARGE_FILE_SUPPORT, adds $1 to
+ # CFLAGS and sets $large_offt to yes if the test succeeds
+ large_offt=no
+ AC_DEFUN(LARGE_FILES, [
+ large_CPPFLAGS=$CPPFLAGS
+ CPPFLAGS="$CPPFLAGS $1"
+ AC_TRY_RUN([
+ #include <sys/types.h>
+
+ #define BIG_OFF_T (((off_t)1<<62)-1+((off_t)1<<62))
+
+ int main(void) {
+ int big_off_t=((BIG_OFF_T%2147483629==721) &&
+ (BIG_OFF_T%2147483647==1));
+ if(big_off_t) {
+ exit(0);
+ } else {
+ exit(1);
+ }
+ }
+ ], [
+ AC_MSG_RESULT(ok)
+ AC_DEFINE(HAVE_LARGE_FILE_SUPPORT)
+ CFLAGS="$CFLAGS $1"
+ large_offt=yes
+ break
+ ], [
+ AC_MSG_RESULT(no)
+ ])
+ CPPFLAGS=$large_CPPFLAGS
+ ])
+
+ AC_MSG_CHECKING(if off_t is 64 bits wide)
+ LARGE_FILES("")
+ if test $large_offt = no; then
+ AC_MSG_CHECKING(if _FILE_OFFSET_BITS=64 gives 64 bit off_t)
+ LARGE_FILES("-D_FILE_OFFSET_BITS=64")
+ fi
+ if test $large_offt = no; then
+ AC_MSG_WARN([No 64 bit file size support available])
+ fi
+
+
+ dnl *****************************
+ dnl *** Checks for libpthread ***
+ dnl *****************************
+ AC_SEARCH_LIBS(pthread_create, pthread, [
AM_CONDITIONAL(THREADS_PTHREAD, true)
AC_DEFINE(HAVE_PTHREAD)
# Need pthread_mutex_timedlock
pthread_CFLAGS=""
orig_CPPFLAGS=$CPPFLAGS
- # This is a gcc-specific error, but we already set gcc-specific
- # options in CFLAGS :)
+ # This is a gcc-specific error, but we already set
+ # gcc-specific options in CFLAGS
CPPFLAGS="$CPPFLAGS -Werror-implicit-function-declaration"
AC_MSG_CHECKING(for pthread_mutex_timedlock)
AC_TRY_COMPILE([ #include <pthread.h>], [
@@ -80,15 +162,10 @@ AC_CHECK_LIB(pthread, pthread_create, [
CPPFLAGS=$orig_CPPFLAGS
CFLAGS="$CFLAGS $pthread_CFLAGS"
], [
- AC_MSG_RESULT([Cannot find libpthread])
- # Check for other thread systems here, set THREAD_LIBS to
- # whatever is needed, and define
- # AM_CONDITIONAL(THREADS_foo, true), and add it to the
- # section in mono/metadata/Makefile.am, AC_DEFINE(HAVE_foo),
- # add that to acconfig.h, add the section for that in
- # mono/metadata/threads.h
+ AC_MSG_ERROR([libpthread is required on non-win32 hosts])
])
-AC_SUBST(THREAD_LIBS)
+fi
+
TARGET="unknown"
ACCESS_UNALIGNED="yes"
@@ -137,6 +214,7 @@ mono/tests/Makefile
mono/wrapper/Makefile
mono/monoburg/Makefile
mono/jit/Makefile
+mono/io-layer/Makefile
runtime/Makefile
doc/Makefile
])