2002-08-30 Miguel de Icaza <miguel@ximian.com>
[mono.git] / configure.in
index 1efd01e21764b746866c98e0b0f6fc4f19b51e72..2e331fc67125bc8fbe6cda4f01e7e9ed1743e667 100644 (file)
@@ -1,8 +1,7 @@
-
 AC_INIT(README)
 AC_CANONICAL_SYSTEM
 AM_CONFIG_HEADER(config.h)
-AM_INIT_AUTOMAKE(mono, 0.14)
+AM_INIT_AUTOMAKE(mono, 0.15)
 AM_MAINTAINER_MODE
 
 dnl ****************************************
@@ -14,11 +13,12 @@ case "$host" in
                platform_win32=yes
                AC_DEFINE(PLATFORM_WIN32)
                CC="gcc -mno-cygwin"
-               libdl="-ldl"
+               HOST_CC="gcc"
+               libdl=
                ;;
        *)
                platform_win32=no
-               libdl=
+               libdl="-ldl"
                ;;
 esac
 AC_MSG_RESULT($platform_win32)
@@ -29,6 +29,12 @@ AC_PROG_CC
 AM_PROG_CC_STDC
 AC_PROG_INSTALL
 
+AC_CHECK_PROG(BISON, bison,yes,no)
+if test "x$BISON" = "xno";
+then
+       AC_MSG_ERROR([You need to install bison])
+fi
+
 dnl may require a specific autoconf version
 dnl AC_PROG_CC_FOR_BUILD
 dnl CC_FOR_BUILD not automatically detected
@@ -49,9 +55,6 @@ AM_PROG_LIBTOOL
 
 AC_CHECK_HEADERS(sys/filio.h sys/sockio.h netdb.h utime.h)
 
-AC_CHECK_HEADERS(iconv.h)
-AC_CHECK_HEADERS(giconv.h)
-
 # for mono/metadata/debug-symfile.c
 AC_CHECK_HEADERS(elf.h)
 
@@ -293,7 +296,7 @@ if test x$platform_win32 = xno; then
        dnl *****************************
        dnl *** Checks for libpthread ***
        dnl *****************************
-       AC_SEARCH_LIBS(pthread_create, pthread, [
+       AC_SEARCH_LIBS(pthread_create, pthread c_r, [
                AM_CONDITIONAL(THREADS_PTHREAD, true)
                AC_DEFINE(HAVE_PTHREAD)
 
@@ -368,7 +371,7 @@ if test x$platform_win32 = xno; then
                        ])
                ])
                CPPFLAGS=$orig_CPPFLAGS
-               CPPFLAGS="$CPPFLAGS $pthread_CFLAGS"
+               CPPFLAGS="$CPPFLAGS -D_REENTRANT $pthread_CFLAGS"
        ], [
                AC_MSG_ERROR([libpthread is required on non-win32 hosts])
        ])
@@ -477,27 +480,6 @@ if test "x$ac_cv_have_dev_random" = "xno" \
 ***]])
 fi
  
-if test "x$cross_compiling" = "xno"; then
-# check for new iconv version
-AC_MSG_CHECKING(for new iconv)
-AC_CACHE_VAL(new_iconv,[
-       AC_TRY_RUN([#include <stdio.h> 
-               #include <iconv.h>
-               int main()
-               {
-                 exit (iconv_open ("UTF-16le", "UTF-8") == (iconv_t)-1);
-               }
-               ],
-               new_iconv=yes,new_iconv=)])
-if test -n "$new_iconv"; then
-       AC_MSG_RESULT(yes)
-       AC_DEFINE(HAVE_NEW_ICONV)
-else
-       AC_MSG_RESULT(no)
-fi
-fi
-
 AC_MSG_CHECKING([if inter-process shared handles are requested])
 AC_ARG_ENABLE(shared-handles, [  --disable-shared-handles disable inter-process shared handles], try_shared_handles=$enableval, try_shared_handles=yes)
 AC_MSG_RESULT($try_shared_handles)
@@ -515,7 +497,7 @@ i*86-*-*) TARGET=X86; arch_target=x86;;
 sparc*-*-*) TARGET=SPARC; arch_target=sparc; ACCESS_UNALIGNED="no";;
 #alpha*-*-linux* | alpha*-*-osf*) TARGET=ALPHA; ACCESS_UNALIGNED="no";;
 #m68k-*-linux*) TARGET=M68K;;
-powerpc-*-linux* | powerpc-*-sysv*) TARGET=POWERPC; arch_target=ppc;;
+macppc-*-openbsd* | powerpc-*-linux* | powerpc-*-openbsd* | powerpc-*-sysv*) TARGET=POWERPC; arch_target=ppc;;
 arm-*-linux-* | armv4l-*-linux-*) TARGET=ARM; arch_target=arm; ACCESS_UNALIGNED="no";;
 esac
 
@@ -537,6 +519,9 @@ AM_CONDITIONAL(M68K, test x$TARGET = xM68K)
 AM_CONDITIONAL(POWERPC, test x$TARGET = xPOWERPC)
 AM_CONDITIONAL(ARM, test x$TARGET = xARM)
 
+LIBC="libc.so.6"
+AC_SUBST(LIBC)
+
 AC_SUBST(arch_target)
 AC_SUBST(CFLAGS)
 AC_SUBST(CPPFLAGS)
@@ -570,6 +555,8 @@ scripts/Makefile
 man/Makefile
 doc/Makefile
 docs/Makefile
+data/Makefile
+mono.spec
 ])
 
 echo "