diff --git a/os/Makefile.am b/os/Makefile.am
index d8d1405..fc4bf6d 100644
--- a/os/Makefile.am
+++ b/os/Makefile.am
@@ -1,4 +1,8 @@
+if LIBCWRAPPER
 noinst_LTLIBRARIES = libos.la libcwrapper.la
+else
+noinst_LTLIBRARIES = libos.la
+endif
 
 AM_CFLAGS = $(DIX_CFLAGS)
 
@@ -41,12 +45,14 @@ if NEED_STRLCAT
 libos_la_SOURCES += $(STRLCAT_SRCS)
 endif
 
+if LIBCWRAPPER
 libcwrapper_la_SOURCES = \
 	$(top_srcdir)/hw/xfree86/os-support/shared/libc_wrapper.c
 libcwrapper_la_CFLAGS = \
 	-DSELF_CONTAINED_WRAPPER \
 	-I$(top_srcdir)/hw/xfree86/os-support \
 	$(AM_CFLAGS)
+endif
 
 EXTRA_DIST = $(K5AUTH_SRCS) $(SECURERPC_SRCS) $(INTERNALMALLOC_SRCS) \
      $(XCSECURITY_SRCS) $(XDMCP_SRCS) $(STRLCAT_SRCS)
