-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathconfigure.ac
executable file
·224 lines (183 loc) · 4.7 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.57)
AC_INIT([DSPSR],[2016-06+],[[email protected]])
AC_CONFIG_AUX_DIR([config])
AC_CONFIG_SRCDIR([Kernel/Makefile.am])
AC_ARG_VAR([PSRHOME], [Standard pulsar home directory])
AC_ARG_VAR([LOGIN_ARCH], [Architecture-dependent sub-directory of PSRHOME])
AC_ARG_VAR([PACKAGES], [Root directories of third-party packages])
AC_ARG_VAR([CUDA_NVCC_FLAGS], [CUDA nvcc flags (e.g. -arch, etc)])
AC_PREFIX_DEFAULT([${PSRHOME:-"/usr/local"}${PSRHOME:+"/$LOGIN_ARCH"}])
if test x"$PSRHOME" = x; then
AC_MSG_WARN([The PSRHOME environment variable is not set])
else
if test x"$LOGIN_ARCH" = x; then
AC_MSG_WARN([The LOGIN_ARCH environment variable is not set])
fi
fi
#
#
#
# Check if the user has set compiler options
SWIN_OPTIONS_SET
# Enable convenience compiler selection
SWIN_COMPILER
AM_INIT_AUTOMAKE([foreign subdir-objects])
#
# Check for selected formats in backends.list
#
DSPSR_FORMATS
# Create static libraries by default
AC_DISABLE_SHARED
# Enable large-file support
AC_SYS_LARGEFILE
# Determine the machine endian
AC_C_BIGENDIAN
# Checks for programs.
AC_PROG_CXX
AC_PROG_CXXCPP
AC_PROG_CC
AC_PROG_CPP
AM_PROG_CC_C_O
AC_PROG_F77
AC_PROG_INSTALL
AC_PROG_LIBTOOL
#
# Disable the debugging information option, -g
#
SWIN_DEBUG
SWIN_LOCAL
#
# Checks for essential libraries
#
AC_CHECK_LIB([m], [sin])
SWIN_LIB_PSRCHIVE([],AC_MSG_ERROR([PSRCHIVE Library not found.
Please see http://psrchive.sourceforge.net
]))
PSRCHIVE_ACLOCAL=`$psrchive_config --aclocal`
AC_SUBST(PSRCHIVE_ACLOCAL)
PSRCHIVE_INCLUDE=`$psrchive_config --cflags | sed s/-pthread//`
AC_SUBST(PSRCHIVE_INCLUDE)
#
# Checks for optional libraries
#
SWIN_LIB_PSRDADA
SWIN_LIB_CFITSIO
SWIN_LIB_MPI
SWIN_LIB_CUDA
SWIN_LIB_GUPPI_DAQ
SWIN_LIB_MARK5ACCESS
AX_OPENMP
AC_SUBST(OPENMP_CFLAGS)
#
# Checks for graphics libraries
#
SWIN_LIB_PGPLOT
#
# For developers: preserve file modification times
#
INSTALL_DATA="${INSTALL} -m 644 -p"
install_sh="CPPROG='cp -p' ${install_sh}"
#
# Checks for header files.
#
AC_CHECK_HEADERS([malloc.h])
# Check for openssl
MJK_LIB_CRYPTO
# Check for psrxml io library
MJK_LIB_PSRXML
# find HDF5 (needed for LOFAR)
AX_HDF5
#
# Checks for library functions.
#
SWIN_FUNC_GETOPT_LONG
SWIN_FUNC_AFFINITY
#
# Generate python module if --enable-shared is used
#
if test x"$enable_shared" == xyes; then
AM_PATH_PYTHON(,, [:])
AC_PROG_SWIG
SWIG_ENABLE_CXX
SWIG_PYTHON
else
PYTHON=":"
fi
AM_CONDITIONAL([HAVE_PYTHON], [test "$PYTHON" != :])
#
# Initialize variables used by Makefile.include
#
INCLUDE_CPPFLAGS="$PSRCHIVE_CPPFLAGS"
AC_SUBST(INCLUDE_CPPFLAGS)
INCLUDE_LDFLAGS="$PSRCHIVE_LIBS"
AC_SUBST(INCLUDE_LDFLAGS)
AM_CONFIG_HEADER([config.h])
AC_CONFIG_FILES([Makefile
config/Makefile
Kernel/Makefile
Kernel/Classes/Makefile
Kernel/Applications/Makefile
Kernel/Formats/Makefile
Kernel/Formats/apsr/Makefile
Kernel/Formats/asp/Makefile
Kernel/Formats/bcpm/Makefile
Kernel/Formats/bpsr/Makefile
Kernel/Formats/caspsr/Makefile
Kernel/Formats/cpsr/Makefile
Kernel/Formats/cpsr2/Makefile
Kernel/Formats/dada/Makefile
Kernel/Formats/dummy/Makefile
Kernel/Formats/emerlin/Makefile
Kernel/Formats/fadc/Makefile
Kernel/Formats/fits/Makefile
Kernel/Formats/gmrt/Makefile
Kernel/Formats/guppi/Makefile
Kernel/Formats/kat/Makefile
Kernel/Formats/lbadr/Makefile
Kernel/Formats/lbadr64/Makefile
Kernel/Formats/lofar_dal/Makefile
Kernel/Formats/lump/Makefile
Kernel/Formats/lwa/Makefile
Kernel/Formats/spda1k/Makefile
Kernel/Formats/mark4/Makefile
Kernel/Formats/mark5/Makefile
Kernel/Formats/mark5b/Makefile
Kernel/Formats/maxim/Makefile
Kernel/Formats/mopsr/Makefile
Kernel/Formats/mwa/Makefile
Kernel/Formats/pmdaq/Makefile
Kernel/Formats/pdev/Makefile
Kernel/Formats/puma/Makefile
Kernel/Formats/puma2/Makefile
Kernel/Formats/s2/Makefile
Kernel/Formats/sigproc/Makefile
Kernel/Formats/ska1/Makefile
Kernel/Formats/spigot/Makefile
Kernel/Formats/uwb/Makefile
Kernel/Formats/vdif/Makefile
Kernel/Formats/wapp/Makefile
Signal/Makefile
Signal/Statistics/Makefile
Signal/General/Makefile
Signal/Pulsar/Makefile
Management/Makefile
Management/dspsr_ldflags
Management/dspsr_cflags
Management/release.csh
More/Makefile
More/Plotting/Makefile
More/Applications/Makefile
python/Makefile])
AC_OUTPUT
echo
if test x"$selected_formats" = x; then
echo "WARNING: no file formats have been selected"
echo "Please see http://dspsr.sourceforge.net/formats for details"
else
echo "DSPSR will support these formats: $selected_formats"
fi
echo
echo "DSPSR is now ready to be compiled. Please run 'make'"
echo