Commit 84d745a5 authored by Gilles Caulier's avatar Gilles Caulier 🗼
Browse files

Remove clapack library from digiKam core used by Refocus tool.

Add new optional dependency to Eigen3 library to replace clapack
REVIEW: 109692
BUGS: 251563
FIXED-IN: 3.2.0
parent 52869940
......@@ -160,7 +160,7 @@ FIND_PACKAGE(Jasper)
FIND_PACKAGE(Kface)
FIND_PACKAGE(KGeoMap)
FIND_PACKAGE(PGF)
FIND_PACKAGE(CLAPACK)
FIND_PACKAGE(Eigen3)
FIND_PACKAGE(Boost) # 1.36.0)
# BEGIN SPECIAL OPENCV HANDLING
......@@ -455,6 +455,8 @@ MACRO_OPTIONAL_FIND_PACKAGE(Doxygen)
MACRO_OPTIONAL_FIND_PACKAGE(Sqlite2)
MACRO_BOOL_TO_01(SQLITE2_FOUND HAVE_SQLITE2)
MACRO_BOOL_TO_01(EIGEN3_FOUND HAVE_EIGEN3)
# Set config files accordingly with optional dependencies
CONFIGURE_FILE(digikam/utils/config-digikam.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/digikam/utils/config-digikam.h)
......@@ -504,11 +506,14 @@ ENDIF(PGF_FOUND)
# ================================================================
IF(CLAPACK_FOUND)
MESSAGE(STATUS " libclapack library found................. YES (optional)")
ELSE(CLAPACK_FOUND)
MESSAGE(STATUS " libclapack library found................. NO (optional - internal version used instead)")
ENDIF(CLAPACK_FOUND)
IF(EIGEN3_FOUND)
MESSAGE(STATUS " Eigen3 library found..................... YES (optional)")
ELSE(EIGEN3_FOUND)
MESSAGE(STATUS " Eigen3 library found..................... NO (optional)")
MESSAGE(STATUS "")
MESSAGE(STATUS " digiKam will be compiled without Refocus tool support.")
MESSAGE(STATUS "")
ENDIF(EIGEN3_FOUND)
# ================================================================
......@@ -606,11 +611,11 @@ ELSE(LCMS_FOUND AND JPEG_FOUND AND PNG_FOUND AND TIFF_FOUND AND Boost_FOUND AND
SET(DIGIKAM_CAN_BE_COMPILED false)
ENDIF(LCMS_FOUND AND JPEG_FOUND AND PNG_FOUND AND TIFF_FOUND AND Boost_FOUND AND JASPER_FOUND AND KDCRAW_FOUND AND KEXIV2_FOUND AND KIPI_FOUND AND KFACE_FOUND AND KGEOMAP_FOUND)
IF(DIGIKAM_CAN_BE_COMPILED AND FORCED_UNBUNDLE AND ((NOT PGF_FOUND) OR (NOT CLAPACK_FOUND)))
IF(DIGIKAM_CAN_BE_COMPILED AND FORCED_UNBUNDLE AND ((NOT PGF_FOUND) OR (NOT EIGEN3_FOUND)))
MESSAGE(STATUS "")
MESSAGE(FATAL_ERROR " BUNDLED LIBRARIES HAVE BEEN FORCE-DISABLED IN THIS BUILD. Aborting.")
SET(DIGIKAM_CAN_BE_COMPILED false)
ENDIF(DIGIKAM_CAN_BE_COMPILED AND FORCED_UNBUNDLE AND ((NOT PGF_FOUND) OR (NOT CLAPACK_FOUND)))
ENDIF(DIGIKAM_CAN_BE_COMPILED AND FORCED_UNBUNDLE AND ((NOT PGF_FOUND) OR (NOT EIGEN3_FOUND)))
MESSAGE(STATUS "----------------------------------------------------------------------------------")
MESSAGE(STATUS "")
......@@ -726,46 +731,6 @@ IF(DIGIKAM_CAN_BE_COMPILED)
)
ENDIF(PGF_FOUND)
IF(CLAPACK_FOUND)
INCLUDE_DIRECTORIES(${CLAPACK_INCLUDE_DIR})
ELSE(CLAPACK_FOUND)
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/libs/3rdparty/clapack)
SET(libclapack_SRCS
${CMAKE_CURRENT_SOURCE_DIR}/libs/3rdparty/clapack/abort_.c
${CMAKE_CURRENT_SOURCE_DIR}/libs/3rdparty/clapack/dgesv.c
${CMAKE_CURRENT_SOURCE_DIR}/libs/3rdparty/clapack/dlaswp.c
${CMAKE_CURRENT_SOURCE_DIR}/libs/3rdparty/clapack/endfile.c
${CMAKE_CURRENT_SOURCE_DIR}/libs/3rdparty/clapack/idamax.c
${CMAKE_CURRENT_SOURCE_DIR}/libs/3rdparty/clapack/open.c
${CMAKE_CURRENT_SOURCE_DIR}/libs/3rdparty/clapack/sig_die.c
${CMAKE_CURRENT_SOURCE_DIR}/libs/3rdparty/clapack/wref.c
${CMAKE_CURRENT_SOURCE_DIR}/libs/3rdparty/clapack/close.c
${CMAKE_CURRENT_SOURCE_DIR}/libs/3rdparty/clapack/dgetf2.c
${CMAKE_CURRENT_SOURCE_DIR}/libs/3rdparty/clapack/dscal.c
${CMAKE_CURRENT_SOURCE_DIR}/libs/3rdparty/clapack/err.c
${CMAKE_CURRENT_SOURCE_DIR}/libs/3rdparty/clapack/ieeeck.c
${CMAKE_CURRENT_SOURCE_DIR}/libs/3rdparty/clapack/s_cmp.c
${CMAKE_CURRENT_SOURCE_DIR}/libs/3rdparty/clapack/s_stop.c
${CMAKE_CURRENT_SOURCE_DIR}/libs/3rdparty/clapack/wrtfmt.c
${CMAKE_CURRENT_SOURCE_DIR}/libs/3rdparty/clapack/dgemm.c
${CMAKE_CURRENT_SOURCE_DIR}/libs/3rdparty/clapack/dgetrf.c
${CMAKE_CURRENT_SOURCE_DIR}/libs/3rdparty/clapack/dswap.c
${CMAKE_CURRENT_SOURCE_DIR}/libs/3rdparty/clapack/fmt.c
${CMAKE_CURRENT_SOURCE_DIR}/libs/3rdparty/clapack/ilaenv.c
${CMAKE_CURRENT_SOURCE_DIR}/libs/3rdparty/clapack/s_copy.c
${CMAKE_CURRENT_SOURCE_DIR}/libs/3rdparty/clapack/wsfe.c
${CMAKE_CURRENT_SOURCE_DIR}/libs/3rdparty/clapack/dger.c
${CMAKE_CURRENT_SOURCE_DIR}/libs/3rdparty/clapack/dgetrs.c
${CMAKE_CURRENT_SOURCE_DIR}/libs/3rdparty/clapack/dtrsm.c
${CMAKE_CURRENT_SOURCE_DIR}/libs/3rdparty/clapack/fmtlib.c
${CMAKE_CURRENT_SOURCE_DIR}/libs/3rdparty/clapack/lsame.c
${CMAKE_CURRENT_SOURCE_DIR}/libs/3rdparty/clapack/sfe.c
${CMAKE_CURRENT_SOURCE_DIR}/libs/3rdparty/clapack/util.c
${CMAKE_CURRENT_SOURCE_DIR}/libs/3rdparty/clapack/xerbla.c
)
ENDIF(CLAPACK_FOUND)
# ==================================================================================================
# Lensfun and LibLqr-1 library rules
IF(LQR-1_FOUND)
......@@ -782,6 +747,16 @@ IF(DIGIKAM_CAN_BE_COMPILED)
ENDIF(LENSFUN_FOUND)
# Refocus tool dependency
IF(EIGEN3_FOUND)
INCLUDE_DIRECTORIES(${EIGEN3_INCLUDE_DIR})
ADD_DEFINITIONS(-DEIGEN3_VERSION_NUMBER="${EIGEN3_VERSION}")
ENDIF(EIGEN3_FOUND)
# ==================================================================================================
# Common targets parts
......@@ -815,7 +790,6 @@ IF(DIGIKAM_CAN_BE_COMPILED)
)
SET(libdimgfilters_SRCS
${libclapack_SRCS}
${CMAKE_CURRENT_SOURCE_DIR}/libs/dklcms/digikam-lcms.cpp
${CMAKE_CURRENT_SOURCE_DIR}/libs/dimg/filters/dimgbuiltinfilter.cpp
${CMAKE_CURRENT_SOURCE_DIR}/libs/dimg/filters/dimgthreadedfilter.cpp
......@@ -875,8 +849,6 @@ IF(DIGIKAM_CAN_BE_COMPILED)
${CMAKE_CURRENT_SOURCE_DIR}/libs/dimg/filters/nr/nrsettings.cpp
${CMAKE_CURRENT_SOURCE_DIR}/libs/dimg/filters/sharp/sharpenfilter.cpp
${CMAKE_CURRENT_SOURCE_DIR}/libs/dimg/filters/sharp/unsharpmaskfilter.cpp
${CMAKE_CURRENT_SOURCE_DIR}/libs/dimg/filters/sharp/refocusfilter.cpp
${CMAKE_CURRENT_SOURCE_DIR}/libs/dimg/filters/sharp/matrix.cpp
${CMAKE_CURRENT_SOURCE_DIR}/libs/dimg/filters/sharp/sharpsettings.cpp
${CMAKE_CURRENT_SOURCE_DIR}/libs/dimg/filters/levels/imagelevels.cpp
${CMAKE_CURRENT_SOURCE_DIR}/libs/dimg/filters/levels/levelsfilter.cpp
......@@ -920,10 +892,19 @@ IF(DIGIKAM_CAN_BE_COMPILED)
${CMAKE_CURRENT_SOURCE_DIR}/libs/dimg/filters/lens/lensfuncameraselector.cpp
${CMAKE_CURRENT_SOURCE_DIR}/libs/dimg/filters/lens/lensfuniface.cpp
${CMAKE_CURRENT_SOURCE_DIR}/libs/dimg/filters/lens/lensfunsettings.cpp
)
)
ENDIF(LENSFUN_FOUND)
IF(EIGEN3_FOUND)
SET(libdimgfilters_SRCS ${libdimgfilters_SRCS}
${CMAKE_CURRENT_SOURCE_DIR}/libs/dimg/filters/sharp/refocusfilter.cpp
${CMAKE_CURRENT_SOURCE_DIR}/libs/dimg/filters/sharp/matrix.cpp
)
ENDIF(EIGEN3_FOUND)
SET(libdmetadata_SRCS
${CMAKE_CURRENT_SOURCE_DIR}/libs/dmetadata/metadatasettings.cpp
${CMAKE_CURRENT_SOURCE_DIR}/libs/dmetadata/metadatasettingscontainer.cpp
......
......@@ -4,6 +4,7 @@ digiKam 3.2.0 - Release date: 2013-04-07
NEW FEATURES:
AlbumGUI : New "Table-View" view mode dedictaed to show album items in a list view.
General : Remove internal clapack library code. Set only an optional and external dependency to eigen3.
BUGFIXES FROM KDE BUGZILLA (alias B.K.O | http://bugs.kde.org):
......
......@@ -103,12 +103,12 @@ libkgeomap >= 2.0.0 https://projects.kde.org/projects/
Optional :
libkdepimlibs >= 4.4.x http://pim.kde.org To support KAddressBook entries.
liblensfun >= 0.2.6 http://lensfun.berlios.de To support LensCorrection editor. If no external libray is found, internal version is used instead. plugin.
liblensfun >= 0.2.6 http://lensfun.berlios.de To support LensCorrection tool.
liblqr-1 >= 0.4.1 http://liblqr.wikidot.com To support Liquid Rescale tool.
libeigen3 >= 3.x http://eigen.tuxfamily.org To support Refocus tool.
libgphoto2 >= 2.4.0 http://www.gphoto.org To support Gphoto2 Cameras.
libusb >= 1.0.0 http://www.libusb.org Required by Gphoto2 as linking dependency. See details in B.K.O #268267
liblqr-1 >= 0.4.1 http://liblqr.wikidot.com For Liquid Rescale tool. If no external libray is found, internal version is used instead.
libpgf >= 6.11.24 http://www.libpgf.org If no external libray is found, internal version is used instead.
libclapack >= 3.x http://www.netlib.org/clapack If no external libray is found, internal version is used instead.
libsqlite2 >= 2.x http://www.sqlite.org/ Only used to import old database version <= 0.7.
Note : all library dependencies require development and binary packages installed on your
......
# - Try to find clapack library
# Once done this will define
#
# CLAPACK_FOUND - system has CLAPACK library
# CLAPACK_INCLUDE_DIR - the CLAPACK include directory
# CLAPACK_LIBRARY - the marblewidget library
#
# copyright 2008 by Patrick Spendrin <ps_ml@gmx.de>
# copyright 2010 by Andreas K. Huettel <mail@akhuettel.de>
# use this file as you like
#
if(CLAPACK_INCLUDE_DIR AND CLAPACK_LIBRARY)
# Already in cache
set(CLAPACK_FOUND TRUE)
else(CLAPACK_INCLUDE_DIR AND CLAPACK_LIBRARY)
find_path(CLAPACK_INCLUDE_DIR clapack.h PATHS /usr/include/clapack NO_DEFAULT_PATH)
if(CLAPACK_INCLUDE_DIR)
message(STATUS "Found clapack includes: ${CLAPACK_INCLUDE_DIR}")
else(CLAPACK_INCLUDE_DIR)
find_path(CLAPACK_INCLUDE_DIR clapack.h PATHS /usr/include/clapack)
if(CLAPACK_INCLUDE_DIR)
message(STATUS "Found clapack includes: ${CLAPACK_INCLUDE_DIR}")
endif(CLAPACK_INCLUDE_DIR)
endif(CLAPACK_INCLUDE_DIR)
find_library(CLAPACK_LIBRARY clapack)
if(CLAPACK_LIBRARY)
message(STATUS "Found clapack library: ${CLAPACK_LIBRARY}")
endif(CLAPACK_LIBRARY)
if(CLAPACK_INCLUDE_DIR AND CLAPACK_LIBRARY)
set(CLAPACK_FOUND TRUE)
endif(CLAPACK_INCLUDE_DIR AND CLAPACK_LIBRARY)
if(NOT CLAPACK_FOUND)
message(STATUS "Could NOT find any working clapack installation")
endif(NOT CLAPACK_FOUND)
mark_as_advanced(CLAPACK_INCLUDE_DIR CLAPACK_LIBRARY)
endif(CLAPACK_INCLUDE_DIR AND CLAPACK_LIBRARY)
# - Try to find Eigen3 lib
#
# This module supports requiring a minimum version, e.g. you can do
# find_package(Eigen3 3.1.2)
# to require version 3.1.2 or newer of Eigen3.
#
# Once done this will define
#
# EIGEN3_FOUND - system has eigen lib with correct version
# EIGEN3_INCLUDE_DIR - the eigen include directory
# EIGEN3_VERSION - eigen version
# Copyright (c) 2006, 2007 Montel Laurent, <montel@kde.org>
# Copyright (c) 2008, 2009 Gael Guennebaud, <g.gael@free.fr>
# Copyright (c) 2009 Benoit Jacob <jacob.benoit.1@gmail.com>
# Redistribution and use is allowed according to the terms of the 2-clause BSD license.
if(NOT Eigen3_FIND_VERSION)
if(NOT Eigen3_FIND_VERSION_MAJOR)
set(Eigen3_FIND_VERSION_MAJOR 2)
endif(NOT Eigen3_FIND_VERSION_MAJOR)
if(NOT Eigen3_FIND_VERSION_MINOR)
set(Eigen3_FIND_VERSION_MINOR 91)
endif(NOT Eigen3_FIND_VERSION_MINOR)
if(NOT Eigen3_FIND_VERSION_PATCH)
set(Eigen3_FIND_VERSION_PATCH 0)
endif(NOT Eigen3_FIND_VERSION_PATCH)
set(Eigen3_FIND_VERSION "${Eigen3_FIND_VERSION_MAJOR}.${Eigen3_FIND_VERSION_MINOR}.${Eigen3_FIND_VERSION_PATCH}")
endif(NOT Eigen3_FIND_VERSION)
macro(_eigen3_check_version)
file(READ "${EIGEN3_INCLUDE_DIR}/Eigen/src/Core/util/Macros.h" _eigen3_version_header)
string(REGEX MATCH "define[ \t]+EIGEN_WORLD_VERSION[ \t]+([0-9]+)" _eigen3_world_version_match "${_eigen3_version_header}")
set(EIGEN3_WORLD_VERSION "${CMAKE_MATCH_1}")
string(REGEX MATCH "define[ \t]+EIGEN_MAJOR_VERSION[ \t]+([0-9]+)" _eigen3_major_version_match "${_eigen3_version_header}")
set(EIGEN3_MAJOR_VERSION "${CMAKE_MATCH_1}")
string(REGEX MATCH "define[ \t]+EIGEN_MINOR_VERSION[ \t]+([0-9]+)" _eigen3_minor_version_match "${_eigen3_version_header}")
set(EIGEN3_MINOR_VERSION "${CMAKE_MATCH_1}")
set(EIGEN3_VERSION ${EIGEN3_WORLD_VERSION}.${EIGEN3_MAJOR_VERSION}.${EIGEN3_MINOR_VERSION})
if(${EIGEN3_VERSION} VERSION_LESS ${Eigen3_FIND_VERSION})
set(EIGEN3_VERSION_OK FALSE)
else(${EIGEN3_VERSION} VERSION_LESS ${Eigen3_FIND_VERSION})
set(EIGEN3_VERSION_OK TRUE)
endif(${EIGEN3_VERSION} VERSION_LESS ${Eigen3_FIND_VERSION})
if(NOT EIGEN3_VERSION_OK)
message(STATUS "Eigen3 version ${EIGEN3_VERSION} found in ${EIGEN3_INCLUDE_DIR}, "
"but at least version ${Eigen3_FIND_VERSION} is required")
endif(NOT EIGEN3_VERSION_OK)
endmacro(_eigen3_check_version)
if (EIGEN3_INCLUDE_DIR)
# in cache already
_eigen3_check_version()
set(EIGEN3_FOUND ${EIGEN3_VERSION_OK})
else (EIGEN3_INCLUDE_DIR)
find_path(EIGEN3_INCLUDE_DIR NAMES signature_of_eigen3_matrix_library
PATHS
${CMAKE_INSTALL_PREFIX}/include
${KDE4_INCLUDE_DIR}
PATH_SUFFIXES eigen3 eigen
)
if(EIGEN3_INCLUDE_DIR)
_eigen3_check_version()
endif(EIGEN3_INCLUDE_DIR)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Eigen3 DEFAULT_MSG EIGEN3_INCLUDE_DIR EIGEN3_VERSION_OK)
mark_as_advanced(EIGEN3_INCLUDE_DIR)
endif(EIGEN3_INCLUDE_DIR)
......@@ -3,10 +3,7 @@ CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/../data/database/dbconfigversion.h.cm
# Shared libdigikamcore ################################################################
IF(NOT CLAPACK_FOUND)
# Disable Clapack C code warnings.
SET_SOURCE_FILES_PROPERTIES(${libclapack_SRCS} PROPERTIES COMPILE_FLAGS "-w")
ENDIF(NOT CLAPACK_FOUND)
IF(NOT PGF_FOUND)
# Disable libpgf warnings.
......@@ -116,10 +113,6 @@ IF(PGF_FOUND)
TARGET_LINK_LIBRARIES(digikamcore ${PGF_LIBRARIES})
ENDIF(PGF_FOUND)
IF(CLAPACK_FOUND)
TARGET_LINK_LIBRARIES(digikamcore ${CLAPACK_LIBRARY})
ENDIF(CLAPACK_FOUND)
IF(Q_WS_X11)
TARGET_LINK_LIBRARIES(digikamcore ${X11_LIBRARIES})
ENDIF(Q_WS_X11)
......@@ -322,9 +315,6 @@ IF(KDEPIMLIBS_FOUND)
TARGET_LINK_LIBRARIES(digikam ${KDE4_KABC_LIBS})
ENDIF(KDEPIMLIBS_FOUND)
IF(CLAPACK_FOUND)
TARGET_LINK_LIBRARIES(digikam ${CLAPACK_LIBRARY})
ENDIF(CLAPACK_FOUND)
INSTALL(TARGETS digikam ${INSTALL_TARGETS_DEFAULT_ARGS})
......
......@@ -39,6 +39,9 @@
/* Define to 1 if an external lensfun shared library have been found */
#cmakedefine HAVE_LENSFUN 1
/* Define to 1 if an external Eigen3 shared library have been found */
#cmakedefine HAVE_EIGEN3
/* Define to 1 if GPhoto2 shared library is installed */
#cmakedefine HAVE_GPHOTO2 1
......
......@@ -45,14 +45,18 @@
// Local includes
#include "config-digikam.h"
#include "sharpsettings.h"
#include "refocusfilter.h"
#include "sharpenfilter.h"
#include "unsharpmaskfilter.h"
#include "editortoolsettings.h"
#include "imageiface.h"
#include "imageregionwidget.h"
#ifdef HAVE_EIGEN3
#include "refocusfilter.h"
#endif // HAVE_EIGEN3
namespace DigikamEnhanceImagePlugin
{
......@@ -193,6 +197,7 @@ void SharpenTool::preparePreview()
case SharpContainer::Refocus:
{
#ifdef HAVE_EIGEN3
DImg img = d->previewWidget->getOriginalRegionImage();
double r = settings.rfRadius;
double c = settings.rfCorrelation;
......@@ -201,6 +206,7 @@ void SharpenTool::preparePreview()
int ms = settings.rfMatrix;
setFilter(new RefocusFilter(&img, this, ms, r, g, c, n));
#endif // HAVE_EIGEN3
break;
}
}
......@@ -249,6 +255,7 @@ void SharpenTool::prepareFinal()
case SharpContainer::Refocus:
{
#ifdef HAVE_EIGEN3
double r = settings.rfRadius;
double c = settings.rfCorrelation;
double n = settings.rfNoise;
......@@ -256,6 +263,7 @@ void SharpenTool::prepareFinal()
int ms = settings.rfMatrix;
setFilter(new RefocusFilter(iface.original(), this, ms, r, g, c, n));
#endif // HAVE_EIGEN3
break;
}
}
......@@ -282,7 +290,9 @@ void SharpenTool::setFinalImage()
case SharpContainer::Refocus:
{
#ifdef HAVE_EIGEN3
iface.setOriginal(i18n("Refocus"), filter()->filterAction(), filter()->getTargetImage());
#endif // HAVE_EIGEN3
break;
}
}
......
REDISTRIBUTABLE
LAPACK is a freely-available software package. It is available from netlib via anonymous ftp and the World Wide Web.
Thus, it can be included in commercial software packages (and has been). We only ask that proper credit be given to the authors.
Like all software, it is copyrighted. It is not trademarked, but we do ask the following:
If you modify the source for these routines we ask that you change the name of the routine
and comment the changes made to the original.
We will gladly answer any questions regarding the software. If a modification is done, however,
it is the responsibility of the person who modified the routine to provide support.
The sources in this directory were copied from the CLAPACK
distribution (see http://www.netlib.org/clapack).
#include "stdio.h"
#include "f2c.h"
#ifdef KR_headers
extern VOID sig_die();
int abort_()
#else
extern void sig_die(char*,int);
int abort_(void)
#endif
{
sig_die("Fortran abort routine called", 1);
return 0; /* not reached */
}
/* CLAPACK 3.0 BLAS wrapper macros
* Feb 5, 2000
*/
#ifndef __BLASWRAP_H
#define __BLASWRAP_H
#ifndef NO_BLAS_WRAP
/* BLAS1 routines */
#define srotg_ f2c_srotg
#define drotg_ f2c_drotg
#define srotmg_ f2c_srotmg
#define drotmg_ f2c_drotmg
#define srot_ f2c_srot
#define drot_ f2c_drot
#define srotm_ f2c_srotm
#define drotm_ f2c_drotm
#define sswap_ f2c_sswap
#define dswap_ f2c_dswap
#define cswap_ f2c_cswap
#define zswap_ f2c_zswap
#define sscal_ f2c_sscal
#define dscal_ f2c_dscal
#define cscal_ f2c_cscal
#define zscal_ f2c_zscal
#define csscal_ f2c_csscal
#define zdscal_ f2c_zdscal
#define scopy_ f2c_scopy
#define dcopy_ f2c_dcopy
#define ccopy_ f2c_ccopy
#define zcopy_ f2c_zcopy
#define saxpy_ f2c_saxpy
#define daxpy_ f2c_daxpy
#define caxpy_ f2c_caxpy
#define zaxpy_ f2c_zaxpy
#define sdot_ f2c_sdot
#define ddot_ f2c_ddot
#define cdotu_ f2c_cdotu
#define zdotu_ f2c_zdotu
#define cdotc_ f2c_cdotc
#define zdotc_ f2c_zdotc
#define snrm2_ f2c_snrm2
#define dnrm2_ f2c_dnrm2
#define scnrm2_ f2c_scnrm2
#define dznrm2_ f2c_dznrm2
#define sasum_ f2c_sasum
#define dasum_ f2c_dasum
#define scasum_ f2c_scasum
#define dzasum_ f2c_dzasum
#define isamax_ f2c_isamax
#define idamax_ f2c_idamax
#define icamax_ f2c_icamax
#define izamax_ f2c_izamax
/* BLAS2 routines */
#define sgemv_ f2c_sgemv
#define dgemv_ f2c_dgemv
#define cgemv_ f2c_cgemv
#define zgemv_ f2c_zgemv
#define sgbmv_ f2c_sgbmv
#define dgbmv_ f2c_dgbmv
#define cgbmv_ f2c_cgbmv
#define zgbmv_ f2c_zgbmv
#define chemv_ f2c_chemv
#define zhemv_ f2c_zhemv
#define chbmv_ f2c_chbmv
#define zhbmv_ f2c_zhbmv
#define chpmv_ f2c_chpmv
#define zhpmv_ f2c_zhpmv
#define ssymv_ f2c_ssymv
#define dsymv_ f2c_dsymv
#define ssbmv_ f2c_ssbmv
#define dsbmv_ f2c_dsbmv
#define sspmv_ f2c_sspmv
#define dspmv_ f2c_dspmv
#define strmv_ f2c_strmv
#define dtrmv_ f2c_dtrmv
#define ctrmv_ f2c_ctrmv
#define ztrmv_ f2c_ztrmv
#define stbmv_ f2c_stbmv
#define dtbmv_ f2c_dtbmv
#define ctbmv_ f2c_ctbmv
#define ztbmv_ f2c_ztbmv
#define stpmv_ f2c_stpmv
#define dtpmv_ f2c_dtpmv
#define ctpmv_ f2c_ctpmv
#define ztpmv_ f2c_ztpmv
#define strsv_ f2c_strsv
#define dtrsv_ f2c_dtrsv
#define ctrsv_ f2c_ctrsv
#define ztrsv_ f2c_ztrsv
#define stbsv_ f2c_stbsv
#define dtbsv_ f2c_dtbsv
#define ctbsv_ f2c_ctbsv
#define ztbsv_ f2c_ztbsv
#define stpsv_ f2c_stpsv
#define dtpsv_ f2c_dtpsv
#define ctpsv_ f2c_ctpsv
#define ztpsv_ f2c_ztpsv
#define sger_ f2c_sger
#define dger_ f2c_dger
#define cgeru_ f2c_cgeru
#define zgeru_ f2c_zgeru
#define cgerc_ f2c_cgerc
#define zgerc_ f2c_zgerc
#define cher_ f2c_cher
#define zher_ f2c_zher
#define chpr_ f2c_chpr
#define zhpr_ f2c_zhpr
#define cher2_ f2c_cher2
#define zher2_ f2c_zher2
#define chpr2_ f2c_chpr2
#define zhpr2_ f2c_zhpr2
#define ssyr_ f2c_ssyr
#define dsyr_ f2c_dsyr
#define sspr_ f2c_sspr
#define dspr_ f2c_dspr
#define ssyr2_ f2c_ssyr2
#define dsyr2_ f2c_dsyr2
#define sspr2_ f2c_sspr2
#define dspr2_ f2c_dspr2
/* BLAS3 routines */
#define sgemm_ f2c_sgemm
#define dgemm_ f2c_dgemm
#define cgemm_ f2c_cgemm
#define zgemm_ f2c_zgemm
#define ssymm_ f2c_ssymm
#define dsymm_ f2c_dsymm
#define csymm_ f2c_csymm
#define zsymm_ f2c_zsymm
#define chemm_ f2c_chemm
#define zhemm_ f2c_zhemm
#define ssyrk_ f2c_ssyrk
#define dsyrk_ f2c_dsyrk
#define csyrk_ f2c_csyrk
#define zsyrk_ f2c_zsyrk
#define cherk_ f2c_cherk
#define zherk_ f2c_zherk
#define ssyr2k_ f2c_ssyr2k
#define dsyr2k_ f2c_dsyr2k
#define csyr2k_ f2c_csyr2k
#define zsyr2k_ f2c_zsyr2k
#define cher2k_ f2c_cher2k
#define zher2k_ f2c_zher2k
#define strmm_ f2c_strmm
#define dtrmm_ f2c_dtrmm
#define ctrmm_ f2c_ctrmm
#define ztrmm_ f2c_ztrmm
#define strsm_ f2c_strsm
#define dtrsm_ f2c_dtrsm
#define ctrsm_ f2c_ctrsm
#define ztrsm_ f2c_ztrsm
#endif /* NO_BLAS_WRAP */
#endif /* __BLASWRAP_H */
This diff is collapsed.
#include "f2c.h"
#include "fio.h"
#ifdef KR_headers
integer f_clos(a) cllist *a;
#else
#undef abs
#undef min
#undef max
#include "stdlib.h"
#ifdef NON_UNIX_STDIO
#ifndef unlink
#define unlink remove
#endif
#else
#ifdef MSDOS
#include "io.h"
#else
#ifdef __cplusplus
extern "C" int unlink(const char*);
#else
extern int unlink(const char*);
#endif
#endif
#endif
integer f_clos(cllist *a)
#endif
{ unit *b;
if(a->cunit >= MXUNIT) return(0);