2 # Process this file with autoconf to produce a configure script.
3 AC_INIT(mod_chxj, 0.5.1-stable)
5 AC_CONFIG_SRCDIR([src/mod_chxj.c])
7 AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
8 AM_CONFIG_HEADER(src/config.h)
11 # Checks for programs.
16 # Checks for libraries.
17 AC_CHECK_LIB([apr-0], [main])
19 AC_ARG_WITH(apache-header, [ --with-apache-header=ARG The directory with the header file of apache2.0 is specified. ])
20 #[, ACTION-IF-GIVEN[, ACTION-IF-NOT-GIVEN]])
21 if test "x$with_apache_header" = "x"; then
23 Please specify the --with-apache-header option.
26 if test "x$with_apache_header" = "xyes"; then
28 Please specify the --with-apache-header option. And, please specify the place of the header file.
33 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
34 source by the automatic operation.])
35 if test "x$enable_img_conv_f" = "xyes"; then
38 QDEFS="-DIMG_NOT_CONVERT_FILENAME"
41 AC_ARG_ENABLE(dump-log, [ --enable-dump-log When the log of conversion is output, it specifies it with the output file. ])
42 if test "x$enable_dump_log" = "xyes"; then
43 DDEFS="-DDUMP_LOG=\\\"/tmp/dump.log\\\""
45 if test "x$enable_dump_log" != "x" ; then
46 DDEFS="-DDUMP_LOG=\\\"${enable_dump_log}\\\""
52 AC_PATH_PROG(APXS, apxs, no,
53 /usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/local/apache/bin)
54 if test "x$APXS" = "xno"; then
55 AC_MSG_ERROR([apxs not found.])
58 AC_PATH_PROG(LIBTOOL, libtool, no,
59 /usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin)
60 if test "x$LIBTOOL" = "xno"; then
61 AC_MSG_ERROR([libtool not found.])
65 AC_PATH_PROG(WAND_CONFIG, Wand-config, no,
66 /usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin)
67 if test "x$WAND_CONFIG" = "xno" ; then
68 AC_MSG_ERROR([wand-config not found.])
71 AC_PATH_PROG(APR_CONFIG, apr-config, no,
72 /usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin)
73 if test "x$APR_CONFIG" = "xno" ; then
74 AC_MSG_ERROR([apr-config not found.])
77 LIBS="${LIBS} `${WAND_CONFIG} --ldflags` `${WAND_CONFIG} --libs` "
78 LIBS="${LIBS} `${APR_CONFIG} --ldflags` `${APR_CONFIG} --libs` "
79 CFLAGS="${CFLAGS} `${WAND_CONFIG} --cppflags` `${WAND_CONFIG} --cflags`"
80 CFLAGS="${CFLAGS} -I`${APR_CONFIG} --includedir` `${APR_CONFIG} --cflags` `${APR_CONFIG} --cppflags`"
81 AC_SUBST(with_apache_header)
88 # Checks for header files.
90 AC_CHECK_HEADERS([string.h strings.h unistd.h fcntl.h sys/types.h sys/stat.h sys/mman.h libgen.h])
92 # Checks for typedefs, structures, and compiler characteristics.
95 # Checks for library functions.
97 AC_CHECK_FUNCS([open mmap close memset memcpy strcasecmp strncasecmp strstr])
100 AC_CONFIG_FILES([Makefile src/Makefile])