2 # Process this file with autoconf to produce a configure script.
3 <<<<<<< HEAD:configure.ac
4 AC_INIT([mod_chxj],[1.0.0-1])
6 AC_INIT([mod_chxj],[0.12.0-1])
7 >>>>>>> * updated new trunk.:configure.ac
9 AC_CONFIG_SRCDIR([src/mod_chxj.c])
11 AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
12 AM_CONFIG_HEADER(include/config.h)
15 # Checks for programs.
18 <<<<<<< HEAD:configure.ac
22 >>>>>>> * updated new trunk.:configure.ac
24 <<<<<<< HEAD:configure.ac
27 >>>>>>> * updated new trunk.:configure.ac
28 AC_SUBST(LIBTOOL_DEPS)
31 # Checks for libraries.
32 AC_CHECK_LIB([apr-1], [main])
34 <<<<<<< HEAD:configure.ac
35 AC_ARG_WITH(apache-header, [ --with-apache-header=ARG The directory with the header file of apache2.x is specified. ])
37 AC_ARG_WITH(apache-header, [ --with-apache-header=ARG The directory with the header file of apache2.0 is specified. ])
38 >>>>>>> * updated new trunk.:configure.ac
39 if test "x$with_apache_header" = "xyes"; then
41 Please specify the --with-apache-header option. And, please specify the place of the header file.
46 dnl ==================================================
50 dnl ==================================================
51 AC_ARG_WITH(apxs, [ --with-apxs=ARG Path of apxs program file.])
52 if test "x$with_apxs" = "x" ; then
55 if test "x$with_apxs" = "xyes" ; then
57 Please specify the --with-apxs option. And, please specify the place of the apxs program.
61 dnl ==================================================
65 dnl ==================================================
66 AC_ARG_WITH(apr-config, [ --with-apr-config=ARG Path of apr-config program file.])
67 if test "x$with_apr_config" = "xyes" ; then
69 Please specify the --with-apr-config option. And, please specify the place of the apr-config program.
73 dnl ==================================================
77 dnl ==================================================
78 AC_ARG_WITH(apu-config, [ --with-apu-config=ARG Path of apu-config program file.])
79 if test "x$with_apu_config" = "xyes" ; then
81 Please specify the --with-apu-config option. And, please specify the place of the apu-config program.
85 AC_ARG_WITH(pcre-config, [ --with-pcre-config=ARG Path of pcre-config program file.])
86 if test "x$with_pcre_config" = "xyes" ; then
88 Please specify the --with-pcre-config option. And, please specify the place of the pcre-config program.
92 dnl ==================================================
94 dnl filename in img tag convertion.
96 dnl ==================================================
97 AC_ARG_ENABLE(img-conv-f, [ --enable-img-conv-f Please specify it when you change the file name of the image being written in the
98 source by the automatic operation.])
99 if test "x$enable_img_conv_f" = "xyes"; then
102 QDEFS="-DIMG_NOT_CONVERT_FILENAME"
106 dnl ==================================================
108 dnl SAVE COOKIE to memcached Mode
110 dnl ==================================================
111 AC_ARG_ENABLE(memcache-cookie, [ --enable-memcache-cookie Please specify it when you save Cookie in memcached. ])
112 AC_ARG_ENABLE(memcached-static, [ --enable-memcached-static use static link. ])
113 AC_ARG_WITH(memcached-header, [ --with-memcached-header Path of "memcached.h"])
114 AC_ARG_WITH(memcached-lib-dir, [ --with-memcached-lib-dir Path of "libmemcached.so"])
115 if test "x$enable_memcache_cookie" = "xyes" ; then
116 dnl ======================================
117 dnl use MEMCACHE COOKIE
118 dnl ======================================
119 if test "x${with_memcached_header}" = "x" -o "x${with_memcached_header}" = "xyes" ; then
121 Please specify the --with-memcached-header And, please specify the place of the "memcached.h" header file directory.
124 if test "x${with_memcached_lib_dir}" = "x" -o "x${with_memcached_lib_dir}" = "xyes" ; then
126 Please specify the --with-memcached-lib-dir And, please specify the place of libmemcached library directory.
129 if test "x$enable_memcached_static" = "xyes" ; then
130 MEMCACHE_COOKIE_DEFS="-DUSE_MEMCACHE_COOKIE -I${with_memcached_header} "
131 MEMCACHE_COOKIE_LIBS=" ${with_memcached_lib_dir}/libmemcached.a "
133 MEMCACHE_COOKIE_DEFS="-DUSE_MEMCACHE_COOKIE -I${with_memcached_header} "
134 MEMCACHE_COOKIE_LIBS="-L${with_memcached_lib_dir} -lmemcached "
137 dnl ======================================
138 dnl no use MEMCACHE COOKIE
139 dnl ======================================
140 MEMCACHE_COOKIE_DEFS=""
141 MEMCACHE_COOKIE_LIBS=""
143 dnl ==================================================
145 dnl SAVE COOKIE to MySQL Mode
147 dnl ==================================================
148 AC_ARG_ENABLE(mysql-cookie, [ --enable-mysql-cookie Please specify it when you save Cookie in MySQL. ])
149 AC_ARG_WITH(mysql-header, [ --with-mysql-header=ARG Path of "mysql.h"])
150 AC_ARG_WITH(mysql-lib-dir, [ --with-mysql-lib-dir=ARG Path of libmysqlclient])
151 if test "x$enable_mysql_cookie" = "xyes"; then
152 dnl ======================================
154 dnl ======================================
155 if test "x$with_mysql_header" = "x" -o "x$with_mysql_header" = "xyes" ; then
157 Please specify the --with-mysql-header And, please specify the place of the "mysql.h" header file.
160 if test "x$with_mysql_lib_dir" = "x" -o "x$with_mysql_lib_dir" = "xyes" ; then
162 Please specify the --with-mysql-lib-dir And, please specify the place of mysql library directory.
165 MYSQL_COOKIE_DEFS="-DUSE_MYSQL_COOKIE -I${with_mysql_header}"
166 MYSQL_COOKIE_LIBS="-L${with_mysql_lib_dir} -lmysqlclient_r"
168 dnl ======================================
169 dnl no use MYSQL COOKIE
170 dnl ======================================
175 dnl ==================================================
177 dnl dump log for DEBUG
179 dnl ==================================================
180 AC_ARG_ENABLE(dump-log, [ --enable-dump-log When the log of conversion is output, it specifies it with the output file. ])
181 if test "x$enable_dump_log" = "xyes"; then
182 DDEFS="-DDUMP_LOG=\\\"/tmp/dump.log\\\""
184 if test "x$enable_dump_log" != "x" ; then
185 DDEFS="-DDUMP_LOG=\\\"${enable_dump_log}\\\""
190 if test "x$with_apxs" = "x" ; then
191 AC_PATH_PROG(APXS2, apxs2, no,
192 /usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/local/apache/bin)
193 if test "x$APXS2" = "xno"; then
194 AC_PATH_PROG(APXS, apxs, no,
195 /usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/local/apache/bin)
196 if test "x$APXS" = "xno" ; then
197 AC_MSG_ERROR([apxs not found.])
203 if test "x$with_apxs" != "x" ; then
207 AC_PATH_PROG(LIBTOOL, libtool, no,
208 /usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin)
209 if test "x$LIBTOOL" = "xno"; then
210 AC_MSG_ERROR([libtool not found.])
214 AC_PATH_PROG(WAND_CONFIG, Wand-config, no,
215 /usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin)
216 if test "x$WAND_CONFIG" = "xno" ; then
217 AC_MSG_ERROR([wand-config not found.])
220 if test "x$with_apr_config" = "x" ; then
221 AC_PATH_PROG(APR_CONFIG, apr-config, no, /usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin)
222 if test "x$APR_CONFIG" = "xno" ; then
223 AC_PATH_PROG(APR_1_CONFIG, apr-1-config, no, /usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin)
224 if test "x$APR_1_CONFIG" = "xno" ; then
225 AC_MSG_ERROR([apr-config and apr-1-config not found.])
227 APR_CONFIG="$APR_1_CONFIG"
231 if test "x$with_apr_config" != "x" ; then
232 APR_CONFIG=$with_apr_config
234 if test "x$with_apu_config" = "x" ; then
235 AC_PATH_PROG(APU_CONFIG, apu-config, no, /usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin)
236 if test "x$APU_CONFIG" = "xno" ; then
237 AC_PATH_PROG(APU_1_CONFIG, apu-1-config, no, /usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin)
238 if test "x$APU_1_CONFIG" = "xno" ; then
239 AC_MSG_ERROR([apu-config and apu-1-config not found.])
241 APU_CONFIG="$APU_1_CONFIG"
245 if test "x$with_apu_config" != "x" ; then
246 APU_CONFIG=$with_apu_config
249 <<<<<<< HEAD:configure.ac
252 >>>>>>> * updated new trunk.:configure.ac
255 CFLAGS="${CFLAGS} -I/usr/local/include "
259 if test "x${with_apache_header}" = "x" ; then
260 with_apache_header=`${APXS} -q includedir`
262 <<<<<<< HEAD:configure.ac
266 >>>>>>> * updated new trunk.:configure.ac
268 LIBS="${LIBS} `${WAND_CONFIG} --ldflags` `${WAND_CONFIG} --libs | sed -e s/-ldpstk//` "
269 LIBS="${LIBS} `${APR_CONFIG} --ldflags` `${APR_CONFIG} --libs` "
270 LIBS="${LIBS} `${APU_CONFIG} --ldflags` `${APU_CONFIG} --libs` "
271 LIBS="${LIBS} ${MYSQL_COOKIE_LIBS}"
272 LIBS="${LIBS} ${MEMCACHE_COOKIE_LIBS} "
273 CFLAGS="${CFLAGS} `${WAND_CONFIG} --cppflags` `${WAND_CONFIG} --cflags`"
274 CFLAGS="${CFLAGS} `${APR_CONFIG} --includes` `${APR_CONFIG} --cflags` `${APR_CONFIG} --cppflags`"
275 CFLAGS="${CFLAGS} `${APU_CONFIG} --includes`"
276 CFLAGS="${CFLAGS} ${MYSQL_COOKIE_DEFS}"
277 CFLAGS="${CFLAGS} ${MEMCACHE_COOKIE_DEFS}"
278 CPPFLAGS="${CPPFLAGS} `${APR_CONFIG} --includes` -I${with_apache_header}"
279 CPPFLAGS="${CPPFLAGS} ${MYSQL_COOKIE_DEFS}"
280 CPPFLAGS="${CPPFLAGS} ${MEMCACHE_COOKIE_DEFS}"
282 # Checks for header files.
284 AC_CHECK_HEADERS([string.h strings.h unistd.h fcntl.h sys/types.h sys/stat.h sys/mman.h libgen.h])
285 APR_HEADER_DIR="`${APR_CONFIG} --includes | sed -e 's/-I//g' | sed -e 's/ //g'`"
286 AC_CHECK_HEADERS([apr_shm.h apr_global_mutex.h])
287 AC_CHECK_HEADERS([apr.h])
288 AC_CHECK_HEADERS([ap_config.h])
289 #AC_CHECK_HEADERS([ap_regex.h],
290 # AC_DEFINE([HAVE_AP_REGEX_H], [], [Define to 1 if you have the <ap_regex.h> header file.]),[],
295 ##ifdef HAVE_AP_CONFIG_H
296 ##include "ap_config.h"
299 AC_CHECK_HEADERS([ap_regex.h],use_pcre_flag="no",use_pcre_flag="yes")
300 if test "x$use_pcre_flag" = "xyes" ; then
301 if test "x$with_pcre_config" = "x" ; then
302 AC_PATH_PROG(PCRE_CONFIG, pcre-config, no, /usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin)
303 if test "x$PCRE_CONFIG" = "xno" ; then
304 AC_PATH_PROG(PCRE_1_CONFIG, pcre-1-config, no, /usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin)
305 if test "x$PCRE_1_CONFIG" = "xno" ; then
306 AC_MSG_ERROR([pcre-config and pcre-1-config not found.])
308 PCRE_CONFIG="$PCRE_1_CONFIG"
312 if test "x$with_pcre_config" != "x" ; then
313 PCRE_CONFIG=$with_pcre_config
315 CFLAGS="${CFLAGS} `${PCRE_CONFIG} --cflags`"
317 AC_DEFINE([HAVE_AP_REGEX_H], [1], [Define to 1 if you have the <ap_regex.h> header file.])
320 # Checks for typedefs, structures, and compiler characteristics.
323 # Checks for library functions.
325 AC_CHECK_FUNCS([open mmap close memset memcpy strcasecmp strncasecmp strstr])
327 AC_SUBST(with_apache_header)
335 AC_CONFIG_FILES([Makefile src/Makefile])