2 # Process this file with autoconf to produce a configure script.
3 AC_INIT(mod_chxj, 0.3.0-unstable)
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.
32 AC_ARG_WITH(apr-header, [ --with-apr-header=ARG The directory with the header file of apr library is specified. ])
33 if test "x$with_apr_header" = "x"; then
35 Please specify the --with-apr-header option.
38 if test "x$with_apr_header" = "xyes"; then
40 Please specify the --with-apr-header option. And, please specify the place of the header file.
45 AC_ARG_WITH(apr-header, [ --with-apr-header=ARG The directory with the header file of apr library is specified. ])
46 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
47 source by the automatic operation.])
48 if test "x$enable_img_conv_f" = "xyes"; then
51 QDEFS="-DIMG_NOT_CONVERT_FILENAME"
54 AC_ARG_ENABLE(dump-log, [ --enable-dump-log When the log of conversion is output, it specifies it with the output file. ])
55 if test "x$enable_dump_log" = "xyes"; then
56 DDEFS="-DDUMP_LOG=\\\"/tmp/dump.log\\\""
58 if test "x$enable_dump_log" != "x" ; then
59 DDEFS="-DDUMP_LOG=\\\"${enable_dump_log}\\\""
65 AC_PATH_PROG(APXS, apxs, no,
66 /usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/local/apache/bin)
67 if test "x$APXS" = "xno"; then
68 AC_MSG_ERROR([apxs not found.])
71 AC_PATH_PROG(LIBTOOL, libtool, no,
72 /usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin)
73 if test "x$LIBTOOL" = "xno"; then
74 AC_MSG_ERROR([libtool not found.])
78 #AC_PATH_PROG(GDLIB_CONFIG, gdlib-config, no
79 # /usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin)
80 #if text "x$GDLIB_CONFIG" = "xno" ; then
81 # AC_MSG_ERROR([gdlib-config not found.])
83 AC_PATH_PROG(WAND_CONFIG, Wand-config, no
84 /usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin)
85 if text "x$WAND_CONFIG" = "xno" ; then
86 AC_MSG_ERROR([wand-config not found.])
90 #LIBS="${LIBS} `${GDLIB_CONFIG} --libs` -lgd"
91 #CFLAGS="${CFLAGS} `${GDLIB_CONFIG} --cflags`"
93 LIBS="${LIBS} `${WAND_CONFIG} --ldflags` `${WAND_CONFIG} --libs` -lgd"
94 CFLAGS="${CFLAGS} `${WAND_CONFIG} --cppflags` `${WAND_CONFIG} --cflags`"
95 AC_SUBST(with_apache_header)
96 AC_SUBST(with_apr_header)
103 # Checks for header files.
105 AC_CHECK_HEADERS([string.h strings.h unistd.h])
107 # Checks for typedefs, structures, and compiler characteristics.
110 # Checks for library functions.
112 AC_CHECK_FUNCS([memset memcpy strcasecmp strncasecmp strstr])
115 AC_CONFIG_FILES([Makefile src/Makefile])