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
|
#############################################################
## ##
## Copyright (c) 2007-2017 by The University of Queensland ##
## Centre for Geoscience Computing ##
## http://earth.uq.edu.au/centre-geoscience-computing ##
## ##
## Primary Business: Brisbane, Queensland, Australia ##
## Licensed under the Open Software License version 3.0 ##
## http://www.apache.org/licenses/LICENSE-2.0 ##
## ##
#############################################################
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
# Boilerplate.
AC_INIT([gengeo], [1.3], [d.weatherley@uq.edu.au])
AC_PREREQ([2.59])
AC_LANG([C++])
AC_CONFIG_AUX_DIR([config])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_SRCDIR([src/main.cc])
AC_CONFIG_HEADERS([config/config.h])
# autoconf generates (in configure) a prefix variable test inside the test for
# the python script directory based on information in python.m4. Depending on
# the version of this macro definition, the prefix variable test does not pass
# the default prefix value to the prefix variable. (This happens in the
# python.m4 associated with aclocal 1.9 and 1.10. The version with aclocal 1.11
# corrects the problem.) In this case general libraries are installed in
# /usr/lib rather than the default /usr/local/lib, and Python 2.6 libraries are
# installed in /usr/lib/python2.6/dist-packages rather than the default
# /usr/local/lib/python2.6/dist-packages.
#
# Although autoconf automatically generates a test for the value
# of the prefix variable, this test occurs too late in the configure script if
# based on a problematic python.m4. Repeating the test here generates the test
# earlier in configure and is a safeguard in the event that a newer python.m4
# returns to the problem encountered with the aclocal 1.10 version.
test "x$prefix" = "xNONE" && prefix=$ac_default_prefix
test "x$exec_prefix" = "xNONE" && exec_prefix=$prefix
AM_INIT_AUTOMAKE([subdir-objects])
AM_PATH_PYTHON([2.6])
#
# These are the new Libtool macros. Add them and remove the deprecated macros
# (not forgetting AC_CONFIG_SUBDIRS near the end of this file) if updating
# the Libtool requirements for GenGeo. Be sure to give the user base plenty
# of warning before requiring a new version of Libtool (which will be necessary
# if the Libtool developers decide no longer to support the deprecated macros).
#
#LT_CONFIG_LTDL_DIR([libltdl])
#LT_INIT([dlopen])
#LT_PREREQ([2.0])
#LT_LANG([C++])
#LTDL_INIT([subproject convenience])
#
# These Libtool macros are deprecated. Remove them if updating the Libtool
# requirements for GenGeo.
#
AC_LIBTOOL_DLOPEN
AC_LIBLTDL_CONVENIENCE([libltdl])
AC_PROG_LIBTOOL
AC_SUBST([INCLTDL])
AC_SUBST([LIBLTDL])
#
# Process the docs option --enable-docs
#
wants_epydoc=false
AC_ARG_ENABLE(
[docs],
AS_HELP_STRING(
[--enable-docs],
[Generate HTML documentation on install (requires epydoc) @<:@default=no@:>@.]
),
[
if test "x${enableval}" = "xyes"; then
wants_epydoc=true
fi
]
)
#
# Process the Epydoc option --with-epydoc[=path/to/epydoc]
#
AC_ARG_WITH(
[epydoc],
AS_HELP_STRING(
[--with-epydoc@<:@=path/to/epydoc@:>@],
[Generate python API documentation in HTML format on install using epydoc @<:@default=no@:>@.]
),
[
case "${withval}" in
no) wants_epydoc=false ;;
yes) wants_epydoc=true; epydocDir="" ;;
*) wants_epydoc=true; epydocDir="${withval}" ;;
esac
]
)
if test "x$wants_epydoc" = "xtrue" ; then
if test -n "${epydocDir}" ; then
AC_PATH_PROG([EPYDOC_EXE], [epydoc], "no", "${epydocDir}")
else
AC_PATH_PROG([EPYDOC_EXE], [epydoc], "no")
fi
if test "$EPYDOC_EXE" = "no" ; then
AC_MSG_WARN([epydoc not found! HTML documentation disabled.])
wants_epydoc=false
else
AC_MSG_NOTICE([epydoc found. HTML documentation enabled.])
fi
else
AC_MSG_NOTICE([HTML documentation disabled.])
fi
AM_CONDITIONAL([EPYDOC_ENABLED], [test "x${wants_epydoc}" = "xtrue"])
# Checks for programs.
AC_PROG_CC([icc ecc gcc cc CC cl KCC RCC xlC])
AC_PROG_CXX([icpc ecpc g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC])
AC_PROG_LN_S
AC_CHECK_TOOL([FIND], [find])
# Checks for libraries.
PYTHON_SYS_PREFIX=`$PYTHON -c "from __future__ import print_function;import sys;print(sys.prefix)"`
AC_CHECK_LIB([python${PYTHON_VERSION}${PYTHON_VERSION_SUFFIX}], [Py_Main])
PYTHON_CPPFLAGS="-I$PYTHON_SYS_PREFIX/include/python${PYTHON_VERSION}${PYTHON_VERSION_SUFFIX}"
AC_SUBST([PYTHON_CPPFLAGS])
# Check for boost library
if [[ $PYTHON_MAJOR_VERSION -ge 4 ]]; then
BOOST_REQUIRE([1.47.0])
elif [[ $PYTHON_MAJOR_VERSION -ge 3 ]]; then
if [[ $PYTHON_MINOR_VERSION -ge 2 ]]; then
BOOST_REQUIRE([1.47.0])
else
BOOST_REQUIRE([1.41.0])
fi
else
BOOST_REQUIRE([1.34.1])
fi
# Check for boost filesystem, python and regex libraries
BOOST_FILESYSTEM
BOOST_PYTHON
BOOST_REGEX
# Checks for header files.
AC_HEADER_STDBOOL
AC_CHECK_HEADERS([stdlib.h sys/time.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_C_INLINE
AC_TYPE_SIZE_T
# Checks for library functions.
AC_FUNC_MALLOC
AC_FUNC_STRTOD
AC_CHECK_FUNCS([floor gettimeofday sqrt])
# Output.
AC_CONFIG_SUBDIRS([libltdl]) # Remove when adding the LT* macros above.
AC_CONFIG_FILES([Makefile Epydoc/Makefile])
AC_OUTPUT
|