OSDN Git Service

* Fixed Bug.
[modchxj/mod_chxj.git] / src / css / configure.ac
1 #                                               -*- Autoconf -*-
2 # Process this file with autoconf to produce a configure script.
3
4 AC_PREREQ(2.61)
5 AC_INIT(scss, 1.0.0, konn@users.sourceforge.jp)
6 AC_CANONICAL_TARGET
7 AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
8 AC_CONFIG_SRCDIR([src/main.c])
9 AC_CONFIG_HEADER([include/config.h])
10
11 # Checks for programs.
12 AM_PROG_LIBTOOL
13 AC_SUBST(LIBTOOL_DEPS)
14 AC_PROG_CC
15
16 # Checks for libraries.
17 AC_CHECK_LIB([apr-1],  [main])
18
19 # Checks for header files.
20 AC_HEADER_STDC
21 AC_CHECK_HEADERS([string.h])
22
23 dnl ==================================================
24 dnl
25 dnl apr-config
26 dnl
27 dnl ==================================================
28 AC_ARG_WITH(apr-config, [  --with-apr-config=ARG  Path of apr-config program file.])
29 if test "x$with_apr_config" = "xyes" ; then
30     AC_MSG_ERROR([
31 Please specify the --with-apr-config option. And, please specify the place of the apr-config program.
32 ])
33 fi
34
35 dnl ==================================================
36 dnl
37 dnl apu-config
38 dnl
39 dnl ==================================================
40 AC_ARG_WITH(apu-config, [  --with-apu-config=ARG  Path of apu-config program file.])
41 if test "x$with_apu_config" = "xyes" ; then
42     AC_MSG_ERROR([
43 Please specify the --with-apu-config option. And, please specify the place of the apu-config program.
44 ])
45 fi
46
47 AC_PATH_PROG(LIBTOOL, libtool, no,
48     /usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin)
49 if test "x$LIBTOOL" = "xno"; then
50     AC_MSG_ERROR([libtool not found.])
51 fi
52
53
54 if test "x$with_apr_config" = "x" ; then
55   AC_PATH_PROG(APR_CONFIG, apr-config, no, /usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin)
56   if test "x$APR_CONFIG" = "xno" ; then
57     AC_PATH_PROG(APR_1_CONFIG, apr-1-config, no, /usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin)
58     if test "x$APR_1_CONFIG" = "xno" ; then
59       AC_MSG_ERROR([apr-config and apr-1-config not found.])
60     else
61       APR_CONFIG="$APR_1_CONFIG"
62     fi
63   fi
64 fi
65 if test "x$with_apr_config" != "x" ; then
66   APR_CONFIG=$with_apr_config
67 fi
68 if test "x$with_apu_config" = "x" ; then
69   AC_PATH_PROG(APU_CONFIG, apu-config, no, /usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin)
70   if test "x$APU_CONFIG" = "xno" ; then
71     AC_PATH_PROG(APU_1_CONFIG, apu-1-config, no, /usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin)
72     if test "x$APU_1_CONFIG" = "xno" ; then
73       AC_MSG_ERROR([apu-config and apu-1-config not found.])
74     else
75       APU_CONFIG="$APU_1_CONFIG"
76     fi
77   fi
78 fi
79 if test "x$with_apu_config" != "x" ; then
80   APU_CONFIG=$with_apu_config
81 fi
82
83
84 if test "x$with_apu_config" != "x" ; then
85   APU_CONFIG=$with_apu_config
86 fi
87
88 # Checks for typedefs, structures, and compiler characteristics.
89 AC_C_CONST
90
91 # Checks for library functions.
92 AC_CHECK_FUNCS([memset strcasecmp strncasecmp])
93
94 CFLAGS="${CFLAGS} -DLIBICONV_PLUG "
95 LIBS="${LIBS} `${APR_CONFIG} --ldflags` `${APR_CONFIG} --libs` "
96 LIBS="${LIBS} `${APU_CONFIG} --ldflags` `${APU_CONFIG} --libs` "
97 CFLAGS="${CFLAGS} `${APR_CONFIG} --includes` `${APR_CONFIG} --cflags` `${APR_CONFIG} --cppflags`"
98 CFLAGS="${CFLAGS} `${APU_CONFIG} --includes`"
99
100
101 AC_SUBST(APR_CONFIG)
102 AC_SUBST(APU_CONFIG)
103 AC_SUBST(CFLAGS)
104 AC_SUBST(LIBS)
105
106 AC_CONFIG_FILES([Makefile src/Makefile])
107 AC_OUTPUT