forked from espressomd/espresso
-
Notifications
You must be signed in to change notification settings - Fork 1
/
configure.ac
670 lines (588 loc) · 20.9 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
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
# Copyright (C) 2012,2013 The ESPResSo project
# Copyright (C) 2006,2007,2008,2009,2010,2011 Olaf Lenz, Axel Arnold
# Copyright (C) 2008,2009,2010
# Max-Planck-Institute for Polymer Research, Theory Group
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
dnl Process this file with autoconf to produce a configure script.
dnl Determine the version of ESPResSo at autoconf time
m4_define([ESPRESSO_VERSION],[esyscmd([/bin/sh config/genversion.sh -rd])])
# Initialize autoconf
AC_INIT([ESPResSo],[ESPRESSO_VERSION],[[email protected]])
AC_PREREQ([2.59])
AC_CONFIG_SRCDIR([src/initialize.cpp])
AC_CONFIG_AUX_DIR(config)
AC_CONFIG_MACRO_DIR(config)
AC_PREFIX_DEFAULT($HOME/Espresso)
AC_CANONICAL_HOST
AC_CANONICAL_TARGET
# Initialize automake
AM_INIT_AUTOMAKE([1.11 gnu subdir-objects dist-xz])
AM_MAINTAINER_MODE
# silent rules, backwards compatiblity
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES])
# Are we in an unpacked dist or in the git repo?
AC_MSG_CHECKING([whether we are using development sources])
AS_IF([test -d $srcdir/.git], [devel_src=yes], [devel_src=no])
AM_CONDITIONAL(DEVEL_SRC, [test ."$devel_src" = .yes])
AC_MSG_RESULT($devel_src)
cat <<EOF
****************************************************************
* Checking compiler characteristics and MPI support *
****************************************************************
EOF
dnl overwrite _AC_PROC_CC_G to avoid check for -g and -O2 flags
m4_define([_AC_PROG_CXX_G],[])
#############
#### MPI ####
#############
# Check for --with-mpi
AC_ARG_WITH(mpi, [AS_HELP_STRING([--with-mpi],
[compile with MPI (parallelization) support. If none is found, the
fake implementation for only one processor is used. @<:@guess@:>@])
],,[with_mpi=guess])
# we use C++ as main code language
AC_LANG([C++])
AX_PROG_CXX_MPI([test x"$with_mpi" != xno],,[
if test xyes = x"$with_mpi"; then
AC_MSG_FAILURE([MPI compiler requested, but couldn't compile with MPI.])
else
AC_MSG_WARN([No MPI c++ compiler found, will use fake implementation!])
use_mpi_fake="yes"
fi
])
# if requested, use the fake implementation
AM_CONDITIONAL(MPI_FAKE, [test x"$use_mpi_fake" = xyes])
MPI_FAKE=$use_mpi_fake
AC_SUBST(MPI_FAKE)
# determine ESPRESSO_MPIEXEC
AS_IF([test x"$use_mpi_fake" = xyes], [
ESPRESSO_MPIEXEC=""
],[
# mpiexec executable
AC_ARG_VAR([MPIEXEC], [MPI command mpiexec])
AS_IF([test x"$MPIEXEC" = x], [
AC_PATH_PROG([MPIEXEC], [mpiexec], [no])
])
AC_MSG_CHECKING([for the mympiexec user script])
AC_ARG_WITH([mympiexec],
AS_HELP_STRING([--with-mympiexec@<:@=SCRIPT@:>@],
[specify the mpiexec-like program or script that should be
used to run ESPResSo in parallel. If the script doesn't
exist, it will try to use mpiexec.
@<:@SCRIPT=./mympiexec.sh@:>@]),
[if test x"$with_mympiexec" = xno; then
MYMPIEXEC=""
else
MYMPIEXEC="$with_mympiexec"
dir=`AS_DIRNAME([$MYMPIEXEC])`
if test x"$dir" = x.; then
MYMPIEXEC="`pwd`/$MYMPIEXEC"
fi
fi],
[ MYMPIEXEC="`pwd`/mympiexec.sh" ])
AC_MSG_RESULT($MYMPIEXEC)
AC_SUBST(MYMPIEXEC)
ESPRESSO_MPIEXEC="`pwd`/tools/es_mpiexec"
])
AC_SUBST(ESPRESSO_MPIEXEC)
##################################
#### COMPILER CHARACTERISTICS ####
##################################
# never overwrite users CXXFLAGS
if test "${CXXFLAGS+set}" != set; then
# test for -O5
AC_MSG_CHECKING([whether the compiler accepts -O5])
saved_CXXFLAGS=$CXXFLAGS
CXXFLAGS="-O5 $CXXFLAGS"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],[
AC_MSG_RESULT(yes);try_add_flag_res=yes
],[
AC_MSG_RESULT(no); CXXFLAGS=$saved_CXXFLAGS; try_add_flag_res=no
])
##################################
# test for -Wall
AC_MSG_CHECKING([whether the compiler accepts -Wall])
saved_CXXFLAGS=$CXXFLAGS
CXXFLAGS="-Wall $CXXFLAGS"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],[
AC_MSG_RESULT(yes);try_add_flag_res=yes
],[
AC_MSG_RESULT(no); CXXFLAGS=$saved_CXXFLAGS; try_add_flag_res=no
])
fi
##################################
# miscellaneous
AC_PROG_CXX_C_O
cat <<EOF
****************************************************************
* Checking for programs *
****************************************************************
EOF
AC_PROG_RANLIB
AC_PROG_AWK
AC_PROG_EGREP
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PATH_PROG(DOXYGEN,doxygen,no)
AM_CONDITIONAL(HAVE_DOXYGEN,[test .$DOXYGEN != .no])
AC_PATH_PROG(DOT,dot)
if test "$DOT"; then HAVE_DOT=YES; else HAVE_DOT=NO; fi
AC_SUBST(HAVE_DOT)
AC_SUBST(DOT_PATH, `AS_DIRNAME(["$DOT"])`)
AC_PATH_PROG(PDFLATEX,pdflatex,no)
AC_PATH_PROG(MAKEINDEX,makeindex,no)
AC_PATH_PROG(BIBTEX,bibtex,no)
AM_CONDITIONAL(HAVE_LATEX,
[test .$PDFLATEX != .no &&
test .$MAKEINDEX != .no &&
test .$BIBTEX != .no])
AC_PATH_PROG(PYTHON,python,no)
AM_CONDITIONAL(HAVE_PYTHON, [test .$PYTHON != .no])
if test .$PYTHON != .no; then
# Check whether python -B works
AC_MSG_CHECKING([whether python -B works])
if $PYTHON -B -c pass > /dev/null 2>&1; then
PYTHON="$PYTHON -B"
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
fi
cat <<EOF
****************************************************************
* Checking for standard headers *
****************************************************************
EOF
##################################
# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([arpa/inet.h fcntl.h float.h inttypes.h limits.h netdb.h\
netinet/in.h stddef.h stdlib.h string.h strings.h sys/file.h sys/socket.h\
sys/time.h unistd.h])
cat <<EOF
****************************************************************
* Checking for standard functions *
****************************************************************
EOF
##################################
# Checks for library functions.
AC_FUNC_MALLOC
AC_FUNC_MEMCMP
AC_FUNC_REALLOC
AC_FUNC_SELECT_ARGTYPES
AC_TYPE_SIZE_T
AC_FUNC_STRTOD
AC_CHECK_FUNCS([atexit floor getcwd gethostbyname memset pow rint select socket sqrt])
cat <<EOF
****************************************************************
* Checking for required tools and libraries *
****************************************************************
EOF
LIBS="$LIBS -lm"
##################################
# check for tcl
AC_DEFINE([USE_NON_CONST],1,[prevent TCL from defining const ptrs])
AC_ARG_WITH(tcl,AS_HELP_STRING([--with-tcl=VERSION],
[specify the tcl library to use (e.g. tcl8.4)]),
[], [with_tcl=yes])
dnl with_tcl=yes try to find a working TCL version, bail out if none is found
dnl with_tcl=no bail out
dnl otherwise use the specified version
if test .$with_tcl = .no; then
AC_MSG_WARN([
*********************************************************
* *
* Without Tcl, ESPResSo doesn't do anything useful yet! *
* *
*********************************************************
])
use_tcl=none
AC_DEFINE(TCL,[],[Whether Tcl is available])
elif test .$with_tcl = .yes; then
for version in $TCL_VERSION tcl8.6 tcl8.5 tcl8.4 tcl8.3 tcl8.2 tcl; do
ES_ADDPATH_CHECK_LIB($version, Tcl_Init, [use_tcl=$version])
if test .$use_tcl != .; then break; fi
done
else
ES_ADDPATH_CHECK_LIB($with_tcl, Tcl_Init, [use_tcl=$with_tcl])
fi
# check the results
if test .$use_tcl = . ; then
# Tcl was not found
case $target_os in
*darwin*) AC_MSG_NOTICE(
[If you have Tcl installed, make sure that either libtcl<tclversion>.dylib is
in one of the library paths set by LDFLAGS, or that you set the appropriate
apple gcc -framework option in CPPFLAGS and LDFLAGS.]) ;;
*) AC_MSG_FAILURE([
********************************************************************************
* Could not link against the (static) Tcl library (libtcl*.a). *
* Please add the library path to LDFLAGS (e.g. configure LDFLAGS=-L/usr/lib)! *
********************************************************************************
]) ;;
esac
fi
case $target_os in
*linux*) # path used by *buntu
extrapaths=/usr/include/$version ;;
esac
if test .$use_tcl != .none; then
ES_ADDPATH_CHECK_HEADER(tcl.h, [],
[AC_MSG_FAILURE([
********************************************************************************
* Could not find the Tcl header files (tcl.h). *
* Please add the include path to CPPFLAGS *
* (e.g. configure CPPFLAGS=-I/usr/include)! *
********************************************************************************
])], $extrapaths)
fi
if test .$use_tcl = .; then
use_tcl=none
fi
AM_CONDITIONAL(TCL, [test .$use_tcl != .none])
##################################
# check for tk
AC_ARG_WITH(tk,
AS_HELP_STRING([--with-tk=VERSION],[whether to use Tk, and which version to use]),
[], [with_tk=no])
dnl with_tk=no don't use Tk
dnl with_tk=yes try to find a working Tk version, bail out if none is found
dnl otherwise use the specified version
if test .$with_tk != .no; then
# test for X11
AC_PATH_XTRA
saved_CPPFLAGS=$CPPFLAGS
saved_LDFLAGS=$LDFLAGS
saved_LIBS=$LIBS
CPPFLAGS="$CPPFLAGS $X_CXXFLAGS"
LDFLAGS="$LDFLAGS $X_LIBS"
LIBS="$LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
AC_LINK_IFELSE([AC_LANG_CALL([],[XOpenDisplay])],[x11_works=yes],[x11_works=no])
if test $x11_works = no; then
AC_MSG_WARN([could not link against X11, hoping Tk works without])
CPPFLAGS=$saved_CPPFLAGS
LDFLAGS=$saved_LDFLAGS
LIBS=$saved_LIBS
fi
# now test whether Tk can be found
if test .$with_tk = .yes; then
for version in $TK_VERSION tk8.5 tk8.4 tk8.3 tk8.2 tk; do
ES_ADDPATH_CHECK_LIB($version, Tk_Init, [use_tk=$version], [])
if test .$use_tk != .; then break; fi
done
else
ES_ADDPATH_CHECK_LIB($with_tk, Tk_Init, [use_tk=$with_tk], [])
fi
if test .$use_tk = .; then
case $target_os in
*darwin*) AC_MSG_ERROR(
[If you have Tk installed, make sure that either libtcl<tclversion>.dylib is
in one of the library paths set by LDFLAGS, or that you set the appropriate
apple gcc -framework option in CPPFLAGS and LDFLAGS.]) ;;
*) AC_MSG_FAILURE([Tk library $with_tk not found]) ;;
esac
fi
if test .$use_tk = .tk; then
if test .$use_tcl != .tcl; then
AC_MSG_WARN([You are using a generic Tk version, but a defined Tcl version. This may cause problems.
Try --with-tcl=tcl to also use a generic Tcl version, which may fit better.])
fi
fi
case $target_os in
*linux*) # path used by *buntu
extrapaths="/usr/include/$version /usr/include/$use_tcl" ;;
(*) ;;
esac
ES_ADDPATH_CHECK_HEADER(tk.h, [],
[AC_MSG_ERROR([Tk headers not found. Please add the include path to CPPFLAGS (e.g. configure CPPFLAGS=-I/usr/include/tcl8.4).])
]
,$extrapaths)
AC_DEFINE_UNQUOTED(TK,$use_tk,[Whether to use Tk])
else
use_tk=none
fi
##################################
# check for FFTW
# with_fftw=no don't use FFTW
# with_fftw=yes try to find a working FFTW, bail out if none is found
# not given try to find a working FFTW, continue if not found
AC_MSG_CHECKING([whether to use FFTW])
AC_ARG_WITH([fftw],
AS_HELP_STRING([--with-fftw],
[specify whether or not to use FFTW3 [guess]]),
, with_fftw=guess)
AC_MSG_RESULT($with_fftw)
AS_IF([test x$with_fftw = xno], [fftw_found=no],
[ AC_SEARCH_LIBS(fftw_plan_many_dft, [fftw3], [fftw_found=yes], [fftw_found=no])
AS_IF([test x$fftw_found = xyes],
[AC_CHECK_HEADER([fftw3.h],, [fftw_found=no])])
])
AS_IF([test x$fftw_found = xno],[
AS_IF([test x$with_fftw = xyes],[
AC_MSG_FAILURE([FFTW requested, but FFTW was not found!])
],[ AS_IF([test x$with_fftw = xguess], [
AC_MSG_WARN([FFTW3 not found. Some features will not be available!])
])
])
])
AS_IF([test x$fftw_found = xyes],[
AC_DEFINE(FFTW,[],[Whether FFTW is available])])
##################################
# check for CUDA
AC_MSG_CHECKING([whether to use CUDA])
AC_ARG_WITH([cuda],
AS_HELP_STRING([--with-cuda@<:@=DIR@:>@], [specify
where CUDA is installed. The cuda compiler can also be
specified by setting the NVCC environment variable. The CUDA
library and header can be manually specified by using
CPPFLAGS, LDFLAGS and LIBS. [guess]]), ,
with_cuda=guess) AC_MSG_RESULT($with_cuda)
AS_IF([test x$with_cuda = xguess || test x$with_cuda = xyes],[
cuda_path=/usr/local/cuda
],[test x$with_cuda != xno],[
cuda_path=$with_cuda
with_cuda=yes
])
cuda_ok=no
AS_IF([test x$with_cuda != xno],[
cuda_ok=yes
save_LIBS=$LIBS
save_LDFLAGS=$LDFLAGS
save_CXX=$CXX
save_CXXFLAGS=$CXXFLAGS
# NVCC
AC_ARG_VAR(NVCC,[NVIDIA CUDA compiler command])
AC_ARG_VAR(NVCCFLAGS,[special compiler flags for the NVIDIA CUDA compiler])
AC_PATH_PROG(NVCC, nvcc, no, [$PATH:$cuda_path/bin])
AS_IF([test x$NVCC = xno],[
AS_IF([test x$with_cuda = xyes],[
AC_MSG_FAILURE([CUDA compiler nvcc was not found, specify location using the NVCC variable])
],[
AC_MSG_WARN([could not find the CUDA compiler (nvcc). Some features will not be available!])
])
])
# MAC nvcc stays 32 bit, even if the rest is 64 bit
case $target in
x86_64-apple-darwin*)
NVCCFLAGS="$NVCCFLAGS -m64";;
esac
# since we link with mpic++, we need to find the cuda libraries manually
ES_ADDPATH_CHECK_LIB(cudart, cudaGetDevice, [LIBS="$LIBS -lcudart"], [
cuda_ok=no
AS_IF([test x$with_cuda = xyes],[
AC_MSG_FAILURE([could not find cuda runtime library (cudart), specify location using LDFLAGS])
],[
AC_MSG_WARN([could not find cuda runtime library (cudart). Some features will not be available!])
])
], [$cuda_path/lib $cuda_path/lib64])
ES_ADDPATH_CHECK_LIB(cufft, cufftPlan3d, [LIBS="$LIBS -lcufft"], [
cuda_ok=no
AS_IF([test x$with_cuda = xyes],[
AC_MSG_FAILURE([could not find cuda FFT library (cufft), specify location using LDFLAGS])
],[
AC_MSG_WARN([could not find cuda FFT library (cufft). Some features will not be available!])
])
], [$cuda_path/lib $cuda_path/lib64])
# NVCC compile check
AC_MSG_CHECKING([whether CUDA compiles])
# if no other compute capability is defined by the user, we require at least 1.1
case "$NVCCFLAGS" in
*-arch=*) ;;
*) NVCCFLAGS="$NVCCFLAGS --ptxas-options=-v -gencode arch=compute_11,code=compute_11 -gencode arch=compute_20,code=compute_20"
esac
# use nvcc
# autoconf currently doesn't allow to define new languages like cuda, this is a workaround
save_CXX=$CXX
save_CXXFLAGS=$CXXFLAGS
CXX=$NVCC
CXXFLAGS="$NVCCFLAGS -x cu"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <cuda.h>],[cudaGetDevice(0);])], [
AC_MSG_RESULT(yes)
],[
cuda_ok=no
AC_MSG_RESULT(no)
AS_IF([test x$with_cuda = xyes],[
AC_MSG_FAILURE([cannot compile CUDA code. Look at config.log for more details.])
],[
AC_MSG_WARN([cannot compile CUDA code. Some features will not be available!])
])
])
# NVCC compile check
AC_MSG_CHECKING([whether CUDA runs])
AC_RUN_IFELSE([AC_LANG_PROGRAM([#include <cuda.h>],[int no; cudaGetDeviceCount(&no);])], [
AC_MSG_RESULT(yes)
],[
cuda_ok=no
AC_MSG_RESULT(no)
AS_IF([test x$with_cuda = xyes],[
AC_MSG_FAILURE([cannot run CUDA code. Look at config.log for more details.])
],[
AC_MSG_WARN([cannot run CUDA code. Some features will not be available!])
])
],[
AC_MSG_RESULT([unknown (cross-compiling)])
])
CXX=$save_CXX
CXXFLAGS=$save_CXXFLAGS
AS_IF([test x$cuda_ok == xyes], [
AC_DEFINE(CUDA,[],[Whether CUDA is available])
],[
LIBS=$save_LIBS
LDFLAGS=$save_LDFLAGS
])
])
AM_CONDITIONAL(CUDA, [test x$cuda_ok == xyes])
cat <<EOF
****************************************************************
* Other settings *
****************************************************************
EOF
##################################
# check for efence
AC_MSG_CHECKING([whether to use efence])
AC_ARG_WITH(efence,
AS_HELP_STRING([--with-efence],[use ElectricFence memory debugging for the debug binary]),
,with_efence=no)
if test .$with_efence = .yes; then
AC_CHECK_LIB(efence,malloc,,AC_MSG_FAILURE([could not link against the efence library]))
CPPFLAGS="$CPPFLAGS -DEFENCE"
LDFLAGS="$LDFLAGS -lefence"
fi
AC_MSG_RESULT($with_efence)
##################################
# Handling the myconfig-header
AC_ARG_WITH(myconfig,
AS_HELP_STRING([--with-myconfig=FILE],
[default name of the local config file [FILE=myconfig.hpp]]),
[ test .$with_myconfig = .no && with_myconfig=myconfig.hpp ],
[ with_myconfig=myconfig.hpp ])
AC_MSG_CHECKING([the name of the configuration header])
myconfig=$with_myconfig
AC_MSG_RESULT($myconfig)
AC_SUBST(myconfig)
##################################
# Number of CPUs
AS_IF([test "X$CPU_COUNT" = "X"], [AX_COUNT_CPUS])
AC_ARG_VAR(CPU_COUNT,[number of tasks to run in test runs])
AC_SUBST(CPU_COUNT)
AC_ARG_VAR(LIBS,[use this to specify additional libraries to link against, e.g. -lmx])
# where to install the init scripts and tools
buildscriptsdir='${abs_top_builddir}/scripts'
AC_SUBST(buildscriptsdir)
scriptsdir='${pkgdatadir}/scripts'
AC_SUBST(scriptsdir)
toolsdir='${pkgdatadir}/tools'
AC_SUBST(toolsdir)
cat <<EOF
****************************************************************
* Creating output files *
****************************************************************
EOF
# Creating the output
AC_CONFIG_HEADERS([src/acconfig.hpp])
AC_CONFIG_FILES([
Makefile
config/Makefile
config/myconfig-sample-header.hpp
src/Makefile
tools/Makefile
scripts/Makefile
testsuite/Makefile
testsuite/configs/Makefile
doc/Makefile
doc/logo/Makefile
doc/ug/Makefile
doc/dg/Makefile
doc/doxygen/Makefile
doc/tutorials/Makefile
doc/tutorials/01-lennard_jones/Makefile
doc/tutorials/02-charged_system/Makefile
doc/latexit.sh
])
AC_CONFIG_FILES([testsuite/runtest.sh],
[chmod 755 testsuite/runtest.sh])
AC_CONFIG_FILES([tools/es_mpiexec],
[chmod 755 tools/es_mpiexec])
AC_SUBST([CONFIG_STATUS_DEPENDENCIES], ['$(top_srcdir)/src/features.def $(top_srcdir)/config/gen_sampleconfig.py'])
AC_CONFIG_COMMANDS([myconfig-sample.hpp],
[if test x"$PYTHON" != xno; then \
cat config/myconfig-sample-header.hpp > myconfig-sample.hpp; \
$PYTHON $srcdir/config/gen_sampleconfig.py $srcdir/src/features.def >> myconfig-sample.hpp;\
else echo "Python is not available, not (re)creating sample config."; \
fi
], [PYTHON="$PYTHON"])
AC_OUTPUT
cat <<EOF
****************************************************************
* Configuration summary *
****************************************************************
platform detected = $target
package version = $PACKAGE_VERSION
development sources = $devel_src
Compiler
--------
compiler = $CXX
linker = $LD
c++ compiler flags = $CXXFLAGS
c++ preprocessor flags = $CPPFLAGS
linker flags = $LDFLAGS
libraries = $LIBS
using debug flags = $enable_debug
using profiling flags = $enable_profiling
inline = $MDINLINE
Libraries
---------
Tcl version = $use_tcl
Tk version = $use_tk
FFTW = $fftw_found
efence = $with_efence
Other settings
--------------
local config header = $myconfig
installation prefix = $prefix
number of test tasks = $CPU_COUNT
mympiexec = $MYMPIEXEC
mpiexec = $MPIEXEC
pdflatex = $PDFLATEX
makeindex = $MAKEINDEX
bibtex = $BIBTEX
doxygen = $DOXYGEN
dot = $DOT
python = $PYTHON
EOF
if test x$cuda_ok = xyes; then
cat <<EOF
CUDA compiler = $NVCC
CUDA flags = $NVCCFLAGS
EOF
else
echo
echo "CUDA disabled or not supported."
fi
if test x"$use_mpi_fake" = x"yes"; then
echo "WARNING: MPI disabled or not supported! Parallelization turned off."
fi
if test .$pdflatex = .no; then
echo "To be able to rebuild the user's guide, add pdflatex to your PATH."
fi
if test .$makeindex = .no; then
echo "To be able to rebuild the user's guide, add makeindex to your PATH."
fi
if test .$bibtex = .no; then
echo "To be able to rebuild the user's guide, add bibtex to your PATH."
fi
if test .$doxygen = .no; then
echo "To be able to build the developer's guide, add doxygen to your PATH."
fi