OSDN Git Service

*** empty log message ***
[modchxj/mod_chxj.git] / configure.ac
1 #                                               -*- Autoconf -*-
2 # Process this file with autoconf to produce a configure script.
3 AC_INIT(mod_chxj, 0.5.1-stable)
4 AC_PREREQ(2.59)
5 AC_CONFIG_SRCDIR([src/mod_chxj.c])
6 AC_CANONICAL_TARGET
7 AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
8 AM_CONFIG_HEADER(src/config.h)
9
10
11 # Checks for programs.
12 AC_PROG_CC
13 AC_PROG_INSTALL
14 AM_PROG_LIBTOOL
15
16 # Checks for libraries.
17 AC_CHECK_LIB([apr-0],  [main])
18
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
22     AC_MSG_ERROR([
23 Please specify the --with-apache-header option.
24 ])
25 fi
26 if test "x$with_apache_header" = "xyes"; then
27     AC_MSG_ERROR([
28 Please specify the --with-apache-header option. And, please specify the place of the header file. 
29
30 ])
31 fi
32
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
36   QDEFS=""
37 else
38   QDEFS="-DIMG_NOT_CONVERT_FILENAME"
39 fi
40
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\\\""
44 else
45     if test "x$enable_dump_log" != "x" ; then
46         DDEFS="-DDUMP_LOG=\\\"${enable_dump_log}\\\""
47     fi
48 fi
49
50
51
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.])
56 fi
57
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.])
62 fi
63
64
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.])
69 fi
70
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.])
75 fi
76
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)
82 AC_SUBST(CC)
83 AC_SUBST(QDEFS)
84 AC_SUBST(DDEFS)
85 AC_SUBST(LIBS)
86 AC_SUBST(CFLAGS)
87
88 # Checks for header files.
89 AC_HEADER_STDC
90 AC_CHECK_HEADERS([string.h strings.h unistd.h fcntl.h sys/types.h sys/stat.h sys/mman.h libgen.h])
91
92 # Checks for typedefs, structures, and compiler characteristics.
93 AC_C_CONST
94
95 # Checks for library functions.
96 AC_FUNC_MALLOC
97 AC_CHECK_FUNCS([open mmap close memset memcpy strcasecmp strncasecmp strstr])
98
99
100 AC_CONFIG_FILES([Makefile src/Makefile])
101 AC_OUTPUT