ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/branches/devel_omp/ac-tools/configure.in
(Generate patch)

Comparing:
trunk/ac-tools/configure.in (file contents), Revision 1197 by chuckv, Thu Dec 6 20:40:07 2007 UTC vs.
branches/development/ac-tools/configure.in (file contents), Revision 1465 by chuckv, Fri Jul 9 23:08:25 2010 UTC

# Line 1 | Line 1 | AC_PREREQ(2.59)
1   dnl **** Process this file with autoconf to produce a configure script.
2   AC_PREREQ(2.59)
3 < AC_INIT(OOPSE, 4.0, gezelter@nd.edu, oopse)
3 > AC_INIT(OpenMD, 1.0, gezelter@nd.edu, openmd)
4   AC_CONFIG_AUX_DIR(ac-tools)
5 < AC_CONFIG_SRCDIR([src/applications/oopse/oopse.cpp])
5 > AC_CONFIG_SRCDIR([src/applications/openmd/openmd.cpp])
6   AC_CONFIG_HEADER([src/config.h])
7  
8 < builtin(include, ac-tools/OOPSE.m4)
8 > builtin(include, ac-tools/OpenMD.m4)
9   builtin(include, ac-tools/AC_CXX_HAVE_STL.m4)
10   builtin(include, ac-tools/AC_CXX_NAMESPACES.m4)
11   builtin(include, ac-tools/AC_CXX_STD.m4)
12 < builtin(include, ac-tools/CGAL.m4)
12 > builtin(include, ac-tools/ax_mpi.m4)
13  
14   # who am i
15   AC_CANONICAL_HOST
# Line 17 | Line 17 | AC_PREFIX_DEFAULT("/usr/local")
17   AC_PREFIX_DEFAULT("/usr/local")
18  
19   # set program name
20 < PROGNAME="oopse"
20 > PROGNAME="openmd"
21   AC_SUBST(PROGNAME)
22  
23   AC_EXEEXT
24   AC_OBJEXT
25   OBJEXT=".$OBJEXT"
26  
27 < OOPSE=oopse
27 > OPENMD=openmd
28  
29 < dnl **** define home dir of oopse
29 > dnl **** define home dir of OpenMD
30   if test "x${prefix}" = "xNONE"
31   then
32 <  OOPSE_HOME=${ac_default_prefix}/oopse
32 >  OPENMD_HOME=${ac_default_prefix}/openmd
33   else
34 <  OOPSE_HOME=${prefix}/oopse
34 >  OPENMD_HOME=${prefix}/openmd
35   fi
36 < AC_ARG_ENABLE(oopse-home,
37 < [  --enable-oopse-home=DIR      define oopse home dir [PREFIX/oopse]],
38 < [OOPSE_HOME="${enableval}"])
36 > AC_ARG_ENABLE(openmd-home,
37 > [  --enable-openmd-home=DIR      define OpenMD home dir [PREFIX/openmd]],
38 > [OPENMD_HOME="${enableval}"])
39  
40   # there are two ways to do debugging.  One with the --enable-debug flag
41   # and one using the DEBUG environment variable
42  
43   debug=0
44 < AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug], [Compile OOPSE in debug mode]), [debug=1])
44 > AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug], [Compile OpenMD in debug mode]), [debug=1])
45   if test "${DEBUG}"; then
46          AC_DEFINE(debug, 1, [Code compiled in debug mode])
47    msg="$msg, debug mode"
48   fi
49   AC_SUBST(debug)
50  
51 < AC_ARG_ENABLE(single, [AC_HELP_STRING([--enable-single],[compile OOPSE in single precision])], ok=$enableval, ok=no)
51 > AC_ARG_ENABLE(single, [AC_HELP_STRING([--enable-single],[compile OpenMD in single precision])], ok=$enableval, ok=no)
52   AC_ARG_ENABLE(float, [AC_HELP_STRING([--enable-float],[synonym for --enable-single])], ok=$enableval)
53   if test "$ok" = "yes"; then
54          AC_DEFINE(SINGLE_PRECISION,1,[Define to compile in single precision.])
# Line 56 | Line 56 | fi
56          AC_SUBST(USE_SINGLE_PRECISION)
57   fi
58  
59 + AC_PROG_CXX([$CXX icpc pathCC pgCC c++ xlc++ xlC g++ CC])
60 + AC_PROG_CC([$CC icc pathcc pgcc cc xlc gcc])
61 + AC_PROG_FC([$FC ifort ifc pathf95 pgf95 xlf95 lf95 epcf90 pathf90 xlf90 f95 f90 gfortran g95 fort], 95)
62 +
63 + save_CXX=$CXX
64 + save_CC=$CC
65 + save_FC=$FC
66 + save_LIBS=$LIBS
67 +
68 + AC_LANG([C++])
69 + AC_CHECK_LIB(c, dlopen, LIBDL="", [AC_CHECK_LIB(dl, dlopen, LIBDL="-ldl")])
70 + AC_SUBST(LIBDL)
71 + AX_MPI([USE_MPI="yes"],
72 +       [USE_MPI="no"
73 +       AC_MSG_WARN([No suitable C++ MPI implementation found. openmd_MPI will not be built.])])
74 + AS_IF([test AS_VAR_GET([USE_MPI]) != no],[
75 + AC_LANG([C])
76 + AX_MPI([USE_MPI="yes"],
77 +       [USE_MPI="no"
78 +       AC_MSG_WARN([No suitable C MPI implementation found. openmd_MPI will not be built.])])
79 + ])
80 + AS_IF([test AS_VAR_GET([USE_MPI]) != no],[
81 + AC_LANG([Fortran])
82 + AX_MPI([USE_MPI="yes"],
83 +       [USE_MPI="no"
84 +       AC_MSG_WARN([No suitable Fortran MPI implementation found. openmd_MPI will not be built.])])
85 + ])
86 + AS_IF([test AS_VAR_GET([USE_MPI]) != no],[
87 +        CXX=$MPICXX
88 +        CC=$MPICC
89 +        FC=$MPIFC
90 +        LIBS="$MPILIBS $LIBS"
91 + ],[
92 +        CXX=$save_CXX
93 +        CC=$save_CC
94 +        FC=$save_FC
95 +        LIBS=$save_LIBS
96 + ]
97 + )
98 + AC_SUBST(USE_MPI)
99 +
100   # Checks for programs.
60 AC_PROG_CXX([mpicxx icpc pathCC pgCC c++ xlc++ xlC g++ CC])
61 AC_PROG_CC([mpicc icc pathcc pgcc cc xlc gcc])
62 AC_PROG_FC([mpif90 ifort ifc pathf95 pgf95 xlf95 lf95 epcf90 pathf90 xlf90 f95 f90 gfortran g95 fort], 95)
101   AC_PROG_CPP
102   AC_PROG_EGREP
103   AC_PROG_LN_S
# Line 71 | Line 109 | esac
109     x/*) ;;
110     *) INSTALL=`pwd`/ac-tools/"shtool install -c" ;
111   esac
112 < MKINSTALLDIRS=`pwd`/ac-tools/"shtool mkdir -p -f"
112 > MKINSTALLDIRS=`pwd`/ac-tools/"shtool mkdir -p -f -m 755"
113   AC_CHECK_PROG(AR, ar, ar, NONE)
114   if test "$AR" = "NONE"; then
115    AC_CACHE_SAVE
# Line 146 | Line 184 | ACX_CHECK_FFTW
184   AC_CHECK_LIB(m, asin, , exit)
185   ACX_CHECK_ZLIB
186   ACX_CHECK_FFTW
187 + ACX_CHECK_QHULL
188 + ACX_CHECK_OPENBABEL
189  
150
190   # Checks for header files.
191   AC_HEADER_STDC
192 < AC_CHECK_HEADERS([conio.h dlfcn.h fstream.h iostream.h libintl.h limits.h machine/hal_sysinfo.h math.h stddef.h stdio.h stdlib.h string.h strings.h strstream.h sys/param.h sys/pstat.h sys/sysmp.h sys/sysctl.h sys/sysinfo.h sys/systemcfg.h sys/table.h sys/time.h time.h unistd.h zlib.h])
192 > AC_CHECK_HEADERS([libintl.h limits.h machine/hal_sysinfo.h stdlib.h string.h strings.h sys/param.h sys/pstat.h sys/sysctl.h sys/sysinfo.h sys/sysmp.h sys/systemcfg.h sys/table.h sys/time.h unistd.h])
193  
194   # Checks for typedefs, structures, and compiler characteristics.
195   AC_HEADER_STDBOOL
196   AC_C_CONST
197   AC_C_INLINE
159 AC_C_RESTRICT
198   AC_TYPE_SIZE_T
199   AC_HEADER_TIME
162 AC_CHECK_TYPES(clock_t)
163 AC_C_CONST
164 AC_C_INLINE
200  
201   # Checks for library functions.
202   AC_FUNC_MALLOC
168 AC_FUNC_MEMCMP
203   AC_FUNC_REALLOC
204   AC_FUNC_SELECT_ARGTYPES
171 AC_FUNC_STRFTIME
205   AC_FUNC_STRTOD
206 < AC_CHECK_FUNCS([floor getpagesize gettimeofday memchr memmove memset pow pstat_getdynamic pstat_getstatic rint select snprintf sranddev sqrt strcasecmp strchr strdup stricmp strncasecmp strnicmp strrchr strstr strtol sysmp getsysinfo sysctl table])
206 > AC_CHECK_FUNCS([floor getpagesize gettimeofday memset pow pstat_getdynamic pstat_getstatic select sqrt strcasecmp strchr strdup stricmp strncasecmp strnicmp strstr strtol sysmp getsysinfo sysctl table])
207  
208   # special check for _system_configuration because AIX <4.3.2 do not
209   # contain the `physmem' member.
# Line 182 | Line 215 | AC_TRY_COMPILE([#include <sys/systemcfg.h>],
215              [Define if you have the _system_configuration variable.])],
216    [AC_MSG_RESULT([no])])
217  
185 dnl check for system getopt
186 adl_FUNC_GETOPT_LONG
187
188 AC_LANG_CPLUSPLUS
189 AC_CXX_NAMESPACES
190 AC_CXX_STD
191 AC_CHECK_HEADERS([ctype.h iostream fstream sstream strstream])
192 # AC_CPP_FUNC
193 # ------------------ #
194 # Checks to see if ANSI C99 CPP variable __func__ works.
195 # If not, perhaps __FUNCTION__ works instead.
196 # If not, we'll just define __func__ to "".
197 AC_DEFUN([AC_CPP_FUNC],
198 [AC_REQUIRE([AC_PROG_CC_STDC])dnl
199 AC_CACHE_CHECK([for an ANSI C99-conforming __func__], ac_cv_cpp_func,
200 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],
201 [[const char *foo = __func__;]])],
202  [ac_cv_cpp_func=yes],
203  [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],
204 [[const char *foo = __FUNCTION__;]])],
205  [ac_cv_cpp_func=__FUNCTION__],
206  [ac_cv_cpp_func=no])])])
207 if test $ac_cv_cpp_func = __FUNCTION__; then
208  AC_DEFINE(__func__,__FUNCTION__,
209            [Define to __FUNCTION__ or "" if `__func__' does not conform to
210 ANSI C.])
211 elif test $ac_cv_cpp_func = no; then
212  AC_DEFINE(__func__,"",
213            [Define to __FUNCTION__ or "" if `__func__' does not conform to
214 ANSI C.])
215 fi
216 ])# AC_CPP_FUNC
217
218 AC_CPP_FUNC
219 AC_SUBST(__func__)
220
221
218   dnl check for strong optimization options
219  
220   case $debug in
# Line 231 | Line 227 | esac
227       ;;
228   esac
229  
234 dnl OpenBabel needs this:
235 AC_DEFINE([OBAPI], [], [Used to export symbols for DLL / shared library builds])
236
237
238 AC_ARG_WITH(mpi,
239        [AC_HELP_STRING([--with-mpi=<prefix>],
240                [compile with MPI installed in <prefix> [default=no]])],
241        with_mpi=$withval,
242        with_mpi="no")
243
244 case "x$with_mpi" in
245        xyes | "x")  USE_MPI=yes;;
246        xno) USE_MPI=no ;;
247        *) MPI="$with_mpi"; USE_MPI=yes ;;
248 esac
249 if test "$USE_MPI" = "yes" -a -z "$with_mpi"; then
250        MPI="/usr/local"
251 fi
252 if test "$USE_MPI" = "yes"; then
253        ACX_MPI
254 fi
255 AC_SUBST(USE_MPI)
256
257 dnl check for CGAL library
258 ACX_CGAL
259
260 if test "$acx_cgal_found" == yes; then
261        USE_CGAL=yes
262        AC_DEFINE(HAVE_CGAL, 1, [Is defined if the CGAL library is available.])
263        AC_SUBST(USE_CGAL)
264        AC_SUBST(CGAL_CXXFLAGS)
265        AC_SUBST(CGAL_LDFLAGS)
266        AC_SUBST(CGAL_CPPFLAGS)
267        AC_SUBST(CGAL_LIBS)
268 fi
269
270
230   BB_ENABLE_DOXYGEN
231  
232   AC_SUBST(EXEEXT)
233   AC_SUBST(OBJEXT)
234   AC_SUBST(BATEXT)
235   AC_SUBST(MKINSTALLDIRS)
236 < AC_SUBST(OOPSE)
237 < AC_SUBST(OOPSE_HOME)
236 > AC_SUBST(OPENMD)
237 > AC_SUBST(OPENMD_HOME)
238   AC_SUBST(SUBDIRS)
239   AC_SUBST(CFLAGS)
240   AC_SUBST(CXXFLAGS)
# Line 284 | Line 243 | AC_SUBST(F90_MODULE_NAMES)
243   AC_SUBST(LDFLAGS)
244   AC_SUBST(PREPDEFFLAG)
245   AC_SUBST(F90_MODULE_NAMES)
246 < AC_CONFIG_FILES([make/Makefile src/utils/Makefile src/math/Makefile src/applications/staticProps/Makefile scripts/filepp], [chmod 0755 scripts/*])
246 > AC_CONFIG_FILES([make/Makefile src/utils/Makefile src/math/Makefile src/integrators/Makefile src/applications/atom2md/Makefile scripts/filepp], [chmod 0755 scripts/*])
247  
248   AC_OUTPUT

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines