Index: Makefile
===================================================================
--- Makefile	(revision ac0cb2ac8774922acaa210b75ea25715e04c97fe)
+++ Makefile	(revision 944b15c87974bab5195a7e1ff5a452c690c0d017)
@@ -72,4 +72,7 @@
 ifeq ($(CONFIG_USERSPACE),y)
 	DEFS += -DCONFIG_USERSPACE
+endif
+ifeq ($(CONFIG_FPU_LAZY),y)
+	DEFS += -DCONFIG_FPU_LAZY
 endif
 
Index: arch/amd64/Makefile.inc
===================================================================
--- arch/amd64/Makefile.inc	(revision ac0cb2ac8774922acaa210b75ea25715e04c97fe)
+++ arch/amd64/Makefile.inc	(revision 944b15c87974bab5195a7e1ff5a452c690c0d017)
@@ -68,7 +68,4 @@
 	DEFS += -DCONFIG_HT
 endif
-ifeq ($(CONFIG_FPU_LAZY),y)
-	DEFS += -DCONFIG_FPU_LAZY
-endif
 
 ARCH_SOURCES = \
Index: arch/ia32/Makefile.inc
===================================================================
--- arch/ia32/Makefile.inc	(revision ac0cb2ac8774922acaa210b75ea25715e04c97fe)
+++ arch/ia32/Makefile.inc	(revision 944b15c87974bab5195a7e1ff5a452c690c0d017)
@@ -87,7 +87,4 @@
 	DEFS += -DCONFIG_HT
 endif
-ifeq ($(CONFIG_FPU_LAZY),y)
-	DEFS += -DCONFIG_FPU_LAZY
-endif
 
 ARCH_SOURCES = \
Index: arch/mips32/Makefile.inc
===================================================================
--- arch/mips32/Makefile.inc	(revision ac0cb2ac8774922acaa210b75ea25715e04c97fe)
+++ arch/mips32/Makefile.inc	(revision 944b15c87974bab5195a7e1ff5a452c690c0d017)
@@ -74,12 +74,4 @@
 	CFLAGS += -EB -DBIG_ENDIAN -DHAVE_FPU -mips3
 endif
-ifeq ($(MIPS_MACHINE),msim4kc)
-	# MSIM needs lwl/swl patch & 4kc instruction patch to work
-	# otherwise add -mmemcpy -mips3
-	
-	BFD_NAME = elf32-tradlittlemips
-	BFD = binary
-	CFLAGS += -mhard-float -march=4kc 
-endif
 ifeq ($(MIPS_MACHINE),simics)
 	# SIMICS 4kc emulation is broken, although for instructions
@@ -96,10 +88,4 @@
 endif
 
-## Accepted configuration directives
-#
-
-ifeq ($(CONFIG_FPU_LAZY),y)
-	DEFS += -DCONFIG_FPU_LAZY
-endif
 
 ARCH_SOURCES = \
Index: kernel.config
===================================================================
--- kernel.config	(revision ac0cb2ac8774922acaa210b75ea25715e04c97fe)
+++ kernel.config	(revision 944b15c87974bab5195a7e1ff5a452c690c0d017)
@@ -37,6 +37,14 @@
 ! [ARCH=ia32] IA32_CPU (choice)
 
+# MIPS Machine Type
+@ "msim" MSIM Simulator
+@ "simics" Virtutech Simics simulator
+@ "lgxemul" GXEmul Little Endian
+@ "bgxemul" GXEmul Big Endian
+@ "indy" SGI Indy
+! [ARCH=mips32] MIPS_MACHINE (choice)
+
 # Support for SMP
-! CONFIG_SMP (y/n)
+! [ARCH=ia32|ARCH=amd64] CONFIG_SMP (y/n)
 
 # Improved support for hyperthreading
@@ -44,14 +52,5 @@
 
 # Lazy FPU context switching
-! CONFIG_FPU_LAZY (y/n)
-
-# MIPS Machine Type
-@ "msim" MSIM Simulator
-@ "msim4kc" MSIM Simulator with 4kc instruction set
-@ "simics" Virtutech Simics simulator
-@ "lgxemul" GXEmul Little Endian
-@ "bgxemul" GXEmul Big Endian
-@ "indy" SGI Indy
-! [ARCH=mips32] MIPS_MACHINE (choice)
+! [(ARCH=mips32&MIPS_MACHINE!=msim)|ARCH=amd64|ARCH=ia32] CONFIG_FPU_LAZY (y/n)
 
 ## Debugging configuration directives
@@ -79,5 +78,5 @@
 @ [ARCH=ia32|ARCH=amd64] "fpu/fpu1" Intel fpu test 1
 @ [ARCH=ia32|ARCH=amd64] "fpu/sse1" Intel Sse test 1
-@ [ARCH=mips32&MIPS_MACHINE!=msim&MIPS_MACHINE!=msim4kc] "fpu/mips1" Mips FPU test 1
+@ [ARCH=mips32&MIPS_MACHINE!=msim] "fpu/mips1" Mips FPU test 1
 @ "print/print1" Printf test 1
 @ "thread/trhead1" Thread test 1
Index: tools/config.py
===================================================================
--- tools/config.py	(revision ac0cb2ac8774922acaa210b75ea25715e04c97fe)
+++ tools/config.py	(revision 944b15c87974bab5195a7e1ff5a452c690c0d017)
@@ -231,15 +231,31 @@
     f.close()
 
-def check_condition(text, defaults):
-    result = True
-    conds = text.split('&')
+def check_condition(text, defaults, asked_names):
+    seen_vars = [ x[0] for x in asked_names ]
+    ctype = 'cnf'
+    if ')|' in text or '|(' in text:
+        ctype = 'dnf'
+    
+    if ctype == 'cnf':
+        conds = text.split('&')
+    else:
+        conds = text.split('|')
+
     for cond in conds:
         if cond.startswith('(') and cond.endswith(')'):
             cond = cond[1:-1]
-        if not check_dnf(cond, defaults):
+            
+        inside = check_inside(cond, defaults, ctype, seen_vars)
+        
+        if ctype == 'cnf' and not inside:
             return False
-    return True
-
-def check_dnf(text, defaults):
+        if ctype == 'dnf' and inside:
+            return True
+
+    if ctype == 'cnf':
+        return True
+    return False
+
+def check_inside(text, defaults, ctype, seen_vars):
     """
     Check that the condition specified on input line is True
@@ -247,5 +263,8 @@
     only CNF is supported
     """
-    conds = text.split('|')
+    if ctype == 'cnf':
+        conds = text.split('|')
+    else:
+        conds = text.split('&')
     for cond in conds:
         res = re.match(r'^(.*?)(!?=)(.*)$', cond)
@@ -255,13 +274,25 @@
         oper = res.group(2)
         condval = res.group(3)
+        if condname not in seen_vars:
+            raise RuntimeError("Variable %s not defined before being asked." %\
+                               condname)
         if not defaults.has_key(condname):
             raise RuntimeError("Condition var %s does not exist: %s" % \
                                (condname,text))
 
-        if oper=='=' and  condval == defaults[condname]:
-            return True
-        if oper == '!=' and condval != defaults[condname]:
-            return True
-    return False
+        if ctype == 'cnf':
+            if oper == '=' and  condval == defaults[condname]:
+                return True
+            if oper == '!=' and condval != defaults[condname]:
+                return True
+        else:
+            if oper== '=' and condval != defaults[condname]:
+                return False
+            if oper== '!=' and condval == defaults[condname]:
+                print 2
+                return False
+    if ctype=='cnf':
+        return False
+    return True
 
 def parse_config(input, output, dlg, defaults={}, askonly=None):
@@ -305,5 +336,6 @@
                 raise RuntimeError('Invalid command: %s' % line)
             if res.group(1):
-                if not check_condition(res.group(1), defaults):
+                if not check_condition(res.group(1), defaults,
+                                       asked_names):
                     continue
             args = res.group(2).strip().split(' ')
@@ -335,5 +367,6 @@
             
             if res.group(1):
-                if not check_condition(res.group(1), defaults):
+                if not check_condition(res.group(1), defaults,
+                                       asked_names):
                     if default is not None:
                         outf.write('#!# %s = %s\n' % (varname, default))
@@ -366,5 +399,6 @@
                 raise RuntimeError("Bad line: %s" % line)
             if res.group(1):
-                if not check_condition(res.group(1),defaults):
+                if not check_condition(res.group(1),defaults,
+                                       asked_names):
                     continue
             choices.append((res.group(2), res.group(3)))
@@ -434,5 +468,5 @@
     
     if not defmode and dlg.yesno('Rebuild kernel?') == 'y':
-        os.execlp('make','make','clean','all')
+        os.execlp('make','make','clean','build')
 
 if __name__ == '__main__':
