1
#############################################################
3
## Copyright (c) 2007-2011 by The University of Queensland ##
4
## Earth Systems Science Computational Centre (ESSCC) ##
5
## http://www.uq.edu.au/esscc ##
7
## Primary Business: Brisbane, Queensland, Australia ##
8
## Licensed under the Open Software License version 3.0 ##
9
## http://www.opensource.org/licenses/osl-3.0.php ##
11
#############################################################
14
# Process this file with autoconf to produce a configure script.
18
AC_INIT([lsmgengeo], [1.0], [d.weatherley@uq.edu.au])
21
AC_CONFIG_AUX_DIR([config])
22
AC_CONFIG_MACRO_DIR([m4])
23
AC_CONFIG_SRCDIR([../src/main.cc])
24
AC_CONFIG_HEADERS([config/config.h])
26
# autoconf generates (in configure) a prefix variable test inside the test for
27
# the python script directory based on information in python.m4. Depending on
28
# the version of this macro definition, the prefix variable test does not pass
29
# the default prefix value to the prefix variable. (This happens in the
30
# python.m4 associated with aclocal 1.9 and 1.10. The version with aclocal 1.11
31
# corrects the problem.) In this case general libraries are installed in
32
# /usr/lib rather than the default /usr/local/lib, and Python 2.6 libraries are
33
# installed in /usr/lib/python2.6/dist-packages rather than the default
34
# /usr/local/lib/python2.6/dist-packages (.../python2.5/site-packages if Python
37
# Although autoconf automatically generates a test for the value
38
# of the prefix variable, this test occurs too late in the configure script if
39
# based on a problematic python.m4. Repeating the test here generates the test
40
# earlier in configure and is a safeguard in the event that a newer python.m4
41
# returns to the problem encountered with the aclocal 1.10 version.
42
test "x$prefix" = "xNONE" && prefix=$ac_default_prefix
43
test "x$exec_prefix" = "xNONE" && exec_prefix=$prefix
49
# These are the new Libtool macros. Add them and remove the deprecated macros
50
# (not forgetting AC_CONFIG_SUBDIRS near the end of this file) if updating
51
# the Libtool requirements for LSMGenGeo. Be sure to give the user base plenty
52
# of warning before requiring a new version of Libtool (which will be necessary
53
# if the Libtool developers decide no longer to support the deprecated macros).
55
#LT_CONFIG_LTDL_DIR([libltdl])
59
#LTDL_INIT([subproject convenience])
62
# These Libtool macros are deprecated. Remove them if updating the Libtool
63
# requirements for LSMGenGeo.
66
AC_LIBLTDL_CONVENIENCE([libltdl])
73
# Process the docs option --enable-docs
80
[Generate HTML documentation on install (requires epydoc) @<:@default=no@:>@.]
83
if test "x${enableval}" = "xyes"; then
91
# Process the Epydoc option --with-epydoc[=path/to/epydoc]
96
[--with-epydoc@<:@=path/to/epydoc@:>@],
97
[Generate python API documentation in HTML format on install using epydoc @<:@default=no@:>@.]
101
yes) wants_epydoc=true; epydocDir="" ;;
102
*) wants_epydoc=true; epydocDir="${withval}" ;;
106
if test "x$wants_epydoc" = "xtrue" ; then
107
if test -n "${epydocDir}" ; then
108
AC_PATH_PROG([EPYDOC_EXE], [epydoc], "no", "${epydocDir}")
110
AC_PATH_PROG([EPYDOC_EXE], [epydoc], "no")
113
if test "$EPYDOC_EXE" = "no" ; then
114
AC_MSG_WARN([epydoc not found! HTML documentation disabled.])
117
AC_MSG_NOTICE([epydoc found. HTML documentation enabled.])
120
AC_MSG_NOTICE([HTML documentation disabled.])
122
AM_CONDITIONAL([EPYDOC_ENABLED], [test "x${wants_epydoc}" = "xtrue"])
125
# Checks for programs.
126
AC_PROG_CC([icc ecc gcc cc CC cl KCC RCC xlC])
127
AC_PROG_CXX([icpc ecpc g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC])
128
AC_CHECK_TOOL([FIND], [find])
131
# Checks for libraries.
132
AC_CHECK_LIB([python$PYTHON_VERSION], [Py_Main])
133
PYTHON_SYS_PREFIX=`$PYTHON -c "import sys;print sys.prefix"`
134
PYTHON_CPPFLAGS="-I$PYTHON_SYS_PREFIX/include/python$PYTHON_VERSION"
135
AC_SUBST([PYTHON_CPPFLAGS])
137
# Check for boost library
138
BOOST_REQUIRE([1.34.1])
140
# Check for boost filesystem, python and regex libraries
146
# Checks for header files.
148
AC_CHECK_HEADERS([stdlib.h sys/time.h])
151
# Checks for typedefs, structures, and compiler characteristics.
156
# Checks for library functions.
159
AC_CHECK_FUNCS([floor gettimeofday sqrt])
163
AC_CONFIG_SUBDIRS([libltdl]) # Remove when adding the LT* macros above.
164
AC_CONFIG_FILES([Makefile Epydoc/Makefile])