Index: configure
===================================================================
--- configure	(revision 2ee54263027122487a901500411985c80c241f9e)
+++ configure	(revision 24f46714e3d84e39031ca86708b991a79da0e12a)
@@ -658,4 +658,6 @@
 CFA_INCDIR
 CFA_PREFIX
+BUILD_NO_LIB_FALSE
+BUILD_NO_LIB_TRUE
 BUILD_DEBUG_FALSE
 BUILD_DEBUG_TRUE
@@ -3146,6 +3148,6 @@
 				;;
 			no)
-				as_fn_error $? "Must build target debug or release" "$LINENO" 5
-				exit 1;
+				build_release="no"
+				build_debug="no"
 				;;
 			*)
@@ -3187,4 +3189,12 @@
   BUILD_DEBUG_TRUE='#'
   BUILD_DEBUG_FALSE=
+fi
+
+ if test "x$build_release$build_debug" = "xnono"; then
+  BUILD_NO_LIB_TRUE=
+  BUILD_NO_LIB_FALSE='#'
+else
+  BUILD_NO_LIB_TRUE='#'
+  BUILD_NO_LIB_FALSE=
 fi
 
@@ -6304,4 +6314,8 @@
 if test -z "${BUILD_DEBUG_TRUE}" && test -z "${BUILD_DEBUG_FALSE}"; then
   as_fn_error $? "conditional \"BUILD_DEBUG\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${BUILD_NO_LIB_TRUE}" && test -z "${BUILD_NO_LIB_FALSE}"; then
+  as_fn_error $? "conditional \"BUILD_NO_LIB\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
@@ -7672,6 +7686,11 @@
 fi
 else
+  if test -z "$BUILD_DEBUG_TRUE"; then :
   { $as_echo "$as_me:${as_lineno-$LINENO}: Building libcfa for target: debug" >&5
 $as_echo "$as_me: Building libcfa for target: debug" >&6;}
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: Running cfa without libcfa" >&5
+$as_echo "$as_me: Running cfa without libcfa" >&6;}
+fi
 fi
 
Index: configure.ac
===================================================================
--- configure.ac	(revision 2ee54263027122487a901500411985c80c241f9e)
+++ configure.ac	(revision 24f46714e3d84e39031ca86708b991a79da0e12a)
@@ -82,6 +82,6 @@
 				;;
 			no)
-				AC_MSG_ERROR(Must build target debug or release)
-				exit 1;
+				build_release="no"
+				build_debug="no"
 				;;
 			*)
@@ -111,4 +111,5 @@
 AM_CONDITIONAL([BUILD_RELEASE], [test "x$build_release" = "xyes"])
 AM_CONDITIONAL([BUILD_DEBUG], [test "x$build_debug" = "xyes"])
+AM_CONDITIONAL([BUILD_NO_LIB], [test "x$build_release$build_debug" = "xnono"])
 
 if test "x$prefix" = "xNONE"; then
@@ -200,5 +201,7 @@
 		[AC_MSG_NOTICE(Building libcfa for target: release & debug)],
 		[AC_MSG_NOTICE(Building libcfa for target: release)])],
-	[AC_MSG_NOTICE(Building libcfa for target: debug)])
+	[AM_COND_IF([BUILD_DEBUG],
+		[AC_MSG_NOTICE(Building libcfa for target: debug)],
+		[AC_MSG_NOTICE(Running cfa without libcfa)])])
 
 # Final text
Index: src/driver/Makefile.am
===================================================================
--- src/driver/Makefile.am	(revision 2ee54263027122487a901500411985c80c241f9e)
+++ src/driver/Makefile.am	(revision 24f46714e3d84e39031ca86708b991a79da0e12a)
@@ -17,4 +17,14 @@
 # applies to both programs
 AM_CXXFLAGS = -Wall -O2
+if BUILD_NO_LIB
+else
+AM_CXXFLAGS += -DHAVE_LIBCFA
+endif
+if BUILD_DEBUG
+AM_CXXFLAGS += -DHAVE_LIBCFA_DEBUG
+endif
+if BUILD_RELEASE
+AM_CXXFLAGS += -DHAVE_LIBCFA_RELEASE
+endif
 
 bin_PROGRAMS = cfa
Index: src/driver/Makefile.in
===================================================================
--- src/driver/Makefile.in	(revision 2ee54263027122487a901500411985c80c241f9e)
+++ src/driver/Makefile.in	(revision 24f46714e3d84e39031ca86708b991a79da0e12a)
@@ -38,4 +38,7 @@
 build_triplet = @build@
 host_triplet = @host@
+@BUILD_NO_LIB_FALSE@am__append_1 = -DHAVE_LIBCFA
+@BUILD_DEBUG_TRUE@am__append_2 = -DHAVE_LIBCFA_DEBUG
+@BUILD_RELEASE_TRUE@am__append_3 = -DHAVE_LIBCFA_RELEASE
 bin_PROGRAMS = cfa$(EXEEXT)
 cc1lib_PROGRAMS = cc1$(EXEEXT)
@@ -204,5 +207,6 @@
 
 # applies to both programs
-AM_CXXFLAGS = -Wall -O2
+AM_CXXFLAGS = -Wall -O2 $(am__append_1) $(am__append_2) \
+	$(am__append_3)
 cfa_SOURCES = cfa.cc
 
