-rw-r--r-- | configure.ac | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index dc1beb3..744fe50 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -1,166 +1,166 @@ | |||
1 | AC_INIT([sitecing-showcase], [0.0], [sitecing-bugs@klever.net]) | 1 | AC_INIT([sitecing-showcase], [0.0-svn], [sitecing-bugs@klever.net]) |
2 | AC_CONFIG_SRCDIR([htdocs/index.chtml]) | 2 | AC_CONFIG_SRCDIR([htdocs/index.chtml]) |
3 | AC_CONFIG_AUX_DIR([aux]) | 3 | AC_CONFIG_AUX_DIR([aux]) |
4 | AC_CONFIG_HEADER([include/acconfig.h]) | 4 | AC_CONFIG_HEADER([include/acconfig.h]) |
5 | AM_INIT_AUTOMAKE([dist-bzip2]) | 5 | AM_INIT_AUTOMAKE([dist-bzip2]) |
6 | 6 | ||
7 | AC_PATH_PROG([XSLTPROC],[xsltproc],[true]) | 7 | AC_PATH_PROG([XSLTPROC],[xsltproc],[true]) |
8 | 8 | ||
9 | PKG_CHECK_MODULES([SITECING],[sitecing],,[ | 9 | PKG_CHECK_MODULES([SITECING],[sitecing],,[ |
10 | AC_MSG_ERROR([site-C-ing not found. get it at http://kin.klever.net/sitecing/]) | 10 | AC_MSG_ERROR([site-C-ing not found. get it at http://kin.klever.net/sitecing/]) |
11 | ]) | 11 | ]) |
12 | sitecing_prefix="$(${PKG_CONFIG} --variable=prefix sitecing)" | 12 | sitecing_prefix="$(${PKG_CONFIG} --variable=prefix sitecing)" |
13 | sitecing_bindir="$(${PKG_CONFIG} --variable=bindir sitecing)" | 13 | sitecing_bindir="$(${PKG_CONFIG} --variable=bindir sitecing)" |
14 | AC_MSG_CHECKING([for sitecing-fastcgi binary]) | 14 | AC_MSG_CHECKING([for sitecing-fastcgi binary]) |
15 | sitecing_fastcgi="${sitecing_bindir}/sitecing-fastcgi" | 15 | sitecing_fastcgi="${sitecing_bindir}/sitecing-fastcgi" |
16 | if test -x "${sitecing_fastcgi}" ; then | 16 | if test -x "${sitecing_fastcgi}" ; then |
17 | AC_MSG_RESULT([found ${sitecing_fastcgi}]) | 17 | AC_MSG_RESULT([found ${sitecing_fastcgi}]) |
18 | else | 18 | else |
19 | AC_MSG_RESULT([not found]) | 19 | AC_MSG_RESULT([not found]) |
20 | AC_MSG_ERROR([broken site-C-ing install detected]) | 20 | AC_MSG_ERROR([broken site-C-ing install detected]) |
21 | fi | 21 | fi |
22 | AC_MSG_CHECKING([for sitecing-build binary]) | 22 | AC_MSG_CHECKING([for sitecing-build binary]) |
23 | sitecing_build="${sitecing_bindir}/sitecing-build" | 23 | sitecing_build="${sitecing_bindir}/sitecing-build" |
24 | if test -x "${sitecing_build}" ; then | 24 | if test -x "${sitecing_build}" ; then |
25 | AC_MSG_RESULT([found ${sitecing_build}]) | 25 | AC_MSG_RESULT([found ${sitecing_build}]) |
26 | else | 26 | else |
27 | AC_MSG_RESULT([not found]) | 27 | AC_MSG_RESULT([not found]) |
28 | AC_MSG_ERROR([broken site-C-ing install detected]) | 28 | AC_MSG_ERROR([broken site-C-ing install detected]) |
29 | fi | 29 | fi |
30 | AC_SUBST([sitecing_prefix]) | 30 | AC_SUBST([sitecing_prefix]) |
31 | AC_SUBST([sitecing_bindir]) | 31 | AC_SUBST([sitecing_bindir]) |
32 | AC_SUBST([sitecing_fastcgi]) | 32 | AC_SUBST([sitecing_fastcgi]) |
33 | AC_SUBST([sitecing_build]) | 33 | AC_SUBST([sitecing_build]) |
34 | 34 | ||
35 | config_sitecing="config.sitecing" | 35 | config_sitecing="config.sitecing" |
36 | rm -f "${config_sitecing}" | 36 | rm -f "${config_sitecing}" |
37 | SC_BUILD_CONF([${config_sitecing}],[CPPFLAGS],[${SITECING_CFLAGS}]) | 37 | SC_BUILD_CONF([${config_sitecing}],[CPPFLAGS],[${SITECING_CFLAGS}]) |
38 | SC_BUILD_CONF([${config_sitecing}],[LDFLAGS],[${SITECING_LIBS}]) | 38 | SC_BUILD_CONF([${config_sitecing}],[LDFLAGS],[${SITECING_LIBS}]) |
39 | AC_SUBST_FILE([config_sitecing]) | 39 | AC_SUBST_FILE([config_sitecing]) |
40 | 40 | ||
41 | SC_WEB_ROOT([web_src_root],[web_run_root]) | 41 | SC_WEB_ROOT([web_src_root],[web_run_root]) |
42 | SC_USER([sitecing_user]) | 42 | SC_USER([sitecing_user]) |
43 | 43 | ||
44 | AC_DEFINE_UNQUOTED([WEB_ROOT],["${web_src_root}"],[the site root]) | 44 | AC_DEFINE_UNQUOTED([WEB_ROOT],["${web_src_root}"],[the site root]) |
45 | AC_DEFINE_UNQUOTED([WEB_SRC_ROOT],["${web_src_root}"],[the site root]) | 45 | AC_DEFINE_UNQUOTED([WEB_SRC_ROOT],["${web_src_root}"],[the site root]) |
46 | AC_DEFINE_UNQUOTED([WEB_RUN_ROOT],["${web_run_root}"],[the site root]) | 46 | AC_DEFINE_UNQUOTED([WEB_RUN_ROOT],["${web_run_root}"],[the site root]) |
47 | 47 | ||
48 | v_hostname="$(hostname)" | 48 | v_hostname="$(hostname)" |
49 | AC_MSG_CHECKING([for virtual host name]) | 49 | AC_MSG_CHECKING([for virtual host name]) |
50 | AC_ARG_WITH([vhostname], | 50 | AC_ARG_WITH([vhostname], |
51 | AC_HELP_STRING([--with-vhostname=virtual-host-name],[set the apache ServerName of VirtualHost]), | 51 | AC_HELP_STRING([--with-vhostname=virtual-host-name],[set the apache ServerName of VirtualHost]), |
52 | [ | 52 | [ |
53 | v_hostname="${withval}" | 53 | v_hostname="${withval}" |
54 | ] | 54 | ] |
55 | ) | 55 | ) |
56 | AC_MSG_RESULT([${v_hostname}]) | 56 | AC_MSG_RESULT([${v_hostname}]) |
57 | AC_SUBST([v_hostname]) | 57 | AC_SUBST([v_hostname]) |
58 | 58 | ||
59 | HAVE_DUDKI="false" | 59 | HAVE_DUDKI="false" |
60 | WANT_DUDKI="true" | 60 | WANT_DUDKI="true" |
61 | AC_ARG_ENABLE([dudki], | 61 | AC_ARG_ENABLE([dudki], |
62 | AC_HELP_STRING([--disable-dudki],[disable the use of dudki! to restart daemon]), | 62 | AC_HELP_STRING([--disable-dudki],[disable the use of dudki! to restart daemon]), |
63 | [ | 63 | [ |
64 | test "${enableval}" = "no" && WANT_DUDKI="false" | 64 | test "${enableval}" = "no" && WANT_DUDKI="false" |
65 | ] | 65 | ] |
66 | ) | 66 | ) |
67 | if ${WANT_DUDKI} ; then | 67 | if ${WANT_DUDKI} ; then |
68 | AC_PATH_PROG([DUDKI],[dudki],[false],[${PATH}:/usr/local/sbin:/usr/sbin]) | 68 | AC_PATH_PROG([DUDKI],[dudki],[false],[${PATH}:/usr/local/sbin:/usr/sbin]) |
69 | test "${DUDKI}" = "false" || HAVE_DUDKI="true" | 69 | test "${DUDKI}" = "false" || HAVE_DUDKI="true" |
70 | fi | 70 | fi |
71 | AM_CONDITIONAL([HAVE_DUDKI],[${HAVE_DUDKI}]) | 71 | AM_CONDITIONAL([HAVE_DUDKI],[${HAVE_DUDKI}]) |
72 | 72 | ||
73 | dudki_id=sitecing-showcase | 73 | dudki_id=sitecing-showcase |
74 | AC_ARG_WITH([dudki-id], | 74 | AC_ARG_WITH([dudki-id], |
75 | AC_HELP_STRING([--with-dudki-id],[specify dudki process id]), | 75 | AC_HELP_STRING([--with-dudki-id],[specify dudki process id]), |
76 | [ | 76 | [ |
77 | dudki_id="${withval}" | 77 | dudki_id="${withval}" |
78 | ] | 78 | ] |
79 | ) | 79 | ) |
80 | AC_SUBST([dudki_id]) | 80 | AC_SUBST([dudki_id]) |
81 | 81 | ||
82 | APACHE_RESTART_CMD="false" | 82 | APACHE_RESTART_CMD="false" |
83 | AC_ARG_WITH([apache-restart-cmd], | 83 | AC_ARG_WITH([apache-restart-cmd], |
84 | AC_HELP_STRING([--with-apache-restart-cmd=command],[use the specified command to restart apache]), | 84 | AC_HELP_STRING([--with-apache-restart-cmd=command],[use the specified command to restart apache]), |
85 | [ | 85 | [ |
86 | test "${withval}" = "no" || APACHE_RESTART_CMD="${withval}" | 86 | test "${withval}" = "no" || APACHE_RESTART_CMD="${withval}" |
87 | ] | 87 | ] |
88 | ) | 88 | ) |
89 | if test "${APACHE_RESTART_CMD}" = "false" ; then | 89 | if test "${APACHE_RESTART_CMD}" = "false" ; then |
90 | AC_PATH_PROG([APACHECTL],[apachectl],[false],[${PATH}:/usr/sbin:/usr/local/sbin]) | 90 | AC_PATH_PROG([APACHECTL],[apachectl],[false],[${PATH}:/usr/sbin:/usr/local/sbin]) |
91 | if test "${APACHECTL}" != "false" ; then | 91 | if test "${APACHECTL}" != "false" ; then |
92 | APACHE_RESTART_CMD="sudo ${APACHECTL} graceful" | 92 | APACHE_RESTART_CMD="sudo ${APACHECTL} graceful" |
93 | else | 93 | else |
94 | AC_PATH_PROG([APACHE2CTL],[apache2ctl],[false],[${PATH}:/usr/sbin:/usr/local/sbin]) | 94 | AC_PATH_PROG([APACHE2CTL],[apache2ctl],[false],[${PATH}:/usr/sbin:/usr/local/sbin]) |
95 | if test "${APACHE2CTL}" != "false" ; then | 95 | if test "${APACHE2CTL}" != "false" ; then |
96 | APACHE_RESTART_CMD="sudo ${APACHE2CTL} graceful" | 96 | APACHE_RESTART_CMD="sudo ${APACHE2CTL} graceful" |
97 | else | 97 | else |
98 | for i_s in /etc/init.d/apache /etc/init.d/apache2 ; do | 98 | for i_s in /etc/init.d/apache /etc/init.d/apache2 ; do |
99 | AC_MSG_CHECKING([for ${i_s}]) | 99 | AC_MSG_CHECKING([for ${i_s}]) |
100 | if test -x ${i_s} ; then | 100 | if test -x ${i_s} ; then |
101 | AC_MSG_RESULT([found]) | 101 | AC_MSG_RESULT([found]) |
102 | APACHE_RESTART_CMD="sudo ${i_s} restart" | 102 | APACHE_RESTART_CMD="sudo ${i_s} restart" |
103 | break | 103 | break |
104 | fi | 104 | fi |
105 | AC_MSG_RESULT([not found]) | 105 | AC_MSG_RESULT([not found]) |
106 | done | 106 | done |
107 | fi | 107 | fi |
108 | fi | 108 | fi |
109 | fi | 109 | fi |
110 | if test "${APACHE_RESTART_CMD}" = "false" ; then | 110 | if test "${APACHE_RESTART_CMD}" = "false" ; then |
111 | AC_MSG_NOTICE([couldn't figure out how to restart apache. use --with-apache-restart-cmd]) | 111 | AC_MSG_NOTICE([couldn't figure out how to restart apache. use --with-apache-restart-cmd]) |
112 | fi | 112 | fi |
113 | AC_SUBST([APACHE_RESTART_CMD]) | 113 | AC_SUBST([APACHE_RESTART_CMD]) |
114 | 114 | ||
115 | 115 | ||
116 | AC_MSG_CHECKING([if we are in the development environment]) | 116 | AC_MSG_CHECKING([if we are in the development environment]) |
117 | do_devel="false" | 117 | do_devel="false" |
118 | AC_ARG_ENABLE([development], | 118 | AC_ARG_ENABLE([development], |
119 | AC_HELP_STRING([--enable-development],[enable build for development environment]), | 119 | AC_HELP_STRING([--enable-development],[enable build for development environment]), |
120 | [ | 120 | [ |
121 | if test "${enableval}" = "yes" ; then | 121 | if test "${enableval}" = "yes" ; then |
122 | do_devel="true" | 122 | do_devel="true" |
123 | fi | 123 | fi |
124 | ] | 124 | ] |
125 | ) | 125 | ) |
126 | build_on_demand="off" | 126 | build_on_demand="off" |
127 | exception_handler="/handlers/exception_prod" | 127 | exception_handler="/handlers/exception_prod" |
128 | if ${do_devel} ; then | 128 | if ${do_devel} ; then |
129 | AC_MSG_RESULT([yes]) | 129 | AC_MSG_RESULT([yes]) |
130 | build_on_demand="on" | 130 | build_on_demand="on" |
131 | exception_handler="/handlers/exception_dev" | 131 | exception_handler="/handlers/exception_dev" |
132 | AC_DEFINE([_DEVELOPMENT],,[define if development environment]) | 132 | AC_DEFINE([_DEVELOPMENT],,[define if development environment]) |
133 | else | 133 | else |
134 | AC_MSG_RESULT([no]) | 134 | AC_MSG_RESULT([no]) |
135 | fi | 135 | fi |
136 | AC_SUBST([build_on_demand]) | 136 | AC_SUBST([build_on_demand]) |
137 | AC_SUBST([exception_handler]) | 137 | AC_SUBST([exception_handler]) |
138 | 138 | ||
139 | DISTCHECKING="false" | 139 | DISTCHECKING="false" |
140 | AC_ARG_ENABLE([distcheck],,[ | 140 | AC_ARG_ENABLE([distcheck],,[ |
141 | DISTCHECKING="true" | 141 | DISTCHECKING="true" |
142 | ]) | 142 | ]) |
143 | AM_CONDITIONAL([DISTCHECKING],[${DISTCHECKING}]) | 143 | AM_CONDITIONAL([DISTCHECKING],[${DISTCHECKING}]) |
144 | 144 | ||
145 | AC_CONFIG_FILES([ | 145 | AC_CONFIG_FILES([ |
146 | Makefile | 146 | Makefile |
147 | conf/httpd.conf conf/sitecing.conf conf/dudki.conf | 147 | conf/httpd.conf conf/sitecing.conf conf/dudki.conf |
148 | bin/run bin/build | 148 | bin/run bin/build |
149 | ]) | 149 | ]) |
150 | AC_CONFIG_COMMANDS([logs/stamp],[touch logs/stamp]) | 150 | AC_CONFIG_COMMANDS([logs/stamp],[touch logs/stamp]) |
151 | AC_CONFIG_COMMANDS([fastcgi-bin/stamp],[touch fastcgi-bin/stamp]) | 151 | AC_CONFIG_COMMANDS([fastcgi-bin/stamp],[touch fastcgi-bin/stamp]) |
152 | AC_CONFIG_COMMANDS([run/stamp],[touch run/stamp]) | 152 | AC_CONFIG_COMMANDS([run/stamp],[touch run/stamp]) |
153 | AC_OUTPUT | 153 | AC_OUTPUT |
154 | 154 | ||
155 | echo | 155 | echo |
156 | echo === | 156 | echo === |
157 | echo "virtual host name:" "${v_hostname}" | 157 | echo "virtual host name:" "${v_hostname}" |
158 | echo "project src root: " "${web_src_root}" | 158 | echo "project src root: " "${web_src_root}" |
159 | echo "project run root: " "${web_run_root}" | 159 | echo "project run root: " "${web_run_root}" |
160 | echo "sitecing user: " "${sitecing_user}" | 160 | echo "sitecing user: " "${sitecing_user}" |
161 | echo "dudki id: " "${dudki_id}" | 161 | echo "dudki id: " "${dudki_id}" |
162 | echo "development: " "${do_devel}" | 162 | echo "development: " "${do_devel}" |
163 | echo "site-C-ing prefix:" "${sitecing_prefix}" | 163 | echo "site-C-ing prefix:" "${sitecing_prefix}" |
164 | echo === | 164 | echo === |
165 | echo | 165 | echo |
166 | dnl vim:set ft=m4: | 166 | dnl vim:set ft=m4: |