configure.ac 3.24 KB
Newer Older
Ole Streicher's avatar
Ole Streicher committed
1 2
# Process this file with autoconf to produce a configure script.

3
AC_INIT([VISIR Instrument Pipeline], [4.3.7], [usd-help@eso.org], [visir])
Ole Streicher's avatar
Ole Streicher committed
4 5 6 7
AC_PREREQ([2.59])

AC_CONFIG_SRCDIR([Makefile.am])
AC_CONFIG_AUX_DIR([admin])
8
AC_CONFIG_MACRO_DIR([m4macros])
Ole Streicher's avatar
Ole Streicher committed
9 10 11 12 13

AC_CANONICAL_HOST
AC_CANONICAL_TARGET

AM_INIT_AUTOMAKE
14
AC_CONFIG_HEADERS([config.h])
15
AM_SILENT_RULES([yes])
Ole Streicher's avatar
Ole Streicher committed
16

17 18 19
AM_MAINTAINER_MODE([enable])

AC_CONFIG_SUBDIRS([swarp])
Ole Streicher's avatar
Ole Streicher committed
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44

VISIR_SET_PREFIX(${PIPE_HOME:-/usr/local})

# Immediately before every release do:
#-------------------------------------
#   if (the interface is totally unchanged from previous release)
#       REVISION++;
#   else {
#       /* interfaces have been added, removed or changed */
#       REVISION = 0;
#       CURRENT++;
#       if (any interfaces have been _added_ since last release)
#           AGE++;
#       if (any interfaces have been _removed_ or incompatibly changed)
#           AGE = 0;
#   }

VISIR_SET_VERSION_INFO([$VERSION])

# Checks for programs.
AC_PROG_CC
AC_PROG_CPP
AM_PROG_CC_C_O
AC_PROG_LN_S

45 46 47
# large file support
AC_SYS_LARGEFILE

48
ESO_GLIBC_MALLOC_CHECK
Ole Streicher's avatar
Ole Streicher committed
49 50
ESO_ENABLE_DEBUG(no)
ESO_ENABLE_STRICT(no)
51 52
CPL_OPENMP

53 54
# for nanosleep, mkstemp and posix_memalign
CPPFLAGS="$CPPFLAGS -D_POSIX_C_SOURCE=200112L -D_XOPEN_SOURCE=600"
55
ESO_PROG_CC_FLAG([std=c99], [CFLAGS="$CFLAGS -std=c99"])
Ole Streicher's avatar
Ole Streicher committed
56 57
ESO_PROG_CC_FLAG([fno-common], [CFLAGS="$CFLAGS -fno-common"])
ESO_PROG_CC_FLAG([fstrict-aliasing], [CFLAGS="$CFLAGS -fstrict-aliasing"])
58
ESO_PROG_CC_FLAG([Werror=implicit-function-declaration], [CFLAGS="$CFLAGS -Werror=implicit-function-declaration"])
59
ESO_PROG_CC_FLAG([Werror=incompatible-pointer-types], [CFLAGS="$CFLAGS -Werror=incompatible-pointer-types"])
Ole Streicher's avatar
Ole Streicher committed
60 61 62 63 64 65

ESO_CHECK_DOCTOOLS

AC_ENABLE_STATIC(no)
AC_ENABLE_SHARED(yes)

66 67
# deprecated in favor of LT_INIT but not available on
# autoconf 2.59 and libtool 1.5.22 on SLC5.3
Ole Streicher's avatar
Ole Streicher committed
68 69 70 71 72
AC_PROG_LIBTOOL
AC_SUBST(LIBTOOL_DEPS)

# Checks for libraries.
AC_CHECK_LIB(m, pow, [LIBS="$LIBS -lm"])
73 74
# Needed by recipes/visir_util_run_swarp.c
AC_CHECK_LIB(pthread, sem_close, [LIBS="$LIBS -lpthread"])
Ole Streicher's avatar
Ole Streicher committed
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97

# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([string.h omp.h])

# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_C_INLINE

# Require the size of an unsigned long long to be (at least) 8
AC_CHECK_SIZEOF(unsigned long long)
fstype=no
AC_RUN_IFELSE([AC_LANG_PROGRAM([[]],[[return sizeof(unsigned long long) < 8;]])],
              [fstype=yes])
if test $fstype = no; then
  AC_MSG_ERROR([sizeof(unsigned long long) is too small])
fi


# Checks for library functions.
# On HP-UX and Solaris isnan() may be undeclared, but available at link time
AC_CHECK_DECLS([isnan])
AC_CHECK_DECLS([erf])
98 99
AC_CHECK_DECLS([posix_memalign])
AC_CHECK_FUNCS([floor pow sqrt isinf isnan erf posix_memalign sysconf posix_fadvise])
Ole Streicher's avatar
Ole Streicher committed
100 101 102
ESO_FUNC_STRDUP

# Check for CPL presence and usability
103
ESO_CHECK_CPL
104
ESO_ENABLE_COVERAGE([no])
Ole Streicher's avatar
Ole Streicher committed
105 106 107 108 109 110 111 112

VISIR_SET_PATHS
VISIR_CREATE_SYMBOLS

AM_WITH_DMALLOC


AC_CONFIG_FILES(Makefile
113
                Doxyfile
Ole Streicher's avatar
Ole Streicher committed
114 115 116
                visir/Makefile
                recipes/Makefile
                irplib/Makefile
117 118 119
		reflex/Makefile
		reflex/visir_image_reduce.xml
		reflex/visir_spectro_reduce.xml
Ole Streicher's avatar
Ole Streicher committed
120 121 122 123
                irplib/tests/Makefile
                visir/tests/Makefile
                recipes/tests/Makefile)
AC_OUTPUT