1
# Process this file with autoconf to produce a configure script.
2
# Autoconf documentation:
3
# http://www.gnu.org/software/autoconf/manual/index.html
5
# Project homepage: http://www.tovid.org
8
# Copyright (C) 2005 tovid.org <http://www.tovid.org>
10
# This program is free software; you can redistribute it and/or
11
# modify it under the terms of the GNU General Public License
12
# as published by the Free Software Foundation; either
13
# version 2 of the License, or (at your option) any later
16
# This program is distributed in the hope that it will be useful,
17
# but WITHOUT ANY WARRANTY; without even the implied warranty of
18
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
# GNU General Public License for more details.
21
# You should have received a copy of the GNU General Public License
22
# along with this program; if not, write to the Free Software
23
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Or see:
25
# http://www.gnu.org/licenses/gpl.txt
27
# ******************************************************************************
28
# ******************************************************************************
34
# ******************************************************************************
35
# ******************************************************************************
37
# The first arugment sets the package name, the second sets the package version.
38
# eg [tovid], [0.40] would yield a tovid-0.40.tar.gz after "$ make dist"
39
# the version number is also substituted into tovid-init.in
40
AC_INIT([tovid], [0.31])
41
AC_CONFIG_SRCDIR([src/tovid])
43
# Require minimum versions of the autotools
45
AM_INIT_AUTOMAKE([1.9])
50
# ******************************************************************************
51
# ******************************************************************************
54
# CHECK FOR DEPENDENCIES
57
# ******************************************************************************
58
# ******************************************************************************
60
# The only 'compile time' dependency we have is txt2tags, which is used to
61
# build the man pages.
62
AC_CHECK_PROG(TXT2TAGS, [txt2tags], [:], [false])
68
txt2tags cannot be found on your system, but tovid needs it to build
69
the man pages. Please install txt2tags (http://txt2tags.sf.net) and
70
run ./configure again. Thanks!
76
# All run-time dependencies are checked in tovid-init now. In addition to being
77
# the Correct Way to do things, it makes packaging much easier for deb|rpm|???
80
# ******************************************************************************
82
# ******************************************************************************
83
# As seen on http://sources.redhat.com/automake/automake.html#Python
84
# AM_PATH_PYTHON sets many vars, including $(pythondir), which is the directory
85
# name for the site-packages subdirectory of the standard Python install tree;
86
# and $(pyexecdir), which is the directory where Python extension modules
87
# (shared libraries) should be installed.
89
# For example, on friedrij's woody debian system
90
# $(pythondir) = ${prefix}/lib/python2.3/site-packages
91
# $(pyexecdir) = ${exec_prefix}/lib/python2.3/site-packages
93
# From the autoconf manual, available in anything _but_ html (uf, fsf) from
94
# http://www.gnu.org/software/autoconf/manual/index.html
95
# $(prefix) is "The common installation prefix for all files. If $(exec_prefix)
96
# is defined to a different value, prefix is used only for architecture-
98
# $(exec_prefix) is "The installation prefix for architecture-dependent files.
99
# By default it's the same as $(prefix). You should avoid installing anything
100
# directly to $(exec_prefix). However, the default value for directories
101
# containing architecture-dependent files should be relative to $(exec_prefix)."
103
# The GNU Coding Standards, available in html (yosh) from
104
# (http://www.gnu.org/prep/standards/standards.html#Directory-Variables),
105
# clarifies the difference between $(prefix) and $(exec_prefix): "Generally,
106
# $(exec_prefix) is used for directories that contain machine-specific files
107
# (such as executables and subroutine libraries), while $(prefix) is used
108
# directly for other directories."
110
# So, this dev thinks we need $(pythondir) and some 'enlightened' python
111
# scripts, as pointed out by
112
# http://sources.redhat.com/automake/automake.html#Hard_002dCoded-Install-Paths
113
# If you do [use $(pythondir) or $(pyexecdir)], then:
114
# * root users can install your package with the same --prefix as Python (you
115
# get the behavior of the previous attempt - eg /usr/lib/python-2.3/...)
116
# * non-root users can install your package too, they will have the extension
117
# module in a place that is not searched by Python but they can work around
118
# this using environment variables (and if you installed scripts that use
119
# this shared library, it's easy to tell Python were to look in the
120
# beginning of your script, so the script works in both cases).
122
# Using pythondir_PYTHON for libtovid will install it to
123
# ${prefix}/lib/python2.3/site-packages (for example)
124
# and the pytovid suite (left as bin_SCRIPTS, so that they are installed as
125
# executables and not byte-compiled like python_PYTHON would do) will need to be
126
# told how to look for libtovid.
130
# Attempt to inform user that their pyton installation won't work
131
# with the default prefix (/usr/local)
132
USER_PYTHON_PATH=$(python -c "import sys; print sys.path")
133
PYTHON_LOCAL=$(echo $USER_PYTHON_PATH | awk -F ',' '{ for (f=1; f<=NF; f++) {print $f}; }' | grep local | tr -d "' ")
135
if test -z $PYTHON_LOCAL && test x"$prefix" == "xNONE"; then
140
It looks like your python installation doesn't look in /usr/local for
141
python modules. tovid installs a few modules on your system, and if
142
python can't find them, then tovid won't work!
144
Please try: ./configure --prefix=/usr
146
to install tovid in a place where python will look for modules. Thanks!
153
# Check to see if this is a svn checkout and set version to revision number
154
if test "$PACKAGE_VERSION" = "svn" && test -e bootstrap; then
155
VERSION="svn-r$(svn info bootstrap | grep Revision | awk '{print $2}')"
158
AC_CONFIG_FILES([Makefile src/tovid-init])
162
# ******************************************************************************
163
# ******************************************************************************
167
# ******************************************************************************
168
# ******************************************************************************
170
# Works for all distros
171
INSTALL_COMMAND="su -c \"make install\""
173
# but *buntu users are used to
174
if $(cat /proc/version | grep -iq buntu); then
175
INSTALL_COMMAND="sudo make install"
181
You may now type '$INSTALL_COMMAND' to compile and install tovid.
183
(or you can try to 'make sense' of it all...)