Browse Source

new out of place builds

Ken Martin 24 years ago
parent
commit
619864c09e
6 changed files with 26 additions and 570 deletions
  1. 0 29
      CMakeSystemConfig.cmake.in
  2. 7 5
      Source/Makefile.in
  3. 1 14
      Source/cmMakefile.cxx
  4. 12 19
      Source/cmUnixMakefileGenerator.cxx
  5. 6 0
      Source/cmake.cxx
  6. 0 503
      configure.in.sample

+ 0 - 29
CMakeSystemConfig.cmake.in

@@ -1,29 +0,0 @@
-# 
-# CMakeLocal.make.in should be in the directory where you run configure
-# in, which need not be the source directory
-#
-SET (CMAKE_WORDS_BIGENDIAN    @CMAKE_WORDS_BIGENDIAN@ )
-SET (CMAKE_USE_SPROC          @CMAKE_USE_SPROC@ CACHE_NO_REPLACE BOOL)
-SET (CMAKE_USE_PTHREADS       @CMAKE_USE_PTHREADS@ CACHE_NO_REPLACE BOOL)
-SET (CMAKE_HP_PTHREADS        @CMAKE_HP_PTHREADS@ CACHE_NO_REPLACE BOOL)
-SET (CMAKE_LIB_EXT            @CMAKE_LIB_EXT@ CACHE_NO_REPLACE )
-SET (CMAKE_RANLIB             "@RANLIB@" CACHE_NO_REPLACE )
-SET (CMAKE_AR                 "@CMAKE_AR@" CACHE_NO_REPLACE )
-SET (CMAKE_CXX_COMPILER       "@CXX@" CACHE_NO_REPLACE FILEPATH)
-SET (CMAKE_CXX_FLAGS          "@CXXFLAGS@" CACHE_NO_REPLACE )
-SET (CMAKE_TEMPLATE_FLAGS     "@CMAKE_TEMPLATE_FLAGS@" CACHE_NO_REPLACE )
-SET (CMAKE_C_COMPILER         "@CC@" CACHE_NO_REPLACE FILEPATH)
-SET (CMAKE_C_FLAGS            "@CFLAGS@" CACHE_NO_REPLACE )
-SET (CMAKE_SHLIB_CFLAGS       "@CMAKE_SHLIB_CFLAGS@" CACHE_NO_REPLACE )
-SET (CMAKE_SHLIB_BUILD_FLAGS  "@CMAKE_SHLIB_BUILD_FLAGS@" CACHE_NO_REPLACE )
-SET (CMAKE_SHLIB_SUFFIX       @CMAKE_SHLIB_SUFFIX@ CACHE_NO_REPLACE )
-SET (CMAKE_THREAD_LIBS        "@CMAKE_THREAD_LIBS@" CACHE_NO_REPLACE )
-SET (CMAKE_DL_LIBS            "@CMAKE_DL_LIBS@" CACHE_NO_REPLACE )
-SET (CMAKE_SHLIB_LINK_FLAGS   "@CMAKE_SHLIB_LINK_FLAGS@" CACHE_NO_REPLACE )
-SET (CMAKE_SHLIB_LD_LIBS      "@CMAKE_SHLIB_LD_LIBS@" CACHE_NO_REPLACE )
-SET (CMAKE_SHLIB_LD_LIBS      "@CMAKE_SHLIB_LD_LIBS@" CACHE_NO_REPLACE_NO_REPLACE )
-# support for X11
-SET (CMAKE_X_LIBS             "@X_PRE_LIBS@ @X_LIBS@ -lX11 @X_EXTRA_LIBS@" CACHE_NO_REPLACE )
-SET (CMAKE_X_CFLAGS           "@X_CFLAGS@" CACHE_NO_REPLACE)
-SET (CMAKE_HAS_X              "@CMAKE_HAS_X@" CACHE_NO_REPLACE)
-

+ 7 - 5
Source/Makefile.in

@@ -7,12 +7,14 @@ CXXFLAGS      = -DCMAKE_ROOT_DIR='"@CMAKE_ROOT_DIR@"' @CXXFLAGS@ -DCMAKE_HAS_AUT
 
 .SUFFIXES: .cxx .java .class
 
+all: cmake
+
 .cxx.o:
 	${CXX} ${CXXFLAGS} -c $< -o $@
 
 
 OBJS = \
-CMakeBuildTargets.o  \
+cmake.o  \
 cmMakeDepend.o \
 cmMakefile.o \
 cmMakefileGenerator.o \
@@ -28,10 +30,10 @@ cmCacheManager.o \
 cmCableClassSet.o \
 cmSourceGroup.o
 
-DEPENDS = $(srcdir)/*.h  ${CMAKE_CONFIG_DIR}/CMake/Source/cmConfigure.h
+DEPENDS = $(srcdir)/*.h  cmConfigure.h
 
 cmCollectFlags.o : $(DEPENDS)
-CMakeBuildTargets.o  : $(DEPENDS)
+cmake.o  : $(DEPENDS)
 cmMakeDepend.o : $(DEPENDS)
 cmMakefile.o : $(DEPENDS)
 cmMakefileGenerator.o : $(DEPENDS)
@@ -49,6 +51,6 @@ cmSourceGroup.o : $(DEPENDS)
 
 
 
-CMakeBuildTargets: ${OBJS}
-	${CXX} ${OBJS} ${CXX_FLAGS}  -o CMakeBuildTargets
+cmake: ${OBJS}
+	${CXX} ${OBJS} ${CXX_FLAGS}  -o cmake
 

+ 1 - 14
Source/cmMakefile.cxx

@@ -64,13 +64,6 @@ cmMakefile::cmMakefile()
   this->AddDefaultCommands();
   this->AddDefaultDefinitions();
   cmCacheManager::GetInstance()->DefineCache(this);
-#if defined(_WIN32) && !defined(__CYGWIN__)
-  const char* cacheValue
-    = cmCacheManager::GetInstance()->GetCacheValue("CMAKE_ROOT");
-  std::string fpath = cacheValue;
-  fpath += "/Templates/CMakeWindowsSystemConfig.cmake";
-  this->ReadListFile(NULL,fpath.c_str());
-#endif
 }
 
 void cmMakefile::AddDefaultCommands()
@@ -346,6 +339,7 @@ void cmMakefile::SetMakefileGenerator(cmMakefileGenerator* mf)
 {
   delete m_MakefileGenerator;
   m_MakefileGenerator = mf;
+  mf->SetMakefile(this);
 }
 
   // Generate the output file
@@ -353,8 +347,6 @@ void cmMakefile::GenerateMakefile()
 {
   // do all the variable expansions here
   this->ExpandVariables();
-  // set the makefile on the generator
-  m_MakefileGenerator->SetMakefile(this);
   // give all the commands a chance to do something
   // after the file has been parsed before generation
   for(std::vector<cmCommand*>::iterator i = m_UsedCommands.begin();
@@ -868,11 +860,6 @@ void cmMakefile::SetHomeOutputDirectory(const char* lib)
   m_HomeOutputDirectory = lib;
   cmSystemTools::ConvertToUnixSlashes(m_HomeOutputDirectory);
   this->AddDefinition("CMAKE_BINARY_DIR", this->GetHomeOutputDirectory());
-#if !defined(_WIN32) || defined(__CYGWIN__)
-  std::string fpath = lib;
-  fpath += "/CMakeSystemConfig.cmake";
-  this->ReadListFile(NULL,fpath.c_str());
-#endif
 }
 
 

+ 12 - 19
Source/cmUnixMakefileGenerator.cxx

@@ -517,7 +517,8 @@ OutputSubDirectoryVars(std::ostream& fout,
     fout << target << "_" << subdir.c_str() << ":\n";
     if(target1)
       {
-      fout << "\tcd " << SubDirectories[i].c_str()
+	fout << "\tif test ! -d " << SubDirectories[i].c_str() << "; then ${MAKE} rebuild_cache; fi\n"
+	  "\tcd " << SubDirectories[i].c_str()
            << "; ${MAKE} -${MAKEFLAGS} " << target1 << "\n";
       }
     if(target2)
@@ -802,43 +803,35 @@ void cmUnixMakefileGenerator::OutputMakeRules(std::ostream& fout)
                        "Rule to build the Makefile",
                        "Makefile",
                        "${CMAKE_COMMAND} ${CMAKE_MAKEFILE_SOURCES} ",
-                       "${CMAKE_COMMAND} ${CMAKE_CURRENT_SOURCE}/CMakeLists.txt "
+                       "${CMAKE_COMMAND} "
                        "-S${CMAKE_CURRENT_SOURCE} -O${CMAKE_CURRENT_BINARY} "
                        "-H${CMAKE_SOURCE_DIR} -B${CMAKE_BINARY_DIR}");  
   this->OutputMakeRule(fout, 
                        "Rule to build the cmake.depends",
                        "cmake.depends",
                        "${CMAKE_COMMAND} ${CMAKE_MAKEFILE_SOURCES} ",
-                       "${CMAKE_COMMAND} ${CMAKE_CURRENT_SOURCE}/CMakeLists.txt "
+                       "${CMAKE_COMMAND} "
                        "-S${CMAKE_CURRENT_SOURCE} -O${CMAKE_CURRENT_BINARY} "
                        "-H${CMAKE_SOURCE_DIR} -B${CMAKE_BINARY_DIR}");
   this->OutputMakeRule(fout, 
                        "Rule to force the build of cmake.depends",
                        "depend",
                        "${SUBDIR_DEPEND}",
-                       "${CMAKE_COMMAND} ${CMAKE_CURRENT_SOURCE}/CMakeLists.txt "
+                       "${CMAKE_COMMAND} "
                        "-S${CMAKE_CURRENT_SOURCE} -O${CMAKE_CURRENT_BINARY} "
                        "-H${CMAKE_SOURCE_DIR} -B${CMAKE_BINARY_DIR}");  
-
-  this->OutputMakeRule(fout, 
-		       "rule to build cmake from source",
-		       "${CMAKE_COMMAND}", "${CMAKE_SOURCE_DIR}/CMake/Source/*.cxx "
-		       "${CMAKE_SOURCE_DIR}/CMake/Source/*.h",
-		       "cd ${CMAKE_BINARY_DIR}/CMake/Source; "
-		       "${MAKE} CMakeBuildTargets");
   this->OutputMakeRule(fout, 
                        "Rebuild the cache",
                        "rebuild_cache",
                        "${CMAKE_BINARY_DIR}/CMakeCache.txt",
-                       "${CMAKE_COMMAND} ${CMAKE_SOURCE_DIR}/CMakeLists.txt "
-                       "-MakeCache -S${CMAKE_SOURCE_DIR} -O${CMAKE_BINARY_DIR} "
+                       "${CMAKE_COMMAND} "
                        "-H${CMAKE_SOURCE_DIR} -B${CMAKE_BINARY_DIR}");
-  //  this->OutputMakeRule(fout, 
-  //                     "Rebuild cmake dummy rule",
-  //                     "${CMAKE_COMMAND}",
-  //                     0,
-  //                     "echo \"cmake might be out of date\"");
-    
+  this->OutputMakeRule(fout, 
+                       "Rebuild cmake dummy rule",
+                       "${CMAKE_COMMAND}",
+                       0,
+                       "echo \"cmake might be out of date\"");
+  
 }
 
 void cmUnixMakefileGenerator::OutputMakeRule(std::ostream& fout, 

+ 6 - 0
Source/cmake.cxx

@@ -134,6 +134,12 @@ void cmake::SetArgs(cmMakefile& builder, int ac, char** av)
 	m_Verbose = true;
       }
     }
+  
+  if (!m_Local)
+    {
+    builder.SetStartDirectory(builder.GetHomeDirectory());
+    builder.SetStartOutputDirectory(builder.GetHomeOutputDirectory());
+    }
 }
 
 // at the end of this CMAKE_ROOT and CMAAKE_COMMAND should be added to the cache

+ 0 - 503
configure.in.sample

@@ -1,503 +0,0 @@
-# Process this file with autoconf to produce a configure script.
-AC_INIT()
-
-AC_CONFIG_HEADER(CMake/Source/cmConfigure.h)
-
-CMAKE_CONFIG_DIR=`pwd`
-AC_SUBST(CMAKE_CONFIG_DIR)
-
-#
-# check for some programs we use
-#
-AC_PROG_CC
-AC_PROG_CXX
-AC_PROG_RANLIB
-AC_PROG_INSTALL
-AC_PATH_XTRA
-
-
-# get byte swapping info
-AC_C_BIGENDIAN
-if test $ac_cv_c_bigendian = yes; then
-  CMAKE_WORDS_BIGENDIAN=1
-fi
-AC_SUBST(CMAKE_WORDS_BIGENDIAN)
-
-
-# some stuff Tcl uses
-#
-AC_CHECK_HEADER(limits.h, HAVE_LIMITS_H=-DHAVE_LIMITS_H,HAVE_LIMITS_H="")
-AC_SUBST(CMAKE_HAVE_LIMITS_H)
-AC_HAVE_HEADERS(unistd.h, HAVE_UNISTD_H=-DHAVE_UNISTD_H,HAVE_UNISTD_H="")
-AC_SUBST(CMAKE_HAVE_UNISTD_H)
-
-# Step 1: set the variable "system" to hold the name and version number
-# for the system.  This can usually be done via the "uname" command, but
-# there are a few systems, like Next, where this doesn't work.
-
-AC_MSG_CHECKING([system version (for dynamic loading)])
-if test -f /usr/lib/NextStep/software_version; then
-  system=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version`
-else
-    system=`uname -s`-`uname -r`
-    if test "$?" -ne 0 ; then
-	AC_MSG_RESULT([unknown (can't find uname command)])
-	system=unknown
-    else
-	# Special check for weird MP-RAS system (uname returns weird
-	# results, and the version is kept in special file).
-    
-	if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
-	    system=MP-RAS-`awk '{print $3}' /etc/.relid'`
-	fi
-	AC_MSG_RESULT($system)
-    fi
-fi
-
-#
-# use shared libs
-#
-
-
-CMAKE_shared_ok="yes"
-# the following is an excerpt from the tcl7.5b2 configure.in
-#--------------------------------------------------------------------
-#	The statements below define a collection of symbols related to
-#	dynamic loading and shared libraries:
-#
-#	CMAKE_SHLIB_CFLAGS -	Flags to pass to cc when compiling the components
-#			of a shared library (may request position-independent
-#			code, among other things).
-#	CMAKE_SHLIB_LD_LIBS -	Dependent libraries for the linker to scan when
-#			creating shared libraries.  This symbol typically
-#			goes at the end of the "ld" commands that build
-#			shared libraries. The value of the symbol if
-#			"${LIBS}" if all of the dependent libraries should
-#			be specified when creating a shared library.  If
-#			dependent libraries should not be specified (as on
-#			SunOS 4.x, where they cause the link to fail, or in
-#			general if Tcl and Tk aren't themselves shared
-#			libraries), then this symbol has an empty string
-#			as its value.
-#	CMAKE_SHLIB_SUFFIX -	Suffix to use for the name of the shared library.  An
-#			empty string means we don't know how to use shared
-#			libraries on this platform.
-#	CMAKE_SHLIB_BUILD_FLAGS -
-#                       Flags to use when building a shared library.	
-#	CMAKE_SHLIB_LINK_FLAGS -	
-#                       Flags to pass to the compiler when linking object
-#			files into an executable application binary such
-#			as tclsh.
-#--------------------------------------------------------------------
-
-
-# Step 2: check for existence of -ldl library.  This is needed because
-# Linux can use either -ldl or -ldld for dynamic loading.
-
-AC_CHECK_LIB(dl, dlopen, have_dl=yes, have_dl=no)
-
-# Step 4: set configuration options based on system name and version.
-
-fullSrcDir=`cd $srcdir; pwd`
-AC_SUBST(fullSrcDir)
-case $system in
-    AIX-*)
-	# AIX: can't link shared library extensions unless Tcl and Tk are
-	# also shared libraries.
-	CMAKE_SHLIB_CFLAGS=""
-	CMAKE_SHLIB_LD_LIBS='${LIBS}'
-	CMAKE_SHLIB_SUFFIX="..o"
-	CMAKE_DL_LIBS=""
-        AC_CHECK_LIB(ld,printf, CMAKE_DL_LIBS="-lld")
-	CMAKE_SHLIB_LINK_FLAGS=""
-	;;
-    HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*)
-	CMAKE_SHLIB_CFLAGS="+z"
-	CMAKE_SHLIB_LD_LIBS=""
-	CMAKE_SHLIB_SUFFIX=".sl"
-	CMAKE_DL_LIBS="-ldld"
-	CMAKE_SHLIB_BUILD_FLAGS='+Z -Wl,-E -Wl,-b'
-	CMAKE_SHLIB_LINK_FLAGS='-Wl,+s -Wl,+b,${LIB_RUNTIME_DIR}'
-        if test "$CC" = "gcc" -o `$CC -v 2>&1 | grep -c gcc` != "0" ; then
-  	  CMAKE_SHLIB_BUILD_FLAGS='-shared -Wl,-E -Wl,-b'
-	  CMAKE_SHLIB_LINK_FLAGS='-Wl,+s -Wl,+b,${LIB_RUNTIME_DIR}'
-        fi
-	;;
-    IRIX-5.*)
-	CMAKE_SHLIB_CFLAGS=""
-	CMAKE_SHLIB_LD_LIBS=""
-	CMAKE_SHLIB_SUFFIX=".so"
-	CMAKE_DL_LIBS=""
-	CMAKE_SHLIB_BUILD_FLAGS="-shared -rdata_shared"
-	;;
-    IRIX-6* | IRIX64-6* | IRIX-64-6*)
-	CMAKE_SHLIB_CFLAGS=""
-	CMAKE_SHLIB_LD_LIBS=""
-	CMAKE_SHLIB_SUFFIX=".so"
-	CMAKE_DL_LIBS=""
-	CMAKE_SHLIB_BUILD_FLAGS="-shared -rdata_shared"
-	;;
-    Linux*)
-	CMAKE_SHLIB_CFLAGS="-fPIC"
-	CMAKE_SHLIB_LD_LIBS=""
-	CMAKE_SHLIB_SUFFIX=".so"
-	CMAKE_SHLIB_BUILD_FLAGS="-shared"
-	if test "$have_dl" = yes; then
-	    CMAKE_DL_LIBS="-ldl"
-	    CMAKE_SHLIB_LINK_FLAGS="-rdynamic"
-	else
-	    AC_CHECK_HEADER(dld.h, [
-		CMAKE_DL_LIBS="-ldld"
-		CMAKE_SHLIB_LINK_FLAGS=""])
-	fi
-	;;
-    CYGWIN_NT*)
-        CMAKE_SHLIB_CFLAGS=""
-        CMAKE_DL_LIBS="-lgdi32" 
-        CMAKE_SHLIB_SUFFIX=".dll"
-        CMAKE_SHLIB_LINK_FLAGS="-shared"
-        ;;
-    MP-RAS-02*)
-	CMAKE_SHLIB_CFLAGS="-K PIC"
-	CMAKE_SHLIB_LD_LIBS=""
-	CMAKE_SHLIB_SUFFIX=".so"
-	CMAKE_DL_LIBS="-ldl"
-	CMAKE_SHLIB_LINK_FLAGS=""
-	;;
-    MP-RAS-*)
-	CMAKE_SHLIB_CFLAGS="-K PIC"
-	CMAKE_SHLIB_LD_LIBS=""
-	CMAKE_SHLIB_SUFFIX=".so"
-	CMAKE_DL_LIBS="-ldl"
-	CMAKE_SHLIB_LINK_FLAGS="-Wl,-Bexport"
-	;;
-    NetBSD-*|FreeBSD-*)
-	# Not available on all versions:  check for include file.
-	if test -f /usr/include/dlfcn.h; then
-	    CMAKE_SHLIB_CFLAGS="-fpic"
-	    CMAKE_SHLIB_LD_LIBS=""
-	    CMAKE_SHLIB_SUFFIX=".so"
-	    CMAKE_DL_LIBS=""
-	    CMAKE_SHLIB_LINK_FLAGS="-shared"
-	else
-	    CMAKE_SHLIB_CFLAGS=""
-	    CMAKE_SHLIB_LD_LIBS=""
-	    CMAKE_SHLIB_SUFFIX="..o"
-	    CMAKE_DL_LIBS=""
-	    CMAKE_SHLIB_LINK_FLAGS=""
-	fi
-	;;
-    NEXTSTEP-*)
-	CMAKE_SHLIB_CFLAGS=""
-	CMAKE_SHLIB_LD_LIBS=""
-	CMAKE_SHLIB_SUFFIX=".so"
-	CMAKE_DL_LIBS=""
-	CMAKE_SHLIB_LINK_FLAGS=""
-	;;
-    OSF1-1.[012])
-	# OSF/1 1.[012] from OSF, and derivatives, including Paragon OSF/1
-	CMAKE_SHLIB_CFLAGS=""
-	# Hack: make package name same as library name
-	CMAKE_SHLIB_LD_LIBS=""
-	CMAKE_SHLIB_SUFFIX=".so"
-	CMAKE_DL_LIBS=""
-	CMAKE_SHLIB_LINK_FLAGS=""
-	;;
-    OSF1-1.*)
-	# OSF/1 1.3 from OSF using ELF, and derivatives, including AD2
-	CMAKE_SHLIB_CFLAGS="-fpic"
-	CMAKE_SHLIB_LD_LIBS=""
-	CMAKE_SHLIB_SUFFIX=".so"
-	CMAKE_DL_LIBS=""
-	CMAKE_SHLIB_LINK_FLAGS=""
-	;;
-    OSF1-V*)
-        # Digital OSF/1
-	CMAKE_SHLIB_CFLAGS=""
-	CMAKE_SHLIB_LD_LIBS=""
-	CMAKE_SHLIB_SUFFIX=".so"
-	CMAKE_DL_LIBS=""
-	CMAKE_SHLIB_BUILD_FLAGS='-shared -Wl,-expect_unresolved,"*"'
-	CMAKE_SHLIB_LINK_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
-	;;
-    RISCos-*)
-	CMAKE_SHLIB_CFLAGS="-G 0"
-	CMAKE_SHLIB_LD_LIBS=""
-	CMAKE_SHLIB_SUFFIX="..o"
-	CMAKE_DL_LIBS=""
-	CMAKE_SHLIB_LINK_FLAGS="-Wl,-D,08000000"
-	;;
-    SCO_SV-3.2*)
-        # Note, dlopen is available only on SCO 3.2.5 and greater.  However,
-        # this test works, since "uname -s" was non-standard in 3.2.4 and
-        # below.
-	CMAKE_SHLIB_CFLAGS="-Kpic -belf"
-	CMAKE_SHLIB_LD_LIBS=""
-	CMAKE_SHLIB_SUFFIX=".so"
-	CMAKE_DL_LIBS=""
-	CMAKE_SHLIB_LINK_FLAGS="-belf -Wl,-Bexport"
-	;;
-     SINIX*5.4*)
-	CMAKE_SHLIB_CFLAGS="-K PIC"
-	CMAKE_SHLIB_LD_LIBS=""
-	CMAKE_SHLIB_SUFFIX=".so"
-	CMAKE_DL_LIBS="-ldl"
-	CMAKE_SHLIB_LINK_FLAGS=""
-	;;
-    SunOS-4*)
-	CMAKE_SHLIB_CFLAGS="-PIC"
-	CMAKE_SHLIB_LD_LIBS=""
-	CMAKE_SHLIB_SUFFIX=".so"
-	CMAKE_DL_LIBS="-ldl"
-	CMAKE_SHLIB_BUILD_FLAGS='-shared -Wl,-r -nostdlib'
-	CMAKE_SHLIB_LINK_FLAGS='-Wl,-L${LIB_RUNTIME_DIR}'
-	;;
-    SunOS-5*)
-	CMAKE_SHLIB_CFLAGS="-KPIC"
-	CMAKE_SHLIB_LD_LIBS='${LIBS}'
-	CMAKE_SHLIB_SUFFIX=".so"
-	CMAKE_DL_LIBS="-ldl"
-	CMAKE_SHLIB_BUILD_FLAGS='-G'
-	CMAKE_SHLIB_LINK_FLAGS='-R ${LIB_RUNTIME_DIR}'
-        if test "$CC" = "gcc" -o `$CC -v 2>&1 | grep -c gcc` != "0" ; then
-	  CMAKE_SHLIB_BUILD_FLAGS='-Wl,-G'
-	  CMAKE_SHLIB_LINK_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
-        fi
-	;;
-    ULTRIX-4.*)
-	CMAKE_SHLIB_CFLAGS="-G 0"
-	CMAKE_SHLIB_SUFFIX="..o"
-	CMAKE_SHLIB_LD_LIBS=""
-	CMAKE_DL_LIBS=""
-	CMAKE_SHLIB_LINK_FLAGS="-Wl,-D,08000000"
-	;;
-    UNIX_SV*)
-	CMAKE_SHLIB_CFLAGS="-K PIC"
-	CMAKE_SHLIB_LD_LIBS=""
-	CMAKE_SHLIB_SUFFIX=".so"
-	CMAKE_DL_LIBS="-ldl"
-	CMAKE_SHLIB_LINK_FLAGS="-Wl,-Bexport"
-	;;
-esac
-export CMAKE_SHLIB_SUFFIX
-
-# If we're running gcc, then change the C flags for compiling shared
-# libraries to the right flags for gcc, instead of those for the
-# standard manufacturer compiler.
-if test "$CC" = "gcc" -o `$CC -v 2>&1 | grep -c gcc` != "0" ; then
-  CMAKE_SHLIB_CFLAGS="-fPIC"
-fi
-# if running on cygwin remove -fPIC flag
-case $system in 
-  CYGWIN_NT*)
-    CMAKE_SHLIB_CFLAGS=""
-    ;;
-esac
-
-CMAKE_SHLIB_CFLAGS="${SHLIB_CFLAGS}"
-CMAKE_LD_SEARCH_FLAGS="${LD_SEARCH_FLAGS}"
-
-
-AC_SUBST(CMAKE_SHLIB_LINK_FLAGS)
-AC_SUBST(CMAKE_SHLIB_BUILD_FLAGS)
-AC_SUBST(CMAKE_SHLIB_CFLAGS)
-AC_SUBST(CMAKE_LIB_EXT)
-AC_SUBST(CMAKE_DL_LIBS)
-AC_SUBST(CMAKE_SHLIB_LD_LIBS)
-AC_SUBST(CMAKE_SHLIB_SUFFIX)
-
-
-##########################
-##			##
-## Check thread support ##
-##			##
-##########################
-# initialize thread vars
-CMAKE_THREAD_LIBS=""
-use_sproc=no
-CMAKE_USE_SPROC=0
-CMAKE_USE_PTHREADS=0
-CMAKE_HP_PTHREADS=0
-
-##########################
-##                      ##
-##      sproc           ##
-##                      ##
-##########################
-# check for sproc
-force_sproc=no
-AC_ARG_WITH(sproc,
-         [  --with-sproc           use sproc instead of pthreads if possible],
-         if test "$withval" = yes; then
-         force_sproc=yes
-         fi,)
-
-
-
-AC_CHECK_HEADERS(sys/prctl.h, [use_sproc=yes])
-if test "$use_sproc" = "yes"; then
-case $system in
-    Linux* | IRIX64-6.5 | IRIX-6.5) 
-        if test "$force_sproc" = "yes"; then
-           CMAKE_USE_SPROC=1
-        else
-	  use_sproc=no
-    	fi
-	;;
-    IRIX*)
-	CMAKE_USE_SPROC=1
-	;;
-esac
-fi
-use_pthreads=no
-AC_CHECK_HEADERS(pthread.h, [use_pthreads=yes])
-if test "$use_pthreads" = "yes"; then
-  if test "$use_sproc" = "no"; then
-    AC_CHECK_LIB(pthreads, pthread_create, CMAKE_THREAD_LIBS="-lpthreads")
-    AC_CHECK_LIB(pthread, pthread_create, CMAKE_THREAD_LIBS="-lpthread")
-# Work around Solaris 5.6 and 5.7 bug:
-    if test "`uname -s -r`" = "SunOS 5.6"; then
-      AC_CHECK_LIB(thread, thr_create, CMAKE_THREAD_LIBS="$CMAKE_THREAD_LIBS -lthread")
-    fi
-    if test "`uname -s -r`" = "SunOS 5.7"; then
-      AC_CHECK_LIB(thread, thr_create, CMAKE_THREAD_LIBS="$CMAKE_THREAD_LIBS -lthread")
-    fi
-	CMAKE_USE_PTHREADS=1
-  fi
-fi
-
-# on an HP with pthread we need to use -lcma
-# on dec alphas we have had problems as well
-if test "$use_pthreads" = "yes"; then
-case $system in
-    HP-UX-*.10.*)
-	CMAKE_THREAD_LIBS="-lcma"
-	CMAKE_USE_PTHREADS=1 
-	CMAKE_HP_PTHREADS=1
-	;;
-    OSF1-V*)
-	CMAKE_USE_PTHREADS=0
-        CMAKE_THREAD_LIBS=""
-        ;;
-    FreeBSD*)
-	CMAKE_USE_PTHREADS=0
-	CMAKE_THREAD_LIBS=""
-	;;
-esac
-fi
-
-
-AC_SUBST(CMAKE_USE_SPROC)
-AC_SUBST(CMAKE_USE_PTHREADS)
-AC_SUBST(CMAKE_HP_PTHREADS)
-AC_SUBST(CMAKE_THREAD_LIBS)
-
-
-CMAKE_ANSI_CFLAGS=""
-# on hp use -Aa for ansi
-if test $ac_cv_prog_gxx = no; then
-case $system in
-    HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*)
-        echo $ac_n "checking whether ${CC} accepts -Aa""... $ac_c" 1>&6
-        echo 'void f(){}' > conftest.c
-        if test -z "`${CC} -Aa -c conftest.c 2>&1`"; then
-          echo "$ac_t""yes" 1>&6
-          CMAKE_ANSI_CFLAGS="-Aa"
-        else
-          echo "$ac_t""no" 1>&6
-        fi
-        rm -f conftest*
-	;;
-esac
-fi
-AC_SUBST(CMAKE_ANSI_CFLAGS)
-
-# if we are not running g++ then we might need some other flags
-# to get the templates compiled correctly
-CMAKE_TEMPLATE_FLAGS=""
-if test $ac_cv_prog_gxx = no; then
-    echo $ac_n "checking whether ${CXX} accepts -ptused -no_prelink""... $ac_c" 1>&6
-  echo 'void f(){}' > conftest.cc
-  if test -z "`${CXX} -ptused -no_prelink -c conftest.cc 2>&1`"; then
-    echo "$ac_t""yes" 1>&6
-    CMAKE_TEMPLATE_FLAGS="-ptused -no_prelink"
-  else
-    echo "$ac_t""no" 1>&6
-  fi
-  rm -f conftest*
-  echo $ac_n "checking whether ${CXX} accepts -instances=semiexplicit""... $ac_c" 1>&6
-  echo 'void f(){}' > conftest.cc
-  if test -z "`${CXX} -instances=static -c conftest.cc 2>&1`"; then
-    echo "$ac_t""yes" 1>&6
-    CMAKE_TEMPLATE_FLAGS="-instances=static"
-  else
-    echo "$ac_t""no" 1>&6
-  fi
-fi
-AC_SUBST(CMAKE_TEMPLATE_FLAGS)
-
-# check no g++ compilers to see if they have the standard 
-# ansi stream files (without the .h)
-if test $ac_cv_prog_gxx = no; then
-  AC_MSG_CHECKING( ansi standard C++ stream headers ) 
-  echo "******"
-  rm -rf conftest.*
-  cat > conftest.cc <<!
-#include <iostream>
-!
-  if test -z "`${CXX} -c conftest.cc 2>&1`"; then
-    echo "$ac_t""yes" 1>&6
-  else
-    AC_DEFINE(CMAKE_NO_STD_NAMESPACE)
-    echo "$ac_t""no" 1>&6
-  fi
-fi
-
-# check to see if stl is in the std namespace
-if test $ac_cv_prog_gxx = no; then
-  echo "******"
-  AC_MSG_CHECKING( ansi standard namespace support ) 
-  rm -rf conftest.*
-  cat > conftest.cc <<!
-#include <list>
-void foo() { std::list<int> l; }
-!
-  if test -z "`${CXX} -c conftest.cc 2>&1`"; then
-    echo "$ac_t""yes" 1>&6
-  else
-    AC_DEFINE(CMAKE_NO_ANSI_STREAM_HEADERS)
-    echo "$ac_t""no" 1>&6
-  fi
-fi
-
-
-if test "$CC" = "gcc" -o `$CC -v 2>&1 | grep -c gcc` != "0" ; then
-  SHLIB_CFLAGS="-fPIC"
-fi
-
-# find make to use to build cmake, prefer gmake
-AC_PATH_PROGS(RUNMAKE, gmake make)
-AC_PATH_PROGS(CMAKE_AR, ar)
-AC_SUBST(CMAKE_AR)
-
-# generate output files.
-# create mkdir files just to make some of the directories
-
-AC_OUTPUT(
-CMakeSystemConfig.cmake:CMake/CMakeSystemConfig.cmake.in
-CMake/makedir:CMake/dummy.in
-CMake/Source/Makefile
-)
-
-# build the CMakeBuildTargets program
-(cd CMake/Source; $RUNMAKE CMakeBuildTargets)
-
-# run CMakeBuildTargets in make cache mode so the
-# cache file can have the most recent changes from configure
-# in it.
-echo  CMake/Source/CMakeBuildTargets ${fullSrcDir}/CMakeLists.txt -MakeCache -S${fullSrcDir} -O${CMAKE_CONFIG_DIR} -H${fullSrcDir} -B${CMAKE_CONFIG_DIR}
-CMake/Source/CMakeBuildTargets ${fullSrcDir}/CMakeLists.txt -MakeCache -S${fullSrcDir} -O${CMAKE_CONFIG_DIR} -H${fullSrcDir} -B${CMAKE_CONFIG_DIR} -DRUN_CONFIGURE
-
-echo CMakeCache.txt location: ${CMAKE_CONFIG_DIR}/CMakeCache.txt
-
-