--- old-chicken/Makefile.am	Mon Dec 19 13:29:14 2005
+++ new-chicken/Makefile.am	Mon Dec 19 13:29:14 2005
@@ -223,28 +223,32 @@
 lib_LTLIBRARIES = libchicken.la libuchicken.la
 
 if IS_MINGW
-POSIX_C = posixwin.c
-UPOSIX_C = uposixwin.c
+if USE_PCRE
+chickenlibsources = extras.c match-support.c lolevel.c tinyclos.c utils.c tcp.c pcre.c posixwin.c stub.c
+chickenulibsources = uextras.c umatch-support.c ulolevel.c utinyclos.c uutils.c utcp.c upcre.c uposixwin.c stub.c
+else
+if USE_PREGEX
+chickenlibsources = extras.c match-support.c lolevel.c tinyclos.c utils.c tcp.c pregexp.c posixwin.c stub.c
+chickenulibsources = uextras.c umatch-support.c ulolevel.c utinyclos.c uutils.c utcp.c upregexp.c uposixwin.c stub.c
 else
-POSIX_C = posix.c
-UPOSIX_C = uposix.c
+chickenlibsources = extras.c match-support.c lolevel.c tinyclos.c utils.c tcp.c regex.c posixwin.c stub.c
+chickenulibsources = uextras.c umatch-support.c ulolevel.c utinyclos.c uutils.c utcp.c uregex.c uposixwin.c stub.c
 endif
-
+endif
+else
 if USE_PCRE
-REGEX_C = pcre.c
-UREGEX_C = upcre.c
+chickenlibsources = extras.c match-support.c lolevel.c tinyclos.c utils.c tcp.c pcre.c posix.c stub.c
+chickenulibsources = uextras.c umatch-support.c ulolevel.c utinyclos.c uutils.c utcp.c upcre.c uposix.c stub.c
 else
 if USE_PREGEX
-REGEX_C = pregexp.c
-UREGEX_C = upregexp.c
+chickenlibsources = extras.c match-support.c lolevel.c tinyclos.c utils.c tcp.c pregexp.c posix.c stub.c
+chickenulibsources = uextras.c umatch-support.c ulolevel.c utinyclos.c uutils.c utcp.c upregexp.c uposix.c stub.c
 else
-REGEX_C = regex.c
-UREGEX_C = uregex.c
+chickenlibsources = extras.c match-support.c lolevel.c tinyclos.c utils.c tcp.c regex.c posix.c stub.c
+chickenulibsources = uextras.c umatch-support.c ulolevel.c utinyclos.c uutils.c utcp.c uregex.c uposix.c stub.c
+endif
 endif
 endif
-
-chickenlibsources = extras.c match-support.c lolevel.c tinyclos.c utils.c tcp.c $(REGEX_C) $(POSIX_C) stub.c
-chickenulibsources = uextras.c umatch-support.c ulolevel.c utinyclos.c uutils.c utcp.c $(UREGEX_C) $(UPOSIX_C) stub.c
 
 libchicken_la_SOURCES = runtime.c library.c eval.c profiler.c scheduler.c $(chickenlibsources) \
   srfi-1.c srfi-4.c srfi-13.c srfi-14.c srfi-18.c

