forked from LSSTDESC/NaMaster
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
80 lines (63 loc) · 2.53 KB
/
configure.ac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.4])
AC_INIT([namaster], [0.0], [github.com/damonge/NaMaster])
AM_INIT_AUTOMAKE([-Wall subdir-objects foreign serial-tests])
AM_PROG_AR
LT_PREREQ([2.2])
LT_INIT([dlopen])
AC_CONFIG_SRCDIR([src/nmt_master.c])
AC_CONFIG_HEADERS([config.h])
# Avoid problem with git timestamps
AM_MAINTAINER_MODE
# Checks for programs.
AC_PROG_CC
AC_PROG_CC_STDC
AC_PROG_INSTALL
AM_PROG_CC_C_O
AM_MAINTAINER_MODE
AC_OPENMP
# Deal with openmp versus pthreads for fftw3
AC_ARG_ENABLE([fftw_pthreads],
AS_HELP_STRING([--enable-fftw-pthreads], [Enable using pthreads instead of OpenMP with FFTW]))
AS_IF(
[test "x$enable_fftw_pthreads" = "xyes"], [AC_SUBST([fftw_thread_type], "-lfftw3_threads -lpthread")],
[test "x$enable_fftw_pthreads" != "xyes"], [AC_SUBST([fftw_thread_type], "-lfftw3_omp")])
# Set libsharp libraries needed
AC_SUBST([libsharp_libs], "-lsharp2")
# Checks for libraries.
AC_SEARCH_LIBS([pow],[m],[],AC_MSG_ERROR(Couldn't find libm. Required.))
AC_SEARCH_LIBS([cblas_dgemm],[gslcblas],[],AC_MSG_ERROR(Couldn't find libgslcblas.))
AC_SEARCH_LIBS([gsl_spline2d_eval_e],[gsl],[],AC_MSG_ERROR(Couldn't find libgsl. GSL V2+ required.))
AC_SEARCH_LIBS([ffopen],[cfitsio],[],AC_MSG_ERROR(Couldn't find cfitsio))
AC_SEARCH_LIBS([ring2nest],[chealpix],[],AC_MSG_ERROR(Couldn't find libchealpix))
AC_SEARCH_LIBS([fftw_execute],[fftw3],[],AC_MSG_ERROR(Couldn't find libfftw3))
AC_SEARCH_LIBS([sharp_execute],[sharp2],[],AC_MSG_ERROR(Couldn't find libsharp2))
# Checks for header files.
AC_CHECK_HEADERS([stdlib.h string.h math.h stdarg.h unistd.h time.h omp.h complex.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_SIZE_T
AC_FUNC_MALLOC
# Checks for library functions.
AC_CHECK_FUNCS([pow sqrt])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
echo \
"
-------------------------------------------------------
${PACKAGE_NAME} Version ${PACKAGE_VERSION}
Configuration settings:
- Prefix: '${prefix}'
- Compiler: '${CC} ${CFLAGS} ${CPPFLAGS}'
Now type 'make @<:@<target>@:>@', where the optional
target may be:
all : to build everything (currently libnmt)
this is the default target
check : runs the library's unit tests
install : to put everything in the installation
directories ('include', 'lib' and
'bin' from prefix). Root privileges may
be necessary for this.
clean : to remove garbage
------------------------------------------------------
"