Go to most recent revision | Compare with Previous | Blame | View Log
# configure.in for SExtractor# (C) E.Bertin 2002-2009# Process this file with autoconf to produce a configure script.# First, disable the annoying config.cachedefine([AC_CACHE_LOAD],)define([AC_CACHE_SAVE],)# This is your standard Bertin source code...AC_INIT(sextractor, 2.9.2, [bertin@iap.fr])AC_CONFIG_SRCDIR(src/makeit.c)AC_CONFIG_AUX_DIR(autoconf)AM_CONFIG_HEADER(config.h)AM_INIT_AUTOMAKEdate=`date +%Y-%m-%d`date2=`date +"%a %b %d %Y"`date3=`date +"%B %Y"`AC_DEFINE_UNQUOTED(DATE, "$date", [Archive creation date])AC_SUBST(PACKAGER, "Emmanuel Bertin")AC_SUBST(DATE2, "$date2")AC_SUBST(DATE3, "$date3")# Include macrossinclude(acx_atlas.m4)sinclude(acx_fftw.m4)sinclude(acx_prog_cc_optim.m4)sinclude(acx_pthread.m4)sinclude(acx_urbi_resolve_dir.m4)# Display pakage and version numberAC_MSG_RESULT([*********** Configuring: $PACKAGE $VERSION ($date) **********])# Initialize the list of compilers to considercclist="cc gcc"# Provide special option for choosing automatically the compilation flags.AC_MSG_CHECKING([if compilation flags are set automatically])AC_ARG_ENABLE(auto-flags,[AC_HELP_STRING([--enable-auto-flags],[Let the configure script choose the compilation flags \(off by default)])],AC_MSG_RESULT([yes]),AC_MSG_RESULT([no]))# Provide special option for the Linux Intel C compilerAC_MSG_CHECKING([for Linux Intel C compiler mode])AC_ARG_ENABLE(icc,[AC_HELP_STRING([--enable-icc],[Enable special mode for compilation with the Intel compiler \(off by default)])],cclist="icc $cclist"AC_MSG_RESULT([yes]),AC_MSG_RESULT([no]))# Checks for programs.# GCC is chosen last because it is likely to yield less optimized codeAC_LANG(C)AC_PROG_CC([$cclist])# C Compiler: Check that it is ANSI C and POSIX-compliantAM_PROG_CC_STDCAC_ISC_POSIX# Override automatic CFLAGS and LDFLAGS with those of userif test "$enable_auto_flags" = "yes"; thenCFLAGS=""LDFLAGS =""ACX_PROG_CC_OPTIMfiAC_PROG_LIBTOOLAC_PROG_INSTALL# Checks for libraries.AC_CHECK_LIB(m, sin)# Checks for header files.AC_HEADER_STDCAC_CHECK_HEADERS([fcntl.h limits.h malloc.h stdlib.h string.h sys/mman.h \sys/types.h unistd.h])if test $enable_icc = "yes" -a $CC = "icc"; thenAC_CHECK_HEADERS(mathimf.h)fi# Checks for typedefs, structures, and compiler characteristics.AC_C_CONSTAC_TYPE_OFF_TAC_TYPE_SIZE_TAC_STRUCT_TMAC_TYPE_UID_T# Checks for library functions.AC_FUNC_ERROR_AT_LINE#AC_FUNC_MALLOCAC_FUNC_MMAPAC_TYPE_SIGNALAC_FUNC_STATAC_FUNC_STRFTIMEAC_CHECK_FUNCS([atexit getenv memcpy memmove memset mkdir munmap strstr \sincosf logf])# Check support for large filesAC_SYS_LARGEFILEAC_FUNC_FSEEKO# Set the data directory to a true absolute pathdatadir2=$(URBI_RESOLVE_DIR([$datadir]))# Provide special options for ATLASAC_ARG_WITH(atlas,[AC_HELP_STRING([--with-atlas=<ATLAS library path>],[Provide an alternative path to the ATLAS library])],atlas_libdir=$withval,atlas_libdir="")AC_ARG_WITH(atlas-incdir,[AC_HELP_STRING([--with-atlas-incdir=<ATLAS include dir>],[Provide an alternative path to the ATLAS include directory])],atlas_incdir=$withval,atlas_incdir="")# Provide special options for FFTWAC_ARG_WITH(fftw,[AC_HELP_STRING([--with-fftw=<FFTW library path>],[Provide an alternative path to the FFTW library])],fftw_libdir=$withval,fftw_libdir="")AC_ARG_WITH(fftw-incdir,[AC_HELP_STRING([--with-fftw-incdir=<FFTW include dir>],[Provide an alternative path to the FFTW include directory])],fftw_incdir=$withval,fftw_incdir="")# Provide a special option for the default XSLT URLAC_ARG_WITH(xsl_url,[AC_HELP_STRING([--with-xsl_url=<default URL for XSLT filter>],[Provide an alternative default URL of the XSLT filter])],[xsl_url=$withval],[xsl_url="file://$datadir2/$PACKAGE_NAME/$PACKAGE_NAME.xsl"])AC_DEFINE_UNQUOTED([XSL_URL], "$xsl_url",[Default URL of the XSLT filter])# Set flags for multithreadingn_pthreads=16AC_ARG_ENABLE(threads,[AC_HELP_STRING([--enable-threads@<:@=<max_number_of_threads>@:>@],[Enable multhreading (on with up to 16 threads by default)])],if test "$enableval" = "no"; thenuse_pthreads="no"elseuse_pthreads="yes"if test "$enableval" != "yes"; thenn_pthreads=$enablevalfifi,use_pthreads=yes)# Deactivate multithreading for nowuse_pthreads="no"# Provide special option for gprof profilingAC_MSG_CHECKING([for gprof profiler mode])AC_ARG_ENABLE(gprof,[AC_HELP_STRING([--enable-gprof],[Enable special mode for compilation with the gprof profiler \(off by default)])],AC_MSG_RESULT([yes]),AC_MSG_RESULT([no]))# Enable linking options for making the executable as portable as possible.AC_MSG_CHECKING([best linking option])AC_ARG_ENABLE(best-link,[AC_HELP_STRING([--enable-best-link],[Choose the right combination of static and dynamic linking to make \the executable as portable as possible (off by default)])],AC_MSG_RESULT([yes]),AC_MSG_RESULT([no]))################# Actions to complete in case of multhreading ################AC_DEFINE_UNQUOTED(THREADS_NMAX, $n_pthreads,[Maximum number of POSIX threads])if test "$use_pthreads" = "yes"; thenAC_MSG_CHECKING([for multithreading])AC_MSG_RESULT([maximum of $n_pthreads thread(s)])AC_DEFINE(USE_THREADS, 1, [Triggers multhreading])# CC, CFLAGS and LIBS are system and compiler-dependentACX_PTHREADCC="$PTHREAD_CC"[AM_CFLAGS="$AM_CFLAGS $PTHREAD_CFLAGS -D_REENTRANT"]LIBS="$PTHREAD_LIBS $LIBS"fiAM_CONDITIONAL(USE_THREADS, test $use_pthreads = "yes")################ handle the FFTW library (Fourier transforms) ################ACX_FFTW($fftw_libdir,$fftw_incdir,$use_pthreads,yes,[use_fftw=yes],[use_fftw=no])if test "$use_fftw" = "yes"; thenLIBS="$FFTW_LIBS $LIBS"if test "$FFTW_WARN" != ""; thenAC_MSG_WARN([$FFTW_WARN])fielseAC_MSG_ERROR([$FFTW_ERROR Exiting.])fi################## handle the ATLAS library(linear algebra) ##################ACX_ATLAS($atlas_libdir,$atlas_incdir,$use_pthreads,[use_atlas=yes],[use_atlas=no])if test "$use_atlas" = "yes"; thenLIBS="$ATLAS_LIB $LIBS"if test "$ATLAS_WARN" != ""; thenAC_MSG_WARN([$ATLAS_WARN])fielseAC_MSG_ERROR([$ATLAS_ERROR Exiting.])fi# Link with gprof optionif test "$enable_gprof" = "yes"; thenif test "$enable_icc" = "yes"; thenAM_CFLAGS="$AM_CFLAGS -pq"elseAM_CFLAGS="$AM_CFLAGS -pg"fienable_best_link="no"fi# "Best" linking optionif test "$enable_best_link" = "yes"; thenAM_LDFLAGS="-shared-libgcc -static-libtool-libs $AM_LDFLAGS"fiAC_SUBST(AM_CFLAGS)AC_SUBST(AM_CPPFLAGS)AC_SUBST(AM_LDFLAGS)# Display compiler and linker flagsAC_MSG_RESULT([***************************************************************])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([***************************************************************])AC_CONFIG_FILES([Makefilesrc/Makefilesrc/fits/Makefilesrc/levmar/Makefilesrc/wcs/Makefileman/Makefiletests/Makefilesextractor.specman/sex.1])AC_OUTPUT
Go to most recent revision | Compare with Previous | Blame | View Log