mirror of https://github.com/CGAL/cgal
Added detection of TAUCS library at installation time
This commit is contained in:
parent
678df1031c
commit
445397cbe8
|
|
@ -492,6 +492,8 @@ Homogeneous_kernel/changes.txt -text
|
|||
Installation/config/support/README -text
|
||||
Installation/config/support/S05-BOOST -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/S21-GMPXX -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_MPFR.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_OUTOFLINE_MEMBER_DEFINITION_BUG.C -text
|
||||
Installation/config/testfiles/CGAL_CFG_SUNPRO_RWSTD.C -text
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
16 March 2006 Laurent Saboret
|
||||
- Added detection of TAUCS library
|
||||
|
||||
07 March 2006 Sylvain Pion
|
||||
- Merge Configuration package into Installation.
|
||||
(old Configuration/changes.txt appended to the end of this 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
|
||||
|
|
@ -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
|
||||
|
|
@ -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;
|
||||
}
|
||||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -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}'`"
|
||||
}
|
||||
|
||||
# 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
|
||||
# we put these into a function that can be called in case
|
||||
|
|
@ -4880,6 +4916,9 @@ _printf=printf
|
|||
_rm=rm
|
||||
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
|
||||
# (starting the whole parsing process would slowdown too much...)
|
||||
case ${*} in
|
||||
|
|
|
|||
|
|
@ -62,27 +62,6 @@ compile_and_run()
|
|||
rm -f $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
|
||||
#---------------------------------------------------------------------#
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
#ifndef CGAL_TAUCS_FIX
|
||||
#define CGAL_TAUCS_FIX
|
||||
|
||||
// Include TAUCS main header
|
||||
// Include TAUCS main header taucs.h
|
||||
#ifndef CGAL_INCLUDED_TAUCS_H
|
||||
#define CGAL_INCLUDED_TAUCS_H
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
@ -62,27 +62,6 @@ compile_and_run()
|
|||
rm -f $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
|
||||
#---------------------------------------------------------------------#
|
||||
|
|
|
|||
Loading…
Reference in New Issue