Commit ece261cd authored by Emmanuel Bertin's avatar Emmanuel Bertin
Browse files

merged with SExFIGI branch

parent 5ae55cd0
......@@ -9,11 +9,68 @@
*
* Contents: log of changes made to the SExtractor source
*
* Last modify: 14/07/2006
* Last modify: 17/01/2007
*
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
*/
------------------------------------------------------------------------
r380 | bertin | 2007-01-17 17:52:49 +0100 (Wed, 17 Jan 2007) | 3 lines
Added options for compiling with icc (Intel compiler).
Pushed version number to 2.5.1.
------------------------------------------------------------------------
r365 | bertin | 2006-11-09 18:39:27 +0100 (Thu, 09 Nov 2006) | 2 lines
Undo previous changes (wrong repository!!).
------------------------------------------------------------------------
r364 | bertin | 2006-11-09 17:58:18 +0100 (Thu, 09 Nov 2006) | 2 lines
Added lmfit routines by Joachim Wuttke in the form of a library.
------------------------------------------------------------------------
r358 | bertin | 2006-10-29 21:04:25 +0100 (Sun, 29 Oct 2006) | 5 lines
Updated FITS library to the latest version.
Fixed some UCDs in output parameters.
Applied patch by Sergio Pascual for configuring the path to the XSL file.
Updated the BUGS section.
------------------------------------------------------------------------
r327 | bertin | 2006-08-16 18:06:49 +0200 (Wed, 16 Aug 2006) | 2 lines
Discard NaN pixels in non-weighted background measurements (as in SWarp).
------------------------------------------------------------------------
r305 | baillard | 2006-07-19 15:28:15 +0200 (Wed, 19 Jul 2006) | 2 lines
Change name
------------------------------------------------------------------------
r303 | baillard | 2006-07-19 15:05:48 +0200 (Wed, 19 Jul 2006) | 2 lines
Change names
------------------------------------------------------------------------
r295 | baillard | 2006-07-18 13:54:43 +0200 (Tue, 18 Jul 2006) | 2 lines
Move sextractor to public repository
------------------------------------------------------------------------
r290 | bertin | 2006-07-17 19:56:12 +0200 (Mon, 17 Jul 2006) | 4 lines
Doc: keyword list updated.
ChangeLog updated.
Back-propagated destructive byte-swapping bugfix in FITS library.
------------------------------------------------------------------------
r289 | bertin | 2006-07-14 20:25:09 +0200 (Fri, 14 Jul 2006) | 3 lines
Removed warnings in psf.c (P.Delorme's edits) using brute-force.
Switched ChangeLog to SVN format.
------------------------------------------------------------------------
r288 | bertin | 2006-07-14 20:13:39 +0200 (Fri, 14 Jul 2006) | 8 lines
......
Dec 07: 2.7
- FITS I/O and astrometry layers updated (same as SWarp and SCAMP)
- Support for model-fitting
Jul 06: 2.5
- Support for VOTable catalogs and metadata in output.
......
# Main Makefile for SExtractor
# Copyright (C) 2002-2005 Emmanuel Bertin.
# Copyright (C) 2002-2008 Emmanuel Bertin.
AUTOMAKE_OPTIONS = foreign no-dependencies
SUBDIRS = man src
SUBDIRS = man src tests
dist_pkgdata_DATA = xsl/sextractor.xsl
EXTRA_DIST = config doc AUTHORS BUGS ChangeLog COPYING HISTORY \
INSTALL README THANKS \
acx_prog_cc_optim.m4
RPM_ROOTDIR = /usr/src/RPM
acx_atlas.m4 acx_prog_cc_optim.m4 \
acx_urbi_resolve_dir.m4
RPM_ROOTDIR = `rpmbuild --nobuild -E %_topdir`
RPM_SRCDIR = $(RPM_ROOTDIR)/SOURCES
dist-hook:
rm -rf `find $(distdir) -name .svn`
rpm: dist
cp -f $(PACKAGE_NAME)-$(PACKAGE_VERSION).tar.gz $(RPM_SRCDIR)
rpmbuild -ba --clean $(PACKAGE_NAME).spec $(PACKAGE_NAME)-mp.spec
rpmbuild -ba --clean --nodeps $(PACKAGE_NAME).spec
rpm-icc: dist
cp -f $(PACKAGE_NAME)-$(PACKAGE_VERSION).tar.gz $(RPM_SRCDIR)
USE_ICC="1" rpmbuild -ba --clean --nodeps $(PACKAGE_NAME).spec
rpm-opteron: dist
cp -f $(PACKAGE_NAME)-$(PACKAGE_VERSION).tar.gz $(RPM_SRCDIR)
GCCFLAGS="-O -g -funroll-loops -fomit-frame-pointer -Wall \
-march=opteron" rpmbuild -ba --target=x86_64 \
--clean $(PACKAGE_NAME).spec
TPXCC="gcc" TPXFLAGS="-O -g -funroll-loops -fomit-frame-pointer -Wall \
-march=opteron" \
TPXLDFLAGS="-static -shared-libgcc" \
TPXLIBS="-lfftw3 -llapack -lcblas -latlas -lm" \
rpmbuild -ba --target=x86_64 --clean $(PACKAGE_NAME).spec
rpm-athlon: dist
cp -f $(PACKAGE_NAME)-$(PACKAGE_VERSION).tar.gz $(RPM_SRCDIR)
GCCFLAGS="-O -g -funroll-loops -fomit-frame-pointer -Wall -m32 \
-march=i686 -msse -mfpmath=sse -mtune=athlon" rpmbuild \
-ba --target=i686 --clean $(PACKAGE_NAME).spec
TPXCC="gcc" TPXFLAGS="-O -g -funroll-loops -fomit-frame-pointer -Wall \
-m32 -march=i686 -msse -mfpmath=sse -mtune=athlon" \
TPXLDFLAGS="-static -shared-libgcc" \
TPXLIBS="-L/usr/lib/ -lm -L/usr/local/lib/ -lfftw3 \
-llapack -lcblas -latlas -lm" \
rpmbuild -ba --target=i686 --clean $(PACKAGE_NAME).spec
rpm-opteron-icc: dist
cp -f $(PACKAGE_NAME)-$(PACKAGE_VERSION).tar.gz $(RPM_SRCDIR)
TPXCC="icc" TPXFLAGS="-O3 -g -axWPT -ip -unroll" \
TPXLDFLAGS="-static -shared-libgcc" \
TPXLIBS="-lfftw3 -llapack -lcblas -latlas -lm" \
rpmbuild -ba --target=x86_64 --clean --nodeps $(PACKAGE_NAME).spec
rpm-athlon-icc: dist
cp -f $(PACKAGE_NAME)-$(PACKAGE_VERSION).tar.gz $(RPM_SRCDIR)
TPXCC="icc32" TPXFLAGS="-O3 -g -axKWNPT -ip -unroll" \
TPXLDFLAGS="-static -shared-libgcc" \
TPXLIBS="-L/usr/local/lib/ -L/usr/lib/ -lfftw3 \
-llapack -lcblas -latlas -lm" \
rpmbuild -ba --target=i686 --clean $(PACKAGE_NAME).spec
athlon:
$(MAKE) CFLAGS="-O -g -funroll-loops -fomit-frame-pointer -Wall -m32 -march=i686 -msse -mfpmath=sse -mtune=athlon" LIBS="-lm"
$(MAKE) CFLAGS="-O -g -pthread -funroll-loops -fomit-frame-pointer \
-Wall -m32 -march=i686 -msse -mfpmath=sse -mtune=athlon" \
LIBS="-L/usr/lib/ -lpthread -lm -L/usr/local/lib/ \
-lfftw3 -lfftw3_threads \
-llapack -lcblas -latlas -lm"
pentium-icc:
$(MAKE) CC="icc32" CFLAGS="-O3 -axKWNPT -ip -unroll -pthread" \
LIBS="-L/usr/lib/ -lpthread -lm -L/usr/local/lib/ -llapack \
-lcblas -latlas -lfftw3 -lfftw3_threads"
debug:
$(MAKE) CFLAGS="-O3 -funroll-loops -fomit-frame-pointer -Wall -m32 -g"
icc:
$(MAKE) CC="icc" CFLAGS="-O3 -g -axWPT -ip -unroll -pthread"
This diff is collapsed.
......@@ -8,25 +8,10 @@ input image is a MEF.
- The (main) default config file can be dumped by typing "sex -d". Secondary
configuration files like default.param are still needed, though.
In case of problems, questions or suggestions related to the software,
please don't hesitate to send a mail (preferably in english) to the
official mailing list:
sextractor@iap.fr
These questions and answers to them are posted on the Web at:
http://terapix.iap.fr/soft/sextractor/
In any case you can still reach me at bertin@iap.fr. I cannot garantee
that I will reply immediately, but I will try for sure to provide
an answer.
-----------
Notes:
- A version "sextractor-2.3.1_lanl" of SExtractor is available on
SourceForge thanks to Mark Galassi and Dan Starr:
http://sourceforge.net/projects/sextractor/
It is a reconditioned version of SExtractor 2.2.2. The LanL and the TERAPIX
(present one) versions follow two different development branches.
- Benne Holwerda <holwerda@stsci.edu> has written a SExtractor handbook and a
GUI which can be found in the doc/ subdirectory or at
http://www-int.stsci.edu/~holwerda/OldHomepage/se.html
The SExtractor homepage is
http://terapix.iap.fr/soft/sextractor
In case of problems, questions or suggestions related to the software, please
refer to the TERAPIX forum:
http://terapix.iap.fr/forum/
Emmanuel Bertin.
Stephane Arnouts <Stephane.Arnouts@oamp.fr>
Suggestions and extensive testing
Pierre Astier <pierre.astier@in2p3.fr>
Suggestions and bug fixes
Eric Aubourg <Eric.Aubourg@cea.fr>
Hints about how to optimize a C code
Anthony Baillard <baillard@iap.fr>
Testing of model-fitting
Mark Calabretta <mcalabre@atnf.csiro.au>
SExtractor makes use of his nice WCS library
Gerard Tissier <tissier@iap.fr>
Preliminary implementation of the VOTable output
Jean-Paul Kneib <kneib@omp.fr>
Ian Smail <Ian.Smail@durham.ac.uk>
Suggestions and spreading the software back in the early days!
Pascal Fouque <pfouque@eso.org>
Suggestions and testing
Eric Aubourg <Eric.Aubourg@cea.fr>
Hints about how to optimize a C code
Ville Laurikari <vl@iki.fi>
For his VL_PROG_CC_WARNINGS (modified to ACX_PROG_CC_OPTIM)
Delphine Hardin <hardin@in2p3.fr>
Suggestions and bug fixes
Benne Holwerda <holwerda@stsci.edu>
For making his cookbook available
ESO
Financial support
Jean-Paul Kneib <kneib@omp.fr>, Ian Smail <Ian.Smail@durham.ac.uk>
Suggestions and spreading the software back in the early days!
Ville Laurikari <vl@iki.fi>
For his VL_PROG_CC_WARNINGS (modified to ACX_PROG_CC_OPTIM)
Valerie de Lapparent <lapparen@iap.fr>
Suggestions and testing of model-fitting
Chiara Marmo <marmo@iap.fr>
For providing the VOTable to HTML XSLT filter and testing.
Joe Mohr <jmohr@illinois.edu>
Suggestions and testing
Gerard Tissier <tissier@iap.fr>
Preliminary implementation of the VOTable output
Joachim Wuttke <J.Wuttke@fz-juelich.de>
For his implementation of the Levenberg-Marquardt algorithm
Institut d'Astrophysique de Paris
University of Leiden
European Southern Observatory
University of Illinois
Financial and technical support
Too many people to list
Help in discovering bugs or bringing suggestions
This diff is collapsed.
dnl @synopsis ACX_ATLAS([ATLAS_LIBDIR, ATLAS_INCDIR, ATLAS_PFLAG, [ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]])
dnl This macro figures out if the ATLAS library and header files
dnl are installed.
dnl You may wish to use these variables in your default LIBS:
dnl
dnl LIBS="$ATLAS_LIBS $LIBS"
dnl
dnl ACTION-IF-FOUND is a list of shell commands to run if BLAS/LAPACK
dnl is found (HAVE_ATLAS is defined first), and ACTION-IF-NOT-FOUND
dnl is a list of commands to run it if it is not found.
dnl
dnl @version $Id: acx_atlas.m4,v 1.0 2007/10/19 21:30:17 bertin Exp $
dnl @author Emmanuel Bertin <bertin@iap.fr>
AC_DEFUN([ACX_ATLAS], [
AC_REQUIRE([AC_CANONICAL_HOST])
dnl --------------------
dnl Search include files
dnl --------------------
acx_atlas_ok=no
if test x$2 = x; then
if test x$1 = x; then
AC_CHECK_HEADERS([cblas.h clapack.h],[acx_atlas_ok=yes])
if test x$acx_atlas_ok = xyes; then
AC_DEFINE(ATLAS_BLAS_H, "cblas.h", [BLAS header filename.])
AC_DEFINE(ATLAS_LAPACK_H, "clapack.h", [CLAPACK header filename.])
else
AC_CHECK_HEADERS([atlas/cblas.h atlas/clapack.h],[acx_atlas_ok=yes])
if test x$acx_atlas_ok = xyes; then
AC_DEFINE(ATLAS_BLAS_H, "atlas/cblas.h", [BLAS header filename.])
AC_DEFINE(ATLAS_LAPACK_H, "atlas/clapack.h", [CLAPACK header filename.])
else
atlas_def=/usr/local/atlas
AC_CHECK_HEADERS(
[$atlas_def/include/cblas.h $atlas_def/include/clapack.h],
[acx_atlas_ok=yes])
if test x$acx_atlas_ok = xyes; then
AC_DEFINE_UNQUOTED(ATLAS_BLAS_H, "$atlas_def/include/cblas.h",
[BLAS header filename.])
AC_DEFINE_UNQUOTED(ATLAS_LAPACK_H, "$atlas_def/include/clapack.h",
[CLAPACK header filename.])
else
atlas_def=/usr/atlas
AC_CHECK_HEADERS(
[$atlas_def/include/cblas.h $atlas_def/include/clapack.h],
[acx_atlas_ok=yes])
if test x$acx_atlas_ok = xyes; then
AC_DEFINE_UNQUOTED(ATLAS_BLAS_H, "$atlas_def/include/cblas.h",
[BLAS header filename.])
AC_DEFINE_UNQUOTED(ATLAS_LAPACK_H, "$atlas_def/include/clapack.h",
[CLAPACK header filename.])
else
ATLAS_ERROR="CBLAS/LAPack include files not found!"
fi
fi
fi
fi
else
AC_CHECK_HEADERS([$1/include/cblas.h $1/include/clapack.h],
[acx_atlas_ok=yes])
if test x$acx_atlas_ok = xyes; then
AC_DEFINE_UNQUOTED(ATLAS_BLAS_H, "$1/include/cblas.h",
[BLAS header filename.])
AC_DEFINE_UNQUOTED(ATLAS_LAPACK_H, "$1/include/clapack.h",
[CLAPACK header filename.])
else
AC_CHECK_HEADERS([cblas.h clapack.h],[acx_atlas_ok=yes])
if test x$acx_atlas_ok = xyes; then
AC_DEFINE_UNQUOTED(ATLAS_BLAS_H, "cblas.h",
[BLAS header filename.])
AC_DEFINE_UNQUOTED(ATLAS_LAPACK_H, "clapack.h",
[CLAPACK header filename.])
else
ATLAS_ERROR="CBLAS/LAPack include files not found in $1/include!"
fi
fi
fi
else
AC_CHECK_HEADERS([$2/cblas.h $2/clapack.h], [acx_atlas_ok=yes])
if test x$acx_atlas_ok = xyes; then
AC_DEFINE_UNQUOTED(ATLAS_BLAS_H, "$2/cblas.h",
[BLAS header filename.])
AC_DEFINE_UNQUOTED(ATLAS_LAPACK_H, "$2/clapack.h",
[CLAPACK header filename.])
else
ATLAS_ERROR="CBLAS/LAPack include files not found in $2!"
fi
fi
dnl --------------------
dnl Search library files
dnl --------------------
if test x$acx_atlas_ok = xyes; then
OLIBS="$LIBS"
LIBS=""
if test x$1 = x; then
AC_CHECK_LIB(lapack, [clapack_dpotrf],, [acx_atlas_ok=no],
[-lcblas -latlas -lm])
AC_CHECK_LIB(cblas, cblas_dgemm,, [acx_atlas_ok=no],
[-latlas -lm])
if test x$acx_atlas_ok = xyes; then
ATLAS_LIBPATH=""
else
atlas_def=/usr/local/atlas
unset ac_cv_lib_lapack_clapack_dpotrf
unset ac_cv_lib_cblas_cblas_dgemm
acx_atlas_ok=yes
AC_CHECK_LIB(lapack, [clapack_dpotrf],, [acx_atlas_ok=no],
[-L$atlas_def/lib -lcblas -latlas -lm])
AC_CHECK_LIB(cblas, cblas_dgemm,, [acx_atlas_ok=no],
[-L$atlas_def/lib -latlas -lm])
if test x$acx_atlas_ok = xyes; then
ATLAS_LIBPATH="-L$atlas_def/lib"
else
atlas_def=/usr/lib64/atlas
unset ac_cv_lib_lapack_clapack_dpotrf
unset ac_cv_lib_cblas_cblas_dgemm
acx_atlas_ok=yes
AC_CHECK_LIB(lapack, [clapack_dpotrf],, [acx_atlas_ok=no],
[-L$atlas_def -lcblas -latlas -lm])
AC_CHECK_LIB(cblas, cblas_dgemm,, [acx_atlas_ok=no],
[-L$atlas_def -latlas -lm])
if test x$acx_atlas_ok = xyes; then
ATLAS_LIBPATH="-L$atlas_def"
else
atlas_def=/usr/lib/atlas
unset ac_cv_lib_lapack_clapack_dpotrf
unset ac_cv_lib_cblas_cblas_dgemm
acx_atlas_ok=yes
AC_CHECK_LIB(lapack, [clapack_dpotrf],, [acx_atlas_ok=no],
[-L$atlas_def -lcblas -latlas -lm])
AC_CHECK_LIB(cblas, cblas_dgemm,, [acx_atlas_ok=no],
[-L$atlas_def -latlas -lm])
if test x$acx_atlas_ok = xyes; then
ATLAS_LIBPATH="-L$atlas_def"
else
atlas_def=/usr/atlas
unset ac_cv_lib_lapack_clapack_dpotrf
unset ac_cv_lib_cblas_cblas_dgemm
acx_atlas_ok=yes
AC_CHECK_LIB(lapack, [clapack_dpotrf],, [acx_atlas_ok=no],
[-L$atlas_def/lib -lcblas -latlas -lm])
AC_CHECK_LIB(cblas, cblas_dgemm,, [acx_atlas_ok=no],
[-L$atlas_def/lib -latlas -lm])
if test x$acx_atlas_ok = xyes; then
ATLAS_LIBPATH="-L$atlas_def/lib"
else
ATLAS_ERROR="CBLAS/LAPack library files not found at usual locations!"
fi
fi
fi
fi
fi
else
AC_CHECK_LIB(lapack, [clapack_dpotrf],, [acx_atlas_ok=no],
[-L$1 -lcblas -latlas -lm])
AC_CHECK_LIB(cblas, cblas_dgemm,, [acx_atlas_ok=no],
[-L$1 -latlas -lm])
if test x$acx_atlas_ok = xyes; then
ATLAS_LIBPATH="-L$1"
else
unset ac_cv_lib_lapack_clapack_dpotrf
unset ac_cv_lib_cblas_cblas_dgemm
acx_atlas_ok=yes
AC_CHECK_LIB(lapack, [clapack_dpotrf],, [acx_atlas_ok=no],
[-L$1/lib -lcblas -latlas -lm])
AC_CHECK_LIB(cblas, cblas_dgemm,, [acx_atlas_ok=no],
[-L$1/lib -latlas -lm])
if test x$acx_atlas_ok = xyes; then
ATLAS_LIBPATH="-L$1/lib"
else
ATLAS_ERROR="CBLAS/LAPack library files not found in $1!"
fi
fi
fi
LIBS="$OLIBS"
fi
AC_SUBST(ATLAS_LIBPATH)
AC_SUBST(ATLAS_CFLAGS)
dnl -------------------------------------------------------------------------
dnl Finally, check MP version and execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND
dnl -------------------------------------------------------------------------
if test x"$acx_atlas_ok" = xyes; then
AC_DEFINE(HAVE_ATLAS,1,
[Define if you have the ATLAS libraries and header files.])
if test x$3 = xyes; then
dnl Check whether the multithreaded version of ATLAS is there too:
AC_CHECK_LIB(ptcblas, cblas_dgemm,, [acx_atlas_ok=no],
[$ATLAS_LIBPATH -lcblas -latlas -lm])
if test x$acx_atlas_ok = xyes; then
ATLAS_LIB="$ATLAS_LIBPATH -llapack -lptcblas -lcblas -latlas"
LIBS="$OLIBS"
AC_SUBST(ATLAS_LIB)
AC_DEFINE(HAVE_ATLAS_MP,1,
[Define if you have the parallel ATLAS libraries.])
$4
else
ATLAS_ERROR="CBLAS/LAPack was compiled without multithreading support!"
AC_SUBST(ATLAS_ERROR)
$5
fi
else
ATLAS_LIB="$ATLAS_LIBPATH -llapack -lcblas -latlas"
LIBS="$OLIBS"
AC_SUBST(ATLAS_LIB)
$4
fi
else
AC_SUBST(ATLAS_ERROR)
$5
fi
])dnl ACX_ATLAS
dnl @synopsis ACX_FFTW([FFTW_DIR, FFTW_INCDIR, FFTW_PFLAG, FFTW_FFLAG, [ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]])
dnl This macro figures out if the FFTW3 libraries and header
dnl files are installed.
dnl You may wish to use these variables in your default LIBS and CFLAGS:
dnl
dnl LIBS="$FFTW_LIBS $LIBS"
dnl
dnl ACTION-IF-FOUND is a list of shell commands to run if FFTW
dnl is found (HAVE_FFTWx are defined first), and ACTION-IF-NOT-FOUND
dnl is a list of commands to run it if it is not found.
dnl
dnl @version $Id: acx_fftw.m4,v 1.0 2008/08/28 21:30:17 bertin Exp $
dnl @author Emmanuel Bertin <bertin@iap.fr>
AC_DEFUN([ACX_FFTW], [
AC_REQUIRE([AC_CANONICAL_HOST])
dnl --------------------
dnl Search include files
dnl --------------------
acx_fftw_ok=no
if test x$2 = x; then
if test x$1 = x; then
AC_CHECK_HEADER(fftw3.h,[acx_fftw_ok=yes])
if test x$acx_fftw_ok = xyes; then
AC_DEFINE(FFTW_H, "fftw.h", [FFTW header filename.])
else
AC_CHECK_HEADER(fftw/fftw3.h,[acx_fftw_ok=yes])
if test x$acx_fftw_ok = xyes; then
AC_DEFINE(FFTW_H, "fftw/fftw3.h", [FFTW header filename.])
else
FFTW_ERROR="FFTW include files not found in default location!"
fi
fi
else
AC_CHECK_HEADER($1/include/fftw3.h,[acx_fftw_ok=yes])
if test x$acx_fftw_ok = xyes; then
AC_DEFINE(FFTW_H, "$1/include/fftw3.h", [FFTW header filename.])
else
AC_CHECK_HEADER(fftw3.h,[acx_fftw_ok=yes])
if test x$acx_fftw_ok = xyes; then
AC_DEFINE(FFTW_H, "fftw.h", [FFTW header filename.])
else
FFTW_ERROR="FFTW include files not found in $1/include!"
fi
fi
fi
else
AC_CHECK_HEADER($2/fftw3.h,[acx_fftw_ok=yes])
if test x$acx_fftw_ok = xyes; then
AC_DEFINE(FFTW_H, "$2/fftw3.h", [FFTW header filename.])
else
FFTW_ERROR="FFTW include files not found in $2!"
fi
fi
dnl --------------------
dnl Search library files
dnl --------------------
FFTW_LIBS=""
OLIBS="$LIBS"
LIBS=""
if test x$acx_fftw_ok = xyes; then
if test x$1 = x; then
if test x$4 = xyes; then
AC_CHECK_LIB(fftw3f, fftwf_execute, [acx_fftw_ok=yes],
[acx_fftw_ok=no], [-lm])
if test x$acx_fftw_ok = xyes; then
AC_DEFINE(HAVE_FFTWF,1,
[Define if you have the FFTW single precision libraries and header files.])
FFTW_LIBS="-lfftw3f"
else
FFTW_ERROR="FFTW single precision library files not found at usual locations!"
fi
else
AC_CHECK_LIB(fftw3, fftw_execute, [acx_fftw_ok=yes],
[acx_fftw_ok=no], [-lm])
if test x$acx_fftw_ok = xyes; then
AC_DEFINE(HAVE_FFTW,1,
[Define if you have the FFTW double precision libraries and header files.])
FFTW_LIBS="-lfftw3"
else
FFTW_ERROR="FFTW double precision library files not found at usual locations!"
fi
fi
if test x$acx_fftw_ok = xyes && test x$3 = xyes; then
if test x$4 = xyes; then
AC_CHECK_LIB(fftw3f_threads, fftwf_init_threads,
[acx_fftw_ok=yes], [acx_fftw_ok=no], [-lfftw3f -lm -lpthread])
if test x$acx_fftw_ok = xyes; then
AC_DEFINE(HAVE_FFTWFT,1,
[Define if you have the FFTW single precision multithreaded libraries and header files.])
FFTW_LIBS="-lfftw3f_threads -lfftw3f"
else
FFTW_ERROR="FFTW single precision library was compiled without multithreading support!"
fi
else
AC_CHECK_LIB(fftw3_threads, fftw_init_threads,
[acx_fftw_ok=yes], [acx_fftw_ok=no], [-lfftw3 -lm -lpthread])
if test x$acx_fftw_ok = xyes; then
AC_DEFINE(HAVE_FFTWT,1,
[Define if you have the FFTW double precision multithreaded libraries and header files.])
FFTW_LIBS="-lfftw3_threads -lfftw3"
else
FFTW_ERROR="FFTW double precision library was compiled without multithreading support!"
fi
fi
fi
else
dnl -------------------------
dnl Specific libdir specified
dnl -------------------------
if test x$4 = xyes; then
AC_CHECK_LIB(fftw3f, fftwf_execute, [acx_fftw_ok=yes],
[acx_fftw_ok=no], [-L$1 -lm])
if test x$acx_fftw_ok = xyes; then
AC_DEFINE(HAVE_FFTWF,1,
[Define if you have the FFTW single precision libraries and header files.])
FFTW_LIBS="-L$1 -lfftw3f"
else
FFTW_ERROR="FFTW single precision library files not found in $1!"
fi
else
AC_CHECK_LIB(fftw3, fftw_execute, [acx_fftw_ok=yes],
[acx_fftw_ok=no], [-L$1 -lm])
if test x$acx_fftw_ok = xyes; then
AC_DEFINE(HAVE_FFTW,1,
[Define if you have the FFTW double precision libraries and header files.])
FFTW_LIBS="-L$1 -lfftw3"
else
FFTW_ERROR="FFTW double precision library files not found in $1!"
fi
fi
if test x$acx_fftw_ok = xyes && test x$3 = xyes; then
if test x$4 = xyes; then
AC_CHECK_LIB(fftw3f_threads, fftwf_init_threads, [acx_fftw_ok=yes],
[acx_fftw_ok=no], [-L$1 -lfftw3f -lm -lpthread])
if test x$acx_fftw_ok = xyes; then
AC_DEFINE(HAVE_FFTWFT,1,
[Define if you have the FFTW single precision multithreaded libraries and header files.])
FFTW_LIBS="-L$1 -lfftw3f_threads -lfftw3f"
else
FFTW_ERROR="FFTW single precision library in $1 was compiled without multithreading support!"
fi
else
AC_CHECK_LIB(fftw3_threads, fftw_init_threads, [acx_fftw_ok=yes],
[acx_fftw_ok=no], [-L$1 -lfftw3 -lm -lpthread])
if test x$acx_fftw_ok = xyes; then
AC_DEFINE(HAVE_FFTWT,1,
[Define if you have the FFTW double precision multithreaded libraries and header files.])
FFTW_LIBS="-L$1 -lfftw3_threads -lfftw3"
else
FFTW_ERROR="FFTW double precision library in $1 was compiled without multithreading support!"
fi
fi
fi
fi
fi
LIBS="$OLIBS"
if test x$acx_fftw_ok = xyes; then
AC_SUBST(FFTW_LIBS)
$5
else
AC_SUBST(FFTW_ERROR)
$6
fi
])dnl ACX_FFTW
......@@ -8,7 +8,7 @@ dnl IRIX C compiler, NEC SX-5 (Super-UX 10) C compiler, and Cray J90
dnl (Unicos 10.0.0.8) C compiler.
dnl
dnl This macro is a modification of Ville Laurikari's VL_PROG_CC_WARNINGS
dnl @version 1.0 (2002-04-15)
dnl @version 1.2 (2008-10-01)
dnl @authors Emmanuel Bertin <bertin@iap.fr> Ville Laurikari <vl@iki.fi>
dnl
AC_DEFUN([ACX_PROG_CC_OPTIM], [
......@@ -19,10 +19,6 @@ AC_DEFUN([ACX_PROG_CC_OPTIM], [
int main(int argc, char **argv) { return 0; }
EOF
dnl GCC
if test "$GCC" = "yes"; then
prog_cc_optim_flags="-O -funroll-loops -fomit-frame-pointer -Wall -g"
dnl Most compilers print some kind of a version string with some command
dnl line options (often "-V"). The version string should be checked
dnl before doing a test compilation run with compiler-specific flags.
......@@ -32,56 +28,85 @@ EOF
dnl erratic things when invoked with flags meant for a different
dnl compiler.
dnl INTEL C 64bits compiler
if $CC -V 2>&1 | grep -i "Intel(R) 64" > /dev/null 2>&1 &&
$CC -c -O conftest.c > /dev/null 2>&1 &&
test -f conftest.o; then
prog_cc_optim_flags="-O3 -axWPTS -ip -no-prec-div -unroll"
prog_ld_optim_flags="-static-intel"
dnl INTEL C 32bits compiler
elif $CC -V 2>&1 | grep -i "Intel(R)" > /dev/null 2>&1 &&
$CC -c -O conftest.c > /dev/null 2>&1 &&
test -f conftest.o; then
prog_cc_optim_flags="-O -axKWNPTS -ip -no-prec-div"
prog_ld_optim_flags="-static-intel"
dnl GCC
elif test "$GCC" = "yes"; then
prog_cc_optim_flags="-O3 -g -funroll-loops -fomit-frame-pointer -Wall"
prog_ld_optim_flags=""
dnl Solaris C compiler
elif $CC -V 2>&1 | grep -i "WorkShop" > /dev/null 2>&1 &&
$CC -c -O conftest.c > /dev/null 2>&1 &&
test -f conftest.o; then
prog_cc_optim_flags="-O"
prog_ld_optim_flags=""
dnl Digital Unix/Compaq C compiler
elif ($CC -V 2>&1 | grep -i "Digital UNIX Compiler"> /dev/null 2>&1 ||
$CC -V 2>&1 | grep -i "Compaq C"> /dev/null 2>&1) &&
$CC -c -fast conftest.c > /dev/null 2>&1 &&
test -f conftest.o; then
prog_cc_optim_flags="-fast -tune host"
prog_cc_optim_flags="-fast -tune host"
prog_ld_optim_flags=""
dnl C for AIX Compiler
elif $CC 2>&1 | grep -i "C for AIX Compiler" > /dev/null 2>&1 &&
$CC -c -qinfo=all -O2 conftest.c > /dev/null 2>&1 &&
test -f conftest.o; then
prog_cc_optim_flags="-O2"
prog_ld_optim_flags=""
dnl IRIX C compiler
elif $CC -version 2>&1 | grep -i "MIPSpro Compilers" > /dev/null 2>&1 &&
$CC -c -fullwarn -O3 conftest.c > /dev/null 2>&1 &&
test -f conftest.o; then
prog_cc_optim_flags="-O3"
prog_ld_optim_flags=""
dnl HP-UX C compiler
elif what $CC 2>&1 | grep -i "HP C Compiler" > /dev/null 2>&1 &&
$CC -c -Aa +O3 conftest.c > /dev/null 2>&1 &&
test -f conftest.o; then
prog_cc_optim_flags="+O3"
prog_ld_optim_flags=""
dnl The NEC SX-5 (Super-UX 10) C compiler
elif $CC -V 2>&1 | grep "/SX" > /dev/null 2>&1 &&
$CC -c -Xc -O conftest.c > /dev/null 2>&1 &&
test -f conftest.o; then
prog_cc_optim_flags="-O"
prog_ld_optim_flags=""
dnl The Cray C compiler (Unicos)
elif $CC -V 2>&1 | grep -i "Cray" > /dev/null 2>&1 &&
$CC -c -h conform -O3 conftest.c > /dev/null 2>&1 &&
test -f conftest.o; then
prog_cc_optim_flags="-O3"
prog_ld_optim_flags=""
fi
rm -f conftest.*
fi
if test -n "$prog_cc_optim_flags"; then
CFLAGS="$CFLAGS $prog_cc_optim_flags"
LDFLAGS="$LDFLAGS $prog_ld_optim_flags"
else
prog_cc_optim_flags="unknown"
prog_cc_optim_flags=""
prog_ld_optim_flags=""
fi
])
])dnl
dnl @synopsis ACX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
dnl
dnl This macro figures out how to build C programs using POSIX
dnl threads. It sets the PTHREAD_LIBS output variable to the threads
dnl library and linker flags, and the PTHREAD_CFLAGS output variable
dnl to any special C compiler flags that are needed. (The user can also
dnl force certain compiler flags/libs to be tested by setting these
dnl environment variables.)
dnl
dnl Also sets PTHREAD_CC to any special C compiler that is needed for
dnl multi-threaded programs (defaults to the value of CC otherwise).
dnl (This is necessary on AIX to use the special cc_r compiler alias.)
dnl
dnl If you are only building threads programs, you may wish to
dnl use these variables in your default LIBS, CFLAGS, and CC:
dnl
dnl LIBS="$PTHREAD_LIBS $LIBS"
dnl CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
dnl CC="$PTHREAD_CC"
dnl
dnl In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute
dnl constant has a nonstandard name, defines PTHREAD_CREATE_JOINABLE
dnl to that name (e.g. PTHREAD_CREATE_UNDETACHED on AIX).
dnl
dnl ACTION-IF-FOUND is a list of shell commands to run if a threads
dnl library is found, and ACTION-IF-NOT-FOUND is a list of commands
dnl to run it if it is not found. If ACTION-IF-FOUND is not specified,
dnl the default action will define HAVE_PTHREAD.
dnl
dnl Please let the authors know if this macro fails on any platform,
dnl or if you have any other suggestions or comments. This macro was
dnl based on work by SGJ on autoconf scripts for FFTW (www.fftw.org)
dnl (with help from M. Frigo), as well as ac_pthread and hb_pthread
dnl macros posted by AFC to the autoconf macro repository. We are also
dnl grateful for the helpful feedback of numerous users.
dnl
dnl @version $Id: acx_pthread.m4,v 1.4 2001/03/16 08:40:17 simons Exp $
dnl @author Steven G. Johnson <stevenj@alum.mit.edu> and Alejandro Forero Cuervo <bachue@bachue.com>
dnl modified by E.Bertin <bertin@iap.fr> (ordering of flags and deactivated
dnl pthread.h check) 2002/04/25
AC_DEFUN([ACX_PTHREAD], [
AC_REQUIRE([AC_CANONICAL_HOST])
acx_pthread_ok=no
# First, check if the POSIX threads header, pthread.h, is available.
# If it isn't, don't bother looking for the threads libraries.
# AC_CHECK_HEADER(pthread.h, , acx_pthread_ok=noheader)
AC_CHECK_HEADER(pthread.h, , acx_pthread_ok=no)
# We must check for the threads library under a number of different
# names; the ordering is very important because some systems
# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
# libraries is broken (non-POSIX).
# First of all, check if the user has set any of the PTHREAD_LIBS,
# etcetera environment variables, and if threads linking works using
# them:
if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
save_LIBS="$LIBS"
LIBS="$PTHREAD_LIBS $LIBS"
AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS])
AC_TRY_LINK_FUNC(pthread_join, acx_pthread_ok=yes)
AC_MSG_RESULT($acx_pthread_ok)
if test x"$acx_pthread_ok" = xno; then
PTHREAD_LIBS=""
PTHREAD_CFLAGS=""
fi
LIBS="$save_LIBS"
CFLAGS="$save_CFLAGS"
fi
# Create a list of thread flags to try. Items starting with a "-" are
# C compiler flags, and other items are library names, except for "none"
# which indicates that we try without any flags at all.
acx_pthread_flags="pthreads none -Kthread -kthread lthread pthread -pthread -pthreads -mthreads --thread-safe -mt"
# The ordering *is* (sometimes) important. Some notes on the
# individual items follow:
# pthreads: AIX (must check this before -lpthread)
# none: in case threads are in libc; should be tried before -Kthread and
# other compiler flags to prevent continual compiler warnings
# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
# -pthreads: Solaris/gcc
# -mthreads: Mingw32/gcc, Lynx/gcc
# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
# doesn't hurt to check since this sometimes defines pthreads too;
# also defines -D_REENTRANT)
# pthread: Linux, etcetera
# --thread-safe: KAI C++
case "${host_cpu}-${host_os}" in
*solaris*)
# On Solaris (at least, for some versions), libc contains stubbed
# (non-functional) versions of the pthreads routines, so link-based
# tests will erroneously succeed. (We need to link with -pthread or
# -lpthread.) (The stubs are missing pthread_cleanup_push, or rather
# a function called by this macro, so we could check for that, but
# who knows whether they'll stub that too in a future libc.) So,
# we'll just look for -pthreads and -lpthread first:
acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags"
;;
esac
if test x"$acx_pthread_ok" = xno; then
for flag in $acx_pthread_flags; do
case $flag in
none)
AC_MSG_CHECKING([whether pthreads work without any flags])
;;
-*)
AC_MSG_CHECKING([whether pthreads work with $flag])
PTHREAD_CFLAGS="$flag"
;;
*)
AC_MSG_CHECKING([for the pthreads library -l$flag])
PTHREAD_LIBS="-l$flag"
;;
esac
save_LIBS="$LIBS"
save_CFLAGS="$CFLAGS"
LIBS="$PTHREAD_LIBS $LIBS"
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
# Check for various functions. We must include pthread.h,
# since some functions may be macros. (On the Sequent, we
# need a special flag -Kthread to make this header compile.)
# We check for pthread_join because it is in -lpthread on IRIX
# while pthread_create is in libc. We check for pthread_attr_init
# due to DEC craziness with -lpthreads. We check for
# pthread_cleanup_push because it is one of the few pthread
# functions on Solaris that doesn't have a non-functional libc stub.
# We try pthread_create on general principles.
AC_TRY_LINK([#include <pthread.h>],
[pthread_t th; pthread_join(th, 0);
pthread_attr_init(0); pthread_cleanup_push(0, 0);
pthread_create(0,0,0,0); pthread_cleanup_pop(0); ],
[acx_pthread_ok=yes])
LIBS="$save_LIBS"
CFLAGS="$save_CFLAGS"
AC_MSG_RESULT($acx_pthread_ok)
if test "x$acx_pthread_ok" = xyes; then
break;
fi
PTHREAD_LIBS=""
PTHREAD_CFLAGS=""
done
fi
# Various other checks:
if test "x$acx_pthread_ok" = xyes; then
save_LIBS="$LIBS"
LIBS="$PTHREAD_LIBS $LIBS"
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
# Detect AIX lossage: threads are created detached by default
# and the JOINABLE attribute has a nonstandard name (UNDETACHED).
AC_MSG_CHECKING([for joinable pthread attribute])
AC_TRY_LINK([#include <pthread.h>],
[int attr=PTHREAD_CREATE_JOINABLE;],
ok=PTHREAD_CREATE_JOINABLE, ok=unknown)
if test x"$ok" = xunknown; then
AC_TRY_LINK([#include <pthread.h>],
[int attr=PTHREAD_CREATE_UNDETACHED;],
ok=PTHREAD_CREATE_UNDETACHED, ok=unknown)
fi
if test x"$ok" != xPTHREAD_CREATE_JOINABLE; then
AC_DEFINE(PTHREAD_CREATE_JOINABLE, $ok,
[Define to the necessary symbol if this constant
uses a non-standard name on your system.])
fi
AC_MSG_RESULT(${ok})
if test x"$ok" = xunknown; then
AC_MSG_WARN([we do not know how to create joinable pthreads])
fi
AC_MSG_CHECKING([if more special flags are required for pthreads])
flag=no
case "${host_cpu}-${host_os}" in
*-aix* | *-freebsd*) flag="-D_THREAD_SAFE";;
*solaris* | alpha*-osf*) flag="-D_REENTRANT";;
esac
AC_MSG_RESULT(${flag})
if test "x$flag" != xno; then
PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
fi
LIBS="$save_LIBS"
CFLAGS="$save_CFLAGS"
# More AIX lossage: must compile with cc_r
AC_CHECK_PROG(PTHREAD_CC, cc_r, cc_r, ${CC})
else
PTHREAD_CC="$CC"
fi
AC_SUBST(PTHREAD_LIBS)
AC_SUBST(PTHREAD_CFLAGS)
AC_SUBST(PTHREAD_CC)
# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
if test x"$acx_pthread_ok" = xyes; then
ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1])
:
else
acx_pthread_ok=no
$2
fi
])dnl ACX_PTHREAD
# URBI_RESOLVE_DIR_PREPARE
# ------------------------
# Define urbi_resolve_dir.
m4_defun([URBI_RESOLVE_DIR_PREPARE],
[# PATH urbi_resolve_dir(DIR)
# --------------------------
# Return the DIR with all inner variables expanded.
urbi_resolve_dir ()
{
ac_$0_dir=$[]1
ac_$0_res=
ac_$0_prefix_NONE=
ac_$0_exec_prefix_NONE=
test "x$prefix" = xNONE &&
ac_$0_exec_prefix_NONE=yes &&
prefix=$ac_default_prefix
test "x$exec_prefix" = xNONE &&
ac_$0_exec_prefix_NONE=yes &&
exec_prefix=$prefix
while true
do
eval ac_$0_res="$ac_$0_dir"
if test x"$ac_$0_dir" == x"$ac_$0_res"; then
break
fi
ac_$0_dir=$ac_$0_res
done
test "$ac_$0_prefix_NONE" && prefix=NONE
test "$ac_$0_exec_prefix_NONE" && exec_prefix=NONE
echo "$ac_$0_res"
}
])
# PATH URBI_RESOLVE_DIR(DIR)
# --------------------------
# Return the DIR with all inner variables expanded.
AC_DEFUN([URBI_RESOLVE_DIR],
[AC_REQUIRE([URBI_RESOLVE_DIR_PREPARE])dnl
urbi_resolve_dir '$1'[]dnl
])
## Local Variables:
## mode: autoconf
## End:
This diff is collapsed.
This diff is collapsed.
#! /bin/sh
# depcomp - compile a program generating dependencies as side-effects
# Copyright 1999, 2000 Free Software Foundation, Inc.
scriptversion=2007-03-29.01
# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007 Free Software
# Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
......@@ -15,8 +18,8 @@
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
......@@ -25,22 +28,45 @@
# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
case $1 in
'')
echo "$0: No command. Try \`$0 --help' for more information." 1>&2
exit 1;
;;
-h | --h*)
cat <<\EOF
Usage: depcomp [--help] [--version] PROGRAM [ARGS]
Run PROGRAMS ARGS to compile a file, generating dependencies
as side-effects.
Environment variables:
depmode Dependency tracking mode.
source Source file read by `PROGRAMS ARGS'.
object Object file output by `PROGRAMS ARGS'.
DEPDIR directory where to store dependencies.
depfile Dependency file to output.
tmpdepfile Temporary file to use when outputing dependencies.
libtool Whether libtool is used (yes/no).
Report bugs to <bug-automake@gnu.org>.
EOF
exit $?
;;
-v | --v*)
echo "depcomp $scriptversion"
exit $?
;;
esac
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
echo "depcomp: Variables source, object and depmode must be set" 1>&2
exit 1
fi
# `libtool' can also be set to `yes' or `no'.
if test -z "$depfile"; then
base=`echo "$object" | sed -e 's,^.*/,,' -e 's,\.\([^.]*\)$,.P\1,'`
dir=`echo "$object" | sed 's,/.*$,/,'`
if test "$dir" = "$object"; then
dir=
fi
# FIXME: should be _deps on DOS.
depfile="$dir.deps/$base"
fi
# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
depfile=${depfile-`echo "$object" |
sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
rm -f "$tmpdepfile"
......@@ -66,7 +92,20 @@ gcc3)
## gcc 3 implements dependency tracking that does exactly what
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
## it if -MD -MP comes after the -MF stuff. Hmm.
"$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
## Unfortunately, FreeBSD c89 acceptance of flags depends upon
## the command line argument order; so add the flags where they
## appear in depend2.am. Note that the slowdown incurred here
## affects only configure: in makefiles, %FASTDEP% shortcuts this.
for arg
do
case $arg in
-c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
*) set fnord "$@" "$arg" ;;
esac
shift # fnord
shift # $arg
done
"$@"
stat=$?
if test $stat -eq 0; then :
else
......@@ -172,31 +211,43 @@ sgi)
aix)
# The C for AIX Compiler uses -M and outputs the dependencies
# in a .u file. This file always lives in the current directory.
# Also, the AIX compiler puts `$object:' at the start of each line;
# $object doesn't have directory information.
stripped=`echo "$object" | sed -e 's,^.*/,,' -e 's/\(.*\)\..*$/\1/'`
tmpdepfile="$stripped.u"
outname="$stripped.o"
# in a .u file. In older versions, this file always lives in the
# current directory. Also, the AIX compiler puts `$object:' at the
# start of each line; $object doesn't have directory information.
# Version 6 uses the directory in both cases.
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
test "x$dir" = "x$object" && dir=
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
if test "$libtool" = yes; then
tmpdepfile1=$dir$base.u
tmpdepfile2=$base.u
tmpdepfile3=$dir.libs/$base.u
"$@" -Wc,-M
else
tmpdepfile1=$dir$base.u
tmpdepfile2=$dir$base.u
tmpdepfile3=$dir$base.u
"$@" -M
fi
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
exit $stat
fi
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
do
test -f "$tmpdepfile" && break
done
if test -f "$tmpdepfile"; then
# Each line is of the form `foo.o: dependent.h'.
# Do two passes, one to just change these to
# `$object: dependent.h' and one to simply `dependent.h:'.
sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
# That's a tab and a space in the [].
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
else
# The sourcefile does not contain any dependencies, so just
# store a dummy comment line, to avoid errors with the Makefile
......@@ -206,38 +257,136 @@ aix)
rm -f "$tmpdepfile"
;;
icc)
# Intel's C compiler understands `-MD -MF file'. However on
# icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
# ICC 7.0 will fill foo.d with something like
# foo.o: sub/foo.c
# foo.o: sub/foo.h
# which is wrong. We want:
# sub/foo.o: sub/foo.c
# sub/foo.o: sub/foo.h
# sub/foo.c:
# sub/foo.h:
# ICC 7.1 will output
# foo.o: sub/foo.c sub/foo.h
# and will wrap long lines using \ :
# foo.o: sub/foo.c ... \
# sub/foo.h ... \
# ...
"$@" -MD -MF "$tmpdepfile"
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
# Each line is of the form `foo.o: dependent.h',
# or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
# Do two passes, one to just change these to
# `$object: dependent.h' and one to simply `dependent.h:'.
sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
# Some versions of the HPUX 10.20 sed can't process this invocation
# correctly. Breaking it into two sed invocations is a workaround.
sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
hp2)
# The "hp" stanza above does not work with aCC (C++) and HP's ia64
# compilers, which have integrated preprocessors. The correct option
# to use with these is +Maked; it writes dependencies to a file named
# 'foo.d', which lands next to the object file, wherever that
# happens to be.
# Much of this is similar to the tru64 case; see comments there.
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
test "x$dir" = "x$object" && dir=
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
if test "$libtool" = yes; then
tmpdepfile1=$dir$base.d
tmpdepfile2=$dir.libs/$base.d
"$@" -Wc,+Maked
else
tmpdepfile1=$dir$base.d
tmpdepfile2=$dir$base.d
"$@" +Maked
fi
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile1" "$tmpdepfile2"
exit $stat
fi
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
do
test -f "$tmpdepfile" && break
done
if test -f "$tmpdepfile"; then
sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
# Add `dependent.h:' lines.
sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile"
else
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile" "$tmpdepfile2"
;;
tru64)
# The Tru64 compiler uses -MD to generate dependencies as a side
# effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
# dependencies in `foo.d' instead, so we check for that too.
# Subdirectories are respected.
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
test "x$dir" = "x$object" && dir=
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
base=`echo "$object" | sed -e 's/\.o$//' -e 's/\.lo$//'`
tmpdepfile1="$base.o.d"
tmpdepfile2="$base.d"
if test "$libtool" = yes; then
# With Tru64 cc, shared objects can also be used to make a
# static library. This mechanism is used in libtool 1.4 series to
# handle both shared and static libraries in a single compilation.
# With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
#
# With libtool 1.5 this exception was removed, and libtool now
# generates 2 separate objects for the 2 libraries. These two
# compilations output dependencies in $dir.libs/$base.o.d and
# in $dir$base.o.d. We have to check for both files, because
# one of the two compilations can be disabled. We should prefer
# $dir$base.o.d over $dir.libs/$base.o.d because the latter is
# automatically cleaned when .libs/ is deleted, while ignoring
# the former would cause a distcleancheck panic.
tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4
tmpdepfile2=$dir$base.o.d # libtool 1.5
tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5
tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504
"$@" -Wc,-MD
else
tmpdepfile1=$dir$base.o.d
tmpdepfile2=$dir$base.d
tmpdepfile3=$dir$base.d
tmpdepfile4=$dir$base.d
"$@" -MD
fi
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile1" "$tmpdepfile2"
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
exit $stat
fi
if test -f "$tmpdepfile1"; then
tmpdepfile="$tmpdepfile1"
else
tmpdepfile="$tmpdepfile2"
fi
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
do
test -f "$tmpdepfile" && break
done
if test -f "$tmpdepfile"; then
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
# That's a space and a tab in the [].
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
# That's a tab and a space in the [].
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
else
echo "#dummy" > "$depfile"
fi
......@@ -250,34 +399,42 @@ tru64)
dashmstdout)
# Important note: in order to support this mode, a compiler *must*
# always write the proprocessed file to stdout, regardless of -o,
# because we must use -o when running libtool.
test -z "$dashmflag" && dashmflag=-M
( IFS=" "
case " $* " in
*" --mode=compile "*) # this is libtool, let us make it quiet
for arg
do # cycle over the arguments
case "$arg" in
"--mode=compile")
# insert --quiet before "--mode=compile"
set fnord "$@" --quiet
shift # fnord
;;
esac
set fnord "$@" "$arg"
shift # fnord
shift # "$arg"
done
# always write the preprocessed file to stdout, regardless of -o.
"$@" || exit $?
# Remove the call to Libtool.
if test "$libtool" = yes; then
while test $1 != '--mode=compile'; do
shift
done
shift
fi
# Remove `-o $object'.
IFS=" "
for arg
do
case $arg in
-o)
shift
;;
$object)
shift
;;
*)
set fnord "$@" "$arg"
shift # fnord
shift # $arg
;;
esac
"$@" $dashmflag | sed 's:^[^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
) &
proc=$!
"$@"
stat=$?
wait "$proc"
if test "$stat" != 0; then exit $stat; fi
done
test -z "$dashmflag" && dashmflag=-M
# Require at least two characters before searching for `:'
# in the target name. This is to cope with DOS-style filenames:
# a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
"$@" $dashmflag |
sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
rm -f "$depfile"
cat < "$tmpdepfile" > "$depfile"
tr ' ' '
......@@ -295,33 +452,37 @@ dashXmstdout)
;;
makedepend)
# X makedepend
(
shift
cleared=no
for arg in "$@"; do
case $cleared in no)
set ""; shift
cleared=yes
esac
case "$arg" in
-D*|-I*)
set fnord "$@" "$arg"; shift;;
-*)
;;
*)
set fnord "$@" "$arg"; shift;;
esac
"$@" || exit $?
# Remove any Libtool call
if test "$libtool" = yes; then
while test $1 != '--mode=compile'; do
shift
done
obj_suffix="`echo $object | sed 's/^.*\././'`"
touch "$tmpdepfile"
${MAKEDEPEND-makedepend} 2>/dev/null -o"$obj_suffix" -f"$tmpdepfile" "$@"
) &
proc=$!
"$@"
stat=$?
wait "$proc"
if test "$stat" != 0; then exit $stat; fi
shift
fi
# X makedepend
shift
cleared=no
for arg in "$@"; do
case $cleared in
no)
set ""; shift
cleared=yes ;;
esac
case "$arg" in
-D*|-I*)
set fnord "$@" "$arg"; shift ;;
# Strip any option that makedepend may not understand. Remove
# the object too, otherwise makedepend will parse it as a source file.
-*|$object)
;;
*)
set fnord "$@" "$arg"; shift ;;
esac
done
obj_suffix="`echo $object | sed 's/^.*\././'`"
touch "$tmpdepfile"
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
rm -f "$depfile"
cat < "$tmpdepfile" > "$depfile"
sed '1,2d' "$tmpdepfile" | tr ' ' '
......@@ -334,35 +495,40 @@ makedepend)
cpp)
# Important note: in order to support this mode, a compiler *must*
# always write the proprocessed file to stdout, regardless of -o,
# because we must use -o when running libtool.
( IFS=" "
case " $* " in
*" --mode=compile "*)
for arg
do # cycle over the arguments
case $arg in
"--mode=compile")
# insert --quiet before "--mode=compile"
set fnord "$@" --quiet
shift # fnord
;;
esac
set fnord "$@" "$arg"
shift # fnord
shift # "$arg"
done
# always write the preprocessed file to stdout.
"$@" || exit $?
# Remove the call to Libtool.
if test "$libtool" = yes; then
while test $1 != '--mode=compile'; do
shift
done
shift
fi
# Remove `-o $object'.
IFS=" "
for arg
do
case $arg in
-o)
shift
;;
$object)
shift
;;
*)
set fnord "$@" "$arg"
shift # fnord
shift # $arg
;;
esac
"$@" -E |
sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
done
"$@" -E |
sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
-e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
sed '$ s: \\$::' > "$tmpdepfile"
) &
proc=$!
"$@"
stat=$?
wait "$proc"
if test "$stat" != 0; then exit $stat; fi
rm -f "$depfile"
echo "$object : \\" > "$depfile"
cat < "$tmpdepfile" >> "$depfile"
......@@ -372,49 +538,27 @@ cpp)
msvisualcpp)
# Important note: in order to support this mode, a compiler *must*
# always write the proprocessed file to stdout, regardless of -o,
# always write the preprocessed file to stdout, regardless of -o,
# because we must use -o when running libtool.
( IFS=" "
case " $* " in
*" --mode=compile "*)
for arg
do # cycle over the arguments
case $arg in
"--mode=compile")
# insert --quiet before "--mode=compile"
set fnord "$@" --quiet
shift # fnord
;;
esac
set fnord "$@" "$arg"
shift # fnord
shift # "$arg"
done
;;
esac
for arg
do
case "$arg" in
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
"$@" || exit $?
IFS=" "
for arg
do
case "$arg" in
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
set fnord "$@"
shift
shift
;;
*)
*)
set fnord "$@" "$arg"
shift
shift
;;
esac
done
"$@" -E |
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
) &
proc=$!
"$@"
stat=$?
wait "$proc"
if test "$stat" != 0; then exit $stat; fi
esac
done
"$@" -E |
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
rm -f "$depfile"
echo "$object : \\" > "$depfile"
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
......@@ -434,3 +578,12 @@ none)
esac
exit 0
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$"
# End:
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/* config.h.in. Generated from configure.ac by autoheader. */
/* BLAS header filename. */
#undef ATLAS_BLAS_H
/* CLAPACK header filename. */
#undef ATLAS_LAPACK_H
/* Archive creation date */
#undef DATE
/* FFTW header filename. */
#undef FFTW_H
/* Define to 1 if you have the `atexit' function. */
#undef HAVE_ATEXIT
/* Define if you have the ATLAS libraries and header files. */
#undef HAVE_ATLAS
/* Define to 1 if you have the <atlas/cblas.h> header file. */
#undef HAVE_ATLAS_CBLAS_H
/* Define to 1 if you have the <atlas/clapack.h> header file. */
#undef HAVE_ATLAS_CLAPACK_H
/* Define if you have the parallel ATLAS libraries. */
#undef HAVE_ATLAS_MP
/* Define to 1 if you have the <cblas.h> header file. */
#undef HAVE_CBLAS_H
/* Define to 1 if you have the <clapack.h> header file. */
#undef HAVE_CLAPACK_H
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
/* Define to 1 if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H
/* Define if you have the FFTW double precision libraries and header files. */
#undef HAVE_FFTW
/* Define if you have the FFTW single precision libraries and header files. */
#undef HAVE_FFTWF
/* Define if you have the FFTW single precision multithreaded libraries and
header files. */
#undef HAVE_FFTWFT
/* Define if you have the FFTW double precision multithreaded libraries and
header files. */
#undef HAVE_FFTWT
/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
#undef HAVE_FSEEKO
......@@ -21,15 +65,23 @@
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Define to 1 if you have the `cblas' library (-lcblas). */
#undef HAVE_LIBCBLAS
/* Define to 1 if you have the `lapack' library (-llapack). */
#undef HAVE_LIBLAPACK
/* Define to 1 if you have the `m' library (-lm). */
#undef HAVE_LIBM
/* Define to 1 if you have the `ptcblas' library (-lptcblas). */
#undef HAVE_LIBPTCBLAS
/* Define to 1 if you have the <limits.h> header file. */
#undef HAVE_LIMITS_H
/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
to 0 otherwise. */
#undef HAVE_MALLOC
/* Define to 1 if you have the `logf' function. */
#undef HAVE_LOGF
/* Define to 1 if you have the <malloc.h> header file. */
#undef HAVE_MALLOC_H
......@@ -55,6 +107,12 @@
/* Define to 1 if you have the `munmap' function. */
#undef HAVE_MUNMAP
/* Define if you have POSIX threads libraries and header files. */
#undef HAVE_PTHREAD
/* Define to 1 if you have the `sincos' function. */
#undef HAVE_SINCOS
/* Define to 1 if `stat' has the bug that it succeeds when given the
zero-length file name argument. */
#undef HAVE_STAT_EMPTY_STRING_BUG
......@@ -111,6 +169,10 @@
/* Define to the version of this package. */
#undef PACKAGE_VERSION
/* Define to the necessary symbol if this constant uses a non-standard name on
your system. */
#undef PTHREAD_CREATE_JOINABLE
/* Define as the return type of signal handlers (`int' or `void'). */
#undef RETSIGTYPE
......@@ -123,9 +185,15 @@
/* Define to 1 if your <sys/time.h> declares `struct tm'. */
#undef TM_IN_SYS_TIME
/* Triggers multhreading */
#undef USE_THREADS
/* Version number of package */
#undef VERSION
/* Default URL of the XSLT filter */
#undef XSL_URL
/* Number of bits in a file offset, on hosts where this is settable. */
#undef _FILE_OFFSET_BITS
......@@ -141,13 +209,10 @@
/* Define to `int' if <sys/types.h> doesn't define. */
#undef gid_t
/* Define to rpl_malloc if the replacement function should be used. */
#undef malloc
/* Define to `long' if <sys/types.h> does not define. */
/* Define to `long int' if <sys/types.h> does not define. */
#undef off_t
/* Define to `unsigned' if <sys/types.h> does not define. */
/* Define to `unsigned int' if <sys/types.h> does not define. */
#undef size_t
/* Define to `int' if <sys/types.h> doesn't define. */
......
This diff is collapsed.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment