2005-06-13 Martin Baulig <martin@ximian.com>
[mono.git] / configure.in
index 824640ba61c107e75bd39e4058e17260f4c86d8e..0617fe8721324fd5d38ba5bf3c4e3d672582b1f6 100644 (file)
@@ -223,6 +223,7 @@ AC_CHECK_TOOL(CC, gcc, gcc)
 AC_PROG_CC
 AM_PROG_CC_STDC
 AC_PROG_INSTALL
+AC_PROG_AWK
 dnl We should use AM_PROG_AS, but it's not available on automake/aclocal 1.4
 : ${CCAS='$(CC)'}
 # Set ASFLAGS if not already set.
@@ -603,7 +604,7 @@ if test x$platform_win32 = xno; then
        # potential compiler bugs.  Defines LARGE_FILE_SUPPORT, adds $1 to
        # CPPFLAGS and sets $large_offt to yes if the test succeeds
        large_offt=no
-       AC_DEFUN(LARGE_FILES, [
+       AC_DEFUN([LARGE_FILES], [
                large_CPPFLAGS=$CPPFLAGS
                CPPFLAGS="$CPPFLAGS $1"
                AC_TRY_RUN([
@@ -1163,6 +1164,8 @@ if test x$platform_win32 = xno; then
        AC_CHECK_FUNCS(fgetpwent)
        AC_CHECK_FUNCS(fgetpwent)
        AC_CHECK_FUNCS(getfsstat)
+       AC_CHECK_FUNCS(mremap)
+       AC_CHECK_FUNCS(remap_file_pages)
        AC_CHECK_FUNCS(posix_fadvise)
        AC_CHECK_FUNCS(posix_fallocate)
        AC_CHECK_FUNCS(posix_madvise)
@@ -1536,8 +1539,18 @@ esac
 
 if test "x$X11" = "xlibX11.so"; then
        AC_PATH_X
+       AC_PATH_PROG(OBJDUMP, objdump, no)
        if test "x$no_x" != "xyes"; then
-               X11=`readlink $x_libraries/libX11.so`
+               if test "x$OBJDUMP" != xno; then
+                       AC_MSG_CHECKING(for the soname of libX11.so)
+                       X11=$($OBJDUMP -p  $x_libraries/libX11.so | $AWK '/SONAME/ {print $2}')
+                       AC_MSG_RESULT($X11)
+               else
+                       AC_MSG_WARN([Could not find objdump. WinForms will not work if you install this mono on a box without the X -devel package.]);
+               fi
+       
+       else
+               AC_MSG_WARN([Could not find X development libs. Do you have the -devel package installed? WinForms may not work...]);
        fi
 fi
 
@@ -1703,6 +1716,8 @@ Makefile
 mint.pc
 mono.pc
 scripts/mono-nunit.pc
+scripts/mono-find-provides
+scripts/mono-find-requires
 mono/Makefile
 mono/utils/Makefile
 mono/metadata/Makefile
@@ -1743,7 +1758,6 @@ data/net_2_0/Makefile
 samples/Makefile
 support/Makefile
 data/config
-mono.spec
 tools/Makefile
 tools/locale-builder/Makefile
 runtime/Makefile