Added detection of TAUCS library at installation time

This commit is contained in:
Laurent Saboret 2006-03-16 17:21:55 +00:00
parent 678df1031c
commit 445397cbe8
11 changed files with 240 additions and 115 deletions

4
.gitattributes vendored
View File

@ -492,6 +492,8 @@ Homogeneous_kernel/changes.txt -text
Installation/config/support/README -text Installation/config/support/README -text
Installation/config/support/S05-BOOST -text Installation/config/support/S05-BOOST -text
Installation/config/support/S06-BOOST_PROGRAM_OPTIONS -text Installation/config/support/S06-BOOST_PROGRAM_OPTIONS -text
Installation/config/support/S09-TAUCSEXTERNAL -text
Installation/config/support/S10-TAUCSLIB -text
Installation/config/support/S20-GMP -text Installation/config/support/S20-GMP -text
Installation/config/support/S21-GMPXX -text Installation/config/support/S21-GMPXX -text
Installation/config/support/S25-MPFR -text Installation/config/support/S25-MPFR -text
@ -511,6 +513,8 @@ Installation/config/support/test_GMPXX.C -text
Installation/config/support/test_LEDA.C -text Installation/config/support/test_LEDA.C -text
Installation/config/support/test_MPFR.C -text Installation/config/support/test_MPFR.C -text
Installation/config/support/test_QT.C -text Installation/config/support/test_QT.C -text
Installation/config/support/test_TAUCS.C -text
Installation/config/support/test_TAUCSEXTERNAL.C -text
Installation/config/testfiles/CGAL_CFG_DEEP_DEPENDENT_TEMPLATE_BUG.C -text Installation/config/testfiles/CGAL_CFG_DEEP_DEPENDENT_TEMPLATE_BUG.C -text
Installation/config/testfiles/CGAL_CFG_OUTOFLINE_MEMBER_DEFINITION_BUG.C -text Installation/config/testfiles/CGAL_CFG_OUTOFLINE_MEMBER_DEFINITION_BUG.C -text
Installation/config/testfiles/CGAL_CFG_SUNPRO_RWSTD.C -text Installation/config/testfiles/CGAL_CFG_SUNPRO_RWSTD.C -text

View File

@ -1,3 +1,6 @@
16 March 2006 Laurent Saboret
- Added detection of TAUCS library
07 March 2006 Sylvain Pion 07 March 2006 Sylvain Pion
- Merge Configuration package into Installation. - Merge Configuration package into Installation.
(old Configuration/changes.txt appended to the end of this file) (old Configuration/changes.txt appended to the end of this file)
@ -107,7 +110,7 @@
- Removed gcc.lib again - Removed gcc.lib again
13 October 2004 Andreas Fabri 13 October 2004 Andreas Fabri
- install_cgal: When using mpfr for Gmpq::to_interval() with MS or Intel compiler on Windows - install_cgal: When using mpfr for Gmpq::to_interval() with MS or Intel compiler on Windows
we have to link against libgcc.a (or gcc.lib) from mingw we have to link against libgcc.a (or gcc.lib) from mingw
6 October 2004 Andreas Fabri 6 October 2004 Andreas Fabri
@ -238,7 +241,7 @@
- Add --disable-shared. - Add --disable-shared.
13 May 2004 Radu Ursu 13 May 2004 Radu Ursu
- install_cgal configures gmp with mpfr support. - install_cgal configures gmp with mpfr support.
06 May 2004 Sylvain Pion 06 May 2004 Sylvain Pion
- Redo April 30's change for ICC. - Redo April 30's change for ICC.
@ -250,7 +253,7 @@
- Undo April 30's change for ICC. - Undo April 30's change for ICC.
04 May 2004 Radu Ursu 04 May 2004 Radu Ursu
- fixed temporay bug in installation of gmp: gmp.h, gmpxx.h are not copied - fixed temporay bug in installation of gmp: gmp.h, gmpxx.h are not copied
to the right location to the right location
- I suspect it's a small change in gmp-4.1.3 or a possible bug in configure - I suspect it's a small change in gmp-4.1.3 or a possible bug in configure
@ -282,7 +285,7 @@
- install_cgal : remove obsolete comment. - install_cgal : remove obsolete comment.
26 Feb 2004 Radu Ursu 26 Feb 2004 Radu Ursu
- install_cgal takes the CGAL_VERSION from include/CGAL/version.h - install_cgal takes the CGAL_VERSION from include/CGAL/version.h
moved get_cgal_version call before all the cgal_install_header calls moved get_cgal_version call before all the cgal_install_header calls
this way the version is displayed from the beginning this way the version is displayed from the beginning
@ -2228,9 +2231,9 @@ GLOB: added test-suite option.
- Remove Weighted_point from Matching_bug_wrapper. - Remove Weighted_point from Matching_bug_wrapper.
2.76 6/8/2003 2.76 6/8/2003
- In Sun_fixes.h the added value_type() etc. functions are put - In Sun_fixes.h the added value_type() etc. functions are put
into namespace CGAL to be found by Koenig-lookup. into namespace CGAL to be found by Koenig-lookup.
- We also have to add one more overload for these functions - We also have to add one more overload for these functions
(for pointers) to please SunPro 5.5. (for pointers) to please SunPro 5.5.
2.75 5/8/2003 2.75 5/8/2003
@ -2375,7 +2378,7 @@ GLOB: added test-suite option.
2.31 2.31
- Added a function test in the CGAL_NO_TMPL_IN_TMPL_PARAM.C. - Added a function test in the CGAL_NO_TMPL_IN_TMPL_PARAM.C.
template < template < class T > class HDS> template < template < class T > class HDS>
void fct(HDS<int> h1 ) { // here it does not compile } void fct(HDS<int> h1 ) { // here it does not compile }
2.30 2.30
- Fixed STLport include (not for VC7) as suggested by Radu. - Fixed STLport include (not for VC7) as suggested by Radu.
@ -2441,7 +2444,7 @@ GLOB: added test-suite option.
2.11 2.11
+ Removed workaround_stl.h workaround_return_type.h and workaround_casts.h. + Removed workaround_stl.h workaround_return_type.h and workaround_casts.h.
+ removed obsolete config testfiles: + removed obsolete config testfiles:
CGAL_CFG_DYNAMIC_CAST_BUG.C and CGAL_CFG_NO_DYNAMIC_CAST.C CGAL_CFG_DYNAMIC_CAST_BUG.C and CGAL_CFG_NO_DYNAMIC_CAST.C
2.10 2.10
+ Added CGAL_CFG_NO_TMPL_IN_TMPL_DEPENDING_FUNCTION_PARAM.C + Added CGAL_CFG_NO_TMPL_IN_TMPL_DEPENDING_FUNCTION_PARAM.C
@ -2600,7 +2603,7 @@ GLOB: added test-suite option.
CGAL_CFG_NO_TYPENAME.C CGAL_CFG_NO_TYPENAME.C
CGAL_CFG_RETURN_TYPE_BUG_1.C CGAL_CFG_RETURN_TYPE_BUG_1.C
CGAL_CFG_RETURN_TYPE_BUG_2.C CGAL_CFG_RETURN_TYPE_BUG_2.C
+Updated: +Updated:
CGAL_CFG_NO_ITERATOR_TRAITS.C and CGAL_CFG_NO_ITERATOR_TRAITS.C and
CGAL_CFG_NO_TEMPLATE_FRIEND_DISTINCTION.C CGAL_CFG_NO_TEMPLATE_FRIEND_DISTINCTION.C
//-----------------------------------------------------------------------// //-----------------------------------------------------------------------//

View File

@ -0,0 +1,17 @@
# TAUCS, a Library of Sparse Linear Solvers (http://www.tau.ac.il/~stoledo/taucs/)
# First step "TAUCSEXTERNAL": find TAUCS platform dependent header directory
# + TAUCS external libs
DESCRIPTION =
PROVIDES = TAUCSEXTERNAL
CXXFLAGS =
LDFLAGS =
LIBS = lapack f77blas cblas atlas metis g2c
REQUIRES = DOLLAR_TAUCSROOT DOLLAR_TAUCS_OSTYPE
INCOMPATIBLE =
STDINCLDIRS = ${TAUCSROOT}/build/${TAUCS_OSTYPE}
INCLTHING = taucs_config_build.h
STDLIBDIRS = ${TAUCSROOT}/external/lib/${TAUCS_OSTYPE}
LIBTHING = libmetis.\*
# EOF

View File

@ -0,0 +1,16 @@
# TAUCS, a Library of Sparse Linear Solvers (http://www.tau.ac.il/~stoledo/taucs/)
# Second step "TAUCS": find TAUCS main header and library
DESCRIPTION =
PROVIDES = TAUCS
CXXFLAGS =
LDFLAGS =
LIBS = taucs
REQUIRES = DOLLAR_TAUCSROOT DOLLAR_TAUCS_OSTYPE TAUCSEXTERNAL
INCOMPATIBLE =
STDINCLDIRS = ${TAUCSROOT}/src
INCLTHING = taucs.h
STDLIBDIRS = ${TAUCSROOT}/lib/${TAUCS_OSTYPE}
LIBTHING = libtaucs.\*
# EOF

View File

@ -0,0 +1,88 @@
// Copyright (c) 2004 Utrecht University (The Netherlands),
// ETH Zurich (Switzerland), Freie Universitaet Berlin (Germany),
// INRIA Sophia-Antipolis (France), Martin-Luther-University Halle-Wittenberg
// (Germany), Max-Planck-Institute Saarbruecken (Germany), RISC Linz (Austria),
// and Tel-Aviv University (Israel). All rights reserved.
//
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation; version 2.1 of the License.
// See the file LICENSE.LGPL distributed with CGAL.
//
// Licensees holding a valid commercial license may use this file in
// accordance with the commercial license agreement provided with the software.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
//
// $URL$
// $Id$
//
// Author(s) : Omer Meshar, Laurent Saboret
// ---------------------------------------------------------------------
// A short test program to evaluate a machine architecture.
// This program is used by cgal_configure.
// The following documentation will be pasted in the generated configfile.
// ---------------------------------------------------------------------
// Test if TAUCS is available
// Second step "TAUCS": find TAUCS main header and library
#include <iostream>
#include <stdlib.h>
#include <stdio.h>
#define TAUCS_CORE_DOUBLE
// Include TAUCS main header taucs.h
#ifndef CGAL_INCLUDED_TAUCS_H
#define CGAL_INCLUDED_TAUCS_H
// In GCC 3.x, <complex.h> includes <complex> and
// complains if we include <complex.h> within "extern C {}"
#if defined(__GNUC__)
#undef __DEPRECATED
#include <complex.h>
#endif
// TAUCS is a C library
extern "C" {
#include <taucs.h>
}
// Avoid error with std::min() and std::max()
#undef min
#undef max
#endif
int main(int argc, char* argv[])
{
// Create a TAUCS matrix to link with TAUCS main library
int m = 4,n = 4,nnz = 4, i;
taucs_ccs_matrix* pMatrix = taucs_ccs_create(m, n, nnz, TAUCS_DOUBLE);
pMatrix->colptr[0] = 0;
pMatrix->colptr[1] = 4;
for ( i = 0; i < 4; i++ )
{
pMatrix->rowind[i] = i;
pMatrix->taucs_values[i] = i;
}
taucs_dccs_free(pMatrix);
// Call a method needing TAUCS external libraries
int* perm;
int* invperm;
taucs_ccs_order(pMatrix,
&perm,
&invperm,
"metis");
// TAUCS provides no version number :-(
// Version 1 is obsolete, thus we assume version 2 (latest is 2.2 on 03/2006)
std::cout << "version=2" << std::endl;
return 0;
}

View File

@ -0,0 +1,63 @@
// Copyright (c) 2004 Utrecht University (The Netherlands),
// ETH Zurich (Switzerland), Freie Universitaet Berlin (Germany),
// INRIA Sophia-Antipolis (France), Martin-Luther-University Halle-Wittenberg
// (Germany), Max-Planck-Institute Saarbruecken (Germany), RISC Linz (Austria),
// and Tel-Aviv University (Israel). All rights reserved.
//
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation; version 2.1 of the License.
// See the file LICENSE.LGPL distributed with CGAL.
//
// Licensees holding a valid commercial license may use this file in
// accordance with the commercial license agreement provided with the software.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
//
// $URL$
// $Id$
//
// Author(s) : Laurent Saboret
// ---------------------------------------------------------------------
// A short test program to evaluate a machine architecture.
// This program is used by cgal_configure.
// The following documentation will be pasted in the generated configfile.
// ---------------------------------------------------------------------
// Test if TAUCS is available
// First step "TAUCSEXTERNAL": find TAUCS platform dependent header directory
// + TAUCS external libs
#include <iostream>
#include <stdlib.h>
#include <stdio.h>
// TAUCS is a C library
extern "C"
{
// Include file in ${TAUCSROOT}/build/${TAUCS_OSTYPE}
#include <taucs_config_build.h>
/* from stuct.h in metis */
typedef int idxtype;
/* from metis.h */
void METIS_NodeND(int *, idxtype *, idxtype *, int *, int *, idxtype *, idxtype *);
}
int main(int argc, char* argv[])
{
// Call function in metis lib
METIS_NodeND(NULL, NULL, NULL, NULL, NULL, NULL, NULL);
// TAUCS external libraries have various version numbers => do not print one
return 0;
}

View File

@ -679,6 +679,42 @@ old_guess_os()
OLD_SYST="${_tmp}`${_uname} -s | ${_sed} 's/_//g'`-`${_uname} -r | ${_sed} -e 's/(.*)//g' -e 's/_/-/g' | ${_awk} '{print $1}'`" OLD_SYST="${_tmp}`${_uname} -s | ${_sed} 's/_//g'`-`${_uname} -r | ${_sed} -e 's/(.*)//g' -e 's/_/-/g' | ${_awk} '{print $1}'`"
} }
# Set ${TAUCS_OSTYPE} (variable indicating the platform name for TAUCS library)
# Note: This code is copied from TAUCS configure script
set_TAUCS_OSTYPE()
{
# In most cases, OSTYPE is set automatically before
# the user's shell begins, but sometimes it is
# not set or set in a way that is inconsistent
# with our usage.
TAUCS_OSTYPE=${OSTYPE}
# On SGI IRIX systems, OSTYPE is not set
# (at least in Tel-Aviv University)
if [ \( ${TAUCS_OSTYPE:-fail} = "fail" \) -a \( `uname` = "IRIX64" \) ] ; then
TAUCS_OSTYPE=irix
fi
# On Linux, OSTYPE is usually set to "linux",
# but if it is not set (or if the user unsets it),
# /bin/sh supplies its own politically-correct,
# string, which we need to normalize.
if [ ${TAUCS_OSTYPE:-fail} = "linux-gnu" ] ; then
TAUCS_OSTYPE=linux
fi
# If TAUCS_OSTYPE is still not set, we try to set it
# from uname, folding to lower case. This should sometimes
# work, but sometimes uname returns a value that is
# inconsistent with the way OSTYPE is set. For example, on
# Solaris, OSTYPE=solaris but uname returns SunOS.
if [ ${TAUCS_OSTYPE:-fail} = "fail" ] ; then
TAUCS_OSTYPE=`uname | tr "A-Z" "a-z"`
fi
${_printf} "\$TAUCS_OSTYPE is set to ${TAUCS_OSTYPE}" >> "${INSTALL_LOGFILE}"
}
# ------------------------------------------------------- # -------------------------------------------------------
# several directories depend on the setting of CGAL_DIR # several directories depend on the setting of CGAL_DIR
# we put these into a function that can be called in case # we put these into a function that can be called in case
@ -4880,6 +4916,9 @@ _printf=printf
_rm=rm _rm=rm
CGAL_INSTALL_VERSION="`_install_version_number`" CGAL_INSTALL_VERSION="`_install_version_number`"
# Set ${TAUCS_OSTYPE} (variable indicating the platform name for TAUCS library)
set_TAUCS_OSTYPE
# first quickly process "trivial" commandline options # first quickly process "trivial" commandline options
# (starting the whole parsing process would slowdown too much...) # (starting the whole parsing process would slowdown too much...)
case ${*} in case ${*} in

View File

@ -62,27 +62,6 @@ compile_and_run()
rm -f $ERRORFILE rm -f $ERRORFILE
touch $ERRORFILE touch $ERRORFILE
#---------------------------------------------------------------------#
# set TAUCS compilation options
# (temporary, until set by CGAL installer)
#---------------------------------------------------------------------#
# if TAUCS is installed
if [ -n "$TAUCSROOT" ] ; then
# Evaluate dynamically TAUCS OSTYPE
TAUCS_OSTYPE=`$CGAL/scripts/compute_TAUCS_OSTYPE`
# add TAUCS compilation options
export TESTSUITE_CXXFLAGS="$TESTSUITE_CXXFLAGS \
-DCGAL_USE_TAUCS \
-I$TAUCSROOT/src \
-I$TAUCSROOT/build/$TAUCS_OSTYPE"
export TESTSUITE_LDFLAGS="$TESTSUITE_LDFLAGS \
-L$TAUCSROOT/lib/$TAUCS_OSTYPE \
-L$TAUCSROOT/external/lib/$TAUCS_OSTYPE \
-ltaucs -llapack -lf77blas -lcblas -latlas -lmetis -lg2c"
fi
#---------------------------------------------------------------------# #---------------------------------------------------------------------#
# compile and run the tests # compile and run the tests
#---------------------------------------------------------------------# #---------------------------------------------------------------------#

View File

@ -21,7 +21,7 @@
#ifndef CGAL_TAUCS_FIX #ifndef CGAL_TAUCS_FIX
#define CGAL_TAUCS_FIX #define CGAL_TAUCS_FIX
// Include TAUCS main header // Include TAUCS main header taucs.h
#ifndef CGAL_INCLUDED_TAUCS_H #ifndef CGAL_INCLUDED_TAUCS_H
#define CGAL_INCLUDED_TAUCS_H #define CGAL_INCLUDED_TAUCS_H

View File

@ -1,63 +0,0 @@
#!/bin/sh
# Copyright (c) 2005,2006 Utrecht University (The Netherlands),
# ETH Zurich (Switzerland), Freie Universitaet Berlin (Germany),
# INRIA Sophia-Antipolis (France), Martin-Luther-University Halle-Wittenberg
# (Germany), Max-Planck-Institute Saarbruecken (Germany), RISC Linz (Austria),
# and Tel-Aviv University (Israel). All rights reserved.
#
# This file is part of CGAL (www.cgal.org); you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public License as
# published by the Free Software Foundation; version 2.1 of the License.
# See the file LICENSE.LGPL distributed with CGAL.
#
# Licensees holding a valid commercial license may use this file in
# accordance with the commercial license agreement provided with the software.
#
# This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
# WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#
# $URL$
# $Id$
#
# Author(s) : Laurent Saboret, Pierre Alliez, Bruno Levy (from $TAUCSROOT/configure)
# Purpose : Figure out TAUCS OSTYPE and print it
# In most cases it is set automatically before
# the user's shell begins, but sometimes it is
# not set or set in a way that is inconsistent
# with our usage.
# On SGI IRIX systems, OSTYPE is not set
# (at least in Tel-Aviv University)
if [ \( ${OSTYPE:-fail} = "fail" \) -a \( `uname` = "IRIX64" \) ] ; then
OSTYPE=irix
fi
# On Linux OSTYPE is usually set to "linux",
# but if it is not set (or if the user unsets it),
# /bin/sh supplies its own politically-correct,
# string, which we need to normalize.
if [ ${OSTYPE:-fail} = "linux-gnu" ] ; then
OSTYPE=linux
fi
# If OSTYPE is still not set, we try to set it
# from uname, folding to lower case. This should sometimes
# work, but sometimes uname returns a value that is
# inconsistent with the way OSTYPE is set. For example, on
# Solaris, OSTYPE=solaris but uname returns SunOS.
if [ ${OSTYPE:-fail} = "fail" ] ; then
OSTYPE=`uname | tr "A-Z" "a-z"`
fi
# Print result
if [ ${OSTYPE:-fail} = "fail" ] ; then
echo ""
else
echo $OSTYPE
fi

View File

@ -62,27 +62,6 @@ compile_and_run()
rm -f $ERRORFILE rm -f $ERRORFILE
touch $ERRORFILE touch $ERRORFILE
#---------------------------------------------------------------------#
# set TAUCS compilation options
# (temporary, until set by CGAL installer)
#---------------------------------------------------------------------#
# if TAUCS is installed
if [ -n "$TAUCSROOT" ] ; then
# Evaluate dynamically TAUCS OSTYPE
TAUCS_OSTYPE=`$CGAL/scripts/compute_TAUCS_OSTYPE`
# add TAUCS compilation options
export TESTSUITE_CXXFLAGS="$TESTSUITE_CXXFLAGS \
-DCGAL_USE_TAUCS \
-I$TAUCSROOT/src \
-I$TAUCSROOT/build/$TAUCS_OSTYPE"
export TESTSUITE_LDFLAGS="$TESTSUITE_LDFLAGS \
-L$TAUCSROOT/lib/$TAUCS_OSTYPE \
-L$TAUCSROOT/external/lib/$TAUCS_OSTYPE \
-ltaucs -llapack -lf77blas -lcblas -latlas -lmetis -lg2c"
fi
#---------------------------------------------------------------------# #---------------------------------------------------------------------#
# compile and run the tests # compile and run the tests
#---------------------------------------------------------------------# #---------------------------------------------------------------------#