Index: configure.ac
===================================================================
RCS file: /cvs/gstreamer/gstreamer/configure.ac,v
retrieving revision 1.396
diff -a -u -r1.396 configure.ac
--- configure.ac	11 Oct 2005 15:26:57 -0000	1.396
+++ configure.ac	14 Oct 2005 14:41:58 -0000
@@ -160,6 +160,9 @@
 
 dnl check for mmap
 AC_FUNC_MMAP()
+AM_CONDITIONAL(GST_HAVE_MMAP, test "x$ac_cv_func_mmap_fixed_mapped" == "xyes") 
+
+
 
 dnl check for makecontext and define HAVE_MAKECONTEXT if we have it
 AC_CHECK_MCSC()
@@ -204,10 +207,12 @@
 case "$host" in
   *-*-mingw*)
     AC_DEFINE_UNQUOTED(HAVE_WIN32, 1, [Defined if compiling for Windows])
+    have_win32=yes
     ;;
   *)
     ;;
 esac
+AM_CONDITIONAL(HAVE_WIN32, test "x$have_win32" = "xyes")
 
 GST_UNALIGNED_ACCESS()
 if test x${as_cv_unaligned_access} = xyes ; then
@@ -526,14 +531,14 @@
 dnl flags shared for all internal objects (core libs, elements, applications)
 dnl we disable deprecated internally
 dnl XML, GLib, popt, GST_INT, VALGRIND, and the right include for CFLAGS
-dnl no need to add XML, GLib, popt explicitly since libgstreamer pulls them in
+dnl no need to add XML, GLib explicitly since libgstreamer pulls them in
 GST_INT_CFLAGS="$GLIB_CFLAGS $XML_CFLAGS $GST_PKG_CFLAGS \
  $GST_INT_CFLAGS \$(ERROR_CFLAGS) -DGST_DISABLE_DEPRECATED"
 
 dnl Private vars for libgst only
 GST_LIB_CFLAGS="$GST_PKG_CFLAGS $GST_INT_CFLAGS \
   $VALGRIND_CFLAGS -I\$(top_srcdir)"
-GST_LIB_LIBS="$XML_LIBS $GLIB_LIBS -lpopt $GST_PKG_LIBS $LTLIBINTL $VALGRIND_LIBS"
+GST_LIB_LIBS="$XML_LIBS $GLIB_LIBS $GST_PKG_LIBS $LTLIBINTL $VALGRIND_LIBS"
 GST_LIB_LDFLAGS="$GST_LT_LDFLAGS -version-info $GST_LIBVERSION -no-undefined $EXPORT_LDFLAGS"
 AC_SUBST(GST_LIB_CFLAGS)
 AC_SUBST(GST_LIB_LIBS)
@@ -541,7 +546,7 @@
 
 dnl Vars for all internal objects built on libgstreamer
 GST_OBJ_CFLAGS="$GST_INT_CFLAGS -I\$(top_srcdir)/libs -I\$(top_srcdir)"
-GST_OBJ_LIBS="\$(top_builddir)/gst/libgstreamer-$GST_MAJORMINOR.la"
+GST_OBJ_LIBS="$GLIB_LIBS \$(top_builddir)/gst/libgstreamer-$GST_MAJORMINOR.la"
 
 AC_SUBST(GST_OBJ_CFLAGS, "$GST_OBJ_CFLAGS")
 AC_SUBST(GST_OBJ_LIBS, "$GST_OBJ_LIBS")
Index: gst/elements/Makefile.am
===================================================================
RCS file: /cvs/gstreamer/gstreamer/gst/elements/Makefile.am,v
retrieving revision 1.71
diff -a -u -r1.71 Makefile.am
--- gst/elements/Makefile.am	9 Sep 2005 17:42:20 -0000	1.71
+++ gst/elements/Makefile.am	14 Oct 2005 14:41:59 -0000
@@ -6,13 +6,19 @@
 
 plugin_LTLIBRARIES = libgstelements.la
 
+if HAVE_WIN32
+GST_FDSRC_SRC = 
+else
+GST_FDSRC_SRC = gstfdsrc.c
+endif
+
 libgstelements_la_DEPENDENCIES = ../libgstreamer-@GST_MAJORMINOR@.la
 libgstelements_la_SOURCES =	\
 	gstbufferstore.c	\
 	gstcapsfilter.c		\
 	gstfakesrc.c		\
 	gstfakesink.c		\
-	gstfdsrc.c		\
+	$(GST_FDSRC_SRC)	\
 	gstfilesink.c		\
 	gstfilesrc.c		\
 	gstidentity.c		\
Index: gst/indexers/Makefile.am
===================================================================
RCS file: /cvs/gstreamer/gstreamer/gst/indexers/Makefile.am,v
retrieving revision 1.8
diff -a -u -r1.8 Makefile.am
--- gst/indexers/Makefile.am	23 Apr 2005 23:25:06 -0000	1.8
+++ gst/indexers/Makefile.am	14 Oct 2005 14:41:59 -0000
@@ -2,11 +2,16 @@
 plugin_LTLIBRARIES = libgstindexers.la
 
 # file index uses xml
+if GST_HAVE_MMAP
 if GST_DISABLE_LOADSAVE
 GST_LOADSAVE_SRC =
 else
 GST_LOADSAVE_SRC = gstfileindex.c
 endif
+else
+GST_LOADSAVE_SRC =
+endif
+
 
 libgstindexers_la_SOURCES = gstindexers.c gstmemindex.c $(GST_LOADSAVE_SRC)
 libgstindexers_la_CFLAGS = $(GST_OBJ_CFLAGS)
Index: gst/indexers/gstindexers.c
===================================================================
RCS file: /cvs/gstreamer/gstreamer/gst/indexers/gstindexers.c,v
retrieving revision 1.5
diff -a -u -r1.5 gstindexers.c
--- gst/indexers/gstindexers.c	13 Mar 2004 15:26:53 -0000	1.5
+++ gst/indexers/gstindexers.c	14 Oct 2005 14:41:59 -0000
@@ -22,7 +22,9 @@
 #include <gst/gstplugin.h>
 
 extern gboolean gst_mem_index_plugin_init (GstPlugin * plugin);
+#ifdef HAVE_MMAP
 extern gboolean gst_file_index_plugin_init (GstPlugin * plugin);
+#endif
 
 static gboolean
 plugin_init (GstPlugin * plugin)
@@ -30,7 +32,9 @@
   gboolean res = TRUE;
 
   res &= gst_mem_index_plugin_init (plugin);
+#ifdef HAVE_MMAP
   res &= gst_file_index_plugin_init (plugin);
+#endif
 
   return res;
 }
