configure: Exit with a non-zero exit code if a core dependency is missing.
diff --git a/configure b/configure
index 55afb90..c453191 100755
--- a/configure
+++ b/configure
@@ -21011,6 +21011,7 @@
 fi
 
 
+exitcode=0
 if test "$have_x" = "no"
 then
   echo
@@ -21018,6 +21019,7 @@
   echo "*** X support, which currently does not work, and would probably not be"
   echo "*** what you want anyway. You will need to install devel packages of"
   echo "*** Xlib/Xfree86 at the very least."
+  exitcode=1
 fi
 
 if test "$wine_cv_opengl_version_OK" = "no"
@@ -21025,6 +21027,7 @@
   echo
   echo "*** Warning: old Mesa headers detected. Wine will be built without Direct3D"
   echo "*** support. Consider upgrading your Mesa libraries (http://www.mesa3d.org/)."
+  exitcode=1
 fi
 
 if test "$wine_cv_msg_freetype" = "yes"
@@ -21034,6 +21037,7 @@
   echo "*** installed, but 'freetype-config' is not in your PATH. Install the"
   echo "*** freetype-devel package (or its equivalent on your distribution) to"
   echo "*** enable Wine to use TrueType fonts."
+  exitcode=1
 fi
 
 if test "$wine_cv_msg_fonts" = "yes"
@@ -21041,6 +21045,7 @@
   echo
   echo "*** Warning: Freetype or Fontforge is missing."
   echo "*** Fonts will not be built. Dialog text may be invisible or unaligned."
+  exitcode=1
 fi
 
 if test -z "$ALSALIBS" -a \
@@ -21053,12 +21058,15 @@
         "$ac_cv_header_machine_soundcard_h" != "yes" -a \
         "$ac_cv_header_soundcard_h" != "yes"
 then
-    echo "*** No sound system was found. Windows applications will be silent."
-    echo "*** The currently supported sound systems are:"
-    echo "*** ALSA, ARTS, EsounD, AudioIO, Jack, NAS and OSS"
+  echo "*** No sound system was found. Windows applications will be silent."
+  echo "*** The currently supported sound systems are:"
+  echo "*** ALSA, ARTS, EsounD, AudioIO, Jack, NAS and OSS"
+  exitcode=1
 fi
 
 echo
 echo "Configure finished.  Do '${ac_make} depend && ${ac_make}' to compile Wine."
 echo
 
+exit $exitcode
+