@matheusbsbs / matheus-bagliano / commits / 657b062dba
Fork 0

autoconf: Add support for setting SHELL_PATH and PERL_PATH

This patch adds support for setting SHELL_PATH and PERL_PATH to autoconf generated ./configure script via --with-shell=PATH and --with-perl=PATH options. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>

Jakub Narebski committed Aug 3, 2006 at 00:38 UTC 657b062dbab2e17c750050d76de3e76ea28e603e
1 file changed +33 -2
configure.ac
+33 -2
@@ -19,17 +19,47 @@ echo "# ${config_append}. Generated by configure." > "${config_append}"
19 # Append LINE to file ${config_append}
20 AC_DEFUN([GIT_CONF_APPEND_LINE],
21 [echo "$1" >> "${config_append}"])# GIT_CONF_APPEND_LINE
22 +#
23 +# GIT_ARG_SET_PATH(PROGRAM)
24 +# -------------------------
25 +# Provide --with-PROGRAM=PATH option to set PATH to PROGRAM
26 +AC_DEFUN([GIT_ARG_SET_PATH],
27 +[AC_ARG_WITH([$1],
28 + [AS_HELP_STRING([--with-$1=PATH],
29 + [provide PATH to $1])],
30 + [GIT_CONF_APPEND_PATH($1)],[])
31 +])# GIT_ARG_SET_PATH
32 +#
33 +# GIT_CONF_APPEND_PATH(PROGRAM)
34 +# ------------------------------
35 +# Parse --with-PROGRAM=PATH option to set PROGRAM_PATH=PATH
36 +# Used by GIT_ARG_SET_PATH(PROGRAM)
37 +AC_DEFUN([GIT_CONF_APPEND_PATH],
38 +[PROGRAM=m4_toupper($1); \
39 +if test "$withval" = "no"; then \
40 + AC_MSG_WARN([You cannot use git without $1]); \
41 +else \
42 + if test "$withval" = "yes"; then \
43 + AC_MSG_WARN([You should provide path for --with-$1=PATH]); \
44 + else \
45 + GIT_CONF_APPEND_LINE(${PROGRAM}_PATH=$withval); \
46 + fi; \
47 +fi; \
48 +]) # GIT_CONF_APPEND_PATH
49
50
51 ## Checks for programs.
52 AC_MSG_NOTICE([CHECKS for programs])
53 #
54 +GIT_ARG_SET_PATH(shell)
55 +GIT_ARG_SET_PATH(perl)
56 +#
57 +# Define NO_PYTHON if you want to lose all benefits of the recursive merge.
58 +# Define PYTHON_PATH to provide path to Python.
59 AC_PROG_CC
60 #AC_PROG_INSTALL # needs install-sh or install.sh in sources
61 AC_CHECK_TOOL(AR, ar, :)
62 AC_CHECK_PROGS(TAR, [gtar tar])
31 -#
32 -# Define NO_PYTHON if you want to lose all benefits of the recursive merge.
63
64
65 ## Checks for libraries.
@@ -127,6 +157,7 @@ AC_CHECK_FUNC(setenv,[],
157
158 ## Site configuration
159 ## --with-PACKAGE[=ARG] and --without-PACKAGE
160 +#
161 # Define NO_SVN_TESTS if you want to skip time-consuming SVN interopability
162 # tests. These tests take up a significant amount of the total test time
163 # but are not needed unless you plan to talk to SVN repos.