mirror of https://github.com/CGAL/cgal
* STL test works for Moskow STL.
* non interactive setting hopefully works now. * check_LEDA_LIB_DIR accepts also, if there only is a libL.so. * Added --help reference when something went wrong. * changed include makefile generation due to Wieger. * changed cgal_test replacement due to Wieger.
This commit is contained in:
parent
2a0eb1adc2
commit
4e2561e196
|
|
@ -22,8 +22,10 @@ CGAL_LIB_NAME='libCGAL'
|
||||||
CGAL_DIRFILE=${CGAL_DIR}/make/CGAL_directories
|
CGAL_DIRFILE=${CGAL_DIR}/make/CGAL_directories
|
||||||
CGAL_TESTFILE=${CGAL_TEST_DIR}/cgal_test
|
CGAL_TESTFILE=${CGAL_TEST_DIR}/cgal_test
|
||||||
|
|
||||||
# toggles the use of LEDA: ('' - no LEDA, '_L' - LEDA)
|
# toggles the use of LEDA: ('' - no LEDA, '_LEDA' - LEDA)
|
||||||
LEDA_EXT=''
|
LEDA_EXT=''
|
||||||
|
LEDA_INCL_DIR=''
|
||||||
|
LEDA_LIB_DIR=''
|
||||||
|
|
||||||
# specifies STL setting (since this is compiler specific,
|
# specifies STL setting (since this is compiler specific,
|
||||||
# it will be updated each time a compiler is chosen)
|
# it will be updated each time a compiler is chosen)
|
||||||
|
|
@ -31,11 +33,12 @@ LEDA_EXT=''
|
||||||
# 'b' means compiler is shipped with an STL (and it should be used)
|
# 'b' means compiler is shipped with an STL (and it should be used)
|
||||||
# while 'x' means to use an extra STL anyway
|
# while 'x' means to use an extra STL anyway
|
||||||
STL_STATUS='e'
|
STL_STATUS='e'
|
||||||
|
STL_DIR=''
|
||||||
|
|
||||||
# type of STL: (see test_stl_version below)
|
# type of STL: (see test_stl_version below)
|
||||||
CGAL_STL_VERSION='CGAL_STL_UNKNOWN'
|
CGAL_STL_VERSION='CGAL_STL_UNKNOWN'
|
||||||
|
|
||||||
# toggles use of gcc rtti patch ('' - no, '_patch' - use it)
|
# toggles use of gcc rtti patch ('' - no, '_rtti' - use it)
|
||||||
GCC_RTTI_PATCH_EXT=''
|
GCC_RTTI_PATCH_EXT=''
|
||||||
|
|
||||||
# logfile for testsuite:
|
# logfile for testsuite:
|
||||||
|
|
@ -53,7 +56,8 @@ _MENU_WIDTH=6
|
||||||
_LEFTSPACE=' '
|
_LEFTSPACE=' '
|
||||||
|
|
||||||
# installation logfile (verbose)
|
# installation logfile (verbose)
|
||||||
INSTALL_LOGFILE=${CGAL_DIR}/install.log
|
INSTALL_LOGFILE="${CGAL_DIR}/install.log"
|
||||||
|
INSTALL_LOGFILE_REDIRECTION=">>${INSTALL_LOGFILE}"
|
||||||
|
|
||||||
# installation logfile (only completed compile/test runs)
|
# installation logfile (only completed compile/test runs)
|
||||||
# (Really Important Stuff)
|
# (Really Important Stuff)
|
||||||
|
|
@ -104,6 +108,12 @@ real_which()
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# print to logfile
|
||||||
|
log_print()
|
||||||
|
{
|
||||||
|
eval "$_printf \"$*\n\" ${INSTALL_LOGFILE_REDIRECTION}"
|
||||||
|
}
|
||||||
|
|
||||||
# checks for existency of program $1
|
# checks for existency of program $1
|
||||||
# and set variable _$3 to its full path
|
# and set variable _$3 to its full path
|
||||||
# ($3 defaults to $1 if not specified)
|
# ($3 defaults to $1 if not specified)
|
||||||
|
|
@ -148,12 +158,6 @@ _check_for_sysutil()
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
# print to logfile
|
|
||||||
log_print()
|
|
||||||
{
|
|
||||||
$_printf "$*\n" >>${INSTALL_LOGFILE}
|
|
||||||
}
|
|
||||||
|
|
||||||
# exit, if there is no directory $1 or it is not readable and executable
|
# exit, if there is no directory $1 or it is not readable and executable
|
||||||
_check_dir_exists()
|
_check_dir_exists()
|
||||||
{
|
{
|
||||||
|
|
@ -198,7 +202,6 @@ init_logfiles()
|
||||||
_check_for_sysutil printf y
|
_check_for_sysutil printf y
|
||||||
$_printf "----------------------------------------------------------\n" \
|
$_printf "----------------------------------------------------------\n" \
|
||||||
>${INSTALL_LOGFILE}
|
>${INSTALL_LOGFILE}
|
||||||
log_print "file: ${INSTALL_LOGFILE}"
|
|
||||||
log_print "log of $0 $*"
|
log_print "log of $0 $*"
|
||||||
log_print "called by $LOGNAME on `date`"
|
log_print "called by $LOGNAME on `date`"
|
||||||
log_print "CGAL_DIR is $CGAL_DIR"
|
log_print "CGAL_DIR is $CGAL_DIR"
|
||||||
|
|
@ -290,7 +293,7 @@ guess_os()
|
||||||
else
|
else
|
||||||
$1 "WARNING: Could not determine architecture."
|
$1 "WARNING: Could not determine architecture."
|
||||||
fi
|
fi
|
||||||
SYST="${_tmp}`${_uname} -s`_`${_uname} -r`"
|
SYST="${_tmp}`${_uname} -s`-`${_uname} -r`"
|
||||||
$1 "OS is \"${SYST}\"."
|
$1 "OS is \"${SYST}\"."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -299,26 +302,22 @@ guess_os()
|
||||||
# since we don't want to make a difference between 2.7.2.*
|
# since we don't want to make a difference between 2.7.2.*
|
||||||
_gpp_version()
|
_gpp_version()
|
||||||
{
|
{
|
||||||
_tmp="`$_gpp --version 2>&1 | $_awk '{print $1}' | $_awk 'BEGIN {FS="."}
|
_tmp="`$1 --version 2>&1 | $_awk '{print $1}' | $_awk 'BEGIN {FS="."}
|
||||||
{print $1"."$2"."$3}'`"
|
{print $1"."$2"."$3}'`"
|
||||||
log_print "GNU g++ version is $_tmp."
|
|
||||||
$_printf "$_tmp"
|
$_printf "$_tmp"
|
||||||
}
|
}
|
||||||
|
|
||||||
# give version numbers for SUNPRO CC
|
# give version numbers for SUNPRO CC
|
||||||
_sunpro_version()
|
_sunpro_version()
|
||||||
{
|
{
|
||||||
_tmp="`$_CC -V 2>&1 | $_fgrep "C++" | $_awk '{print $NF}'`"
|
_tmp="`$1 -V 2>&1 | $_fgrep "C++" | $_awk '{print $NF}'`"
|
||||||
log_print "SUNPRO CC version is $_tmp."
|
|
||||||
$_printf "$_tmp"
|
$_printf "$_tmp"
|
||||||
}
|
}
|
||||||
|
|
||||||
# give version numbers for IRIX MIPSPRO CC
|
# give version numbers for IRIX MIPSPRO CC
|
||||||
_sgi_version()
|
_sgi_version()
|
||||||
{
|
{
|
||||||
_check_for_sysutil showprods y
|
|
||||||
_tmp=`$_showprods -nM | $_fgrep "C++," | $_fgrep c++_dev | $_awk '{print $5}'`
|
_tmp=`$_showprods -nM | $_fgrep "C++," | $_fgrep c++_dev | $_awk '{print $5}'`
|
||||||
log_print "SGI CC version is $_tmp."
|
|
||||||
$_printf "$_tmp"
|
$_printf "$_tmp"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -364,10 +363,32 @@ rtti_patch_ldflags()
|
||||||
}
|
}
|
||||||
|
|
||||||
# give basename of ${COMPILER}s executable
|
# give basename of ${COMPILER}s executable
|
||||||
|
# (assumed to be the second record of ${COMPILER})
|
||||||
compiler_basename()
|
compiler_basename()
|
||||||
{
|
{
|
||||||
_tmp=`compiler_bin`
|
$_printf "${COMPILER}" | $_awk '{print $2}'
|
||||||
$_printf "`$_basename ${_tmp}`"
|
}
|
||||||
|
|
||||||
|
# append a version number to ${COMPILER}, if possible
|
||||||
|
# $1 must be the compiler executable(full path)
|
||||||
|
compute_compiler_version()
|
||||||
|
{
|
||||||
|
case `compiler_basename` in
|
||||||
|
*CC*)
|
||||||
|
case ${SYST} in
|
||||||
|
*IRIX*) _check_for_sysutil showprods y
|
||||||
|
COMPILER="${COMPILER} `_sgi_version $1`"
|
||||||
|
log_print "SGI CC version is `_sgi_version $1`.";;
|
||||||
|
*SunOS*) COMPILER="${COMPILER} `_sunpro_version $1`"
|
||||||
|
log_print "SUNPRO CC version is `_sunpro_version $1`.";;
|
||||||
|
*) COMPILER="${COMPILER}";;
|
||||||
|
esac;;
|
||||||
|
*g++*)
|
||||||
|
COMPILER="${COMPILER} `_gpp_version $1`"
|
||||||
|
log_print "GNU g++ version is `_gpp_version $1`.";;
|
||||||
|
*)
|
||||||
|
COMPILER="${COMPILER}";;
|
||||||
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
# give version of ${COMPILER}
|
# give version of ${COMPILER}
|
||||||
|
|
@ -377,6 +398,24 @@ compiler_version()
|
||||||
$_printf "${COMPILER}" | $_awk '{print $3}'
|
$_printf "${COMPILER}" | $_awk '{print $3}'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# give a literal description for compiler $1
|
||||||
|
# (e.g. $1 = CC, g++, ...)
|
||||||
|
compiler_description()
|
||||||
|
{
|
||||||
|
case $1 in
|
||||||
|
*CC*)
|
||||||
|
case ${SYST} in
|
||||||
|
*IRIX*) $_printf "IRIX CC";;
|
||||||
|
*SunOS*) $_printf "SUNPRO CC";;
|
||||||
|
*) $_printf "unknown CC";;
|
||||||
|
esac;;
|
||||||
|
*g++*)
|
||||||
|
$_printf "GNU g++";;
|
||||||
|
*)
|
||||||
|
$_printf "unknown $1";;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
# return 0, iff current compiler needs rtti patch
|
# return 0, iff current compiler needs rtti patch
|
||||||
# (gcc2.7.2.*)
|
# (gcc2.7.2.*)
|
||||||
show_rtti_options()
|
show_rtti_options()
|
||||||
|
|
@ -397,7 +436,9 @@ show_rtti_options()
|
||||||
_search_compiler()
|
_search_compiler()
|
||||||
{
|
{
|
||||||
if _check_for_util "$1" n "${3:-$1}"; then
|
if _check_for_util "$1" n "${3:-$1}"; then
|
||||||
eval "_COMPILER_$_COMPILER_NUMBER=\"$2\""
|
COMPILER="$2"
|
||||||
|
compute_compiler_version `compiler_bin ${COMPILER}`
|
||||||
|
eval "_COMPILER_$_COMPILER_NUMBER=\"${COMPILER}\""
|
||||||
eval "$_EXPR $_COMPILER_NUMBER + 1"
|
eval "$_EXPR $_COMPILER_NUMBER + 1"
|
||||||
_COMPILER_NUMBER=$_result
|
_COMPILER_NUMBER=$_result
|
||||||
fi
|
fi
|
||||||
|
|
@ -411,17 +452,11 @@ search_for_compilers()
|
||||||
guess_os log_print
|
guess_os log_print
|
||||||
_COMPILER_NUMBER=1
|
_COMPILER_NUMBER=1
|
||||||
case ${SYST} in
|
case ${SYST} in
|
||||||
*IRIX*)
|
*IRIX*|*SunOS*)
|
||||||
_search_compiler CC 'IRIX CC `_sgi_version`'
|
_search_compiler CC "`compiler_description CC`"
|
||||||
_search_compiler g++ 'GNU g++ `_gpp_version`' gpp
|
_search_compiler g++ "`compiler_description g++`" gpp;;
|
||||||
;;
|
|
||||||
*SunOS*)
|
|
||||||
_search_compiler CC 'SUNPRO CC `_sunpro_version`'
|
|
||||||
_search_compiler g++ 'GNU g++ `_gpp_version`' gpp
|
|
||||||
;;
|
|
||||||
*)
|
*)
|
||||||
_search_compiler g++ 'GNU g++ `_gpp_version`' gpp
|
_search_compiler g++ "`compiler_description CC`" gpp;;
|
||||||
;;
|
|
||||||
esac
|
esac
|
||||||
if [ ${_COMPILER_NUMBER} = 1 ]; then
|
if [ ${_COMPILER_NUMBER} = 1 ]; then
|
||||||
$_printf "\nERROR: Couldn't find any compiler, exiting.\n"
|
$_printf "\nERROR: Couldn't find any compiler, exiting.\n"
|
||||||
|
|
@ -812,8 +847,8 @@ check_LEDA_INCL_DIR()
|
||||||
|
|
||||||
check_LEDA_LIB_DIR()
|
check_LEDA_LIB_DIR()
|
||||||
{
|
{
|
||||||
if [ ! -r $LEDA_LIB_DIR/libL.a ]; then
|
if [ ! -r $LEDA_LIB_DIR/libL.a -a ! -r $LEDA_LIB_DIR/libL.so ]; then
|
||||||
$1 "WARNING: LEDA_LIB_DIR should contain libL.a."
|
$1 "WARNING: LEDA_LIB_DIR should contain libL.a or libL.so."
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
return 1
|
return 1
|
||||||
|
|
@ -841,7 +876,7 @@ check_GCC_RTTI_PATCH_DIR()
|
||||||
check_GCC_RTTI_PATCH_EXT()
|
check_GCC_RTTI_PATCH_EXT()
|
||||||
{
|
{
|
||||||
if [ "${GCC_RTTI_PATCH_EXT}" != "" -a \
|
if [ "${GCC_RTTI_PATCH_EXT}" != "" -a \
|
||||||
"${GCC_RTTI_PATCH_EXT}" != "_patch" ]; then
|
"${GCC_RTTI_PATCH_EXT}" != "_rtti" ]; then
|
||||||
$1 "WARNING: GCC_RTTI_PATCH_EXT"
|
$1 "WARNING: GCC_RTTI_PATCH_EXT"
|
||||||
$1 " is not set correctly."
|
$1 " is not set correctly."
|
||||||
return 0
|
return 0
|
||||||
|
|
@ -851,7 +886,7 @@ check_GCC_RTTI_PATCH_EXT()
|
||||||
|
|
||||||
check_LEDA_EXT()
|
check_LEDA_EXT()
|
||||||
{
|
{
|
||||||
if [ "${LEDA_EXT}" != "" -a "${LEDA_EXT}" != "_L" ]; then
|
if [ "${LEDA_EXT}" != "" -a "${LEDA_EXT}" != "_LEDA" ]; then
|
||||||
$1 "WARNING: LEDA_EXT is not set correctly."
|
$1 "WARNING: LEDA_EXT is not set correctly."
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
@ -883,7 +918,7 @@ CGAL_STL_SGI_CC|CGAL_STL_WITH_ITERATOR_TRAITS|CGAL_STL_UNKNOWN)
|
||||||
check_CGAL_INSTALL_VERSION()
|
check_CGAL_INSTALL_VERSION()
|
||||||
{
|
{
|
||||||
case ${CGAL_INSTALL_VERSION} in
|
case ${CGAL_INSTALL_VERSION} in
|
||||||
*Revision*) return 1;;
|
*.*) return 1;;
|
||||||
*) $1 "WARNING: CGAL_INSTALL_VERSION is not set correctly."
|
*) $1 "WARNING: CGAL_INSTALL_VERSION is not set correctly."
|
||||||
return 0;;
|
return 0;;
|
||||||
esac
|
esac
|
||||||
|
|
@ -1083,7 +1118,7 @@ _test_sgi_1996_stl()
|
||||||
}
|
}
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
list<int> l;
|
const list<int> l;
|
||||||
assert( check( l.begin()));
|
assert( check( l.begin()));
|
||||||
return 0;
|
return 0;
|
||||||
}' > ${TMP_CXX_FILE}
|
}' > ${TMP_CXX_FILE}
|
||||||
|
|
@ -1289,7 +1324,11 @@ test_gcc_rtti_patch()
|
||||||
# compiler settings
|
# compiler settings
|
||||||
set_ostype()
|
set_ostype()
|
||||||
{
|
{
|
||||||
CGAL_OS_COMPILER="${SYST}_`compiler_basename`_`compiler_version`"
|
if [ -n "`compiler_version`" ]; then
|
||||||
|
CGAL_OS_COMPILER="${SYST}_`compiler_basename`-`compiler_version`"
|
||||||
|
else
|
||||||
|
CGAL_OS_COMPILER="${SYST}_`compiler_basename`"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# return the full os/compiler string
|
# return the full os/compiler string
|
||||||
|
|
@ -1619,7 +1658,7 @@ dir_menu()
|
||||||
u|U)
|
u|U)
|
||||||
_CHANGED='y'
|
_CHANGED='y'
|
||||||
if [ -z "$LEDA_EXT" ]; then
|
if [ -z "$LEDA_EXT" ]; then
|
||||||
LEDA_EXT='_L'
|
LEDA_EXT='_LEDA'
|
||||||
else
|
else
|
||||||
LEDA_EXT=''
|
LEDA_EXT=''
|
||||||
fi
|
fi
|
||||||
|
|
@ -1655,7 +1694,7 @@ dir_menu()
|
||||||
r|R)
|
r|R)
|
||||||
_CHANGED='y'
|
_CHANGED='y'
|
||||||
if [ -z "${GCC_RTTI_PATCH_EXT}" ]; then
|
if [ -z "${GCC_RTTI_PATCH_EXT}" ]; then
|
||||||
GCC_RTTI_PATCH_EXT='_patch'
|
GCC_RTTI_PATCH_EXT='_rtti'
|
||||||
else
|
else
|
||||||
GCC_RTTI_PATCH_EXT=''
|
GCC_RTTI_PATCH_EXT=''
|
||||||
fi
|
fi
|
||||||
|
|
@ -1721,9 +1760,12 @@ write_compiler_flags()
|
||||||
echo >> $FILE
|
echo >> $FILE
|
||||||
|
|
||||||
echo "CGAL_STL_VERSION = CGAL_STL_UNKNOWN" >> $FILE
|
echo "CGAL_STL_VERSION = CGAL_STL_UNKNOWN" >> $FILE
|
||||||
echo "CGAL_STL_INCLUDE_DIRECTIVE = -ISTL_include_directory" >> $FILE
|
echo "# *** Fill in your STL_include_directory ***" >> $FILE
|
||||||
|
echo "# (including the -I directive)" >> $FILE
|
||||||
|
echo "# (e.g. -I/usr/local/STL)" >> $FILE
|
||||||
|
echo "CGAL_STL_INCLUDE_DIRECTIVE =" >> $FILE
|
||||||
if [ ! -z "$USE_LEDA" ] ; then
|
if [ ! -z "$USE_LEDA" ] ; then
|
||||||
echo "LEDA_INCL_DIR = LEDA_include_directory" >> $FILE
|
echo "LEDA_INCL_DIR = *** FILL IN YOUR LEDA_include_directory ***" >> $FILE
|
||||||
fi
|
fi
|
||||||
echo >> $FILE
|
echo >> $FILE
|
||||||
|
|
||||||
|
|
@ -1759,12 +1801,14 @@ write_linker_flags()
|
||||||
echo >> $FILE
|
echo >> $FILE
|
||||||
|
|
||||||
if [ ! -z "$USE_LEDA" ] ; then
|
if [ ! -z "$USE_LEDA" ] ; then
|
||||||
echo "LEDA_LIB_DIR = LEDA_lib_directory" >> $FILE
|
echo "# *** Fill in your LEDA_lib_directory ***" >> $FILE
|
||||||
|
echo "LEDA_LIB_DIR =" >> $FILE
|
||||||
echo >> $FILE
|
echo >> $FILE
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -z "$USE_RTTI_PATCH" ] ; then
|
if [ ! -z "$USE_RTTI_PATCH" ] ; then
|
||||||
echo "GCC_RTTI_PATCH_DIR = g++_rttipatch_directory" >> $FILE
|
echo "# *** Fill in your g++_rttipatch_directory ***" >> $FILE
|
||||||
|
echo "GCC_RTTI_PATCH_DIR =" >> $FILE
|
||||||
echo >> $FILE
|
echo >> $FILE
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
@ -1806,6 +1850,26 @@ write_linker_flags()
|
||||||
|
|
||||||
_create_include_makefile()
|
_create_include_makefile()
|
||||||
{
|
{
|
||||||
|
FILE=$CGAL_MAKEFILE
|
||||||
|
|
||||||
|
if [ -z "$LEDA_EXT" ] ; then
|
||||||
|
USE_LEDA=
|
||||||
|
else
|
||||||
|
USE_LEDA=Y
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$GCC_RTTI_PATCH_EXT" ] ; then
|
||||||
|
USE_RTTI_PATCH=
|
||||||
|
if show_rtti_options; then
|
||||||
|
USE_STDEXCEPT=Y
|
||||||
|
else
|
||||||
|
USE_STDEXCEPT=
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
USE_RTTI_PATCH=Y
|
||||||
|
USE_STDEXCEPT=
|
||||||
|
fi
|
||||||
|
|
||||||
echo "# This file contains CGAL makefile settings for the following platform:" >> $FILE
|
echo "# This file contains CGAL makefile settings for the following platform:" >> $FILE
|
||||||
echo "# operating system: $OPERATING_SYSTEM" >> $FILE
|
echo "# operating system: $OPERATING_SYSTEM" >> $FILE
|
||||||
if [ ! -z "$USE_RTTI_PATCH" ] ; then
|
if [ ! -z "$USE_RTTI_PATCH" ] ; then
|
||||||
|
|
@ -1861,72 +1925,6 @@ _create_include_makefile()
|
||||||
echo >> $FILE
|
echo >> $FILE
|
||||||
}
|
}
|
||||||
|
|
||||||
_create_include_makefile_without_leda()
|
|
||||||
{
|
|
||||||
USE_LEDA=
|
|
||||||
USE_STDEXCEPT=
|
|
||||||
USE_RTTI_PATCH=
|
|
||||||
FILE=${CGAL_MAKE_DIR}/makefile_${CGAL_OS_COMPILER}
|
|
||||||
_create_include_makefile
|
|
||||||
}
|
|
||||||
|
|
||||||
_create_include_makefile_with_leda()
|
|
||||||
{
|
|
||||||
USE_LEDA=Y
|
|
||||||
USE_STDEXCEPT=
|
|
||||||
USE_RTTI_PATCH=
|
|
||||||
OLD_EXTENSION=${CGAL_OS_COMPILER}
|
|
||||||
CGAL_OS_COMPILER=${CGAL_OS_COMPILER}_L
|
|
||||||
FILE=${CGAL_MAKE_DIR}/makefile_${CGAL_OS_COMPILER}
|
|
||||||
_create_include_makefile
|
|
||||||
CGAL_OS_COMPILER=${OLD_EXTENSION}
|
|
||||||
}
|
|
||||||
|
|
||||||
_create_include_makefile_without_leda_gcc()
|
|
||||||
{
|
|
||||||
USE_LEDA=
|
|
||||||
USE_STDEXCEPT=Y
|
|
||||||
USE_RTTI_PATCH=
|
|
||||||
FILE=${CGAL_MAKE_DIR}/makefile_${CGAL_OS_COMPILER}
|
|
||||||
_create_include_makefile
|
|
||||||
}
|
|
||||||
|
|
||||||
_create_include_makefile_with_leda_gcc()
|
|
||||||
{
|
|
||||||
USE_LEDA=Y
|
|
||||||
USE_STDEXCEPT=Y
|
|
||||||
USE_RTTI_PATCH=
|
|
||||||
OLD_EXTENSION=${CGAL_OS_COMPILER}
|
|
||||||
CGAL_OS_COMPILER=${CGAL_OS_COMPILER}_L
|
|
||||||
FILE=${CGAL_MAKE_DIR}/makefile_${CGAL_OS_COMPILER}
|
|
||||||
_create_include_makefile
|
|
||||||
CGAL_OS_COMPILER=${OLD_EXTENSION}
|
|
||||||
}
|
|
||||||
|
|
||||||
_create_include_makefile_without_leda_gcc_patch()
|
|
||||||
{
|
|
||||||
USE_LEDA=
|
|
||||||
USE_STDEXCEPT=
|
|
||||||
USE_RTTI_PATCH=Y
|
|
||||||
OLD_EXTENSION=${CGAL_OS_COMPILER}
|
|
||||||
CGAL_OS_COMPILER=${CGAL_OS_COMPILER}_patch
|
|
||||||
FILE=${CGAL_MAKE_DIR}/makefile_${CGAL_OS_COMPILER}
|
|
||||||
_create_include_makefile
|
|
||||||
CGAL_OS_COMPILER=${OLD_EXTENSION}
|
|
||||||
}
|
|
||||||
|
|
||||||
_create_include_makefile_with_leda_gcc_patch()
|
|
||||||
{
|
|
||||||
USE_LEDA=Y
|
|
||||||
USE_STDEXCEPT=
|
|
||||||
USE_RTTI_PATCH=Y
|
|
||||||
OLD_EXTENSION=${CGAL_OS_COMPILER}
|
|
||||||
CGAL_OS_COMPILER=${CGAL_OS_COMPILER}_patch_L
|
|
||||||
FILE=${CGAL_MAKE_DIR}/makefile_${CGAL_OS_COMPILER}
|
|
||||||
_create_include_makefile
|
|
||||||
CGAL_OS_COMPILER=${OLD_EXTENSION}
|
|
||||||
}
|
|
||||||
|
|
||||||
# -----------------------------------------------------------
|
# -----------------------------------------------------------
|
||||||
# Now the new function to create the include makefile
|
# Now the new function to create the include makefile
|
||||||
# for compiler/os combination CGAL_OS_COMPILER
|
# for compiler/os combination CGAL_OS_COMPILER
|
||||||
|
|
@ -1948,8 +1946,7 @@ create_include_makefile()
|
||||||
CGAL_SHARED_LIB_CREATE="CC -shared -o"
|
CGAL_SHARED_LIB_CREATE="CC -shared -o"
|
||||||
WINDOW_DIR="/usr/lib/X11"
|
WINDOW_DIR="/usr/lib/X11"
|
||||||
RUNTIME_FLAG="-rpath "
|
RUNTIME_FLAG="-rpath "
|
||||||
_create_include_makefile_without_leda
|
_create_include_makefile;;
|
||||||
_create_include_makefile_with_leda;;
|
|
||||||
*IRIX*6.*CC*)
|
*IRIX*6.*CC*)
|
||||||
#### settings for sgi mipspro compiler on irix6
|
#### settings for sgi mipspro compiler on irix6
|
||||||
OPERATING_SYSTEM="IRIX 6.2"
|
OPERATING_SYSTEM="IRIX 6.2"
|
||||||
|
|
@ -1964,8 +1961,7 @@ create_include_makefile()
|
||||||
CGAL_SHARED_LIB_CREATE="CC -shared -o"
|
CGAL_SHARED_LIB_CREATE="CC -shared -o"
|
||||||
WINDOW_DIR="/usr/lib/X11"
|
WINDOW_DIR="/usr/lib/X11"
|
||||||
RUNTIME_FLAG="-rpath "
|
RUNTIME_FLAG="-rpath "
|
||||||
_create_include_makefile_without_leda
|
_create_include_makefile;;
|
||||||
_create_include_makefile_with_leda;;
|
|
||||||
*IRIX*g++*)
|
*IRIX*g++*)
|
||||||
#### settings for GNU compiler on irix
|
#### settings for GNU compiler on irix
|
||||||
OPERATING_SYSTEM="IRIX ?.?"
|
OPERATING_SYSTEM="IRIX ?.?"
|
||||||
|
|
@ -1980,10 +1976,7 @@ create_include_makefile()
|
||||||
CGAL_SHARED_LIB_CREATE="g++ -shared -o"
|
CGAL_SHARED_LIB_CREATE="g++ -shared -o"
|
||||||
WINDOW_DIR="/usr/lib/X11"
|
WINDOW_DIR="/usr/lib/X11"
|
||||||
RUNTIME_FLAG=
|
RUNTIME_FLAG=
|
||||||
_create_include_makefile_with_leda_gcc
|
_create_include_makefile;;
|
||||||
_create_include_makefile_without_leda_gcc
|
|
||||||
_create_include_makefile_with_leda_gcc_patch
|
|
||||||
_create_include_makefile_without_leda_gcc_patch;;
|
|
||||||
*SunOS*5.*CC*)
|
*SunOS*5.*CC*)
|
||||||
#### settings for sunpro compiler on solaris
|
#### settings for sunpro compiler on solaris
|
||||||
OPERATING_SYSTEM="Sun Solaris 2.5"
|
OPERATING_SYSTEM="Sun Solaris 2.5"
|
||||||
|
|
@ -1998,8 +1991,7 @@ create_include_makefile()
|
||||||
CGAL_SHARED_LIB_CREATE="CC -G -o"
|
CGAL_SHARED_LIB_CREATE="CC -G -o"
|
||||||
WINDOW_DIR="/usr/openwin/lib"
|
WINDOW_DIR="/usr/openwin/lib"
|
||||||
RUNTIME_FLAG="-R "
|
RUNTIME_FLAG="-R "
|
||||||
_create_include_makefile_without_leda
|
_create_include_makefile;;
|
||||||
_create_include_makefile_with_leda;;
|
|
||||||
*SunOS*5.*g++*)
|
*SunOS*5.*g++*)
|
||||||
#### settings for GNU compiler on solaris
|
#### settings for GNU compiler on solaris
|
||||||
OPERATING_SYSTEM="Sun Solaris 2.5"
|
OPERATING_SYSTEM="Sun Solaris 2.5"
|
||||||
|
|
@ -2014,10 +2006,7 @@ create_include_makefile()
|
||||||
CGAL_SHARED_LIB_CREATE="g++ -G -o"
|
CGAL_SHARED_LIB_CREATE="g++ -G -o"
|
||||||
WINDOW_DIR="/usr/openwin/lib"
|
WINDOW_DIR="/usr/openwin/lib"
|
||||||
RUNTIME_FLAG="-R "
|
RUNTIME_FLAG="-R "
|
||||||
_create_include_makefile_with_leda_gcc
|
_create_include_makefile;;
|
||||||
_create_include_makefile_without_leda_gcc
|
|
||||||
_create_include_makefile_with_leda_gcc_patch
|
|
||||||
_create_include_makefile_without_leda_gcc_patch;;
|
|
||||||
*Linux*g++*)
|
*Linux*g++*)
|
||||||
#### settings for GNU compiler on linux
|
#### settings for GNU compiler on linux
|
||||||
OPERATING_SYSTEM="Linux"
|
OPERATING_SYSTEM="Linux"
|
||||||
|
|
@ -2032,10 +2021,7 @@ create_include_makefile()
|
||||||
CGAL_SHARED_LIB_CREATE="g++ -G -o"
|
CGAL_SHARED_LIB_CREATE="g++ -G -o"
|
||||||
WINDOW_DIR="/usr/openwin/lib"
|
WINDOW_DIR="/usr/openwin/lib"
|
||||||
RUNTIME_FLAG=
|
RUNTIME_FLAG=
|
||||||
_create_include_makefile_with_leda_gcc
|
_create_include_makefile;;
|
||||||
_create_include_makefile_without_leda_gcc
|
|
||||||
_create_include_makefile_with_leda_gcc_patch
|
|
||||||
_create_include_makefile_without_leda_gcc_patch;;
|
|
||||||
*)
|
*)
|
||||||
#### settings for unknown compiler
|
#### settings for unknown compiler
|
||||||
OPERATING_SYSTEM="${SYST}"
|
OPERATING_SYSTEM="${SYST}"
|
||||||
|
|
@ -2050,10 +2036,7 @@ create_include_makefile()
|
||||||
CGAL_SHARED_LIB_CREATE="${COMPILER} -G -o"
|
CGAL_SHARED_LIB_CREATE="${COMPILER} -G -o"
|
||||||
WINDOW_DIR="/usr/lib/X11"
|
WINDOW_DIR="/usr/lib/X11"
|
||||||
RUNTIME_FLAG=
|
RUNTIME_FLAG=
|
||||||
_create_include_makefile_with_leda_gcc
|
_create_include_makefile;;
|
||||||
_create_include_makefile_without_leda_gcc
|
|
||||||
_create_include_makefile_with_leda_gcc_patch
|
|
||||||
_create_include_makefile_without_leda_gcc_patch;;
|
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2085,7 +2068,11 @@ generatemakefiles()
|
||||||
|
|
||||||
# create ${CGAL_MAKEFILE}, if it does not exist
|
# create ${CGAL_MAKEFILE}, if it does not exist
|
||||||
if [ ! -r ${CGAL_MAKEFILE} ]; then
|
if [ ! -r ${CGAL_MAKEFILE} ]; then
|
||||||
$1 "WARNING: `$_basename ${CGAL_MAKEFILE}` does not exist, creating."
|
$1 "remark: `$_basename ${CGAL_MAKEFILE}` does not exist, creating."
|
||||||
|
create_include_makefile
|
||||||
|
else
|
||||||
|
$1 "remark: `$_basename ${CGAL_MAKEFILE}` already exists, saving as \".bak\"."
|
||||||
|
/bin/mv ${CGAL_MAKEFILE} ${CGAL_MAKEFILE}.bak
|
||||||
create_include_makefile
|
create_include_makefile
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
@ -2232,7 +2219,7 @@ test_menu()
|
||||||
|
|
||||||
$_printf "${_LEFTSPACE}Updating `$_basename ${CGAL_TESTFILE}` ..."
|
$_printf "${_LEFTSPACE}Updating `$_basename ${CGAL_TESTFILE}` ..."
|
||||||
_check_write ${CGAL_TESTFILE}
|
_check_write ${CGAL_TESTFILE}
|
||||||
replace_line ${CGAL_TESTFILE} test_platform "test_platform=`full_ostype`"
|
replace_line ${CGAL_TESTFILE} PLATFORM "PLATFORM=`full_ostype`; testplatform"
|
||||||
$_chmod 744 ${CGAL_TESTFILE}
|
$_chmod 744 ${CGAL_TESTFILE}
|
||||||
$_printf " done.\n"
|
$_printf " done.\n"
|
||||||
|
|
||||||
|
|
@ -2332,7 +2319,7 @@ main_menu()
|
||||||
# check command line options:
|
# check command line options:
|
||||||
_tmp=`basename $0`
|
_tmp=`basename $0`
|
||||||
case $* in
|
case $* in
|
||||||
*h*|*H*)
|
*--help*|-h)
|
||||||
# help
|
# help
|
||||||
echo "This is the install script for CGAL ${CGAL_VERSION}."
|
echo "This is the install script for CGAL ${CGAL_VERSION}."
|
||||||
echo "Just type \"${_tmp}\" and follow the menus."
|
echo "Just type \"${_tmp}\" and follow the menus."
|
||||||
|
|
@ -2348,16 +2335,17 @@ case $* in
|
||||||
echo " For the rest you are on your own."
|
echo " For the rest you are on your own."
|
||||||
echo " (Have a look at the README file.)"
|
echo " (Have a look at the README file.)"
|
||||||
echo;;
|
echo;;
|
||||||
*v*|*V*)
|
*--version*|-V|-v)
|
||||||
# version
|
# version
|
||||||
echo "This is ${_tmp} version ${CGAL_INSTALL_VERSION}."
|
echo "This is ${_tmp} ${CGAL_INSTALL_VERSION}."
|
||||||
echo;;
|
echo;;
|
||||||
*os*|*OS*)
|
*-os*)
|
||||||
# architecture/os key
|
# architecture/os key
|
||||||
_uname=uname
|
_uname=uname
|
||||||
guess_os echo;;
|
guess_os echo;;
|
||||||
*ni*|*NI*)
|
*-ni*)
|
||||||
# non interactive mode:
|
# non interactive mode:
|
||||||
|
echo "---------------------------------------------------"
|
||||||
echo "running non interactive mode ..."
|
echo "running non interactive mode ..."
|
||||||
shift
|
shift
|
||||||
# check for spaces
|
# check for spaces
|
||||||
|
|
@ -2365,10 +2353,15 @@ case $* in
|
||||||
*" "*)
|
*" "*)
|
||||||
echo
|
echo
|
||||||
echo "ERROR: Too many arguments, exiting."
|
echo "ERROR: Too many arguments, exiting."
|
||||||
|
echo "Try: `basename $0` --help"
|
||||||
exit 1;;
|
exit 1;;
|
||||||
*)
|
*)
|
||||||
_uname=uname
|
INSTALL_LOGFILE_REDIRECTION=''
|
||||||
_basename=basename
|
echo "---------------------------------------------------"
|
||||||
|
echo "locating utilities ..."
|
||||||
|
_check_for_sysutil printf y
|
||||||
|
check_for_utils
|
||||||
|
echo "---------------------------------------------------"
|
||||||
guess_os echo
|
guess_os echo
|
||||||
_tmp=`${_basename} $* 2>/dev/null`
|
_tmp=`${_basename} $* 2>/dev/null`
|
||||||
if [ -z "${_tmp}" ]; then
|
if [ -z "${_tmp}" ]; then
|
||||||
|
|
@ -2378,17 +2371,22 @@ case $* in
|
||||||
elif [ -z "$*" ]; then
|
elif [ -z "$*" ]; then
|
||||||
echo
|
echo
|
||||||
echo "ERROR: Missing argument, exiting."
|
echo "ERROR: Missing argument, exiting."
|
||||||
|
echo "Try: `basename $0` --help"
|
||||||
exit 1
|
exit 1
|
||||||
elif [ ! -x $* ]; then
|
elif [ ! -x $* ]; then
|
||||||
echo
|
echo
|
||||||
echo "ERROR: Cannot execute $*, exiting."
|
echo "ERROR: Cannot execute $*, exiting."
|
||||||
|
echo "Try: `basename $0` --help"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
CGAL_OS_COMPILER="${SYST}_${_tmp}"
|
|
||||||
COMPILER="$*"
|
|
||||||
_mkdir=mkdir
|
|
||||||
_sed=sed
|
|
||||||
|
|
||||||
|
COMPILER="`compiler_description ${_tmp}`"
|
||||||
|
compute_compiler_version "$*"
|
||||||
|
echo "compiler is \"${COMPILER}\"."
|
||||||
|
set_ostype
|
||||||
|
echo "CGAL_OS_COMPILER is \"${CGAL_OS_COMPILER}\"."
|
||||||
|
|
||||||
|
echo "---------------------------------------------------"
|
||||||
echo "creating directories and makefiles ..."
|
echo "creating directories and makefiles ..."
|
||||||
# all four combinations
|
# all four combinations
|
||||||
make_lib_dir
|
make_lib_dir
|
||||||
|
|
@ -2397,9 +2395,9 @@ case $* in
|
||||||
CGAL_MAKEFILE=${CGAL_MAKE_DIR}/makefile_${_libname}
|
CGAL_MAKEFILE=${CGAL_MAKE_DIR}/makefile_${_libname}
|
||||||
generatemakefiles echo
|
generatemakefiles echo
|
||||||
|
|
||||||
LEDA_EXT='_L'
|
LEDA_EXT='_LEDA'
|
||||||
make_lib_dir
|
make_lib_dir
|
||||||
GCC_RTTI_PATCH_EXT='_patch'
|
GCC_RTTI_PATCH_EXT='_rtti'
|
||||||
make_lib_dir
|
make_lib_dir
|
||||||
LEDA_EXT=''
|
LEDA_EXT=''
|
||||||
make_lib_dir
|
make_lib_dir
|
||||||
|
|
@ -2450,4 +2448,11 @@ esac
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue