ENH: various fixes to allow bootstrap on sunos with CC
This commit is contained in:
parent
850d74f67f
commit
a7f7366abd
|
@ -748,7 +748,7 @@ bool cmSystemTools::IsOn(const char* val)
|
||||||
|
|
||||||
bool cmSystemTools::IsOff(const char* val)
|
bool cmSystemTools::IsOff(const char* val)
|
||||||
{
|
{
|
||||||
if (!val)
|
if (!val || strlen(val) == 0)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -501,7 +501,7 @@ void cmUnixMakefileGenerator::OutputTargets(std::ostream& fout)
|
||||||
fout << "#\n";
|
fout << "#\n";
|
||||||
fout << m_LibraryOutputPath << "lib" << l->first << ".a: ${" <<
|
fout << m_LibraryOutputPath << "lib" << l->first << ".a: ${" <<
|
||||||
l->first << "_SRC_OBJS} \n";
|
l->first << "_SRC_OBJS} \n";
|
||||||
fout << "\t${CMAKE_AR} cr "
|
fout << "\t${CMAKE_AR} "
|
||||||
<< m_LibraryOutputPath << "lib" << l->first << ".a ${" <<
|
<< m_LibraryOutputPath << "lib" << l->first << ".a ${" <<
|
||||||
l->first << "_SRC_OBJS} \n";
|
l->first << "_SRC_OBJS} \n";
|
||||||
fout << "\t${CMAKE_RANLIB} "
|
fout << "\t${CMAKE_RANLIB} "
|
||||||
|
|
|
@ -2920,14 +2920,6 @@ if test $ac_cv_prog_gxx = no; then
|
||||||
echo "$ac_t""no" 1>&6
|
echo "$ac_t""no" 1>&6
|
||||||
fi
|
fi
|
||||||
rm -f conftest*
|
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
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
@ -2935,7 +2927,7 @@ fi
|
||||||
# ansi stream files (without the .h)
|
# ansi stream files (without the .h)
|
||||||
if test $ac_cv_prog_gxx = no; then
|
if test $ac_cv_prog_gxx = no; then
|
||||||
echo $ac_n "checking ansi standard C++ stream headers ""... $ac_c" 1>&6
|
echo $ac_n "checking ansi standard C++ stream headers ""... $ac_c" 1>&6
|
||||||
echo "configure:2939: checking ansi standard C++ stream headers " >&5
|
echo "configure:2931: checking ansi standard C++ stream headers " >&5
|
||||||
rm -rf conftest.*
|
rm -rf conftest.*
|
||||||
cat > conftest.cc <<!
|
cat > conftest.cc <<!
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
@ -2952,7 +2944,7 @@ fi
|
||||||
# check to see if stl is in the std namespace
|
# check to see if stl is in the std namespace
|
||||||
if test $ac_cv_prog_gxx = no; then
|
if test $ac_cv_prog_gxx = no; then
|
||||||
echo $ac_n "checking ansi standard namespace support ""... $ac_c" 1>&6
|
echo $ac_n "checking ansi standard namespace support ""... $ac_c" 1>&6
|
||||||
echo "configure:2956: checking ansi standard namespace support " >&5
|
echo "configure:2948: checking ansi standard namespace support " >&5
|
||||||
rm -rf conftest.*
|
rm -rf conftest.*
|
||||||
cat > conftest.cc <<!
|
cat > conftest.cc <<!
|
||||||
#include <list>
|
#include <list>
|
||||||
|
@ -2978,7 +2970,7 @@ do
|
||||||
# Extract the first word of "$ac_prog", so it can be a program name with args.
|
# Extract the first word of "$ac_prog", so it can be a program name with args.
|
||||||
set dummy $ac_prog; ac_word=$2
|
set dummy $ac_prog; ac_word=$2
|
||||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||||
echo "configure:2982: checking for $ac_word" >&5
|
echo "configure:2974: checking for $ac_word" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_path_RUNMAKE'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_path_RUNMAKE'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
|
@ -3018,16 +3010,16 @@ do
|
||||||
# Extract the first word of "$ac_prog", so it can be a program name with args.
|
# Extract the first word of "$ac_prog", so it can be a program name with args.
|
||||||
set dummy $ac_prog; ac_word=$2
|
set dummy $ac_prog; ac_word=$2
|
||||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||||
echo "configure:3022: checking for $ac_word" >&5
|
echo "configure:3014: checking for $ac_word" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_path_CMAKE_AR'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_path_CMAKE_AR_TMP'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
case "$CMAKE_AR" in
|
case "$CMAKE_AR_TMP" in
|
||||||
/*)
|
/*)
|
||||||
ac_cv_path_CMAKE_AR="$CMAKE_AR" # Let the user override the test with a path.
|
ac_cv_path_CMAKE_AR_TMP="$CMAKE_AR_TMP" # Let the user override the test with a path.
|
||||||
;;
|
;;
|
||||||
?:/*)
|
?:/*)
|
||||||
ac_cv_path_CMAKE_AR="$CMAKE_AR" # Let the user override the test with a dos path.
|
ac_cv_path_CMAKE_AR_TMP="$CMAKE_AR_TMP" # Let the user override the test with a dos path.
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
|
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
|
||||||
|
@ -3035,7 +3027,7 @@ else
|
||||||
for ac_dir in $ac_dummy; do
|
for ac_dir in $ac_dummy; do
|
||||||
test -z "$ac_dir" && ac_dir=.
|
test -z "$ac_dir" && ac_dir=.
|
||||||
if test -f $ac_dir/$ac_word; then
|
if test -f $ac_dir/$ac_word; then
|
||||||
ac_cv_path_CMAKE_AR="$ac_dir/$ac_word"
|
ac_cv_path_CMAKE_AR_TMP="$ac_dir/$ac_word"
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
@ -3043,16 +3035,27 @@ else
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
CMAKE_AR="$ac_cv_path_CMAKE_AR"
|
CMAKE_AR_TMP="$ac_cv_path_CMAKE_AR_TMP"
|
||||||
if test -n "$CMAKE_AR"; then
|
if test -n "$CMAKE_AR_TMP"; then
|
||||||
echo "$ac_t""$CMAKE_AR" 1>&6
|
echo "$ac_t""$CMAKE_AR_TMP" 1>&6
|
||||||
else
|
else
|
||||||
echo "$ac_t""no" 1>&6
|
echo "$ac_t""no" 1>&6
|
||||||
fi
|
fi
|
||||||
|
|
||||||
test -n "$CMAKE_AR" && break
|
test -n "$CMAKE_AR_TMP" && break
|
||||||
done
|
done
|
||||||
|
|
||||||
|
CMAKE_AR="$CMAKE_AR_TMP cr"
|
||||||
|
# if on SunOS and not using gXX then use the compiler to make .a libs
|
||||||
|
case $system in
|
||||||
|
SunOS-5*)
|
||||||
|
if test $ac_cv_prog_gxx = yes; then
|
||||||
|
:
|
||||||
|
else
|
||||||
|
echo "Using $CXX -xar -o for creating .a libraries"
|
||||||
|
CMAKE_AR="$CXX -xar -o"
|
||||||
|
fi
|
||||||
|
esac
|
||||||
|
|
||||||
|
|
||||||
# generate output files.
|
# generate output files.
|
||||||
|
@ -3238,6 +3241,7 @@ s%@CMAKE_TEMPLATE_FLAGS@%$CMAKE_TEMPLATE_FLAGS%g
|
||||||
s%@CMAKE_NO_STD_NAMESPACE@%$CMAKE_NO_STD_NAMESPACE%g
|
s%@CMAKE_NO_STD_NAMESPACE@%$CMAKE_NO_STD_NAMESPACE%g
|
||||||
s%@CMAKE_NO_ANSI_STREAM_HEADERS@%$CMAKE_NO_ANSI_STREAM_HEADERS%g
|
s%@CMAKE_NO_ANSI_STREAM_HEADERS@%$CMAKE_NO_ANSI_STREAM_HEADERS%g
|
||||||
s%@RUNMAKE@%$RUNMAKE%g
|
s%@RUNMAKE@%$RUNMAKE%g
|
||||||
|
s%@CMAKE_AR_TMP@%$CMAKE_AR_TMP%g
|
||||||
s%@CMAKE_AR@%$CMAKE_AR%g
|
s%@CMAKE_AR@%$CMAKE_AR%g
|
||||||
|
|
||||||
CEOF
|
CEOF
|
||||||
|
|
|
@ -497,14 +497,6 @@ if test $ac_cv_prog_gxx = no; then
|
||||||
echo "$ac_t""no" 1>&6
|
echo "$ac_t""no" 1>&6
|
||||||
fi
|
fi
|
||||||
rm -f conftest*
|
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
|
fi
|
||||||
AC_SUBST(CMAKE_TEMPLATE_FLAGS)
|
AC_SUBST(CMAKE_TEMPLATE_FLAGS)
|
||||||
|
|
||||||
|
@ -549,7 +541,18 @@ fi
|
||||||
|
|
||||||
# find make to use to build cmake, prefer gmake
|
# find make to use to build cmake, prefer gmake
|
||||||
AC_PATH_PROGS(RUNMAKE, gmake make)
|
AC_PATH_PROGS(RUNMAKE, gmake make)
|
||||||
AC_PATH_PROGS(CMAKE_AR, ar)
|
AC_PATH_PROGS(CMAKE_AR_TMP, ar)
|
||||||
|
CMAKE_AR="$CMAKE_AR_TMP cr"
|
||||||
|
# if on SunOS and not using gXX then use the compiler to make .a libs
|
||||||
|
case $system in
|
||||||
|
SunOS-5*)
|
||||||
|
if test $ac_cv_prog_gxx = yes; then
|
||||||
|
:
|
||||||
|
else
|
||||||
|
echo "Using $CXX -xar -o for creating .a libraries"
|
||||||
|
CMAKE_AR="$CXX -xar -o"
|
||||||
|
fi
|
||||||
|
esac
|
||||||
AC_SUBST(CMAKE_AR)
|
AC_SUBST(CMAKE_AR)
|
||||||
|
|
||||||
# generate output files.
|
# generate output files.
|
||||||
|
|
|
@ -103,3 +103,5 @@ $RUNMAKE
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue