~ubuntu-branches/ubuntu/saucy/python-demgengeo/saucy

« back to all changes in this revision

Viewing changes to build/configure.ac

  • Committer: Package Import Robot
  • Author(s): Anton Gladky
  • Date: 2011-11-18 21:47:18 UTC
  • Revision ID: package-import@ubuntu.com-20111118214718-4ysqm3dhpqwdd7gd
Tags: upstream-0.99~bzr106
ImportĀ upstreamĀ versionĀ 0.99~bzr106

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#############################################################
 
2
##                                                         ##
 
3
## Copyright (c) 2007-2011 by The University of Queensland ##
 
4
## Earth Systems Science Computational Centre (ESSCC)      ##
 
5
## http://www.uq.edu.au/esscc                              ##
 
6
##                                                         ##
 
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          ##
 
10
##                                                         ##
 
11
#############################################################
 
12
 
 
13
#                                               -*- Autoconf -*-
 
14
# Process this file with autoconf to produce a configure script.
 
15
 
 
16
 
 
17
# Boilerplate.
 
18
AC_INIT([lsmgengeo], [1.0], [d.weatherley@uq.edu.au])
 
19
AC_PREREQ([2.59])
 
20
AC_LANG([C++])
 
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])
 
25
 
 
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
 
35
# 2.5 is being used).
 
36
#
 
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
 
44
 
 
45
AM_INIT_AUTOMAKE([])
 
46
AM_PATH_PYTHON([2.3])
 
47
                    
 
48
#
 
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).
 
54
#
 
55
#LT_CONFIG_LTDL_DIR([libltdl])
 
56
#LT_INIT([dlopen])
 
57
#LT_PREREQ([2.0]) 
 
58
#LT_LANG([C++])
 
59
#LTDL_INIT([subproject convenience])
 
60
 
 
61
#
 
62
# These Libtool macros are deprecated.  Remove them if updating the Libtool
 
63
# requirements for LSMGenGeo.
 
64
#
 
65
AC_LIBTOOL_DLOPEN
 
66
AC_LIBLTDL_CONVENIENCE([libltdl])
 
67
AC_PROG_LIBTOOL
 
68
AC_SUBST([INCLTDL])
 
69
AC_SUBST([LIBLTDL])
 
70
 
 
71
 
 
72
#
 
73
# Process the docs option --enable-docs
 
74
#
 
75
wants_epydoc=false
 
76
AC_ARG_ENABLE(
 
77
  [docs],
 
78
  AS_HELP_STRING(
 
79
    [--enable-docs],
 
80
    [Generate HTML documentation on install (requires epydoc)  @<:@default=no@:>@.]
 
81
  ),
 
82
  [
 
83
    if test "x${enableval}" = "xyes"; then
 
84
        wants_epydoc=true
 
85
    fi
 
86
  ]
 
87
)
 
88
 
 
89
 
 
90
#
 
91
# Process the Epydoc option --with-epydoc[=path/to/epydoc]
 
92
#
 
93
AC_ARG_WITH(
 
94
  [epydoc],
 
95
  AS_HELP_STRING(
 
96
    [--with-epydoc@<:@=path/to/epydoc@:>@],
 
97
    [Generate python API documentation in HTML format on install using epydoc @<:@default=no@:>@.]
 
98
  ),
 
99
  [
 
100
    case "${withval}" in
 
101
      yes) wants_epydoc=true; epydocDir="" ;;
 
102
      *)   wants_epydoc=true; epydocDir="${withval}" ;;
 
103
    esac
 
104
  ]
 
105
)
 
106
if test "x$wants_epydoc" = "xtrue" ; then
 
107
    if test -n "${epydocDir}" ; then
 
108
        AC_PATH_PROG([EPYDOC_EXE], [epydoc], "no", "${epydocDir}")
 
109
    else
 
110
        AC_PATH_PROG([EPYDOC_EXE], [epydoc], "no")
 
111
    fi
 
112
 
 
113
    if test "$EPYDOC_EXE" = "no" ; then
 
114
        AC_MSG_WARN([epydoc not found! HTML documentation disabled.])
 
115
        wants_epydoc=false
 
116
    else
 
117
        AC_MSG_NOTICE([epydoc found. HTML documentation enabled.])
 
118
    fi
 
119
else
 
120
    AC_MSG_NOTICE([HTML documentation disabled.])
 
121
fi
 
122
AM_CONDITIONAL([EPYDOC_ENABLED], [test "x${wants_epydoc}" = "xtrue"])
 
123
 
 
124
 
 
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])
 
129
 
 
130
 
 
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])
 
136
 
 
137
# Check for boost library
 
138
BOOST_REQUIRE([1.34.1])
 
139
 
 
140
# Check for boost filesystem, python and regex libraries
 
141
BOOST_FILESYSTEM
 
142
BOOST_PYTHON
 
143
BOOST_REGEX
 
144
 
 
145
 
 
146
# Checks for header files.
 
147
AC_HEADER_STDBOOL
 
148
AC_CHECK_HEADERS([stdlib.h sys/time.h])
 
149
 
 
150
 
 
151
# Checks for typedefs, structures, and compiler characteristics.
 
152
AC_C_INLINE
 
153
AC_TYPE_SIZE_T
 
154
 
 
155
 
 
156
# Checks for library functions.
 
157
AC_FUNC_MALLOC
 
158
AC_FUNC_STRTOD
 
159
AC_CHECK_FUNCS([floor gettimeofday sqrt])
 
160
 
 
161
 
 
162
# Output.
 
163
AC_CONFIG_SUBDIRS([libltdl]) # Remove when adding the LT* macros above.
 
164
AC_CONFIG_FILES([Makefile Epydoc/Makefile])
 
165
AC_OUTPUT