-rw-r--r-- | acinclude.m4 | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/acinclude.m4 b/acinclude.m4 new file mode 100644 index 0000000..e16972c --- a/dev/null +++ b/acinclude.m4 | |||
@@ -0,0 +1,37 @@ | |||
1 | dnl SC_BUILD_CONF(FILE-NAME,DIRECTIVE,CONTENTS) | ||
2 | AC_DEFUN([SC_BUILD_CONF],[ | ||
3 | echo -n "$2" >>"$1" | ||
4 | oc=0 | ||
5 | for o in $3 ; do | ||
6 | oc=`expr ${oc} + 1` | ||
7 | if test ${oc} -ge 16 ; then | ||
8 | (echo ; echo -n "$2") >>"$1" | ||
9 | oc=0; | ||
10 | fi | ||
11 | echo -n " ${o}" >>"$1" | ||
12 | done | ||
13 | echo >>"$1" | ||
14 | ]) | ||
15 | |||
16 | dnl SC_WEB_ROOT(V_SRC,V_RUN) | ||
17 | AC_DEFUN([SC_WEB_ROOT],[ | ||
18 | $2="${PWD}" | ||
19 | X="${PWD}" | ||
20 | cd ${srcdir} | ||
21 | $1="${PWD}" | ||
22 | cd "${X}" | ||
23 | AC_SUBST([$1]) | ||
24 | AC_SUBST([$2]) | ||
25 | ]) | ||
26 | |||
27 | dnl SC_USER(VARIABLE[,DEFAULT]) | ||
28 | AC_DEFUN([SC_USER],[ | ||
29 | $1=ifelse([$2], , ["${USER}"],[$2]) | ||
30 | AC_ARG_WITH([sitecing-user], | ||
31 | AC_HELP_STRING([--with-sitecing-user=user],[set the owner of sitecing process]), | ||
32 | [ | ||
33 | $1="${withval}" | ||
34 | ] | ||
35 | ) | ||
36 | AC_SUBST([$1]) | ||
37 | ]) | ||