ENH: Configure script now just invokes bootstrap script.

This commit is contained in:
Brad King 2003-06-23 08:58:19 -04:00
parent 26d638c5d5
commit c5890b8c2e
5 changed files with 2 additions and 2100 deletions

View File

@ -1,9 +0,0 @@
srcdir = @srcdir@
VPATH = @srcdir@
CMAKE_CONFIG_DIR = @CMAKE_CONFIG_DIR@
all:
cd Source; ${MAKE}

View File

@ -1,66 +0,0 @@
srcdir = @srcdir@
VPATH = @srcdir@
CMAKE_CONFIG_DIR = @CMAKE_CONFIG_DIR@
CXX = @CXX@
CXXFLAGS = @CMAKE_ANSI_CXXFLAGS@ -DCMAKE_ROOT_DIR='"@CMAKE_ROOT_DIR@"' @CXXFLAGS@ -DCMAKE_HAS_AUTOCONF -I${CMAKE_CONFIG_DIR}/Source
.SUFFIXES: .cxx .java .class
all: cmake
.cxx.o:
${CXX} ${CXXFLAGS} -c $< -o $@
OBJS = \
cmake.o \
cmakewizard.o \
cmakemain.o \
cmMakeDepend.o \
cmMakefile.o \
cmDocumentation.o \
cmGlobalGenerator.o \
cmLocalGenerator.o \
cmRegularExpression.o \
cmSourceFile.o \
cmSystemTools.o \
cmDirectory.o \
cmGlobalUnixMakefileGenerator.o \
cmLocalUnixMakefileGenerator.o \
cmCommands.o \
cmTarget.o \
cmCustomCommand.o \
cmCacheManager.o \
cmListFileCache.o \
cmVariableWatch.o \
cmSourceGroup.o
DEPENDS = cmConfigure.h @CMAKE_ROOT_DIR@/Source/*.h
cmakewizard.o : $(DEPENDS)
cmListFileCache.o : $(DEPENDS)
cmCollectFlags.o : $(DEPENDS)
cmake.o : $(DEPENDS)
cmakemain.o : $(DEPENDS)
cmMakeDepend.o : $(DEPENDS)
cmMakefile.o : $(DEPENDS)
cmGlobalGenerator.o : $(DEPENDS)
cmLocalGenerator.o : $(DEPENDS)
cmAuxSourceDirectoryCommand.o : $(DEPENDS)
cmRegularExpression.o : $(DEPENDS)
cmSourceFile.o : $(DEPENDS)
cmDirectory.o : $(DEPENDS)
cmCustomCommand.o : $(DEPENDS)
cmGlobalUnixMakefileGenerator.o : $(DEPENDS)
cmLocalUnixMakefileGenerator.o : $(DEPENDS)
cmCommands.o : $(DEPENDS) $(srcdir)/*Command*.cxx
cmTarget.o : $(DEPENDS)
cmCacheManager.o : $(DEPENDS)
cmSourceGroup.o : $(DEPENDS)
cmVariableWatch.o : $(DEPENDS)
cmake: ${OBJS}
${CXX} ${OBJS} ${CXXFLAGS} -o cmake

View File

@ -1,78 +0,0 @@
srcdir = @srcdir@/..
#VPATH = @srcdir@
CMAKE_CONFIG_DIR = @CMAKE_CONFIG_DIR@
CXX = @CXX@
CXXFLAGS = @CMAKE_ANSI_CXXFLAGS@ -DCMAKE_ROOT_DIR='"@CMAKE_ROOT_DIR@"' @CXXFLAGS@ \
-DCMAKE_HAS_AUTOCONF -I${CMAKE_CONFIG_DIR}/Source
.SUFFIXES: .cxx .java .class
all: cmake
OBJS = \
cmCacheManager.o \
cmCommands.o \
cmCustomCommand.o \
cmDirectory.o \
cmListFileCache.o \
cmMakeDepend.o \
cmMakefile.o \
cmMakefileGenerator.o \
cmRegularExpression.o \
cmSourceFile.o \
cmSourceGroup.o \
cmSystemTools.o \
cmTarget.o \
cmUnixMakefileGenerator.o \
cmake.o \
cmakemain.o \
cmakewizard.o
DEPENDS = ${CMAKE_CONFIG_DIR}/Source/cmConfigure.h Makefile
cmCacheManager.o : ${srcdir}/cmCacheManager.cxx $(DEPENDS)
${CXX} ${CXXFLAGS} -c ${srcdir}/cmCacheManager.cxx -o cmCacheManager.o
cmCommands.o : ${srcdir}/cmCommands.cxx $(DEPENDS) $(srcdir)/*Command*.cxx
${CXX} ${CXXFLAGS} -c ${srcdir}/cmCommands.cxx -o cmCommands.o
cmCustomCommand.o : ${srcdir}/cmCustomCommand.cxx $(DEPENDS)
${CXX} ${CXXFLAGS} -c ${srcdir}/cmCustomCommand.cxx -o cmCustomCommand.o
cmDirectory.o : ${srcdir}/cmDirectory.cxx $(DEPENDS)
${CXX} ${CXXFLAGS} -c ${srcdir}/cmDirectory.cxx -o cmDirectory.o
cmListFileCache.o : ${srcdir}/cmListFileCache.cxx $(DEPENDS)
${CXX} ${CXXFLAGS} -c ${srcdir}/cmListFileCache.cxx -o cmListFileCache.o
cmMakeDepend.o : ${srcdir}/cmMakeDepend.cxx $(DEPENDS)
${CXX} ${CXXFLAGS} -c ${srcdir}/cmMakeDepend.cxx -o cmMakeDepend.o
cmMakefile.o : ${srcdir}/cmMakefile.cxx $(DEPENDS)
${CXX} ${CXXFLAGS} -c ${srcdir}/cmMakefile.cxx -o cmMakefile.o
cmMakefileGenerator.o : ${srcdir}/cmMakefileGenerator.cxx $(DEPENDS)
${CXX} ${CXXFLAGS} -c ${srcdir}/cmMakefileGenerator.cxx -o cmMakefileGenerator.o
cmRegularExpression.o : ${srcdir}/cmRegularExpression.cxx $(DEPENDS)
${CXX} ${CXXFLAGS} -c ${srcdir}/cmRegularExpression.cxx -o cmRegularExpression.o
cmSourceFile.o : ${srcdir}/cmSourceFile.cxx $(DEPENDS)
${CXX} ${CXXFLAGS} -c ${srcdir}/cmSourceFile.cxx -o cmSourceFile.o
cmSourceGroup.o : ${srcdir}/cmSourceGroup.cxx $(DEPENDS)
${CXX} ${CXXFLAGS} -c ${srcdir}/cmSourceGroup.cxx -o cmSourceGroup.o
cmSystemTools.o : ${srcdir}/cmSystemTools.cxx $(DEPENDS)
${CXX} ${CXXFLAGS} -c ${srcdir}/cmSystemTools.cxx -o cmSystemTools.o
cmTarget.o : ${srcdir}/cmTarget.cxx $(DEPENDS)
${CXX} ${CXXFLAGS} -c ${srcdir}/cmTarget.cxx -o cmTarget.o
cmUnixMakefileGenerator.o : ${srcdir}/cmUnixMakefileGenerator.cxx $(DEPENDS)
${CXX} ${CXXFLAGS} -c ${srcdir}/cmUnixMakefileGenerator.cxx -o cmUnixMakefileGenerator.o
cmake.o : ${srcdir}/cmake.cxx $(DEPENDS)
${CXX} ${CXXFLAGS} -c ${srcdir}/cmake.cxx -o cmake.o
cmakemain.o : ${srcdir}/cmakemain.cxx $(DEPENDS)
${CXX} ${CXXFLAGS} -c ${srcdir}/cmakemain.cxx -o cmakemain.o
cmakewizard.o : ${srcdir}/cmakewizard.cxx $(DEPENDS)
${CXX} ${CXXFLAGS} -c ${srcdir}/cmakewizard.cxx -o cmakewizard.o
cmake: ${OBJS}
${CXX} ${OBJS} ${CXXFLAGS} -o cmake
.PHONY: clean
clean:
-rm -f *.o cmake
distclean: clean
-rm -f Makefile

1709
configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -1,240 +0,0 @@
# Process this file with autoconf to produce a configure script.
AC_INIT()
AC_CONFIG_HEADER(Source/cmConfigure.h)
# find make to use to build cmake, prefer gmake
AC_PATH_PROGS(RUNMAKE, gmake make)
fullSrcDir=`cd $srcdir; pwd`
CMAKE_ROOT_DIR=$fullSrcDir
if test "x$BUILD_CMAKE_IN_SUBDIR" = "xtrue"; then
#
# check for some programs we use
#
# save the CFLAGS and CXXFLAGS specified by the user
save_CFLAGS=$CFLAGS
save_CXXFLAGS=$CXXFLAGS
# let autoconf find cc and CC, it will try to add -g -O2 to CFLAGS and CXXFLAGS
AC_PROG_CC
AC_PROG_CXX
# restore the flags specified by the user and get rid of any flags
# found by autoconf (we do not want -02 -g by default)
CFLAGS=$save_CFLAGS
CXXFLAGS=$save_CXXFLAGS
AC_SUBST(CMAKE_ROOT_DIR)
# Parse the cmake version number out of the top-level CMake listfile.
[
CMake_VERSION_MAJOR=`cat $fullSrcDir/CMakeLists.txt | sed -n '/SET *( *CMake_VERSION_MAJOR/ {s/.*MAJOR *\([0-9][0-9]*\).*/\1/;p;}'`
CMake_VERSION_MINOR=`cat $fullSrcDir/CMakeLists.txt | sed -n '/SET *( *CMake_VERSION_MINOR/ {s/.*MINOR *\([0-9][0-9]*\).*/\1/;p;}'`
CMake_VERSION_PATCH=`cat $fullSrcDir/CMakeLists.txt | sed -n '/SET *( *CMake_VERSION_PATCH/ {s/.*PATCH *\([0-9][0-9]*\).*/\1/;p;}'`
]
AC_DEFINE_UNQUOTED(CMake_VERSION_MAJOR, ${CMake_VERSION_MAJOR})
AC_DEFINE_UNQUOTED(CMake_VERSION_MINOR, ${CMake_VERSION_MINOR})
AC_DEFINE_UNQUOTED(CMake_VERSION_PATCH, ${CMake_VERSION_PATCH})
AC_SUBST(CMake_VERSION_MAJOR)
AC_SUBST(CMake_VERSION_MINOR)
AC_SUBST(CMake_VERSION_PATCH)
# 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
CMAKE_CONFIG_DIR=`pwd`
AC_SUBST(CMAKE_CONFIG_DIR)
case $system in
CYGWIN_NT*)
CMAKE_CONFIG_DIR=`pwd`
CMAKE_CONFIG_DIR="\"$CMAKE_CONFIG_DIR\""
;;
esac
CMAKE_ANSI_CFLAGS=""
CMAKE_ANSI_CXXFLAGS=""
# 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.*)
CFLAGS_ORIG="$FLAGS"
CFLAGS="-Aa $CFLAGS"
AC_MSG_CHECKING([whether ${CC} accepts -Aa])
AC_TRY_COMPILE([
void foo() {}
],,[
AC_MSG_RESULT(yes)
CMAKE_ANSI_CFLAGS="$CMAKE_ANSI_CFLAGS -Aa"
],[
AC_MSG_RESULT(no)
])
CFLAGS="$CFLAGS_ORIG"
;;
IRIX-5* | IRIX-6* | IRIX64-6* | IRIX-64-6*)
echo $ac_n "checking whether ${CXX} accepts -LANG:std""... $ac_c" 1>&6
echo 'void f(){}' > conftest.cc
if test -z "`${CXX} -LANG:std -c conftest.cc 2>&1`"; then
echo "$ac_t""yes" 1>&6
CMAKE_ANSI_CXXFLAGS="-LANG:std"
else
echo "$ac_t""no" 1>&6
fi
rm -f conftest*
;;
OSF1-*)
CXXFLAGS_ORIG="$CXXFLAGS"
CXXFLAGS="-std strict_ansi -nopure_cname $CXXFLAGS"
AC_MSG_CHECKING([whether ${CXX} accepts -std strict_ansi -nopure_cname])
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
AC_TRY_COMPILE([
void foo() {}
],,[
AC_MSG_RESULT(yes)
CMAKE_ANSI_CXXFLAGS="-std strict_ansi -nopure_cname"
],[
AC_MSG_RESULT(no)
])
AC_LANG_RESTORE
CXXFLAGS="$CXXFLAGS_ORIG"
;;
esac
fi
AC_SUBST(CMAKE_ANSI_CFLAGS)
AC_SUBST(CMAKE_ANSI_CXXFLAGS)
# check non-g++ compilers to see if they have the standard
# ansi stream files (without the .h)
if test $ac_cv_prog_gxx = no; then
CXXFLAGS_ORIG="$CXXFLAGS"
CXXFLAGS="$CMAKE_ANSI_CXXFLAGS $CXXFLAGS"
AC_MSG_CHECKING( ansi standard C++ stream headers )
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
AC_TRY_COMPILE([
#include <iostream>
],,[
AC_MSG_RESULT(yes)
],[
AC_DEFINE(CMAKE_NO_ANSI_STREAM_HEADERS)
AC_MSG_RESULT(no)
])
AC_LANG_RESTORE
CXXFLAGS="$CXXFLAGS_ORIG"
fi
# check non-g++ compilers to see if they have std::stringstream
CXXFLAGS_ORIG="$CXXFLAGS"
CXXFLAGS="$CMAKE_ANSI_CXXFLAGS $CXXFLAGS"
AC_MSG_CHECKING([for ansi standard C++ stringstream])
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
AC_TRY_COMPILE([
#include <sstream>
],,[
AC_MSG_RESULT(yes)
],[
AC_DEFINE(CMAKE_NO_ANSI_STRING_STREAM)
AC_MSG_RESULT(no)
])
AC_LANG_RESTORE
CXXFLAGS="$CXXFLAGS_ORIG"
# check to see if stl is in the std namespace
if test $ac_cv_prog_gxx = no; then
CXXFLAGS_ORIG="$CXXFLAGS"
CXXFLAGS="$CMAKE_ANSI_CXXFLAGS $CXXFLAGS"
AC_MSG_CHECKING([whether the std namespace is supported])
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
AC_TRY_COMPILE([
#include <list>
void foo() { std::list<int>(); }
],,[
AC_MSG_RESULT(yes)
],[
AC_DEFINE(CMAKE_NO_STD_NAMESPACE)
AC_MSG_RESULT(no)
])
AC_LANG_RESTORE
CXXFLAGS="$CXXFLAGS_ORIG"
fi
# check to see if for scoping is supported
if test $ac_cv_prog_gxx = no; then
CXXFLAGS_ORIG="$CXXFLAGS"
CXXFLAGS="$CMAKE_ANSI_CXXFLAGS $CXXFLAGS"
AC_MSG_CHECKING([ansi for scope support])
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
AC_TRY_COMPILE([
void foo() { for(int i;;); for(int i;;); }
],,[
AC_MSG_RESULT(yes)
],[
AC_DEFINE(CMAKE_NO_ANSI_FOR_SCOPE)
AC_MSG_RESULT(no)
])
AC_LANG_RESTORE
CXXFLAGS="$CXXFLAGS_ORIG"
fi
AC_OUTPUT(Source/InitialConfigureFlags.cmake Makefile Source/Makefile)
# build cmake
$RUNMAKE
else
PRGNAME=configure # Should be `basename $0`
DIRNAME=Bootstrap.cmk
# Check if the bootstrap directory already exists.
if test -d ${DIRNAME}; then
:
else
# if it does not create one
mkdir ${DIRNAME}
fi
if (
# Build bootstrap cmake
cd ${DIRNAME}
echo "Bootstrapping to directory `pwd`"
BUILD_CMAKE_IN_SUBDIR=true $CMAKE_ROOT_DIR/$PRGNAME $ac_configure_args
); then
# run cmake
${DIRNAME}/Source/cmake $fullSrcDir
# run cmake depends
$RUNMAKE depend
else
echo "Problem bootstrapping CMake"
exit 1
fi
fi