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,11 +28,31 @@ 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 ||
......@@ -44,44 +60,53 @@ EOF
$CC -c -fast conftest.c > /dev/null 2>&1 &&
test -f conftest.o; then
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,37 +257,135 @@ 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
# 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 [].
# That's a tab and a space in the [].
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
else
echo "#dummy" > "$depfile"
......@@ -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
# 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 # cycle over the arguments
case "$arg" in
"--mode=compile")
# insert --quiet before "--mode=compile"
set fnord "$@" --quiet
shift # fnord
do
case $arg in
-o)
shift
;;
esac
$object)
shift
;;
*)
set fnord "$@" "$arg"
shift # fnord
shift # "$arg"
done
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)
"$@" || exit $?
# Remove any Libtool call
if test "$libtool" = yes; then
while test $1 != '--mode=compile'; do
shift
done
shift
fi
# X makedepend
(
shift
cleared=no
for arg in "$@"; do
case $cleared in no)
case $cleared in
no)
set ""; shift
cleared=yes
cleared=yes ;;
esac
case "$arg" in
-D*|-I*)
set fnord "$@" "$arg"; shift;;
-*)
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;;
set fnord "$@" "$arg"; shift ;;
esac
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
${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 "*)
# 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 # cycle over the arguments
do
case $arg in
"--mode=compile")
# insert --quiet before "--mode=compile"
set fnord "$@" --quiet
shift # fnord
-o)
shift
;;
esac
$object)
shift
;;
*)
set fnord "$@" "$arg"
shift # fnord
shift # "$arg"
done
shift # $arg
;;
esac
done
"$@" -E |
sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
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,26 +538,10 @@ 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
"$@" || exit $?
IFS=" "
for arg
do
case "$arg" in
......@@ -409,12 +559,6 @@ msvisualcpp)
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
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.
#! /bin/sh
# Common stub for a few missing GNU programs while installing.
# Copyright 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
scriptversion=2006-05-10.23
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006
# Free Software Foundation, Inc.
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
# This program is free software; you can redistribute it and/or modify
......@@ -15,8 +19,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
......@@ -29,6 +33,8 @@ if test $# -eq 0; then
fi
run=:
sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
# In the cases where this matters, `missing' is being run in the
# srcdir already.
......@@ -38,18 +44,24 @@ else
configure_ac=configure.in
fi
case "$1" in
msg="missing on your system"
case $1 in
--run)
# Try to run requested program, and just exit if it succeeds.
run=
shift
"$@" && exit 0
# Exit code 63 means version mismatch. This often happens
# when the user try to use an ancient version of a tool on
# a file that requires a minimum version. In this case we
# we should proceed has if the program had been absent, or
# if --run hadn't been passed.
if test $? = 63; then
run=:
msg="probably too old"
fi
;;
esac
# If it does not exist, or fails to run (possibly an outdated version),
# try to emulate it.
case "$1" in
-h|--h|--he|--hel|--help)
echo "\
......@@ -67,6 +79,7 @@ Supported PROGRAM values:
aclocal touch file \`aclocal.m4'
autoconf touch file \`configure'
autoheader touch file \`config.h.in'
autom4te touch the output file, or create a stub one
automake touch all \`Makefile.in' files
bison create \`y.tab.[ch]', if possible, from existing .[ch]
flex create \`lex.yy.c', if possible, from existing .c
......@@ -74,11 +87,15 @@ Supported PROGRAM values:
lex create \`lex.yy.c', if possible, from existing .c
makeinfo touch the output file
tar try tar, gnutar, gtar, then tar without non-portable flags
yacc create \`y.tab.[ch]', if possible, from existing .[ch]"
yacc create \`y.tab.[ch]', if possible, from existing .[ch]
Send bug reports to <bug-automake@gnu.org>."
exit $?
;;
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
echo "missing 0.4 - GNU automake"
echo "missing $scriptversion (GNU Automake)"
exit $?
;;
-*)
......@@ -87,14 +104,44 @@ Supported PROGRAM values:
exit 1
;;
aclocal*)
esac
# Now exit if we have it, but it failed. Also exit now if we
# don't have it and --version was passed (most likely to detect
# the program).
case $1 in
lex|yacc)
# Not GNU programs, they don't have --version.
;;
tar)
if test -n "$run"; then
echo 1>&2 "ERROR: \`tar' requires --run"
exit 1
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
exit 1
fi
;;
*)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
# Could not run --version or --help. This is probably someone
# running `$TOOL --version' or `$TOOL --help' to check whether
# $TOOL exists and not knowing $TOOL uses missing.
exit 1
fi
;;
esac
# If it does not exist, or fails to run (possibly an outdated version),
# try to emulate it.
case $1 in
aclocal*)
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
WARNING: \`$1' is $msg. You should only need it if
you modified \`acinclude.m4' or \`${configure_ac}'. You might want
to install the \`Automake' and \`Perl' packages. Grab them from
any GNU archive site."
......@@ -102,13 +149,8 @@ WARNING: \`$1' is missing on your system. You should only need it if
;;
autoconf)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
WARNING: \`$1' is $msg. You should only need it if
you modified \`${configure_ac}'. You might want to install the
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU
archive site."
......@@ -116,13 +158,8 @@ WARNING: \`$1' is missing on your system. You should only need it if
;;
autoheader)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
WARNING: \`$1' is $msg. You should only need it if
you modified \`acconfig.h' or \`${configure_ac}'. You might want
to install the \`Autoconf' and \`GNU m4' packages. Grab them
from any GNU archive site."
......@@ -130,7 +167,7 @@ WARNING: \`$1' is missing on your system. You should only need it if
test -z "$files" && files="config.h"
touch_files=
for f in $files; do
case "$f" in
case $f in
*:*) touch_files="$touch_files "`echo "$f" |
sed -e 's/^[^:]*://' -e 's/:.*//'`;;
*) touch_files="$touch_files $f.in";;
......@@ -140,13 +177,8 @@ WARNING: \`$1' is missing on your system. You should only need it if
;;
automake*)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
WARNING: \`$1' is $msg. You should only need it if
you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
You might want to install the \`Automake' and \`Perl' packages.
Grab them from any GNU archive site."
......@@ -156,20 +188,15 @@ WARNING: \`$1' is missing on your system. You should only need it if
;;
autom4te)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
echo 1>&2 "\
WARNING: \`$1' is needed, and you do not seem to have it handy on your
system. You might have modified some files without having the
WARNING: \`$1' is needed, but is $msg.
You might have modified some files without having the
proper tools for further handling them.
You can get \`$1Help2man' as part of \`Autoconf' from any GNU
You can get \`$1' as part of \`Autoconf' from any GNU
archive site."
file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
file=`echo "$*" | sed -n "$sed_output"`
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
if test -f "$file"; then
touch $file
else
......@@ -185,74 +212,67 @@ WARNING: \`$1' is needed, and you do not seem to have it handy on your
bison|yacc)
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
WARNING: \`$1' $msg. You should only need it if
you modified a \`.y' file. You may need the \`Bison' package
in order for those modifications to take effect. You can get
\`Bison' from any GNU archive site."
rm -f y.tab.c y.tab.h
if [ $# -ne 1 ]; then
if test $# -ne 1; then
eval LASTARG="\${$#}"
case "$LASTARG" in
case $LASTARG in
*.y)
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
if [ -f "$SRCFILE" ]; then
if test -f "$SRCFILE"; then
cp "$SRCFILE" y.tab.c
fi
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
if [ -f "$SRCFILE" ]; then
if test -f "$SRCFILE"; then
cp "$SRCFILE" y.tab.h
fi
;;
esac
fi
if [ ! -f y.tab.h ]; then
if test ! -f y.tab.h; then
echo >y.tab.h
fi
if [ ! -f y.tab.c ]; then
if test ! -f y.tab.c; then
echo 'main() { return 0; }' >y.tab.c
fi
;;
lex|flex)
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
WARNING: \`$1' is $msg. You should only need it if
you modified a \`.l' file. You may need the \`Flex' package
in order for those modifications to take effect. You can get
\`Flex' from any GNU archive site."
rm -f lex.yy.c
if [ $# -ne 1 ]; then
if test $# -ne 1; then
eval LASTARG="\${$#}"
case "$LASTARG" in
case $LASTARG in
*.l)
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
if [ -f "$SRCFILE" ]; then
if test -f "$SRCFILE"; then
cp "$SRCFILE" lex.yy.c
fi
;;
esac
fi
if [ ! -f lex.yy.c ]; then
if test ! -f lex.yy.c; then
echo 'main() { return 0; }' >lex.yy.c
fi
;;
help2man)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
WARNING: \`$1' is $msg. You should only need it if
you modified a dependency of a manual page. You may need the
\`Help2man' package in order for those modifications to take
effect. You can get \`Help2man' from any GNU archive site."
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
if test -z "$file"; then
file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
fi
if [ -f "$file" ]; then
file=`echo "$*" | sed -n "$sed_output"`
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
if test -f "$file"; then
touch $file
else
test -z "$file" || exec >$file
......@@ -262,54 +282,58 @@ WARNING: \`$1' is missing on your system. You should only need it if
;;
makeinfo)
if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then
# We have makeinfo, but it failed.
exit 1
fi
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
WARNING: \`$1' is $msg. You should only need it if
you modified a \`.texi' or \`.texinfo' file, or any other file
indirectly affecting the aspect of the manual. The spurious
call might also be the consequence of using a buggy \`make' (AIX,
DU, IRIX). You might want to install the \`Texinfo' package or
the \`GNU make' package. Grab either from any GNU archive site."
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
# The file to touch is that specified with -o ...
file=`echo "$*" | sed -n "$sed_output"`
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
if test -z "$file"; then
file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
# ... or it is the one specified with @setfilename ...
infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
file=`sed -n '
/^@setfilename/{
s/.* \([^ ]*\) *$/\1/
p
q
}' $infile`
# ... or it is derived from the source name (dir/f.texi becomes f.info)
test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
fi
# If the file does not exist, the user really needs makeinfo;
# let's fail without touching anything.
test -f $file || exit 1
touch $file
;;
tar)
shift
if test -n "$run"; then
echo 1>&2 "ERROR: \`tar' requires --run"
exit 1
fi
# We have already tried tar in the generic part.
# Look for gnutar/gtar before invocation to avoid ugly error
# messages.
if (gnutar --version > /dev/null 2>&1); then
gnutar ${1+"$@"} && exit 0
gnutar "$@" && exit 0
fi
if (gtar --version > /dev/null 2>&1); then
gtar ${1+"$@"} && exit 0
gtar "$@" && exit 0
fi
firstarg="$1"
if shift; then
case "$firstarg" in
case $firstarg in
*o*)
firstarg=`echo "$firstarg" | sed s/o//`
tar "$firstarg" ${1+"$@"} && exit 0
tar "$firstarg" "$@" && exit 0
;;
esac
case "$firstarg" in
case $firstarg in
*h*)
firstarg=`echo "$firstarg" | sed s/h//`
tar "$firstarg" ${1+"$@"} && exit 0
tar "$firstarg" "$@" && exit 0
;;
esac
fi
......@@ -323,10 +347,10 @@ WARNING: I can't seem to be able to run \`tar' with the given arguments.
*)
echo 1>&2 "\
WARNING: \`$1' is needed, and you do not seem to have it handy on your
system. You might have modified some files without having the
WARNING: \`$1' is needed, and is $msg.
You might have modified some files without having the
proper tools for further handling them. Check the \`README' file,
it often tells you about the needed prerequirements for installing
it often tells you about the needed prerequisites for installing
this package. You may also peek at any GNU archive site, in case
some other package would contain this missing \`$1' program."
exit 1
......@@ -334,3 +358,10 @@ WARNING: \`$1' is needed, and you do not seem to have it handy on your
esac
exit 0
# Local variables:
# 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.
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