diff --git configure.ac configure.ac
index 2372711..a7c62dc 100644
--- configure.ac
+++ configure.ac
@@ -43,8 +43,23 @@ else
   AC_MSG_NOTICE([... done])
 fi
 
-dnl Make libcddgmp:
-make -C external cdd
+dnl Make cddlib if requested:
+AC_LANG_PUSH(C++)
+AC_CHECK_HEADERS([cddlib/setoper.h])
+AC_CHECK_HEADERS([cddlib/cdd.h], [], [],
+[#ifdef HAVE_CDDLIB_SETOPER_H
+# include <cddlib/setoper.h>
+# endif
+])
+AC_LANG_POP
+AM_CONDITIONAL(USE_LOCAL_CDD, [test "x$ac_cv_header_cddlib_cdd_h" = "xno"])
+if test "x$ac_cv_header_cddlib_cdd_h" = "xyes"; then
+  AC_MSG_NOTICE([system cddlib is used])
+else
+  AC_MSG_NOTICE([cddlib/cdd.h not found on system - building cdd locally ...])
+  make -C external cdd
+  AC_MSG_NOTICE([... done])
+fi
 
 dnl Check for requests for third-party packages:
 dnl Check for qsopt_ex:
@@ -62,8 +77,17 @@ if test "x$enable_qsoptex" = "xyes"; then
   AC_CHECK_LIB([z], [gzopen], [], AC_MSG_NOTICE([compiling without libz]))
   AC_CHECK_LIB([bz2], [BZ2_bzopen], [], AC_MSG_NOTICE([compiling without libbz2]))
 
-  dnl Make libqsopt_ex:
-  make -C external qso
+  AC_LANG_PUSH(C++)
+  AC_CHECK_HEADERS([qsopt_ex/QSopt_ex.h])
+  AC_LANG_POP
+  AM_CONDITIONAL(USE_LOCAL_QSOPTEX, [test "x$ac_cv_header_qsopt_ex_QSopt_ex_h" = "xno"])
+  if test "x$ac_cv_header_qsopt_ex_QSopt_ex_h" = "xyes"; then
+    AC_MSG_NOTICE([system QSopt_ex is used])
+  else
+    AC_MSG_NOTICE([qsopt_ex/QSopt_ex.h not found on system - building cddQSopt_exlocally ...])
+    make -C external qso
+    AC_MSG_NOTICE([... done])
+  fi
 else
   AC_MSG_RESULT(no)
 fi
@@ -77,12 +101,23 @@ AC_ARG_ENABLE([soplex],
 if test "x$enable_soplex" = "xyes"; then  
   AC_MSG_RESULT(yes)
 
-  dnl Check for compression library (soplex needs it):
-  AC_CHECK_LIB([z], [gzopen], [LIBS="-lsoplex $LIBS"; AC_DEFINE(HAVE_LIBSOPLEX)], AC_MSG_NOTICE([libz missing => soplex not enabled]))
+
+  AC_LANG_PUSH(C++)
+  AC_CHECK_HEADERS([soplex.h])
+  AC_LANG_POP
+  AM_CONDITIONAL(USE_SOPLEX, [test "x$ac_cv_header_soplex_h" = "xyes"])
+  if test "x$ac_cv_header_soplex_h" = "xyes"; then
+    AC_MSG_NOTICE([system soplex is used])
+  else
+    AC_MSG_NOTICE([soplex.h not found on system - using external ...])
+      dnl Check for compression library (soplex needs it):
+    AC_CHECK_LIB([z], [gzopen], [LIBS="-lsoplex $LIBS"; AC_DEFINE(HAVE_LIBSOPLEX)], AC_MSG_NOTICE([libz missing => soplex not enabled]))
+    AC_MSG_NOTICE([... done])
+  fi
 else
   AC_MSG_RESULT(no)
 fi
-AM_CONDITIONAL(USE_SOPLEX, [test "x$ac_cv_lib_z_gzopen" = "xyes" -a "x$enable_soplex" = "xyes"])
+AM_CONDITIONAL(USE_LOCAL_SOPLEX, [test "x$ac_cv_lib_z_gzopen" = "xyes" -a "x$enable_soplex" = "xyes"])
 
 dnl Check for Permlib:
 dnl AC_MSG_CHECKING(whether permlib support was enabled)
diff --git lib-src-reg/LPinterface.hh lib-src-reg/LPinterface.hh
index 6522dbe..c376887 100644
--- lib-src-reg/LPinterface.hh
+++ lib-src-reg/LPinterface.hh
@@ -21,8 +21,8 @@
 #include "LabelSet.hh"
 #include "Rational.h"
 
-#include "setoper.h"
-#include "cdd.h"
+#include "cddlib/setoper.h"
+#include "cddlib/cdd.h"
 
 namespace topcom {
 
diff --git src-reg/Makefile.am src-reg/Makefile.am
index ed4a016..c017871 100644
--- src-reg/Makefile.am
+++ src-reg/Makefile.am
@@ -3,15 +3,30 @@ bin_PROGRAMS = checkregularity
 checkregularity_SOURCES = checkregularity.cc
 
 LDADD           = ../lib-src/libTOPCOM.a \
-                  ../lib-src-reg/libCHECKREG.a \
-                  ../external/lib/libcddgmp.a
+                  ../lib-src-reg/libCHECKREG.a
+
+if USE_LOCAL_CDD
+LDADD          += ../external/lib/libcddgmp.a
+else
+LIBS           += -lcddgmp -lcdd
+endif
+
 if USE_QSOPTEX
+if USE_LOCAL_QSOPTEX
 LDADD          += ../external/lib/libqsopt_ex.a
+else
+LIBS           += -lqsopt_ex
+endif
 endif
 
 if USE_SOPLEX
+LIBS           += -lsoplexshared
+else
+if USE_LOCAL_SOPLEX
 LDADD          += ../external/lib/libsoplex.a
 endif
+endif
+
 if USE_LOCAL_GMP
 LDADD          += ../external/lib/libgmpxx.a \
                   ../external/lib/libgmp.a
diff --git src/Makefile.am src/Makefile.am
index c97ecc5..4b26e1a 100644
--- src/Makefile.am
+++ src/Makefile.am
@@ -122,14 +122,30 @@ santos_dim4_triang_SOURCES         = santos_dim4_triang.cc
 santos_22_triang_SOURCES           = santos_22_triang.cc
 
 LDADD           = ../lib-src/libTOPCOM.a \
-                  ../lib-src-reg/libCHECKREG.a \
-                  ../external/lib/libcddgmp.a
+                  ../lib-src-reg/libCHECKREG.a
+
+if USE_LOCAL_CDD
+LDADD          += ../external/lib/libcddgmp.a
+else
+LIBS           += -lcddgmp -lcdd
+endif
+
 if USE_QSOPTEX
+if USE_LOCAL_QSOPTEX
 LDADD          += ../external/lib/libqsopt_ex.a
+else
+LIBS           += -lqsopt_ex
 endif
+endif
+
 if USE_SOPLEX
+LIBS           += -lsoplexshared
+else
+if USE_LOCAL_SOPLEX
 LDADD          += ../external/lib/libsoplex.a
 endif
+endif
+
 if USE_LOCAL_GMP
 LDADD          += ../external/lib/libgmpxx.a \
                   ../external/lib/libgmp.a
