source: pcp/configure.ac@ 7bfc19

Last change on this file since 7bfc19 was e08f45, checked in by Frederik Heber <heber@…>, 17 years ago

Merge branch 'ConcaveHull' of ../espack2 into ConcaveHull

Conflicts:

molecuilder/src/boundary.cpp
molecuilder/src/boundary.hpp
molecuilder/src/builder.cpp
molecuilder/src/linkedcell.cpp
molecuilder/src/linkedcell.hpp
molecuilder/src/vector.cpp
molecuilder/src/vector.hpp
util/src/NanoCreator.c

Basically, this resulted from a lot of conversions two from spaces to one tab, which is my standard indentation. The mess was caused by eclipse auto-indenting. And in espack2:ConcaveHull was the new stuff, so all from ConcaveHull was replaced in case of doubt.
Additionally, vector had ofstream << operator instead ostream << ...

  • Property mode set to 100755
File size: 6.0 KB
Line 
1# -*- Autoconf -*-
2# Process this file with autoconf to produce a configure script.
3
4AC_PREREQ(2.59)
5AC_INIT([ElectronicStructurePACKage], 1.1, heber@ins.uni-bonn.de, ESPACK)
6AC_CONFIG_AUX_DIR([config])
7AC_CONFIG_SRCDIR([src/pcp.c])
8AC_CONFIG_HEADER([config.h])
9
10AM_INIT_AUTOMAKE(dist-bzip2)
11
12AC_CANONICAL_HOST
13
14# Checks for programs.
15AC_PROG_CC
16AC_PROG_CXX
17AC_PATH_PROG([PERL],[perl])
18AC_PATH_PROG([TAR],[tar])
19AM_MISSING_PROG([DOXYGEN], [doxygen])
20
21dnl Check for MPI-Routines
22AC_ARG_VAR(MPICC, [contains mpi C compiler])
23AC_ARG_VAR(MPICXX, [contains mpi C++ compiler])
24AC_ARG_VAR(MPILIBS, [contains mpi libraries used when linking])
25AC_ARG_ENABLE([mpi],
26 AC_HELP_STRING([--enable-mpi],
27 [build MPI parallel version
28 (default is yes if MPI code can be compiled)]),
29 [enable_mpi=$enableval], [enable_mpi=maybe])
30disabled_msg="MPI version disabled."
31if test x"$enable_mpi" = xyes -o x"$enable_mpi" = xmaybe
32then
33 AC_MSG_NOTICE([checking for MPI features])
34 ACX_MPI([enable_mpi=yes],
35 [err_msg="cannot find out how to compile MPI code."
36 if test x"$enable_mpi" = xyes
37 then
38 AC_MSG_ERROR([$err_msg])
39 else
40 AC_MSG_WARN([$err_msg $disabled_msg])
41 enable_mpi=no
42 fi])
43 if test x"$enable_mpi" = xyes; then
44 AC_ARG_VAR([MPILIBS],[necessary libraries to link MPI C code])
45 AC_ARG_VAR([MPICC],[necessary comnpiler for MPI C code])
46 AC_ARG_VAR([MPICXX],[necessary comnpiler for MPI CPP code])
47 #AM_CONDITIONAL([MPIVER], [test x"$enable_mpi" = xyes])
48 AC_MSG_NOTICE(["MPICC: $MPICC, MPILIBS: $MPILIBS, MPIVER: $MPIVER, CC: $CC"])
49 # if CC not set, set to MPICC
50 if ! test x"$MPICC" = x; then
51 CC="$MPICC"
52 fi
53 if ! test x"$MPICXX" = x; then
54 CXX="$MPICXX"
55 else
56 CXX="$MPICC"
57 fi
58 if ! test x"$MPILIBS" = x; then
59 LDFLAGS="$LDFLAGS $MPILIBS"
60 #AC_CHECK_LIB(mpich, MPI_Allreduce, ,AC_MSG_ERROR([compatible mpich library not found]))
61 fi
62 fi
63else
64 AC_MSG_NOTICE([$disabled_msg])
65fi
66
67# Checks for typedefs, structures, and compiler characteristics.
68AC_TYPE_PID_T
69AC_TYPE_SIZE_T
70AC_TYPE_SIGNAL
71
72AC_C_CONST
73AC_C_INLINE
74AC_C_VOLATILE
75AC_C_RESTRICT
76
77# Checks for library functions.
78# use when adapted: AC_CHECK_FUNCS([floor ftruncate memmove memset mkdir modf pow realpath sqrt strchr strdup strerror strrchr strstr strtol statfs],[],[AC_MSG_WARN([Some functions not found. Compile may fail. Alternate methods may need to be implemented.])])
79AC_FUNC_MALLOC
80AC_FUNC_REALLOC
81AC_TYPE_SIGNAL
82
83# Checks for fftw libraries and find out version.
84AC_CHECK_LIB(m, sqrt, ,AC_MSG_ERROR([compatible libc math library not found]))
85AC_CHECK_FUNCS([alarm atexit floor pow sqrt strchr uname strstr strrchr])
86FFTW=notfound
87RFFTW=notfound
88AC_ARG_ENABLE([fftw],
89 AS_HELP_STRING([--enable-fftw],[build FFTW-2 version (default is yes if fftw2 code can be compiled)]),
90 [enable_fftw=$enableval], [enable_fftw=maybe])
91AC_ARG_ENABLE([dfftw],
92 AS_HELP_STRING([--enable-dfftw],[build double fftw2 version (default is fftw2)]),
93 [enable_dfftw=$enableval], [enable_dfftw=maybe])
94AC_ARG_ENABLE([fftw3],
95 AS_HELP_STRING([--enable-fftw3],[build FFTW-3 version (default is fftw2)]),
96 [enable_fftw3=$enableval], [enable_fftw3=maybe])
97
98# Checks for header files.
99AC_HEADER_STDC
100AC_CHECK_HEADERS([sys/time.h unistd.h float.h stddef.h])
101AC_HEADER_STDBOOL
102
103# check for fftw headers and subsequently for libs
104# if FFTW=.. set on success condition, -l... is not appended
105# .._HEADER doesn't show up in configh.h, .._HEADERS does!
106FFTW=notfound
107if test x"$FFTW" = xnotfound -o x"$enable_fftw" = xyes; then
108 FFTW=FFTW
109 AC_CHECK_HEADERS(fftw.h,
110 [AC_CHECK_LIB(fftw, fftw_create_plan, , [FFTW=notfound], -lfftw)],
111 [FFTW=notfound]
112 )
113
114 AC_CHECK_HEADERS(rfftw.h,
115 [AC_CHECK_LIB(rfftw, rfftw_create_plan, , [FFTW=notfound],-lrfftw)],
116 [FFTW=notfound]
117 )
118fi
119if test x"$FFTW" = xnotfound -o x"$enable_dfftw" = xyes; then
120 FFTW=DFFTW
121 AC_CHECK_HEADERS(dfftw.h,
122 [AC_CHECK_LIB(dfftw, fftw_create_plan, , [FFTW=notfound],-ldfftw)],
123 [FFTW=notfound]
124 )
125
126 AC_CHECK_HEADERS(drfftw.h,
127 [AC_CHECK_LIB(drfftw, rfftw_create_plan, , [FFTW=notfound],-ldrfftw)],
128 [FFTW=notfound]
129 )
130fi
131if test x"$FFTW" = xnotfound -o x"$enable_fftw3" = xyes; then
132 FFTW=FFTW3
133 AC_CHECK_HEADERS(fftw3.h,
134 [AC_CHECK_LIB(fftw3, fftw_create_plan, , [FFTW=notfound],-lfftw3)],
135 [FFTW=notfound]
136 )
137fi
138# warn if not found
139if test x"$FFTW" = xnotfound; then
140 AC_MSG_WARN(["Missing lib(d)fftw(3) and/or lib(d)rfftw(3).\nIf exist but not in LD_.._PATH, use export LDFLAGS=-L.."])
141 AC_MSG_WARN(["Or missing header (d)fftw(3).h and/or (d)rfftw.h\nIf exist but not in PATH, use export CFLAGS=-I.."])
142fi
143# check for GNU Scientific Library
144#AC_CHECK_LIB(m,main)
145AC_CHECK_HEADERS([gsl/gsl_blas.h])
146AC_SEARCH_LIBS(dnrm2, goto blas cblas gslblas gslcblas)
147AC_CHECK_LIB(gsl, main, [],
148 [AC_SEARCH_LIBS(cblas_dnrm2, blas cblas gslblas gslcblas)])
149AC_CHECK_LIB(gsl, gsl_blas_dnrm2, , [AC_MSG_ERROR(["No working BLAS found for GSL, stopping."])])
150
151dnl Check for "extern inline", using a modified version
152dnl of the test for AC_C_INLINE from acspecific.mt
153dnl
154AC_CACHE_CHECK([for extern inline], ac_cv_c_extern_inline,
155[ac_cv_c_extern_inline=no
156AC_TRY_COMPILE([extern $ac_cv_c_inline double foo(double x);
157extern $ac_cv_c_inline double foo(double x) { return x+1.0; };
158double foo (double x) { return x + 1.0; };],
159[ foo(1.0) ],
160[ac_cv_c_extern_inline="yes"])
161])
162
163if test "$ac_cv_c_inline" != no ; then
164 AC_DEFINE(HAVE_INLINE,1, ["May use inline routines"])
165 AC_SUBST(HAVE_INLINE)
166fi
167
168#AC_MSG_NOTICE(["CFLAGS: $CFLAGS, CXXFLAGS: $CXXFLAGS, LDFLAGS: $LDFLAGS, CC: $CC, CXX:, $CXX, MPICC: $MPICC, MPILIBS: $MPILIBS, LIBS: $LIBS"])
169
170# test suite
171AC_CONFIG_TESTDIR(tests)
172AC_CONFIG_FILES([tests/atlocal tests/Makefile])
173AC_CONFIG_FILES([tests/pcp], [chmod +x tests/pcp])
174
175AC_CONFIG_FILES([Makefile src/Makefile doc/Makefile])
176AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.