From 3bb75a4d7a374564e341749f80aa95e0719d50ad Mon Sep 17 00:00:00 2001
From: Marcel Loose <loose@astron.nl>
Date: Wed, 17 Jun 2009 12:51:37 +0000
Subject: [PATCH] Bug 1310: Updated CMake and LCS directories after yesterday's
 merge of the branch LOFAR-Bug1310-task-branch with the trunk.

---
 .gitattributes                               |   9 --
 CMake/FindReadline.cmake                     |  47 ++++++
 CMake/variants/variants.dop131               |  45 +-----
 CMakeLists.txt                               |   4 +-
 LCS/ACC/PLC/lofar_config.h.cmake             |  30 ----
 LCS/AMC/AMCBase/lofar_config.h.cmake         |  30 ----
 LCS/AMC/AMCImpl/lofar_config.h.cmake         |  30 ----
 LCS/ApplCommon/lofar_config.h.cmake          |  26 ----
 LCS/ApplCommon/test/tObservation.sh          |   2 +-
 LCS/ApplCommon/test/tStationInfo.sh          |   2 +
 LCS/Blob/lofar_config.h.cmake                |  26 ----
 LCS/Common/CMakeLists.txt                    |   1 +
 LCS/Common/include/Common/CMakeLists.txt     |   2 +
 LCS/Common/lofar_config.h.cmake              | 148 -------------------
 LCS/Common/src/CMakeLists.txt                |   2 +
 LCS/Common/test/CMakeLists.txt               |  16 +-
 LCS/Stream/include/Stream/Package__Version.h |   4 +-
 LCS/Stream/lofar_config.h.cmake              |  26 ----
 LCS/Tools/src/CMakeLists.txt                 |   7 +
 LCS/Tools/src/Makefile.am                    |   2 +-
 LCS/Tools/src/lofarinit.csh.in               |   2 +-
 LCS/Tools/src/lofarinit.sh.in                |   2 +-
 LCS/Transport/lofar_config.h.cmake           |  30 ----
 LCS/config.h.cmake                           | 148 -------------------
 lofar_config.h.cmake                         |   6 +
 25 files changed, 87 insertions(+), 560 deletions(-)
 create mode 100644 CMake/FindReadline.cmake
 delete mode 100644 LCS/ACC/PLC/lofar_config.h.cmake
 delete mode 100644 LCS/AMC/AMCBase/lofar_config.h.cmake
 delete mode 100644 LCS/AMC/AMCImpl/lofar_config.h.cmake
 delete mode 100644 LCS/ApplCommon/lofar_config.h.cmake
 create mode 100755 LCS/ApplCommon/test/tStationInfo.sh
 delete mode 100644 LCS/Blob/lofar_config.h.cmake
 delete mode 100644 LCS/Common/lofar_config.h.cmake
 delete mode 100644 LCS/Stream/lofar_config.h.cmake
 delete mode 100644 LCS/Transport/lofar_config.h.cmake
 delete mode 100644 LCS/config.h.cmake

diff --git a/.gitattributes b/.gitattributes
index 94b222fd308..efee36e90e4 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -260,32 +260,25 @@ JAVA/LofarUtils/src/com/toedter/components/images/JSpinFieldMono16.gif -text
 JAVA/LofarUtils/src/com/toedter/components/images/JSpinFieldMono32.gif -text
 JAVA/MAC/jRSP/.cvsignore -text
 JAVA/MAC/jRSP/nbproject/.cvsignore -text
-LCS/ACC/PLC/lofar_config.h.cmake -text
-LCS/AMC/AMCBase/lofar_config.h.cmake -text
-LCS/AMC/AMCImpl/lofar_config.h.cmake -text
 LCS/AMC/AMCImpl/src/AMCServer.cc -text
 LCS/AMC/amc_main_classes.png -text
 LCS/AMC/amc_package.png -text
 LCS/ApplCommon/bootstrap -text
-LCS/ApplCommon/lofar_config.h.cmake -text
 LCS/ApplCommon/test/tObservation.in_conflict1 -text
 LCS/ApplCommon/test/tObservation.in_conflict2 -text
 LCS/ApplCommon/test/tObservation.in_conflict3 -text
 LCS/ApplCommon/test/tObservation.in_conflict4 -text
 LCS/ApplCommon/test/tObservation.in_conflict5 -text
 LCS/ApplCommon/test/tObservation.in_parset1 -text
-LCS/Blob/lofar_config.h.cmake -text
 LCS/Blob/test/tBlobField.in_be -text svneol=unset#unset
 LCS/Blob/test/tBlobField.in_le -text svneol=unset#unset
 LCS/Blob/test/tBlobStream.in_be -text svneol=unset#unset
 LCS/Blob/test/tBlobStream.in_le -text svneol=unset#unset
 LCS/CMakeLists.txt -text
 LCS/Common/config.h.cmake -text
-LCS/Common/lofar_config.h.cmake -text
 LCS/Common/src/Common-Model.cat -text
 LCS/LACE/bootstrap -text
 LCS/Stream/bootstrap -text
-LCS/Stream/lofar_config.h.cmake -text
 LCS/Tools/config.h.cmake -text
 LCS/Tools/lofar_config.h.cmake -text
 LCS/Tools/src/countalllines -text
@@ -295,8 +288,6 @@ LCS/Tools/src/countpurecodecomm -text
 LCS/Tools/src/fillreview -text
 LCS/Tools/src/makecov -text
 LCS/Tools/src/processgcov -text
-LCS/Transport/lofar_config.h.cmake -text
-LCS/config.h.cmake -text
 LCS/lofar_config.h.cmake -text
 LCS/pyparameterset/bootstrap -text
 LCS/pytools/bootstrap -text
diff --git a/CMake/FindReadline.cmake b/CMake/FindReadline.cmake
new file mode 100644
index 00000000000..448ccd9f1be
--- /dev/null
+++ b/CMake/FindReadline.cmake
@@ -0,0 +1,47 @@
+# $Id$
+#
+# Copyright (C) 2008-2009
+# ASTRON (Netherlands Foundation for Research in Astronomy)
+# P.O.Box 2, 7990 AA Dwingeloo, The Netherlands, seg@astron.nl
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+# Try to find readline, a library for easy editing of command lines.
+#
+# This will define:
+#  
+#  READLINE_FOUND        - system has Readline
+#  READLINE_INCLUDE_DIR  - the Readline include directory (cached)
+#  READLINE_INCLUDE_DIRS - the Readline include directories
+#                           (identical to READLINE_INCLUDE_DIR)
+#  READLINE_LIBRARY      - the Readline library (cached)
+#  READLINE_LIBRARIES    - the Readline libraries
+#                           (identical to READLINE_LIBRARY)
+
+if(NOT READLINE_FOUND)
+
+  find_path(READLINE_INCLUDE_DIR readline/readline.h)
+  find_library(READLINE_LIBRARY readline)
+  find_library(NCURSES_LIBRARY ncurses)   # readline depends on libncurses
+  mark_as_advanced(READLINE_INCLUDE_DIR READLINE_LIBRARY NCURSES_LIBRARY)
+
+  include(FindPackageHandleStandardArgs)
+  find_package_handle_standard_args(Readline DEFAULT_MSG
+    READLINE_LIBRARY NCURSES_LIBRARY READLINE_INCLUDE_DIR)
+
+  set(READLINE_INCLUDE_DIRS ${READLINE_INCLUDE_DIR})
+  set(READLINE_LIBRARIES ${READLINE_LIBRARY} ${NCURSES_LIBRARY})
+
+endif(NOT READLINE_FOUND)
diff --git a/CMake/variants/variants.dop131 b/CMake/variants/variants.dop131
index c7a7dc7fe6e..7a2c77f7608 100644
--- a/CMake/variants/variants.dop131
+++ b/CMake/variants/variants.dop131
@@ -1,42 +1,5 @@
-## -*- CMake -*-
-##
-## Host specific variants file. 
-## Settings in this file extend or override those in the global variants file.
-##
-## $Id$
+set(GNU_COMPILERS GNU_C GNU_CXX)
+set(GNU_C         /usr/bin/gcc)
+set(GNU_CXX       /usr/bin/g++)
 
-set(CMAKE_SYSTEM_NAME BlueGeneP)
-
-# Define compiler suites.
-set(LOFAR_COMPILER_SUITES
-  GNUBGP
-)
-
-# Define build variants.
-set(LOFAR_BUILD_VARIANTS
-  CN
-  ION
-)
-
-# GNU BG/P compiler suite
-set(GNUBGP_COMPILERS GNUBGP_C GNUBGP_CXX)# GNUBGP_ASM)
-set(GNUBGP_C         /usr/bin/gcc)
-set(GNUBGP_CXX       /usr/bin/g++)
-#set(GNUBGP_ASM       /usr/bin/as)
-
-set(GNUBGP_C_FLAGS)
-set(GNUBGP_C_FLAGS_DEBUG "-g")
-set(GNUBGP_C_FLAGS_OPT "-g -O2")
-set(GNUBGP_CXX_FLAGS "-W -Wall -Woverloaded-virtual -Wno-unknown-pragmas")
-set(GNUBGP_CXX_FLAGS_DEBUG "-g")
-set(GNUBGP_CXX_FLAGS_OPT "-g -O2")
-set(GNUBGP_EXE_LINKER_FLAGS)
-set(GNUBGP_EXE_LINKER_FLAGS_CN)
-set(GNUBGP_EXE_LINKER_FLAGS_ION)
-set(GNUBGP_COMPILE_DEFINITIONS 
-  -B/bgsys/drivers/ppcfloor/gnu-linux/powerpc-bgp-linux/bin
-  -DHAVE_BGP
-  -I/bgsys/drivers/ppcfloor/comm/include
-  -I/bgsys/drivers/ppcfloor/arch/include)
-set(GNUBGP_COMPILE_DEFINITIONS_CN -DHAVE_BGP_CN)
-set(GNUBGP_COMPILE_DEFINITIONS_ION -DHAVE_BGP_ION)
+set(ENABLE_LIB64 TRUE)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 877fed0fe62..4550bc1b007 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -37,8 +37,8 @@ include(LofarGeneral)
 add_subdirectory(LCS)
 #add_subdirectory(CEP)
 #add_subdirectory(RTCP)
-add_subdirectory(SAS)
-add_subdirectory(MAC)
+#add_subdirectory(SAS)
+#add_subdirectory(MAC)
 
 ## ---------------------------------------------------------------------------
 ## Generate configuration header file.
diff --git a/LCS/ACC/PLC/lofar_config.h.cmake b/LCS/ACC/PLC/lofar_config.h.cmake
deleted file mode 100644
index 673d4734cf1..00000000000
--- a/LCS/ACC/PLC/lofar_config.h.cmake
+++ /dev/null
@@ -1,30 +0,0 @@
-/* Generated by lofar_init.m4 */
-
-#ifndef LOFAR_CONFIG_H
-#define LOFAR_CONFIG_H
-
-#if defined(HAVE_CONFIG_H)
-#include <config.h>
-#endif
-
-#define HAVE_LOFAR_PLC 1
-
-#define LOFARLOGGER_PACKAGE "LCS.ACC.PLC"
-
-#if !defined(HAVE_BOOST)
-# define HAVE_BOOST 1
-#endif
-
-#if !defined(HAVE_READLINE)
-# define HAVE_READLINE 1
-#endif
-
-#if !defined(HAVE_TOOLS)
-# define HAVE_TOOLS 1
-#endif
-
-#if !defined(HAVE_AIPSPP)
-# define HAVE_AIPSPP 1
-#endif
-
-#endif
diff --git a/LCS/AMC/AMCBase/lofar_config.h.cmake b/LCS/AMC/AMCBase/lofar_config.h.cmake
deleted file mode 100644
index 2dc2cdc6b63..00000000000
--- a/LCS/AMC/AMCBase/lofar_config.h.cmake
+++ /dev/null
@@ -1,30 +0,0 @@
-/* Generated by lofar_init.m4 */
-
-#ifndef LOFAR_CONFIG_H
-#define LOFAR_CONFIG_H
-
-#if defined(HAVE_CONFIG_H)
-#include <config.h>
-#endif
-
-#define HAVE_LOFAR_AMCBASE 1
-
-#define LOFARLOGGER_PACKAGE "LCS.AMC.AMCBase"
-
-#if !defined(HAVE_BOOST)
-# define HAVE_BOOST 1
-#endif
-
-#if !defined(HAVE_READLINE)
-# define HAVE_READLINE 1
-#endif
-
-#if !defined(HAVE_TOOLS)
-# define HAVE_TOOLS 1
-#endif
-
-#if !defined(HAVE_AIPSPP)
-# define HAVE_AIPSPP 1
-#endif
-
-#endif
diff --git a/LCS/AMC/AMCImpl/lofar_config.h.cmake b/LCS/AMC/AMCImpl/lofar_config.h.cmake
deleted file mode 100644
index ab73eab5ab7..00000000000
--- a/LCS/AMC/AMCImpl/lofar_config.h.cmake
+++ /dev/null
@@ -1,30 +0,0 @@
-/* Generated by lofar_init.m4 */
-
-#ifndef LOFAR_CONFIG_H
-#define LOFAR_CONFIG_H
-
-#if defined(HAVE_CONFIG_H)
-#include <config.h>
-#endif
-
-#define HAVE_LOFAR_AMCIMPL 1
-
-#define LOFARLOGGER_PACKAGE "LCS.AMC.AMCImpl"
-
-#if !defined(HAVE_BOOST)
-# define HAVE_BOOST 1
-#endif
-
-#if !defined(HAVE_READLINE)
-# define HAVE_READLINE 1
-#endif
-
-#if !defined(HAVE_TOOLS)
-# define HAVE_TOOLS 1
-#endif
-
-#if !defined(HAVE_BLOB)
-# define HAVE_BLOB 1
-#endif
-
-#endif
diff --git a/LCS/ApplCommon/lofar_config.h.cmake b/LCS/ApplCommon/lofar_config.h.cmake
deleted file mode 100644
index 95025141795..00000000000
--- a/LCS/ApplCommon/lofar_config.h.cmake
+++ /dev/null
@@ -1,26 +0,0 @@
-/* Generated by lofar_init.m4 */
-
-#ifndef LOFAR_CONFIG_H
-#define LOFAR_CONFIG_H
-
-#if defined(HAVE_CONFIG_H)
-#include <config.h>
-#endif
-
-#define HAVE_LOFAR_APPLCOMMON 1
-
-#define LOFARLOGGER_PACKAGE "LCS.ApplCommon"
-
-#if !defined(HAVE_BOOST)
-# define HAVE_BOOST 1
-#endif
-
-#if !defined(HAVE_READLINE)
-# define HAVE_READLINE 1
-#endif
-
-#if !defined(HAVE_TOOLS)
-# define HAVE_TOOLS 1
-#endif
-
-#endif
diff --git a/LCS/ApplCommon/test/tObservation.sh b/LCS/ApplCommon/test/tObservation.sh
index fa5e6dfe61c..985cd896290 100755
--- a/LCS/ApplCommon/test/tObservation.sh
+++ b/LCS/ApplCommon/test/tObservation.sh
@@ -1,2 +1,2 @@
 #!/bin/sh
-./runctest.sh ./tObservation 2>&1 > tObservation.log
+./runctest.sh tObservation 2>&1 > tObservation.log
diff --git a/LCS/ApplCommon/test/tStationInfo.sh b/LCS/ApplCommon/test/tStationInfo.sh
new file mode 100755
index 00000000000..52987e54a1c
--- /dev/null
+++ b/LCS/ApplCommon/test/tStationInfo.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+./runctest.sh tStationInfo 2>&1 > tStationInfo.log
diff --git a/LCS/Blob/lofar_config.h.cmake b/LCS/Blob/lofar_config.h.cmake
deleted file mode 100644
index d1d3e4c70ee..00000000000
--- a/LCS/Blob/lofar_config.h.cmake
+++ /dev/null
@@ -1,26 +0,0 @@
-/* Generated by lofar_init.m4 */
-
-#ifndef LOFAR_CONFIG_H
-#define LOFAR_CONFIG_H
-
-#if defined(HAVE_CONFIG_H)
-#include <config.h>
-#endif
-
-#define HAVE_LOFAR_BLOB 1
-
-#define LOFARLOGGER_PACKAGE "LCS.Blob"
-
-#if !defined(HAVE_BOOST)
-# define HAVE_BOOST 1
-#endif
-
-#if !defined(HAVE_READLINE)
-# define HAVE_READLINE 1
-#endif
-
-#if !defined(HAVE_TOOLS)
-# define HAVE_TOOLS 1
-#endif
-
-#endif
diff --git a/LCS/Common/CMakeLists.txt b/LCS/Common/CMakeLists.txt
index 60726788227..6cd2c472115 100644
--- a/LCS/Common/CMakeLists.txt
+++ b/LCS/Common/CMakeLists.txt
@@ -39,6 +39,7 @@ lofar_add_package(${PROJECT_NAME} 3.1)
 ## ---------------------------------------------------------------------------
 include(LofarFindPackage)
 lofar_find_package(Boost)
+lofar_find_package(Readline)
 
 ## ---------------------------------------------------------------------------
 ## Generate configuration header file.
diff --git a/LCS/Common/include/Common/CMakeLists.txt b/LCS/Common/include/Common/CMakeLists.txt
index 05c7981c301..c98a0af1057 100644
--- a/LCS/Common/include/Common/CMakeLists.txt
+++ b/LCS/Common/include/Common/CMakeLists.txt
@@ -36,6 +36,7 @@ set(inst_HEADERS
   hexdump.h
   i4complex.h
   KVpair.h
+  Lock.h
   lofar_algorithm.h
   lofar_bitset.h
   LofarConstants.h
@@ -73,6 +74,7 @@ set(inst_HEADERS
   ParameterSetImpl.h
   PrettyUnits.h
   Process.h
+  ReadLine.h
   RunOnNode.h
   Semaphore.h
   Singleton.h
diff --git a/LCS/Common/lofar_config.h.cmake b/LCS/Common/lofar_config.h.cmake
deleted file mode 100644
index 54c643dae09..00000000000
--- a/LCS/Common/lofar_config.h.cmake
+++ /dev/null
@@ -1,148 +0,0 @@
-/* config.h.cmake.  [LOFAR.LCS.Common].  */
-
-/* Define if building universal (internal helper macro) */
-#cmakedefine AC_APPLE_UNIVERSAL_BUILD 1
-
-/* Define as __PRETTY_FUNCTION__, __FUNCTION__, or "<unknown>" */
-#cmakedefine AUTO_FUNCTION_NAME
-
-/* Define if DbgAssert is enabled */
-#cmakedefine ENABLE_DBGASSERT 1
-
-/* Define if TRACER is enabled */
-#cmakedefine ENABLE_TRACER 1
-
-/* Define if backtrace() is available */
-#cmakedefine HAVE_BACKTRACE 1
-
-/* Define if libbfd is available */
-#cmakedefine HAVE_BFD 1
-
-/* Define if MPICH is installed */
-#cmakedefine HAVE_BGLMPICH 1
-
-/* Define if BOOST is installed */
-#cmakedefine HAVE_BOOST 1
-
-/* Define to 1 if you have the `cplus_demangle' function. */
-#cmakedefine HAVE_CPLUS_DEMANGLE 1
-
-/* Define to 1 if you have the <dlfcn.h> header file. */
-#cmakedefine HAVE_DLFCN_H 1
-
-/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
-#cmakedefine HAVE_DOPRNT 1
-
-/* Define to 1 if you have the <inttypes.h> header file. */
-#cmakedefine HAVE_INTTYPES_H 1
-
-/* Define if LAM is installed */
-#cmakedefine HAVE_LAM 1
-
-/* Define if LOG4CPLUS is installed */
-#cmakedefine HAVE_LOG4CPLUS 1
-
-/* Define if LOG4CXX is installed */
-#cmakedefine HAVE_LOG4CXX 1
-
-/* Define if `long long' is supported */
-#cmakedefine HAVE_LONG_LONG 1
-
-/* Define to 1 if you have the <memory.h> header file. */
-#cmakedefine HAVE_MEMORY_H 1
-
-/* Define if we have an MPI implementation installed */
-#cmakedefine HAVE_MPI 1
-
-/* Define if MPICH is installed */
-#cmakedefine HAVE_MPICH 1
-
-/* Define if MPI profiler should be enabled */
-#cmakedefine HAVE_MPI_PROFILER 1
-
-/* Define if using Rational Purify */
-#cmakedefine HAVE_PURIFY 1
-
-/* Define if ScaMPI is installed */
-#cmakedefine HAVE_SCAMPI 1
-
-/* Defined if shared memory is used */
-#cmakedefine HAVE_SHMEM 1
-
-/* Define to 1 if you have the <stdint.h> header file. */
-#cmakedefine HAVE_STDINT_H 1
-
-/* Define to 1 if you have the <stdlib.h> header file. */
-#cmakedefine HAVE_STDLIB_H 1
-
-/* Define to 1 if you have the <strings.h> header file. */
-#cmakedefine HAVE_STRINGS_H 1
-
-/* Define to 1 if you have the <string.h> header file. */
-#cmakedefine HAVE_STRING_H 1
-
-/* Define to 1 if you have the <sys/stat.h> header file. */
-#cmakedefine HAVE_SYS_STAT_H 1
-
-/* Define to 1 if you have the <sys/types.h> header file. */
-#cmakedefine HAVE_SYS_TYPES_H 1
-
-/* Define if TOOLS is installed */
-#cmakedefine HAVE_TOOLS 1
-
-/* Define if `uint' is supported */
-#cmakedefine HAVE_UINT 1
-
-/* Define if `ulong' is supported */
-#cmakedefine HAVE_ULONG 1
-
-/* Define to 1 if you have the <unistd.h> header file. */
-#cmakedefine HAVE_UNISTD_H 1
-
-/* Define if `ushort' is supported */
-#cmakedefine HAVE_USHORT 1
-
-/* Define to 1 if you have the `vprintf' function. */
-#cmakedefine HAVE_VPRINTF 1
-
-/* Define if we are compiling with debugging information */
-#cmakedefine LOFAR_DEBUG 1
-
-/* Define to the sub-directory in which libtool stores uninstalled libraries.
-   */
-#cmakedefine LT_OBJDIR 1
-
-/* Define to the address where bug reports for this package should be sent. */
-#cmakedefine PACKAGE_BUGREPORT 1
-
-/* Define to the full name of this package. */
-#cmakedefine PACKAGE_NAME 1
-
-/* Define to the full name and version of this package. */
-#cmakedefine PACKAGE_STRING 1
-
-/* Define to the one symbol short name of this package. */
-#cmakedefine PACKAGE_TARNAME 1
-
-/* Define to the version of this package. */
-#cmakedefine PACKAGE_VERSION 1
-
-/* Define RPM release nr */
-#cmakedefine RPM_RELEASE 1
-
-/* Define to 1 if you have the ANSI C header files. */
-#cmakedefine STDC_HEADERS 1
-
-/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
-   significant byte first (like Motorola and SPARC, unlike Intel). */
-#cmakedefine WORDS_BIGENDIAN 1
-
-/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a
-   `char[]'. */
-#cmakedefine YYTEXT_POINTER 1
-
-/* Define to empty if `const' does not conform to ANSI C. */
-#cmakedefine const 1
-
-/* Define to `unsigned int' if <sys/types.h> does not define. */
-#cmakedefine size_t 1
diff --git a/LCS/Common/src/CMakeLists.txt b/LCS/Common/src/CMakeLists.txt
index 678fd44d621..1cb2220526f 100644
--- a/LCS/Common/src/CMakeLists.txt
+++ b/LCS/Common/src/CMakeLists.txt
@@ -28,6 +28,7 @@ set(common_LIB_SRCS
   FileLocator.cc
   hexdump.cc
   KVpair.cc
+  Lock.cc
   lofar_bitset.cc
   LofarLogCout.cc
   LofarLogger.cc
@@ -37,6 +38,7 @@ set(common_LIB_SRCS
   ParameterValue.cc
   PrettyUnits.cc
   Process.cc
+  ReadLine.cc
   RunOnNode.cc
   Stopwatch.cc
   StreamUtil.cc
diff --git a/LCS/Common/test/CMakeLists.txt b/LCS/Common/test/CMakeLists.txt
index 37c99fb5ae8..ca6b124b4a7 100644
--- a/LCS/Common/test/CMakeLists.txt
+++ b/LCS/Common/test/CMakeLists.txt
@@ -27,21 +27,21 @@ lofar_add_test(tFileLocator tFileLocator.cc)
 lofar_add_test(tStringUtil tStringUtil.cc)
 lofar_add_test(tStreamUtil tStreamUtil.cc)
 lofar_add_test(tHexdump tHexdump.cc)
-#lofar_add_test(testSocket testSocket.cc)
+lofar_add_test(testSocket testSocket.cc)
 lofar_add_test(tComplex tComplex.cc)
-#lofar_add_test(tProcess tProcess.cc)
+lofar_add_test(tProcess tProcess.cc)
 lofar_add_test(tRunOnNode tRunOnNode.cc)
 lofar_add_test(tTimer tTimer.cc)
-#lofar_add_test(tNumeric tNumeric.cc)
+lofar_add_test(tNumeric tNumeric.cc)
 lofar_add_test(tSingleton tSingleton.cc)
 lofar_add_test(tObjectFactory tObjectFactory.cc Shapes.cc Coordinates.cc)
-#lofar_add_test(tSystemUtil tSystemUtil.cc)
-#lofar_add_test(tSaxpy tSaxpy.cc)
+lofar_add_test(tSystemUtil tSystemUtil.cc)
+lofar_add_test(tSaxpy tSaxpy.cc)
 lofar_add_test(tPrettyUnits tPrettyUnits.cc)
 lofar_add_test(tParameterValue tParameterValue.cc)
 lofar_add_test(tParameterSet tParameterSet.cc)
 lofar_add_test(tParameterSetPerf tParameterSetPerf.cc)
-lofar_add_test(tBacktrace tBacktrace.cc)
-
 add_test(tgetparsetvalue ${CMAKE_CURRENT_SOURCE_DIR}/tgetparsetvalue.sh)
-#lofar_add_test(tReadLine tReadLine.cc)
+#add_dependencies(tgetparsetvalue getparsetvalue)
+lofar_add_test(tBacktrace tBacktrace.cc)
+lofar_add_test(tReadLine tReadLine.cc)
diff --git a/LCS/Stream/include/Stream/Package__Version.h b/LCS/Stream/include/Stream/Package__Version.h
index 8a0dc08cd0a..fbfe38a9f45 100644
--- a/LCS/Stream/include/Stream/Package__Version.h
+++ b/LCS/Stream/include/Stream/Package__Version.h
@@ -1,4 +1,4 @@
-//# Get revision info; generated by autoconf_share/makeversion
+//# Get revision info; generated by CMake/makeversion
 
 #ifndef LOFAR_STREAM_PACKAGE__VERSION_H
 #define LOFAR_STREAM_PACKAGE__VERSION_H
@@ -15,7 +15,7 @@ namespace LOFAR {
 
     // Get the version number of the package (as given in repository).
     static std::string getVersion();
-    // Get the svn version number of the package according to configure.in.
+    // Get the svn version number of the package according to CMakeLists.txt.
     static std::string getConfVersion();
     // Get the global revision number of the package.
     static std::string getRevision();
diff --git a/LCS/Stream/lofar_config.h.cmake b/LCS/Stream/lofar_config.h.cmake
deleted file mode 100644
index 131dbe77dfc..00000000000
--- a/LCS/Stream/lofar_config.h.cmake
+++ /dev/null
@@ -1,26 +0,0 @@
-/* Generated by lofar_init.m4 */
-
-#ifndef LOFAR_CONFIG_H
-#define LOFAR_CONFIG_H
-
-#if defined(HAVE_CONFIG_H)
-#include <config.h>
-#endif
-
-#define HAVE_LOFAR_STREAM 1
-
-#define LOFARLOGGER_PACKAGE "LCS.Stream"
-
-#if !defined(HAVE_BOOST)
-# define HAVE_BOOST 1
-#endif
-
-#if !defined(HAVE_READLINE)
-# define HAVE_READLINE 1
-#endif
-
-#if !defined(HAVE_TOOLS)
-# define HAVE_TOOLS 1
-#endif
-
-#endif
diff --git a/LCS/Tools/src/CMakeLists.txt b/LCS/Tools/src/CMakeLists.txt
index 62320016edb..044a2918331 100644
--- a/LCS/Tools/src/CMakeLists.txt
+++ b/LCS/Tools/src/CMakeLists.txt
@@ -28,14 +28,21 @@ install(TARGETS
 
 install(PROGRAMS
   checkrun
+  countalllines
+  countlines
+  countpurecode
+  countpurecodecomm
+  fillreview
   finddep
   lofarcvsmv
   lofarcvsx
+  makecov
   makedoc
   makedep.sh
   makeClass.py
   makePackage.py
   makeTest.py
+  processgcov
   DESTINATION sbin)
 
 install(FILES
diff --git a/LCS/Tools/src/Makefile.am b/LCS/Tools/src/Makefile.am
index c8b4228cc06..a41174f60e9 100644
--- a/LCS/Tools/src/Makefile.am
+++ b/LCS/Tools/src/Makefile.am
@@ -42,7 +42,7 @@ dist_template_DATA  = templates/header.cc_template \
 # They have to be sourced; fill in the correct path. 
 install-data-local:
 	@for FIL in lofarinit.sh lofarinit.csh; do \
-	  sed -e "s%\. #filled in by install%$(prefix)%" $(srcdir)/$$FIL > $$FIL.tmp; \
+	  sed -e "s%[@]prefix[@]%$(prefix)%" $(srcdir)/$$FIL.in > $$FIL.tmp; \
 	  echo "$(INSTALL_DATA) $$FIL.tmp $(prefix)/$$FIL"; \
 	  $(INSTALL_DATA) $$FIL.tmp $(prefix)/$$FIL; \
 	  $(RM) $$FIL.tmp; \
diff --git a/LCS/Tools/src/lofarinit.csh.in b/LCS/Tools/src/lofarinit.csh.in
index fa4c1dc46d6..eb56a3140c9 100644
--- a/LCS/Tools/src/lofarinit.csh.in
+++ b/LCS/Tools/src/lofarinit.csh.in
@@ -26,7 +26,7 @@
 # Define root here.
 # This is a placeholder, so do NOT change the line.
 # The actual value is filled in by make install (see Makefile.am).
-set a_root=@CMAKE_INSTALL_PREFIX@
+set a_root=@prefix@        # lfr_root=@CMAKE_INSTALL_PREFIX@
 
 # Get python version.
 set a_pyv=`python -V |& cat --`
diff --git a/LCS/Tools/src/lofarinit.sh.in b/LCS/Tools/src/lofarinit.sh.in
index 9626d6366cb..10fb6cfc5f5 100644
--- a/LCS/Tools/src/lofarinit.sh.in
+++ b/LCS/Tools/src/lofarinit.sh.in
@@ -26,7 +26,7 @@
 # Define root here.
 # This is a placeholder, so do NOT change the line.
 # The actual value is filled in by make install (see Makefile.am).
-lfr_root=@CMAKE_INSTALL_PREFIX@
+lfr_root=@prefix@        # lfr_root=@CMAKE_INSTALL_PREFIX@
 
 # Get python version.
 a_pyv=`python -V 2>&1`
diff --git a/LCS/Transport/lofar_config.h.cmake b/LCS/Transport/lofar_config.h.cmake
deleted file mode 100644
index c21b6434257..00000000000
--- a/LCS/Transport/lofar_config.h.cmake
+++ /dev/null
@@ -1,30 +0,0 @@
-/* Generated by lofar_init.m4 */
-
-#ifndef LOFAR_CONFIG_H
-#define LOFAR_CONFIG_H
-
-#if defined(HAVE_CONFIG_H)
-#include <config.h>
-#endif
-
-#define HAVE_LOFAR_TRANSPORT 1
-
-#define LOFARLOGGER_PACKAGE "LCS.Transport"
-
-#if !defined(HAVE_BOOST)
-# define HAVE_BOOST 1
-#endif
-
-#if !defined(HAVE_READLINE)
-# define HAVE_READLINE 1
-#endif
-
-#if !defined(HAVE_TOOLS)
-# define HAVE_TOOLS 1
-#endif
-
-#if !defined(HAVE_AIPSPP)
-# define HAVE_AIPSPP 1
-#endif
-
-#endif
diff --git a/LCS/config.h.cmake b/LCS/config.h.cmake
deleted file mode 100644
index 7e6c5886db1..00000000000
--- a/LCS/config.h.cmake
+++ /dev/null
@@ -1,148 +0,0 @@
-/* config.h.in.  Generated from configure.in by autoheader.  */
-
-/* Define if building universal (internal helper macro) */
-#cmakedefine AC_APPLE_UNIVERSAL_BUILD 1
-
-/* Define as __PRETTY_FUNCTION__, __FUNCTION__, or "<unknown>" */
-#define AUTO_FUNCTION_NAME __PRETTY_FUNCTION__
-
-/* Define if DbgAssert is enabled */
-#cmakedefine ENABLE_DBGASSERT 1
-
-/* Define if TRACER is enabled */
-#cmakedefine ENABLE_TRACER 1
-
-/* Define if backtrace() is available */
-#cmakedefine HAVE_BACKTRACE 1
-
-/* Define if libbfd is available */
-#cmakedefine HAVE_BFD 1
-
-/* Define if MPICH is installed */
-#cmakedefine HAVE_BGLMPICH 1
-
-/* Define if BOOST is installed */
-#cmakedefine HAVE_BOOST 1
-
-/* Define to 1 if you have the `cplus_demangle' function. */
-#cmakedefine HAVE_CPLUS_DEMANGLE 1
-
-/* Define to 1 if you have the <dlfcn.h> header file. */
-#cmakedefine HAVE_DLFCN_H 1
-
-/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
-#cmakedefine HAVE_DOPRNT 1
-
-/* Define to 1 if you have the <inttypes.h> header file. */
-#cmakedefine HAVE_INTTYPES_H 1
-
-/* Define if LAM is installed */
-#cmakedefine HAVE_LAM 1
-
-/* Define if LOG4CPLUS is installed */
-#cmakedefine HAVE_LOG4CPLUS 1
-
-/* Define if LOG4CXX is installed */
-#cmakedefine HAVE_LOG4CXX 1
-
-/* Define if `long long' is supported */
-#cmakedefine HAVE_LONG_LONG 1
-
-/* Define to 1 if you have the <memory.h> header file. */
-#cmakedefine HAVE_MEMORY_H 1
-
-/* Define if we have an MPI implementation installed */
-#cmakedefine HAVE_MPI 1
-
-/* Define if MPICH is installed */
-#cmakedefine HAVE_MPICH 1
-
-/* Define if MPI profiler should be enabled */
-#cmakedefine HAVE_MPI_PROFILER 1
-
-/* Define if using Rational Purify */
-#cmakedefine HAVE_PURIFY 1
-
-/* Define if ScaMPI is installed */
-#cmakedefine HAVE_SCAMPI 1
-
-/* Defined if shared memory is used */
-#cmakedefine HAVE_SHMEM 1
-
-/* Define to 1 if you have the <stdint.h> header file. */
-#cmakedefine HAVE_STDINT_H 1
-
-/* Define to 1 if you have the <stdlib.h> header file. */
-#cmakedefine HAVE_STDLIB_H 1
-
-/* Define to 1 if you have the <strings.h> header file. */
-#cmakedefine HAVE_STRINGS_H 1
-
-/* Define to 1 if you have the <string.h> header file. */
-#cmakedefine HAVE_STRING_H 1
-
-/* Define to 1 if you have the <sys/stat.h> header file. */
-#cmakedefine HAVE_SYS_STAT_H 1
-
-/* Define to 1 if you have the <sys/types.h> header file. */
-#cmakedefine HAVE_SYS_TYPES_H 1
-
-/* Define if TOOLS is installed */
-#cmakedefine HAVE_TOOLS 1
-
-/* Define if `uint' is supported */
-#cmakedefine HAVE_UINT 1
-
-/* Define if `ulong' is supported */
-#cmakedefine HAVE_ULONG 1
-
-/* Define to 1 if you have the <unistd.h> header file. */
-#cmakedefine HAVE_UNISTD_H 1
-
-/* Define if `ushort' is supported */
-#cmakedefine HAVE_USHORT 1
-
-/* Define to 1 if you have the `vprintf' function. */
-#cmakedefine HAVE_VPRINTF 1
-
-/* Define if we are compiling with debugging information */
-#cmakedefine LOFAR_DEBUG 1
-
-/* Define to the sub-directory in which libtool stores uninstalled libraries.
-   */
-#cmakedefine LT_OBJDIR 1
-
-/* Define to the address where bug reports for this package should be sent. */
-#cmakedefine PACKAGE_BUGREPORT 1
-
-/* Define to the full name of this package. */
-#cmakedefine PACKAGE_NAME 1
-
-/* Define to the full name and version of this package. */
-#cmakedefine PACKAGE_STRING 1
-
-/* Define to the one symbol short name of this package. */
-#cmakedefine PACKAGE_TARNAME 1
-
-/* Define to the version of this package. */
-#cmakedefine PACKAGE_VERSION 1
-
-/* Define RPM release nr */
-#cmakedefine RPM_RELEASE 1
-
-/* Define to 1 if you have the ANSI C header files. */
-#cmakedefine STDC_HEADERS 1
-
-/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
-   significant byte first (like Motorola and SPARC, unlike Intel). */
-#cmakedefine WORDS_BIGENDIAN 1
-
-/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a
-   `char[]'. */
-#cmakedefine YYTEXT_POINTER 1
-
-/* Define to empty if `const' does not conform to ANSI C. */
-#cmakedefine const 1
-
-/* Define to `unsigned int' if <sys/types.h> does not define. */
-#cmakedefine size_t 1
diff --git a/lofar_config.h.cmake b/lofar_config.h.cmake
index ce993c1b89e..8ec12ee4071 100644
--- a/lofar_config.h.cmake
+++ b/lofar_config.h.cmake
@@ -24,6 +24,12 @@
 /* Define if BOOST is installed */
 #cmakedefine HAVE_BOOST 1
 
+/* Define if BOOST component regex is installed */
+#cmakedefine HAVE_BOOST_REGEX 1
+
+/* Define if BOOST component date_time is installed */
+#cmakedefine HAVE_BOOST_DATE_TIME 1
+
 /* Define to 1 if you have the `cplus_demangle' function. */
 #cmakedefine HAVE_CPLUS_DEMANGLE 1
 
-- 
GitLab