Removing a lot of stuff from configure.ac that we aren't using
[mediagoblin.git] / configure.ac
CommitLineData
e342891a
BI
1dnl configure.ac
2dnl
3dnl Copyright 2012, 2013 Brandon Invergo <brandon@invergo.net>
07778a69 4dnl 2014 MediaGoblin contributors (see MediaGoblin's AUTHORS)
e342891a
BI
5dnl
6dnl Copying and distribution of this file, with or without modification,
7dnl are permitted in any medium without royalty provided the copyright
8dnl notice and this notice are preserved. This file is offered as-is,
9dnl without any warranty.
10
11dnl#########
12dnl README #
13dnl#########
14dnl
15dnl This is a basic Autoconf configure.ac file for Python-based
16dnl projects. It is not intended to be used as-is, but rather to be
17dnl modified to the specific needs of the project.
18dnl
19dnl Lines prefixed with "dnl" are comments that are automatically
20dnl removed by Autoconf/M4, thus they will not appear in the generated
21dnl configure script (see the M4 documentation for more information).
22dnl Such comments are used in this file to communicate information to
23dnl you, the developer. In some cases, the comments contain extra
24dnl macros that you might consider including in your configure script.
25dnl If you wish to include them, simply remove the "dnl" from the
26dnl beginning of the line.
27dnl
28dnl Lines prefixed with "#" are comments that will appear in the
29dnl generated configure script. These comments are thus used to clarify
30dnl to the user what is happening in that script
31dnl
32dnl Wherever pyconfigure-specific macros are used, extra comments are
33dnl included to describe the macros.
34
35dnl######################
36dnl Package Information #
37dnl######################
38
39dnl----
40dnl Initialize Autoconf with the package metadata
41dnl The arguments have been set via the project's PKG-INFO file
42dnl and correspond to:
43dnl
44dnl 1) package name (i.e. foo)
45dnl 2) package version (i.e. 1.2)
46dnl 3) bug/info/project email address (i.e. bug-foo@gnu.org)
47dnl----
48dnl
743af6ba 49AC_INIT([mediagoblin], [0.8.1.dev], [cwebber@gnu.org])
e342891a 50
a9dc855a 51
e342891a
BI
52dnl----
53dnl Load macros from the m4/ directory. If you plan to write new
54dnl macros, put them in files in this directory.
55dnl----
56dnl
0e58f810 57dnl AC_CONFIG_MACRO_DIR([m4])
e342891a
BI
58
59
07778a69
CAW
60dnl # The default prefix should be changed from /usr/local. Set it, as in
61dnl # the documentation, to /srv/mediagoblin.example.org/mediagoblin/
62dnl AC_PREFIX_DEFAULT([`pwd`])
dc85ee8c
BI
63
64
e342891a
BI
65dnl###########################
66dnl Program/command support #
67dnl###########################
68dnl
69dnl In this section, we check for the presence of important commands
70dnl and programs.
71
50e53328
CAW
72dnl--A bit simpler python init----------------------------------------
73dnl Expect python2.7 or python2.6 unless --with-python3 is given.
74dnl----
75
76
96f9c530
CAW
77AC_ARG_WITH([python3],
78 [AS_HELP_STRING([--with-python3], [Set up to use Python 3 by default.])],
79 [],
80 [with_python3=no])
81AS_IF([test "x$with_python3" != xno],
82 AC_CHECK_PROGS([PYTHON], [python3.3], [none])
41c6732e 83 AC_SUBST([USE_PYTHON3], [true])
96f9c530
CAW
84 AS_IF([test "x$PYTHON" = xnone],
85 [AC_MSG_FAILURE(
86 [--with-python3 given but no acceptable python3 (3.3) could be found])]),
87 AC_CHECK_PROGS([PYTHON], [python2.7 python2.6], [none])
41c6732e 88 AC_SUBST([USE_PYTHON3], [false])
96f9c530
CAW
89 AS_IF([test "x$PYTHON" = xnone],
90 [AC_MSG_FAILURE(
f8c1e11f 91 [No acceptable python (2.7, 2.6) could be found])]))
96f9c530 92
e342891a
BI
93dnl----
94dnl With the following set of macros, we implement an option
95dnl "--with-virtualenv", which the user can pass to the configure
96dnl script in order to install to a Virtualenv (AC_ARG_WITH). If the
97dnl option is specified by the user, then we check if the program is
98dnl available, checking both for "virtualenv" and "virtualenv2"
99dnl (AC_CHECK_PROGS)
100dnl----
101dnl
07778a69 102# Support doing development in a virtualenv via the --with-virtualenv
e342891a
BI
103# configure flag
104AC_ARG_WITH([virtualenv],
07778a69 105 [AS_HELP_STRING([--without-virtualenv], [install to a Python virtualenv])],
e342891a 106 [],
07778a69 107 [with_virtualenv=yes])
e342891a
BI
108AS_IF([test "x$with_virtualenv" != xno],
109 AC_CHECK_PROGS([VIRTUALENV], [virtualenv virtualenv3 virtualenv2], [no])
110 AS_IF([test "x$VIRTUALENV" = xno],
111 [AC_MSG_FAILURE(
112 [--with-virtualenv given but virtualenv could not be found])]),
113 AC_SUBST([VIRTUALENV], [no]))
114AC_ARG_VAR([VIRTUALENV_FLAGS], [flags to pass to the virtualenv command])
115
116dnl----
117dnl If the program uses sphinx-build to build documentation, uncomment
118dnl this to create a SPHINXBUILD variable in the Makefile pointing to
119dnl the program. Thus, the user would specify
120dnl SPHINXBUILD=/path/to/sphinx-build as an argument to the configure
121dnl script. Since building the documentation should be optional, just
122dnl print a warning. If the program uses some other documentation
123dnl system, you can do something similar with it.
124dnl----
125dnl
96f9c530
CAW
126dnl # Check for sphinx-build
127dnl AC_CHECK_PROGS([SPHINXBUILD], [sphinx-build sphinx-build3 sphinx-build2], [no])
128dnl AS_IF([test "x$SPHINXBUILD" = xno],
129dnl AC_MSG_WARN(sphinx-build is required to build documentation))
e342891a
BI
130
131
132dnl----
133dnl These two are standard Autoconf macros which check for the
134dnl presence of some programs that we will use in the Makefile.
135dnl----
136dnl
137AC_PROG_MKDIR_P
138AC_PROG_INSTALL
139
96f9c530 140dnl--MediaGoblin specific commands/variables ------------------------
07778a69
CAW
141
142
e342891a
BI
143dnl#########
144dnl Finish #
145dnl#########
146
147dnl Define the files to be configured
00ed01b7 148AC_CONFIG_FILES([Makefile])
07778a69 149
e342891a
BI
150dnl Generate config.status
151AC_OUTPUT