OSDN Git Service

* 共有メモリ使用廃止、mutex使用廃止。
[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.2.0-alpha)
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 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
34     AC_MSG_ERROR([
35 Please specify the --with-apr-header option.
36 ])
37 fi
38 if test "x$with_apr_header" = "xyes"; then
39     AC_MSG_ERROR([
40 Please specify the --with-apr-header option. And, please specify the place of the header file. 
41
42 ])
43 fi
44
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
49   QDEFS=""
50 else
51   QDEFS="-DIMG_NOT_CONVERT_FILENAME"
52 fi
53
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\\\""
57 else
58     if test "x$enable_dump_log" != "x" ; then
59         DDEFS="-DDUMP_LOG=\\\"${enable_dump_log}\\\""
60     fi
61 fi
62
63
64
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.])
69 fi
70
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.])
75 fi
76
77 AC_PATH_PROG(GDLIB_CONFIG, gdlib-config, no
78    /usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin)
79 if text "x$GDLIB_CONFIG" = "xno" ; then
80     AC_MSG_ERROR([gdlib-config not found.])
81 fi
82
83 LIBS="${LIBS} `${GDLIB_CONFIG} --libs` -lgd"
84 CFLAGS="${CFLAGS} `${GDLIB_CONFIG} --cflags`"
85
86 AC_SUBST(with_apache_header)
87 AC_SUBST(with_apr_header)
88 AC_SUBST(CC)
89 AC_SUBST(QDEFS)
90 AC_SUBST(DDEFS)
91 AC_SUBST(LIBS)
92 AC_SUBST(CFLAGS)
93
94 # Checks for header files.
95 AC_HEADER_STDC
96 AC_CHECK_HEADERS([string.h strings.h unistd.h])
97
98 # Checks for typedefs, structures, and compiler characteristics.
99 AC_C_CONST
100
101 # Checks for library functions.
102 AC_FUNC_MALLOC
103 AC_CHECK_FUNCS([memset memcpy strcasecmp strncasecmp strstr])
104
105 AC_CONFIG_FILES([Makefile src/Makefile])
106 AC_OUTPUT