Go to most recent revision | Compare with Previous | Blame | View Log
# configure.in for SExtractor# (C) E.Bertin 2002-2006# 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.5.0, [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_prog_cc_optim.m4)# Display pakage and version numberAC_MSG_RESULT([*********** Configuring: $PACKAGE $VERSION ($date) **********])# Initialize the list of compilers to considercclist="cc gcc"# Backup and reset the input CFLAGS and LDFLAGSmycflags="$CFLAGS"CFLAGS=""myldflags="$LDFLAGS"LDFLAGS=""# 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)])],use_icc="yes"cclist="icc $cclist"AC_MSG_RESULT([yes]),use_icc="no"AC_MSG_RESULT([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)])],use_gprof="yes"AC_MSG_RESULT([yes]),use_gprof="no"AC_MSG_RESULT([no]))# Enable static linkingAC_MSG_CHECKING([static linking])AC_ARG_ENABLE(static,[AC_HELP_STRING([--enable-static],[Enable static linking \(off by default)])],use_static="yes"AC_MSG_RESULT([yes]),use_static="no"AC_MSG_RESULT([no]))# Checks for programs.# GCC is chosen last because it is likely to yield less optimized codeAC_PROG_CC([$cclist])# C Compiler: Check that it is ANSI CAM_PROG_CC_STDC# C Compiler: Check that it is POSIX-compliantAC_ISC_POSIXACX_PROG_CC_OPTIMAC_PROG_RANLIBAC_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])# 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_LINEAC_FUNC_MALLOCAC_FUNC_MMAPAC_TYPE_SIGNALAC_FUNC_STATAC_FUNC_STRFTIMEAC_CHECK_FUNCS([atexit getenv memcpy memmove memset mkdir munmap strstr])# Check support for large filesAC_SYS_LARGEFILEAC_FUNC_FSEEKO########################### No multithreading yet! ############################AC_DEFINE(USE_THREADS, 1, [Triggers multhreading])AC_DEFINE_UNQUOTED(THREADS_NMAX, 1,[Maximum number of POSIX threads])# Special optimization options for the INTEL C compilerif test $use_icc = "yes" -a $CC = "icc"; thenCFLAGS="$CFLAGS -O3 -axiMKW -ipo -ipo_obj -unroll"fi# Link with gprof optionif test "$use_gprof" = "yes"; thenif test "$use_icc" = "yes"; thenCFLAGS="$CFLAGS -pq"elseCFLAGS="-O3 -pg"fiuse_static="no"fiif test "$use_static" = "yes"; thenLDFLAGS="$LDFLAGS -static"fi# Override automatic CFLAGS and LDFLAGS with those of userif test -n "$mycflags"; thenCFLAGS="$mycflags"fiif test -n "$myldflags"; thenLDFLAGS="$myldflags"fi# Display compiler and linker flagsAC_MSG_RESULT([I will compile using: $CC $CFLAGS])AC_MSG_RESULT([I will link using: $CC $LDFLAGS $LIBS])AC_CONFIG_FILES([Makefile man/Makefile src/Makefile src/fits/Makefile src/wcs/Makefile sextractor.spec sextractor-tpx.spec man/sex.1])AC_OUTPUT
Go to most recent revision | Compare with Previous | Blame | View Log