Index: aclocal.m4
===================================================================
--- aclocal.m4	(revision 57f408ebfa7e276870a937eea1a8be092c0af69b)
+++ aclocal.m4	(revision 9def87a13b46fd9815756c84b1635d68908f773d)
@@ -135,4 +135,44 @@
 # expand $ac_aux_dir to an absolute path
 am_aux_dir=`cd $ac_aux_dir && pwd`
+])
+
+# AM_COND_IF                                            -*- Autoconf -*-
+
+# Copyright (C) 2008, 2010 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 3
+
+# _AM_COND_IF
+# _AM_COND_ELSE
+# _AM_COND_ENDIF
+# --------------
+# These macros are only used for tracing.
+m4_define([_AM_COND_IF])
+m4_define([_AM_COND_ELSE])
+m4_define([_AM_COND_ENDIF])
+
+
+# AM_COND_IF(COND, [IF-TRUE], [IF-FALSE])
+# ---------------------------------------
+# If the shell condition COND is true, execute IF-TRUE, otherwise execute
+# IF-FALSE.  Allow automake to learn about conditional instantiating macros
+# (the AC_CONFIG_FOOS).
+AC_DEFUN([AM_COND_IF],
+[m4_ifndef([_AM_COND_VALUE_$1],
+	   [m4_fatal([$0: no such condition "$1"])])dnl
+_AM_COND_IF([$1])dnl
+if test -z "$$1_TRUE"; then :
+  m4_n([$2])[]dnl
+m4_ifval([$3],
+[_AM_COND_ELSE([$1])dnl
+else
+  $3
+])dnl
+_AM_COND_ENDIF([$1])dnl
+fi[]dnl
 ])
 
Index: configure
===================================================================
--- configure	(revision 57f408ebfa7e276870a937eea1a8be092c0af69b)
+++ configure	(revision 9def87a13b46fd9815756c84b1635d68908f773d)
@@ -658,4 +658,8 @@
 CFA_INCDIR
 CFA_PREFIX
+BUILD_DEBUG_FALSE
+BUILD_DEBUG_TRUE
+BUILD_RELEASE_FALSE
+BUILD_RELEASE_TRUE
 CFA_BACKEND_CC
 BACKEND_CC
@@ -734,4 +738,6 @@
 enable_maintainer_mode
 with_backend_compiler
+enable_target_release
+enable_target_debug
 enable_dependency_tracking
 '
@@ -1376,4 +1382,6 @@
   --disable-maintainer-mode  disable make rules and dependencies not useful
 			  (and sometimes confusing) to the casual installer
+  --enable-target-release Build and install the release target
+  --enable-target-debug   Build and install the debug target
   --disable-dependency-tracking  speeds up one-time build
   --enable-dependency-tracking   do not reject slow dependency extractors
@@ -3099,4 +3107,85 @@
 _ACEOF
 
+
+
+
+
+# Check whether --enable-target-release was given.
+if test "${enable_target_release+set}" = set; then :
+  enableval=$enable_target_release;
+fi
+
+# Check whether --enable-target-debug was given.
+if test "${enable_target_debug+set}" = set; then :
+  enableval=$enable_target_debug;
+fi
+
+
+case "$enable_target_release" in
+	yes)
+		case "$enable_target_debug" in
+			yes)
+				build_release="yes"
+				build_debug="yes"
+				;;
+			no)
+				build_release="yes"
+				build_debug="no"
+				;;
+			*)
+				build_release="yes"
+				build_debug="no"
+				;;
+		esac
+		;;
+	no)
+		case "$enable_target_debug" in
+			yes)
+				build_release="no"
+				build_debug="yes"
+				;;
+			no)
+				as_fn_error $? "Must build target debug or release" "$LINENO" 5
+				exit 1;
+				;;
+			*)
+				build_release="no"
+				build_debug="yes"
+				;;
+		esac
+		;;
+	*)
+		case "$enable_target_debug" in
+			yes)
+				build_release="no"
+				build_debug="yes"
+				;;
+			no)
+				build_release="yes"
+				build_debug="no"
+				;;
+			*)
+				build_release="yes"
+				build_debug="yes"
+				;;
+		esac
+		;;
+esac
+
+ if test "x$build_release" = "xyes"; then
+  BUILD_RELEASE_TRUE=
+  BUILD_RELEASE_FALSE='#'
+else
+  BUILD_RELEASE_TRUE='#'
+  BUILD_RELEASE_FALSE=
+fi
+
+ if test "x$build_debug" = "xyes"; then
+  BUILD_DEBUG_TRUE=
+  BUILD_DEBUG_FALSE='#'
+else
+  BUILD_DEBUG_TRUE='#'
+  BUILD_DEBUG_FALSE=
+fi
 
 
@@ -6207,4 +6296,12 @@
 if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
   as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${BUILD_RELEASE_TRUE}" && test -z "${BUILD_RELEASE_FALSE}"; then
+  as_fn_error $? "conditional \"BUILD_RELEASE\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+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
@@ -7566,4 +7663,17 @@
 
 
+if test -z "$BUILD_RELEASE_TRUE"; then :
+  if test -z "$BUILD_DEBUG_TRUE"; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: Building libcfa for target: release & debug" >&5
+$as_echo "$as_me: Building libcfa for target: release & debug" >&6;}
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: Building libcfa for target: release" >&5
+$as_echo "$as_me: Building libcfa for target: release" >&6;}
+fi
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: Building libcfa for target: debug" >&5
+$as_echo "$as_me: Building libcfa for target: debug" >&6;}
+fi
+
 # Final text
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: Cforall configuraton completed. Type \"make -j 8 install\"." >&5
Index: configure.ac
===================================================================
--- configure.ac	(revision 57f408ebfa7e276870a937eea1a8be092c0af69b)
+++ configure.ac	(revision 9def87a13b46fd9815756c84b1635d68908f773d)
@@ -52,4 +52,63 @@
 AC_DEFINE_UNQUOTED(CFA_BACKEND_CC, "${BACKEND_CC}", [Location of include files.])
 AC_SUBST(CFA_BACKEND_CC)
+
+
+
+AC_ARG_ENABLE(target-release, AS_HELP_STRING([--enable-target-release], [Build and install the release target]))
+AC_ARG_ENABLE(target-debug, AS_HELP_STRING([--enable-target-debug], [Build and install the debug target]))
+
+case "$enable_target_release" in
+	yes)
+		case "$enable_target_debug" in
+			yes)
+				build_release="yes"
+				build_debug="yes"
+				;;
+			no)
+				build_release="yes"
+				build_debug="no"
+				;;
+			*)
+				build_release="yes"
+				build_debug="no"
+				;;
+		esac
+		;;
+	no)
+		case "$enable_target_debug" in
+			yes)
+				build_release="no"
+				build_debug="yes"
+				;;
+			no)
+				AC_MSG_ERROR(Must build target debug or release)
+				exit 1;
+				;;
+			*)
+				build_release="no"
+				build_debug="yes"
+				;;
+		esac
+		;;
+	*)
+		case "$enable_target_debug" in
+			yes)
+				build_release="no"
+				build_debug="yes"
+				;;
+			no)
+				build_release="yes"
+				build_debug="no"
+				;;
+			*)
+				build_release="yes"
+				build_debug="yes"
+				;;
+		esac
+		;;
+esac
+
+AM_CONDITIONAL([BUILD_RELEASE], [test "x$build_release" = "xyes"])
+AM_CONDITIONAL([BUILD_DEBUG], [test "x$build_debug" = "xyes"])
 
 if test "x$prefix" = "xNONE"; then
@@ -137,4 +196,10 @@
 AC_OUTPUT
 
+AM_COND_IF([BUILD_RELEASE],
+	[AM_COND_IF([BUILD_DEBUG],
+		[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)])
+
 # Final text
 AC_MSG_RESULT(Cforall configuraton completed. Type "make -j 8 install".)
