| 1 |
# -*- Autoconf -*- |
| 2 |
# Process this file with autoconf to produce a configure script. |
| 3 |
# |
| 4 |
# Tim Rice <[email protected]> |
| 5 |
# |
| 6 |
# $Id$ |
| 7 |
# |
| 8 |
# Copyright (c) 2005, 2006, 2010 Tim Rice |
| 9 |
# |
| 10 |
# This program is free software; you can redistribute it and/or modify |
| 11 |
# it under the terms of the GNU General Public License as published by |
| 12 |
# the Free Software Foundation; either version 2 of the License, or |
| 13 |
# (at your option) any later version. |
| 14 |
# |
| 15 |
# This program is distributed in the hope that it will be useful, |
| 16 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 17 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 18 |
# GNU General Public License for more details. |
| 19 |
# |
| 20 |
# You should have received a copy of the GNU General Public License |
| 21 |
# along with this program; if not, write to the Free Software |
| 22 |
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA |
| 23 |
# |
| 24 |
#The complete license can be found in the file COPYING. |
| 25 |
|
| 26 |
AC_PREREQ(2.53) |
| 27 |
AC_INIT(ldap-account-manager, 9.6, [email protected]) |
| 28 |
AC_CONFIG_SRCDIR(README) |
| 29 |
AC_PREFIX_DEFAULT(/usr/local/lam) |
| 30 |
|
| 31 |
# work around those that want to build in srcdir |
| 32 |
if test x$srcdir = "x." ; then |
| 33 |
srcdir=`pwd` |
| 34 |
fi |
| 35 |
|
| 36 |
# Does make set variable $(MAKE) |
| 37 |
AC_PROG_MAKE_SET |
| 38 |
|
| 39 |
# Checks for programs. |
| 40 |
AC_PROG_LN_S |
| 41 |
AC_PROG_INSTALL |
| 42 |
AC_PATH_PROG(CHMOD, chmod) |
| 43 |
AC_PATH_PROG(CHOWN, chown) |
| 44 |
AC_PATH_PROG(GREP, grep) |
| 45 |
AC_PATH_PROG(ID, id) |
| 46 |
AC_PATH_PROG(MKDIR, mkdir) |
| 47 |
AC_PATH_PROG(RM, rm) |
| 48 |
AC_PATH_PROG(TAR, tar) |
| 49 |
|
| 50 |
# Find a suitable copy command |
| 51 |
AC_PATH_PROG(COPY, copy) |
| 52 |
AC_PATH_PROG(CP, cp) |
| 53 |
if test x$COPY = x ; then |
| 54 |
touch conf-cp-tst |
| 55 |
$CP --preserve=timestamps conf-cp-tst conf-cp-tst2 2>/dev/null |
| 56 |
if test -f conf-cp-tst2 ; then |
| 57 |
COPY_PROG="$CP --preserve=timestamps" |
| 58 |
rm conf-cp-tst2 |
| 59 |
fi |
| 60 |
rm conf-cp-tst |
| 61 |
else |
| 62 |
COPY_PROG="$COPY -m" |
| 63 |
fi |
| 64 |
AC_SUBST(COPY_PROG) |
| 65 |
|
| 66 |
HTTPD_USER=httpd |
| 67 |
AC_ARG_WITH(httpd-user, |
| 68 |
[ --with-httpd-user=user Specify the user your http daemon runs as. |
| 69 |
default is http ], |
| 70 |
[ |
| 71 |
if test -n "$withval" && test "x$withval" != "xno" && \ |
| 72 |
test "x${withval}" != "xyes"; then |
| 73 |
HTTPD_USER=$withval |
| 74 |
fi |
| 75 |
] |
| 76 |
) |
| 77 |
AC_SUBST(HTTPD_USER) |
| 78 |
|
| 79 |
HTTPD_GROUP=httpd |
| 80 |
AC_ARG_WITH(httpd-group, |
| 81 |
[ --with-httpd-group=group Specify the group your http daemon runs as. |
| 82 |
default is http ], |
| 83 |
[ |
| 84 |
if test -n "$withval" && test "x$withval" != "xno" && \ |
| 85 |
test "x${withval}" != "xyes"; then |
| 86 |
HTTPD_GROUP=$withval |
| 87 |
fi |
| 88 |
] |
| 89 |
) |
| 90 |
AC_SUBST(HTTPD_GROUP) |
| 91 |
|
| 92 |
if test ${prefix} = NONE; then |
| 93 |
WEB_ROOT=${ac_default_prefix} |
| 94 |
else |
| 95 |
WEB_ROOT=${prefix} |
| 96 |
fi |
| 97 |
AC_ARG_WITH(web-root, |
| 98 |
[ --with-web-root=PATH Specify where the LAM files that the web server |
| 99 |
uses should be installed. |
| 100 |
default is ${prefix} ], |
| 101 |
[ |
| 102 |
if test -n "$withval" && test "x$withval" != "xno" && \ |
| 103 |
test "x${withval}" != "xyes"; then |
| 104 |
WEB_ROOT=$withval |
| 105 |
fi |
| 106 |
] |
| 107 |
) |
| 108 |
AC_SUBST(WEB_ROOT) |
| 109 |
|
| 110 |
AC_ARG_WITH(perl, |
| 111 |
[ --with-perl=PATH Specify path to perl program ], |
| 112 |
[ |
| 113 |
if test -n "$withval" && test "x$withval" != "xno" && \ |
| 114 |
test "x${withval}" != "xyes"; then |
| 115 |
perl_path=$withval |
| 116 |
fi |
| 117 |
], |
| 118 |
[ |
| 119 |
# We search these paths before $PATH to find a more up-to-date/capable |
| 120 |
# version of perl than the system installed one. |
| 121 |
TestPath="/opt/bin" |
| 122 |
TestPath="${TestPath}${PATH_SEPARATOR}/opt/sfw/bin" |
| 123 |
TestPath="${TestPath}${PATH_SEPARATOR}/usr/local/bin" |
| 124 |
TestPath="${TestPath}${PATH_SEPARATOR}$PATH" |
| 125 |
AC_PATH_PROGS(perl_path, perl5 perl, , $TestPath) |
| 126 |
] |
| 127 |
) |
| 128 |
|
| 129 |
if test -z "$perl_path" ; then |
| 130 |
PERL_PATH="/usr/bin/perl" |
| 131 |
AC_MSG_WARN([*** lamdaemon.pl requires perl ***]) |
| 132 |
else |
| 133 |
PERL_PATH=$perl_path |
| 134 |
fi |
| 135 |
AC_SUBST(PERL_PATH) |
| 136 |
|
| 137 |
AC_CONFIG_FILES([Makefile]) |
| 138 |
AC_OUTPUT |
| 139 |
|