Commit 54b951b1 authored by Emmanuel Bertin's avatar Emmanuel Bertin
Browse files

Switched to single precision for model fitting.

Changed configure behaviour towards CFLAGS and LDFLAGS: automatic settings are now applied only if the --enable-automatic-flags configure option is set (thanks to S.Pascual).
Version number pushed to 2.9.0.
parent 3b59ee2e
......@@ -91,6 +91,9 @@ distuninstallcheck_listfiles = find . -type f -print
distcleancheck_listfiles = find . -type f -print
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_CFLAGS = @AM_CFLAGS@
AM_CPPFLAGS = @AM_CPPFLAGS@
AM_LDFLAGS = @AM_LDFLAGS@
AR = @AR@
ATLAS_CFLAGS = @ATLAS_CFLAGS@
ATLAS_ERROR = @ATLAS_ERROR@
......
......@@ -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.3 (2009-04-01)
dnl @version 1.4 (2009-09-08)
dnl @authors Emmanuel Bertin <bertin@iap.fr> Ville Laurikari <vl@iki.fi>
dnl
AC_DEFUN([ACX_PROG_CC_OPTIM], [
......@@ -101,8 +101,8 @@ EOF
rm -f conftest.*
fi
if test -n "$prog_cc_optim_flags"; then
CFLAGS="$CFLAGS $prog_cc_optim_flags"
LDFLAGS="$LDFLAGS $prog_ld_optim_flags"
AM_CFLAGS="$CFLAGS $prog_cc_optim_flags"
AM_LDFLAGS="$LDFLAGS $prog_ld_optim_flags"
else
prog_cc_optim_flags=""
prog_ld_optim_flags=""
......
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.63 for sextractor 2.8.9.
# Generated by GNU Autoconf 2.63 for sextractor 2.9.0.
#
# Report bugs to <bertin@iap.fr>.
#
......@@ -750,8 +750,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package.
PACKAGE_NAME='sextractor'
PACKAGE_TARNAME='sextractor'
PACKAGE_VERSION='2.8.9'
PACKAGE_STRING='sextractor 2.8.9'
PACKAGE_VERSION='2.9.0'
PACKAGE_STRING='sextractor 2.9.0'
PACKAGE_BUGREPORT='bertin@iap.fr'
 
ac_unique_file="src/makeit.c"
......@@ -792,6 +792,9 @@ ac_includes_default="\
#endif"
 
ac_subst_vars='LTLIBOBJS
AM_LDFLAGS
AM_CPPFLAGS
AM_CFLAGS
ATLAS_ERROR
ATLAS_WARN
ATLAS_LIB
......@@ -915,6 +918,7 @@ SHELL'
ac_subst_files=''
ac_user_opts='
enable_option_checking
enable_automatic_flags
enable_icc
enable_dependency_tracking
enable_static
......@@ -1500,7 +1504,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures sextractor 2.8.9 to adapt to many kinds of systems.
\`configure' configures sextractor 2.9.0 to adapt to many kinds of systems.
 
Usage: $0 [OPTION]... [VAR=VALUE]...
 
......@@ -1570,7 +1574,7 @@ fi
 
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of sextractor 2.8.9:";;
short | recursive ) echo "Configuration of sextractor 2.9.0:";;
esac
cat <<\_ACEOF
 
......@@ -1578,6 +1582,9 @@ Optional Features:
--disable-option-checking ignore unrecognized --enable/--with options
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--enable-automatic-flags
Let the configure script choose the compilation
flags (off by default)
--enable-icc Enable special mode for compilation with the Intel
compiler (off by default)
--disable-dependency-tracking speeds up one-time build
......@@ -1697,7 +1704,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
sextractor configure 2.8.9
sextractor configure 2.9.0
generated by GNU Autoconf 2.63
 
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
......@@ -1711,7 +1718,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
 
It was created by sextractor $as_me 2.8.9, which was
It was created by sextractor $as_me 2.9.0, which was
generated by GNU Autoconf 2.63. Invocation command line was
 
$ $0 $@
......@@ -2414,7 +2421,7 @@ fi
 
# Define the identity of the package.
PACKAGE='sextractor'
VERSION='2.8.9'
VERSION='2.9.0'
 
 
cat >>confdefs.h <<_ACEOF
......@@ -2606,11 +2613,20 @@ $as_echo "*********** Configuring: $PACKAGE $VERSION ($date) **********" >&6; }
# Initialize the list of compilers to consider
cclist="cc gcc"
 
# Backup and reset the input CFLAGS and LDFLAGS
mycflags="$CFLAGS"
CFLAGS=""
myldflags="$LDFLAGS"
LDFLAGS=""
# Provide special option for choosing automatically the compilation flags.
{ $as_echo "$as_me:$LINENO: checking if compilation flags are set automatically" >&5
$as_echo_n "checking if compilation flags are set automatically... " >&6; }
# Check whether --enable-automatic-flags was given.
if test "${enable_automatic_flags+set}" = set; then
enableval=$enable_automatic_flags; use_autoflag="yes"
{ $as_echo "$as_me:$LINENO: result: yes" >&5
$as_echo "yes" >&6; }
else
use_autoflag="no"
{ $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi
 
# Provide special option for the Linux Intel C compiler
{ $as_echo "$as_me:$LINENO: checking for Linux Intel C compiler mode" >&5
......@@ -4430,6 +4446,10 @@ if test "$ac_res" != no; then
 
fi
 
# Override automatic CFLAGS and LDFLAGS with those of user
if test "$use_autoflag" = "yes"; then
CFLAGS=""
LDFLAGS =""
 
msg="for C compiler optimization flags"
{ $as_echo "$as_me:$LINENO: checking $msg" >&5
......@@ -4507,8 +4527,8 @@ EOF
rm -f conftest.*
fi
if test -n "$prog_cc_optim_flags"; then
CFLAGS="$CFLAGS $prog_cc_optim_flags"
LDFLAGS="$LDFLAGS $prog_ld_optim_flags"
AM_CFLAGS="$CFLAGS $prog_cc_optim_flags"
AM_LDFLAGS="$LDFLAGS $prog_ld_optim_flags"
else
prog_cc_optim_flags=""
prog_ld_optim_flags=""
......@@ -4518,6 +4538,7 @@ fi
{ $as_echo "$as_me:$LINENO: result: $prog_cc_optim_flags" >&5
$as_echo "$prog_cc_optim_flags" >&6; }
 
fi
# Check whether --enable-static was given.
if test "${enable_static+set}" = set; then
enableval=$enable_static; p=${PACKAGE-default}
......@@ -5299,7 +5320,7 @@ ia64-*-hpux*)
;;
*-*-irix6*)
# Find out which ABI we are using.
echo '#line 5302 "configure"' > conftest.$ac_ext
echo '#line 5323 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
......@@ -8074,11 +8095,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:8077: $lt_compile\"" >&5)
(eval echo "\"\$as_me:8098: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:8081: \$? = $ac_status" >&5
echo "$as_me:8102: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
......@@ -8364,11 +8385,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:8367: $lt_compile\"" >&5)
(eval echo "\"\$as_me:8388: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:8371: \$? = $ac_status" >&5
echo "$as_me:8392: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
......@@ -8468,11 +8489,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:8471: $lt_compile\"" >&5)
(eval echo "\"\$as_me:8492: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:8475: \$? = $ac_status" >&5
echo "$as_me:8496: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
......@@ -10855,7 +10876,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
#line 10858 "configure"
#line 10879 "configure"
#include "confdefs.h"
 
#if HAVE_DLFCN_H
......@@ -10955,7 +10976,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
#line 10958 "configure"
#line 10979 "configure"
#include "confdefs.h"
 
#if HAVE_DLFCN_H
......@@ -13383,11 +13404,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:13386: $lt_compile\"" >&5)
(eval echo "\"\$as_me:13407: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:13390: \$? = $ac_status" >&5
echo "$as_me:13411: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
......@@ -13487,11 +13508,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:13490: $lt_compile\"" >&5)
(eval echo "\"\$as_me:13511: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:13494: \$? = $ac_status" >&5
echo "$as_me:13515: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
......@@ -15051,11 +15072,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:15054: $lt_compile\"" >&5)
(eval echo "\"\$as_me:15075: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:15058: \$? = $ac_status" >&5
echo "$as_me:15079: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
......@@ -15155,11 +15176,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:15158: $lt_compile\"" >&5)
(eval echo "\"\$as_me:15179: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:15162: \$? = $ac_status" >&5
echo "$as_me:15183: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
......@@ -17352,11 +17373,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:17355: $lt_compile\"" >&5)
(eval echo "\"\$as_me:17376: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:17359: \$? = $ac_status" >&5
echo "$as_me:17380: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
......@@ -17642,11 +17663,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:17645: $lt_compile\"" >&5)
(eval echo "\"\$as_me:17666: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:17649: \$? = $ac_status" >&5
echo "$as_me:17670: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
......@@ -17746,11 +17767,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:17749: $lt_compile\"" >&5)
(eval echo "\"\$as_me:17770: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:17753: \$? = $ac_status" >&5
echo "$as_me:17774: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
......@@ -23568,7 +23589,7 @@ fi
 
 
CC="$PTHREAD_CC"
CFLAGS="$CFLAGS $PTHREAD_CFLAGS -D_REENTRANT"
AM_CFLAGS="$AM_CFLAGS $PTHREAD_CFLAGS -D_REENTRANT"
LIBS="$PTHREAD_LIBS $LIBS"
fi
if test $use_pthreads = "yes"; then
......@@ -24342,7 +24363,7 @@ LIBS=""
 
if test x$acx_fftw_ok = xyes; then
if test x$fftw_libdir = x; then
if test xno = xyes; then
if test xyes = xyes; then
{ $as_echo "$as_me:$LINENO: checking for fftwf_execute in -lfftw3f" >&5
$as_echo_n "checking for fftwf_execute in -lfftw3f... " >&6; }
if test "${ac_cv_lib_fftw3f_fftwf_execute+set}" = set; then
......@@ -24508,7 +24529,7 @@ _ACEOF
fi
fi
if test x$acx_fftw_ok = xyes && test x$use_pthreads = xyes; then
if test xno = xyes; then
if test xyes = xyes; then
{ $as_echo "$as_me:$LINENO: checking for fftwf_init_threads in -lfftw3f" >&5
$as_echo_n "checking for fftwf_init_threads in -lfftw3f... " >&6; }
if test "${ac_cv_lib_fftw3f_fftwf_init_threads+set}" = set; then
......@@ -24837,7 +24858,7 @@ _ACEOF
fi
fi
else
if test xno = xyes; then
if test xyes = xyes; then
{ $as_echo "$as_me:$LINENO: checking for fftwf_execute in -lfftw3f" >&5
$as_echo_n "checking for fftwf_execute in -lfftw3f... " >&6; }
if test "${ac_cv_lib_fftw3f_fftwf_execute+set}" = set; then
......@@ -25003,7 +25024,7 @@ _ACEOF
fi
fi
if test x$acx_fftw_ok = xyes && test x$use_pthreads = xyes; then
if test xno = xyes; then
if test xyes = xyes; then
{ $as_echo "$as_me:$LINENO: checking for fftwf_init_threads in -lfftw3f" >&5
$as_echo_n "checking for fftwf_init_threads in -lfftw3f... " >&6; }
if test "${ac_cv_lib_fftw3f_fftwf_init_threads+set}" = set; then
......@@ -27712,33 +27733,29 @@ fi
# Link with gprof option
if test "$use_gprof" = "yes"; then
if test "$use_icc" = "yes"; then
CFLAGS="$CFLAGS -pq"
AM_CFLAGS="$AM_CFLAGS -pq"
else
CFLAGS="$CFLAGS -pg"
AM_CFLAGS="$AM_CFLAGS -pg"
fi
use_static="no"
fi
 
# Static linking option
if test "$use_static" = "yes"; then
LDFLAGS="-static -shared-libgcc $LDFLAGS"
AM_LDFLAGS="-static -shared-libgcc $AM_LDFLAGS"
fi
 
# Override automatic CFLAGS and LDFLAGS with those of user
#if test -n "$mycflags"; then
#CFLAGS="$mycflags"
#fi
#if test -n "$myldflags"; then
#LDFLAGS="$myldflags"
#fi
 
# Display compiler and linker flags
{ $as_echo "$as_me:$LINENO: result: ***************************************************************" >&5
$as_echo "***************************************************************" >&6; }
{ $as_echo "$as_me:$LINENO: result: Compile cmdline: $CC $CFLAGS" >&5
$as_echo "Compile cmdline: $CC $CFLAGS" >&6; }
{ $as_echo "$as_me:$LINENO: result: Link cmdline: $CC $LDFLAGS $LIBS" >&5
$as_echo "Link cmdline: $CC $LDFLAGS $LIBS" >&6; }
{ $as_echo "$as_me:$LINENO: result: Compile cmdline: $CC $AM_CPPFLAGS $CPPFLAGS $AM_CFLAGS $CFLAGS" >&5
$as_echo "Compile cmdline: $CC $AM_CPPFLAGS $CPPFLAGS $AM_CFLAGS $CFLAGS" >&6; }
{ $as_echo "$as_me:$LINENO: result: Link cmdline: $CC $AM_LDFLAGS $LDFLAGS $LIBS" >&5
$as_echo "Link cmdline: $CC $AM_LDFLAGS $LDFLAGS $LIBS" >&6; }
{ $as_echo "$as_me:$LINENO: result: Default XSLT URL: $xsl_url" >&5
$as_echo "Default XSLT URL: $xsl_url" >&6; }
{ $as_echo "$as_me:$LINENO: result: ***************************************************************" >&5
......@@ -28127,7 +28144,7 @@ exec 6>&1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by sextractor $as_me 2.8.9, which was
This file was extended by sextractor $as_me 2.9.0, which was
generated by GNU Autoconf 2.63. Invocation command line was
 
CONFIG_FILES = $CONFIG_FILES
......@@ -28190,7 +28207,7 @@ Report bugs to <bug-autoconf@gnu.org>."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_version="\\
sextractor config.status 2.8.9
sextractor config.status 2.9.0
configured by $0, generated by GNU Autoconf 2.63,
with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
 
......
......@@ -6,7 +6,7 @@ define([AC_CACHE_LOAD],)
define([AC_CACHE_SAVE],)
# This is your standard Bertin source code...
AC_INIT(sextractor, 2.8.9, [bertin@iap.fr])
AC_INIT(sextractor, 2.9.0, [bertin@iap.fr])
AC_CONFIG_SRCDIR(src/makeit.c)
AC_CONFIG_AUX_DIR(autoconf)
AM_CONFIG_HEADER(config.h)
......@@ -32,11 +32,16 @@ AC_MSG_RESULT([*********** Configuring: $PACKAGE $VERSION ($date) **********])
# Initialize the list of compilers to consider
cclist="cc gcc"
# Backup and reset the input CFLAGS and LDFLAGS
mycflags="$CFLAGS"
CFLAGS=""
myldflags="$LDFLAGS"
LDFLAGS=""
# Provide special option for choosing automatically the compilation flags.
AC_MSG_CHECKING([if compilation flags are set automatically])
AC_ARG_ENABLE(automatic-flags,
[AC_HELP_STRING([--enable-automatic-flags],
[Let the configure script choose the compilation flags \
(off by default)])],
use_autoflag="yes"
AC_MSG_RESULT([yes]),
use_autoflag="no"
AC_MSG_RESULT([no]))
# Provide special option for the Linux Intel C compiler
AC_MSG_CHECKING([for Linux Intel C compiler mode])
......@@ -57,7 +62,12 @@ AC_PROG_CC([$cclist])
# C Compiler: Check that it is ANSI C and POSIX-compliant
AM_PROG_CC_STDC
AC_ISC_POSIX
ACX_PROG_CC_OPTIM
# Override automatic CFLAGS and LDFLAGS with those of user
if test "$use_autoflag" = "yes"; then
CFLAGS=""
LDFLAGS =""
ACX_PROG_CC_OPTIM
fi
AC_DISABLE_STATIC
#AC_DISABLE_SHARED
AC_PROG_LIBTOOL
......@@ -182,13 +192,13 @@ if test "$use_pthreads" = "yes"; then
# CC, CFLAGS and LIBS are system and compiler-dependent
ACX_PTHREAD
CC="$PTHREAD_CC"
[CFLAGS="$CFLAGS $PTHREAD_CFLAGS -D_REENTRANT"]
[AM_CFLAGS="$AM_CFLAGS $PTHREAD_CFLAGS -D_REENTRANT"]
LIBS="$PTHREAD_LIBS $LIBS"
fi
AM_CONDITIONAL(USE_THREADS, test $use_pthreads = "yes")
################ handle the FFTW library (Fourier transforms) ################
ACX_FFTW($fftw_libdir,$fftw_incdir,$use_pthreads,no,
ACX_FFTW($fftw_libdir,$fftw_incdir,$use_pthreads,yes,
[use_fftw=yes],[use_fftw=no])
if test "$use_fftw" = "yes"; then
LIBS="$FFTW_LIBS $LIBS"
......@@ -214,30 +224,26 @@ fi
# Link with gprof option
if test "$use_gprof" = "yes"; then
if test "$use_icc" = "yes"; then
CFLAGS="$CFLAGS -pq"
AM_CFLAGS="$AM_CFLAGS -pq"
else
CFLAGS="$CFLAGS -pg"
AM_CFLAGS="$AM_CFLAGS -pg"
fi
use_static="no"
fi
# Static linking option
if test "$use_static" = "yes"; then
LDFLAGS="-static -shared-libgcc $LDFLAGS"
AM_LDFLAGS="-static -shared-libgcc $AM_LDFLAGS"
fi
# Override automatic CFLAGS and LDFLAGS with those of user
#if test -n "$mycflags"; then
#CFLAGS="$mycflags"
#fi
#if test -n "$myldflags"; then
#LDFLAGS="$myldflags"
#fi
AC_SUBST(AM_CFLAGS)
AC_SUBST(AM_CPPFLAGS)
AC_SUBST(AM_LDFLAGS)
# Display compiler and linker flags
AC_MSG_RESULT([***************************************************************])
AC_MSG_RESULT([Compile cmdline: $CC $CFLAGS])
AC_MSG_RESULT([Link cmdline: $CC $LDFLAGS $LIBS])
AC_MSG_RESULT([Compile cmdline: $CC $AM_CPPFLAGS $CPPFLAGS $AM_CFLAGS $CFLAGS])
AC_MSG_RESULT([Link cmdline: $CC $AM_LDFLAGS $LDFLAGS $LIBS])
AC_MSG_RESULT([Default XSLT URL: $xsl_url])
AC_MSG_RESULT([***************************************************************])
......
......@@ -55,6 +55,9 @@ MANS = $(dist_man_MANS)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_CFLAGS = @AM_CFLAGS@
AM_CPPFLAGS = @AM_CPPFLAGS@
AM_LDFLAGS = @AM_LDFLAGS@
AR = @AR@
ATLAS_CFLAGS = @ATLAS_CFLAGS@
ATLAS_ERROR = @ATLAS_ERROR@
......
.TH SEXTRACTOR "1" "August 2009" "SWarp 2.8.9" "User Commands"
.TH SEXTRACTOR "1" "September 2009" "SWarp 2.9.0" "User Commands"
.SH NAME
sex \- extract a source catalog from an astronomical FITS image
.SH SYNOPSIS
......
......@@ -98,6 +98,9 @@ DIST_SUBDIRS = $(SUBDIRS)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_CFLAGS = @AM_CFLAGS@
AM_CPPFLAGS = @AM_CPPFLAGS@
AM_LDFLAGS = @AM_LDFLAGS@
AR = @AR@
ATLAS_CFLAGS = @ATLAS_CFLAGS@
ATLAS_ERROR = @ATLAS_ERROR@
......
......@@ -7,7 +7,7 @@
*
* Author: E.BERTIN (IAP)
*
* Contents: Routines dealing with double precision FFT.
* Contents: Routines dealing with float precision FFT.
*
* Last modify: 26/06/2009
*
......@@ -59,7 +59,7 @@ void fft_init(int nthreads)
{
if (!fftw_init_threads())
error(EXIT_FAILURE, "*Error*: thread initialization failed in ", "FFTW");
fftw_plan_with_nthreads(prefs.nthreads);
fftwf_plan_with_nthreads(prefs.nthreads);
}
#endif
#endif
......@@ -87,11 +87,11 @@ void fft_end(void)
firsttimeflag = 0;
#ifdef USE_THREADS
#ifdef HAVE_FFTW_MP
fftw_cleanup_threads();
fftwf_cleanup_threads();
#endif
QPTHREAD_MUTEX_DESTROY(&fftmutex);
#endif
fftw_cleanup();
fftwf_cleanup();
}
return;
......@@ -99,21 +99,21 @@ void fft_end(void)
/****** fft_conv ************************************************************
PROTO void fft_conv(double *data1, double *fdata2, int *size)
PROTO void fft_conv(float *data1, float *fdata2, int *size)
PURPOSE Optimized 2-dimensional FFT convolution using the FFTW library.
INPUT ptr to the first image,
ptr to the Fourier transform of the second image,
image size vector.
OUTPUT -.
NOTES For data1 and fdata2, memory must be allocated for
size[0]* ... * 2*(size[naxis-1]/2+1) doubles (padding required).
size[0]* ... * 2*(size[naxis-1]/2+1) floats (padding required).
AUTHOR E. Bertin (IAP)
VERSION 26/03/2007
***/
void fft_conv(double *data1, double *fdata2, int *size)
void fft_conv(float *data1, float *fdata2, int *size)
{
fftw_plan plan;
double *fdata1,*fdata1p,*fdata2p,
fftwf_plan plan;
float *fdata1,*fdata1p,*fdata2p,
real,imag, fac;
int i, npix,npix2;
......@@ -125,18 +125,18 @@ void fft_conv(double *data1, double *fdata2, int *size)
#ifdef USE_THREADS
QPTHREAD_MUTEX_LOCK(&fftmutex);
#endif
QFFTWMALLOC(fdata1, double, npix2);
plan = fftw_plan_dft_r2c_2d(size[1], size[0], data1,
(fftw_complex *)fdata1, FFTW_ESTIMATE|FFTW_DESTROY_INPUT);
QFFTWMALLOC(fdata1, float, npix2);
plan = fftwf_plan_dft_r2c_2d(size[1], size[0], data1,
(fftwf_complex *)fdata1, FFTW_ESTIMATE|FFTW_DESTROY_INPUT);
#ifdef USE_THREADS
QPTHREAD_MUTEX_UNLOCK(&fftmutex);
#endif
fftw_execute(plan);
fftwf_execute(plan);
#ifdef USE_THREADS
QPTHREAD_MUTEX_LOCK(&fftmutex);
#endif
fftw_destroy_plan(plan);
fftwf_destroy_plan(plan);
#ifdef USE_THREADS
QPTHREAD_MUTEX_UNLOCK(&fftmutex);
#endif
......@@ -157,18 +157,18 @@ void fft_conv(double *data1, double *fdata2, int *size)
#ifdef USE_THREADS
QPTHREAD_MUTEX_LOCK(&fftmutex);
#endif
plan = fftw_plan_dft_c2r_2d(size[1], size[0], (fftw_complex *)fdata1,
plan = fftwf_plan_dft_c2r_2d(size[1], size[0], (fftwf_complex *)fdata1,
data1, FFTW_ESTIMATE|FFTW_DESTROY_INPUT);
#ifdef USE_THREADS
QPTHREAD_MUTEX_UNLOCK(&fftmutex);
#endif
fftw_execute(plan);
fftwf_execute(plan);
#ifdef USE_THREADS
QPTHREAD_MUTEX_LOCK(&fftmutex);
#endif
fftw_destroy_plan(plan);
fftwf_destroy_plan(plan);
/* Free the fdata1 scratch array */
QFFTWFREE(fdata1);
#ifdef USE_THREADS
......@@ -180,7 +180,7 @@ void fft_conv(double *data1, double *fdata2, int *size)
/****** fft_rtf ************************************************************
PROTO double *fft_rtf(double *data, int *size)
PROTO float *fft_rtf(float *data, int *size)
PURPOSE Optimized 2-dimensional FFT "in place" using the FFTW library.
INPUT ptr to the image,
ptr to image size vector.
......@@ -189,11 +189,11 @@ NOTES Input data may end up corrupted.
AUTHOR E. Bertin (IAP)
VERSION 26/03/2007
***/
double *fft_rtf(double *data, int *size)
float *fft_rtf(float *data, int *size)
{
fftw_plan plan;
fftw_complex *fdata;
int npix2;
fftwf_plan plan;
fftwf_complex *fdata;
int npix2;
/* Convert axis indexing to that of FFTW */
npix2 = ((size[0]/2) + 1) * size[1];
......@@ -202,22 +202,22 @@ double *fft_rtf(double *data, int *size)
#ifdef USE_THREADS
QPTHREAD_MUTEX_LOCK(&fftmutex);
#endif
QFFTWMALLOC(fdata, fftw_complex, npix2);
plan = fftw_plan_dft_r2c_2d(size[1], size[0], data,
QFFTWMALLOC(fdata, fftwf_complex, npix2);
plan = fftwf_plan_dft_r2c_2d(size[1], size[0], data,
fdata, FFTW_ESTIMATE|FFTW_DESTROY_INPUT);
#ifdef USE_THREADS
QPTHREAD_MUTEX_UNLOCK(&fftmutex);
#endif
fftw_execute(plan);
fftwf_execute(plan);
#ifdef USE_THREADS
QPTHREAD_MUTEX_LOCK(&fftmutex);
#endif
fftw_destroy_plan(plan);
fftwf_destroy_plan(plan);
#ifdef USE_THREADS
QPTHREAD_MUTEX_UNLOCK(&fftmutex);
#endif
return (double *)fdata;
return (float *)fdata;
}
......@@ -22,16 +22,16 @@
/*------------------------------- Other Macros ------------------------------*/
#define QFFTWMALLOC(ptr, typ, nel) \
{if (!(ptr = (typ *)fftw_malloc((size_t)(nel)*sizeof(typ)))) \
{if (!(ptr = (typ *)fftwf_malloc((size_t)(nel)*sizeof(typ)))) \
error(EXIT_FAILURE, "Not enough memory for ", \
#ptr " (" #nel " elements) !");;}
#define QFFTWFREE(ptr) fftw_free(ptr)
#define QFFTWFREE(ptr) fftwf_free(ptr)
/*--------------------------- structure definitions -------------------------*/
/*---------------------------------- protos --------------------------------*/
extern void fft_conv(double *data1, double *fdata2, int *size),
extern void fft_conv(float *data1, float *fdata2, int *size),
fft_end(),
fft_init(int nthreads);
extern double *fft_rtf(double *data, int *size);
extern float *fft_rtf(float *data, int *size);
......@@ -74,6 +74,9 @@ CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_CFLAGS = @AM_CFLAGS@
AM_CPPFLAGS = @AM_CPPFLAGS@
AM_LDFLAGS = @AM_LDFLAGS@
AR = @AR@
ATLAS_CFLAGS = @ATLAS_CFLAGS@
ATLAS_ERROR = @ATLAS_ERROR@
......
......@@ -71,6 +71,9 @@ CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_CFLAGS = @AM_CFLAGS@
AM_CPPFLAGS = @AM_CPPFLAGS@
AM_LDFLAGS = @AM_LDFLAGS@
AR = @AR@
ATLAS_CFLAGS = @ATLAS_CFLAGS@
ATLAS_ERROR = @ATLAS_ERROR@
......
This diff is collapsed.
......@@ -9,7 +9,7 @@
*
* Contents: Include file for profit.c.
*
* Last modify: 20/03/2009
* Last modify: 07/09/2009
*
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
*/
......@@ -70,32 +70,32 @@ typedef enum {PARAM_BACK, PARAM_X, PARAM_Y,
typedef struct
{
proftypenum code; /* Model code */
double *pix; /* Full pixmap of the model */
float *pix; /* Full pixmap of the model */
int naxis; /* Number of pixmap dimensions */
int naxisn[3]; /* Pixmap size for each axis */
double typscale; /* Typical scale in prof pixels */
double fluxfac; /* Flux normalisation factor */
float typscale; /* Typical scale in prof pixels */
float fluxfac; /* Flux normalisation factor */
/* Generic presentation parameters */
double *flux; /* Integrated flux */
double *x[2]; /* Coordinate vector */
double *scale; /* Scaling vector */
double *aspect; /* Aspect ratio */
double *posangle; /* Position angle (CCW/NAXIS1)*/
double *featfrac; /* Feature flux fraction */
double *featscale; /* Feature relative scalelength */
double *featstart; /* Feature relative starting radius */
double *featposang; /* Feature position angle */
double *featpitch; /* Feature pitch */
double *featpitchvar; /* Feature pitch variation */
double *featwidth; /* Feature width */
double *feataspect; /* Feature aspect ratio */
double *extra[PROFIT_MAXEXTRA];/* Parameters along extra-dimension */
double extrazero[PROFIT_MAXEXTRA]; /* Zero-point along extra-dim. */
double extrascale[PROFIT_MAXEXTRA]; /* Scaling along extra-dim. */
float *flux; /* Integrated flux */
float *x[2]; /* Coordinate vector */
float *scale; /* Scaling vector */
float *aspect; /* Aspect ratio */
float *posangle; /* Position angle (CCW/NAXIS1)*/
float *featfrac; /* Feature flux fraction */
float *featscale; /* Feature relative scalelength */
float *featstart; /* Feature relative starting radius */
float *featposang; /* Feature position angle */
float *featpitch; /* Feature pitch */
float *featpitchvar; /* Feature pitch variation */
float *featwidth; /* Feature width */
float *feataspect; /* Feature aspect ratio */
float *extra[PROFIT_MAXEXTRA];/* Parameters along extra-dimension */
float extrazero[PROFIT_MAXEXTRA]; /* Zero-point along extra-dim. */
float extrascale[PROFIT_MAXEXTRA]; /* Scaling along extra-dim. */
int extracycleflag[PROFIT_MAXEXTRA]; /* !=0 for cycling dim. */
interpenum interptype[2+PROFIT_MAXEXTRA]; /* Interpolation type */
int kernelwidth[2+PROFIT_MAXEXTRA]; /* Kernel size */
double *kernelbuf; /* Kernel buffer */
float *kernelbuf; /* Kernel buffer */
int kernelnlines; /* Number of interp kernel lines */
} profstruct;
......@@ -104,22 +104,22 @@ typedef struct
objstruct *obj; /* Current object */
obj2struct *obj2; /* Current object */
int nparam; /* Number of parameters to be fitted */
double *paramlist[PARAM_NPARAM]; /* flat parameter list */
float *paramlist[PARAM_NPARAM]; /* flat parameter list */
int paramindex[PARAM_NPARAM];/* Vector of parameter indices */
double param[PARAM_NPARAM]; /* Vector of parameters to be fitted */
double paraminit[PARAM_NPARAM];/* Parameter initial guesses */
double parammin[PARAM_NPARAM]; /* Parameter lower limits */
double parammax[PARAM_NPARAM]; /* Parameter upper limits */
double *covar; /* Covariance matrix */
double paramerr[PARAM_NPARAM]; /* Std deviations of parameters */
float param[PARAM_NPARAM]; /* Vector of parameters to be fitted */
float paraminit[PARAM_NPARAM];/* Parameter initial guesses */
float parammin[PARAM_NPARAM]; /* Parameter lower limits */
float parammax[PARAM_NPARAM]; /* Parameter upper limits */
float *covar; /* Covariance matrix */
float paramerr[PARAM_NPARAM]; /* Std deviations of parameters */
int niter; /* Number of iterations */
profstruct **prof; /* Array of pointers to profiles */
int nprof; /* Number of profiles to consider */
struct psf *psf; /* PSF */
double pixstep; /* Model/PSF sampling step */
double *psfdft; /* Compressed Fourier Transform of the PSF */
double *psfpix; /* Full res. pixmap of the PSF */
double *modpix; /* Full res. pixmap of the complete model */
float pixstep; /* Model/PSF sampling step */
float *psfdft; /* Compressed Fourier Transform of the PSF */
float *psfpix; /* Full res. pixmap of the PSF */
float *modpix; /* Full res. pixmap of the complete model */
float *pmodpix; /* Full res. pixmap of the partial model */
int modnaxisn[3]; /* Dimensions along each axis */
PIXTYPE *lmodpix; /* Low resolution pixmap of the model */
......@@ -127,12 +127,12 @@ typedef struct
PIXTYPE *objweight; /* Copy of object weight-map */
int objnaxisn[2]; /* Dimensions along each axis */
int ix, iy; /* Integer coordinates of object pixmap */
double *resi; /* Vector of residuals */
float *resi; /* Vector of residuals */
int nresi; /* Number of residual elements */
double chi2; /* Std error per residual element */
double sigma; /* Standard deviation of the pixel values */
double flux; /* Total flux in final convolved model */
double spirindex; /* Spiral index (>0 for CCW) */
float chi2; /* Std error per residual element */
float sigma; /* Standard deviation of the pixel values */
float flux; /* Total flux in final convolved model */
float spirindex; /* Spiral index (>0 for CCW) */
} profitstruct;
/*----------------------------- Global variables ----------------------------*/
......@@ -142,41 +142,41 @@ profitstruct *profit_init(struct psf *psf);
profstruct *prof_init(profitstruct *profit, proftypenum profcode);
double *profit_compresi(profitstruct *profit, double dynparam,
double *resi),
float *profit_compresi(profitstruct *profit, float dynparam,
float *resi),
*profit_residuals(profitstruct *profit, picstruct *field,
picstruct *wfield, double dynparam,
double *param, double *resi),
picstruct *wfield, float dynparam,
float *param, float *resi),
profit_spiralindex(profitstruct *profit);
int profit_copyobjpix(profitstruct *profit, picstruct *field,
picstruct *wfield),
profit_minimize(profitstruct *profit, int niter),
profit_setparam(profitstruct *profit, paramenum paramtype,
double param, double parammin, double parammax);
float param, float parammin, float parammax);
void prof_add(profstruct *prof, profitstruct *profit),
prof_end(profstruct *prof),
profit_addparam(profitstruct *profit, paramenum paramindex,
double **param),
profit_boundtounbound(profitstruct *profit, double *param),
float **param),
profit_boundtounbound(profitstruct *profit, float *param),
profit_fit(profitstruct *profit,
picstruct *field, picstruct *wfield,
objstruct *obj, obj2struct *obj2),
profit_convolve(profitstruct *profit, double *modpix),
profit_convolve(profitstruct *profit, float *modpix),
profit_covarunboundtobound(profitstruct *profit),
profit_end(profitstruct *profit),
profit_evaluate(double *par, double *fvec, int m, int n,
profit_evaluate(float *par, float *fvec, int m, int n,
void *adata),
profit_makedft(profitstruct *profit),
profit_moments(profitstruct *profit),
profit_printout(int n_par, double* par, int m_dat, double* fvec,
profit_printout(int n_par, float* par, int m_dat, float* fvec,
void *data, int iflag, int iter, int nfev ),
profit_psf(profitstruct *profit),
profit_resample(profitstruct *profit, double *inpix,
PIXTYPE *outpix, double factor),
profit_resample(profitstruct *profit, float *inpix,
PIXTYPE *outpix, float factor),
profit_resetparam(profitstruct *profit, paramenum paramtype),
profit_resetparams(profitstruct *profit),
profit_unboundtobound(profitstruct *profit, double *param);
profit_unboundtobound(profitstruct *profit, float *param);
#endif
......@@ -1020,8 +1020,8 @@ Build the local PSF (function of "context").
void psf_build(psfstruct *psf)
{
static double pos[POLY_MAXDIM];
double *pl, *basis, fac;
float *ppc;
double *basis, fac;
float *ppc, *pl;
int i,n,p, ndim, npix;
npix = psf->masksize[0]*psf->masksize[1];
......
......@@ -68,7 +68,7 @@ typedef struct psf
int *masksize; /* PSF mask dimensions */
int masknpix; /* Total number of involved PSF pixels */
float *maskcomp; /* Complete pix. data (PSF components) */
double *maskloc; /* Local PSF */
float *maskloc; /* Local PSF */
double **context; /* Contexts */
t_type *contexttyp; /* Context types */
char **contextname; /* Array of context key-names */
......
......@@ -72,6 +72,9 @@ CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_CFLAGS = @AM_CFLAGS@
AM_CPPFLAGS = @AM_CPPFLAGS@
AM_LDFLAGS = @AM_LDFLAGS@
AR = @AR@
ATLAS_CFLAGS = @ATLAS_CFLAGS@
ATLAS_ERROR = @ATLAS_ERROR@
......
......@@ -49,6 +49,9 @@ DIST_SOURCES =
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_CFLAGS = @AM_CFLAGS@
AM_CPPFLAGS = @AM_CPPFLAGS@
AM_LDFLAGS = @AM_LDFLAGS@
AR = @AR@
ATLAS_CFLAGS = @ATLAS_CFLAGS@
ATLAS_ERROR = @ATLAS_ERROR@
......
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