You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

139 lines
3.6 KiB

17 years ago
13 years ago
  1. # -*- Autoconf -*-
  2. # Process this file with autoconf to produce a configure script.
  3. #
  4. # Tim Rice <tim@multitalents.net>
  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. AC_PREREQ(2.53)
  26. AC_INIT(ldap-account-manager, @@VERSION@@, lam-public@lists.sourceforge.net)
  27. AC_CONFIG_SRCDIR(README)
  28. AC_PREFIX_DEFAULT(/usr/local/lam)
  29. # work around those that want to build in srcdir
  30. if test x$srcdir = "x." ; then
  31. srcdir=`pwd`
  32. fi
  33. # Does make set variable $(MAKE)
  34. AC_PROG_MAKE_SET
  35. # Checks for programs.
  36. AC_PROG_LN_S
  37. AC_PROG_INSTALL
  38. AC_PATH_PROG(CHMOD, chmod)
  39. AC_PATH_PROG(CHOWN, chown)
  40. AC_PATH_PROG(GREP, grep)
  41. AC_PATH_PROG(ID, id)
  42. AC_PATH_PROG(MKDIR, mkdir)
  43. AC_PATH_PROG(RM, rm)
  44. AC_PATH_PROG(TAR, tar)
  45. # Find a sutable copy command
  46. AC_PATH_PROG(COPY, copy)
  47. AC_PATH_PROG(CP, cp)
  48. if test x$COPY = x ; then
  49. touch conf-cp-tst
  50. $CP --preserve=timestamps conf-cp-tst conf-cp-tst2 2>/dev/null
  51. if test -f conf-cp-tst2 ; then
  52. COPY_PROG="$CP --preserve=timestamps"
  53. rm conf-cp-tst2
  54. fi
  55. rm conf-cp-tst
  56. else
  57. COPY_PROG="$COPY -m"
  58. fi
  59. AC_SUBST(COPY_PROG)
  60. HTTPD_USER=httpd
  61. AC_ARG_WITH(httpd-user,
  62. [ --with-httpd-user=user Specify the user your http daemon runs as.
  63. default is http ],
  64. [
  65. if test -n "$withval" && test "x$withval" != "xno" && \
  66. test "x${withval}" != "xyes"; then
  67. HTTPD_USER=$withval
  68. fi
  69. ]
  70. )
  71. AC_SUBST(HTTPD_USER)
  72. HTTPD_GROUP=httpd
  73. AC_ARG_WITH(httpd-group,
  74. [ --with-httpd-group=group Specify the group your http daemon runs as.
  75. default is http ],
  76. [
  77. if test -n "$withval" && test "x$withval" != "xno" && \
  78. test "x${withval}" != "xyes"; then
  79. HTTPD_GROUP=$withval
  80. fi
  81. ]
  82. )
  83. AC_SUBST(HTTPD_GROUP)
  84. if test ${prefix} = NONE; then
  85. WEB_ROOT=${ac_default_prefix}
  86. else
  87. WEB_ROOT=${prefix}
  88. fi
  89. AC_ARG_WITH(web-root,
  90. [ --with-web-root=PATH Specify where the LAM files that the web server
  91. uses should be installed.
  92. default is ${prefix} ],
  93. [
  94. if test -n "$withval" && test "x$withval" != "xno" && \
  95. test "x${withval}" != "xyes"; then
  96. WEB_ROOT=$withval
  97. fi
  98. ]
  99. )
  100. AC_SUBST(WEB_ROOT)
  101. AC_ARG_WITH(perl,
  102. [ --with-perl=PATH Specify path to perl program ],
  103. [
  104. if test -n "$withval" && test "x$withval" != "xno" && \
  105. test "x${withval}" != "xyes"; then
  106. perl_path=$withval
  107. fi
  108. ],
  109. [
  110. # We search these paths before $PATH to find a more up-to-date/capable
  111. # version of perl than the system installed one.
  112. TestPath="/opt/bin"
  113. TestPath="${TestPath}${PATH_SEPARATOR}/opt/sfw/bin"
  114. TestPath="${TestPath}${PATH_SEPARATOR}/usr/local/bin"
  115. TestPath="${TestPath}${PATH_SEPARATOR}$PATH"
  116. AC_PATH_PROGS(perl_path, perl5 perl, , $TestPath)
  117. ]
  118. )
  119. if test -z "$perl_path" ; then
  120. PERL_PATH="/usr/bin/perl"
  121. AC_MSG_WARN([*** lamdaemon.pl requires perl ***])
  122. else
  123. PERL_PATH=$perl_path
  124. fi
  125. AC_SUBST(PERL_PATH)
  126. AC_CONFIG_FILES([Makefile])
  127. AC_OUTPUT