diff options
Diffstat (limited to 'm4')
-rw-r--r-- | m4/apache.m4 | 186 | ||||
-rw-r--r-- | m4/mod_ssl.m4 | 50 | ||||
-rw-r--r-- | m4/mysql.m4 | 64 |
3 files changed, 0 insertions, 300 deletions
diff --git a/m4/apache.m4 b/m4/apache.m4 deleted file mode 100644 index ef9ce90..0000000 --- a/m4/apache.m4 +++ /dev/null | |||
@@ -1,186 +0,0 @@ | |||
1 | dnl TEST_APACHE_VERSION(RELEASE, [MINIMUM-VERSION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) | ||
2 | dnl Test for Apache | ||
3 | dnl | ||
4 | AC_DEFUN(TEST_APACHE_VERSION, | ||
5 | [dnl | ||
6 | AC_REQUIRE([AC_CANONICAL_TARGET]) | ||
7 | releasetest=$1 | ||
8 | min_apache_version="$2" | ||
9 | no_apache="" | ||
10 | ac_save_CFLAGS="$CFLAGS" | ||
11 | CFLAGS="$CFLAGS $APACHE_CFLAGS" | ||
12 | if test $releasetest -eq 20; then | ||
13 | CFLAGS="$CFLAGS -I$APU_INCDIR -I$APR_INCDIR" | ||
14 | fi | ||
15 | |||
16 | AC_TRY_RUN([ | ||
17 | #include <stdio.h> | ||
18 | #include <stdlib.h> | ||
19 | #include <string.h> | ||
20 | #include "httpd.h" | ||
21 | |||
22 | #ifndef AP_SERVER_BASEREVISION | ||
23 | #define AP_SERVER_BASEREVISION SERVER_BASEREVISION | ||
24 | #endif | ||
25 | |||
26 | char* my_strdup (char *str) | ||
27 | { | ||
28 | char *new_str; | ||
29 | |||
30 | if (str) { | ||
31 | new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char)); | ||
32 | strcpy (new_str, str); | ||
33 | } else | ||
34 | new_str = NULL; | ||
35 | |||
36 | return new_str; | ||
37 | } | ||
38 | |||
39 | int main (int argc, char *argv[]) | ||
40 | { | ||
41 | int major1, minor1, micro1; | ||
42 | int major2, minor2, micro2; | ||
43 | char *tmp_version; | ||
44 | |||
45 | { FILE *fp = fopen("conf.apachetest", "a"); if ( fp ) fclose(fp); } | ||
46 | |||
47 | tmp_version = my_strdup("$min_apache_version"); | ||
48 | if (sscanf(tmp_version, "%d.%d.%d", &major1, &minor1, µ1) != 3) { | ||
49 | printf("%s, bad version string\n", "$min_apache_version"); | ||
50 | exit(1); | ||
51 | } | ||
52 | tmp_version = my_strdup(AP_SERVER_BASEREVISION); | ||
53 | if (sscanf(tmp_version, "%d.%d.%d", &major2, &minor2, µ2) != 3) { | ||
54 | printf("%s, bad version string\n", AP_SERVER_BASEREVISION); | ||
55 | exit(1); | ||
56 | } | ||
57 | if ((major2 > major1) || | ||
58 | ((major2 == major1) && (minor2 > minor1)) || | ||
59 | ((major2 == major1) && (minor2 == minor1) && (micro2 >= micro1))) | ||
60 | { | ||
61 | exit(0); | ||
62 | } else { | ||
63 | /*printf("\n*** This module requires apache version %d.%d.%d or greater\n", | ||
64 | major1, minor1, micro1); | ||
65 | printf("*** I found version %d.%d.%d. Please verify the installation directory\n", | ||
66 | major2, minor2, micro2); | ||
67 | printf("*** of apache with the --with-apxs configure option.\n");*/ | ||
68 | exit(1); | ||
69 | } | ||
70 | } | ||
71 | |||
72 | ],, no_apache=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) | ||
73 | CFLAGS="$ac_save_CFLAGS" | ||
74 | |||
75 | if test "x$no_apache" = x ; then | ||
76 | ifelse([$3], , :, [$3]) | ||
77 | else | ||
78 | if test -f conf.apachetest ; then | ||
79 | : | ||
80 | else | ||
81 | echo "*** Could not run Apache test program, checking why..." | ||
82 | CFLAGS="$CFLAGS APACHE_CFLAGS" | ||
83 | AC_TRY_LINK([ | ||
84 | #include <stdio.h> | ||
85 | #include "httpd.h" | ||
86 | |||
87 | int main(int argc, char *argv[]) | ||
88 | { return 0; } | ||
89 | #undef main | ||
90 | #define main K_and_R_C_main | ||
91 | ], [ return 0; ], | ||
92 | [ echo "*** The test program compiled, but failed to run. Check config.log" ], | ||
93 | [ echo "*** The test program failed to compile or link. Check config.log" ]) | ||
94 | CFLAGS="$ac_save_CFLAGS" | ||
95 | fi | ||
96 | ifelse([$4], , :, [$4]) | ||
97 | fi | ||
98 | rm -f conf.apachetest | ||
99 | ]) | ||
100 | |||
101 | dnl CHECK_PATH_APACHE([MINIMUM13-VERSION [, MINIMUM20-VERSION [, | ||
102 | dnl ACTION-IF-FOUND13 [, ACTION-IF-FOUND20 [, ACTION-IF-NOT-FOUND]]]) | ||
103 | dnl Test for Apache apxs | ||
104 | dnl | ||
105 | AC_DEFUN(CHECK_PATH_APACHE, | ||
106 | [dnl | ||
107 | AC_ARG_WITH( | ||
108 | apxs, | ||
109 | [AC_HELP_STRING([--with-apxs=PATH],[Location to APXS binary (default: /usr)])], | ||
110 | apxs_prefix="$withval", | ||
111 | apxs_prefix="/usr" | ||
112 | ) | ||
113 | AC_ARG_ENABLE( | ||
114 | apachetest, | ||
115 | [AC_HELP_STRING([--disable-apachetest],[Do not try to compile and run apache version test program])], | ||
116 | , | ||
117 | enable_apachetest=yes | ||
118 | ) | ||
119 | |||
120 | PATH="$apxs_prefix:$apxs_prefix/bin:$apxs_prefix/sbin:$PATH" | ||
121 | if test -x $apxs_prefix -a ! -d $apxs_prefix; then | ||
122 | APXS_BIN=$apxs_prefix | ||
123 | else | ||
124 | AC_PATH_PROG(APXS_BIN, apxs, no, [$PATH]) | ||
125 | fi | ||
126 | min_apache13_version=ifelse([$1], ,no,$1) | ||
127 | min_apache20_version=ifelse([$2], ,no,$2) | ||
128 | no_apxs="" | ||
129 | if test "$APXS_BIN" = "no"; then | ||
130 | AC_MSG_ERROR([*** The apxs binary installed by apache could not be found!]) | ||
131 | AC_MSG_ERROR([*** If apache is installed in PREFIX, make sure PREFIX/bin is in]) | ||
132 | AC_MSG_ERROR([*** your path, or use the --with-apxs configure option]) | ||
133 | else | ||
134 | APACHE_INCDIR=`$APXS_BIN -q INCLUDEDIR` | ||
135 | APR_INCDIR=`$APXS_BIN -q APR_INCLUDEDIR` | ||
136 | APU_INCDIR=`$APXS_BIN -q APU_INCLUDEDIR` | ||
137 | APACHE_CPPFLAGS=`$APXS_BIN -q CPPFLAGS` | ||
138 | APACHE_CPPFLAGS="$APACHE_CPPFLAGS -I$APACHE_INCDIR" | ||
139 | APACHE_CFLAGS=`$APXS_BIN -q CFLAGS` | ||
140 | APACHE_CFLAGS="$APACHE_CFLAGS -I$APACHE_INCDIR" | ||
141 | APACHE_MODDIR=`$APXS_BIN -q LIBEXECDIR` | ||
142 | |||
143 | if test "x$enable_apachetest" = "xyes" ; then | ||
144 | if test "$min_apache20_version" != "no"; then | ||
145 | AC_MSG_CHECKING(for Apache 2.0 version >= $min_apache20_version) | ||
146 | TEST_APACHE_VERSION(20,$min_apache20_version, | ||
147 | AC_MSG_RESULT(yes) | ||
148 | AC_DEFINE(WITH_APACHE20,1,[Define to 1 if we are compiling with Apache 2.0.x]) | ||
149 | APACHE_VERSION="2.0" | ||
150 | APXS_EXTENSION=.la | ||
151 | APACHE_CFLAGS="$APACHE_CFLAGS -I$APU_INCDIR -I$APR_INCDIR" | ||
152 | APACHE_CPPFLAGS="$APACHE_CPPFLAGS -I$APU_INCDIR -I$APR_INCDIR" | ||
153 | APACHE_DEFS="-DWITH_APACHE20" | ||
154 | ifelse([$4], , , $4), | ||
155 | AC_MSG_RESULT(no) | ||
156 | if test "x$min_apache13_version" = "xno"; then | ||
157 | ifelse([$5], , , $5) | ||
158 | fi | ||
159 | ) | ||
160 | fi | ||
161 | if test "$min_apache13_version" != "no" -a "x$APACHE_VERSION" = "x"; then | ||
162 | AC_MSG_CHECKING(for Apache 1.3 version >= $min_apache13_version) | ||
163 | TEST_APACHE_VERSION(13,$min_apache13_version, | ||
164 | AC_MSG_RESULT(yes) | ||
165 | AC_DEFINE(WITH_APACHE13,1,[Define to 1 if we are compiling with Apache 1.3.x]) | ||
166 | APACHE_VERSION="1.3" | ||
167 | APXS_EXTENSION=.so | ||
168 | APACHE_CFLAGS="-g $APACHE_CFLAGS" | ||
169 | APACHE_DEFS="-DWITH_APACHE13" | ||
170 | ifelse([$3], , , $3), | ||
171 | AC_MSG_RESULT(no) | ||
172 | ifelse([$5], , , $5) | ||
173 | ) | ||
174 | fi | ||
175 | fi | ||
176 | AC_SUBST(APACHE_DEFS) | ||
177 | AC_SUBST(APACHE_CFLAGS) | ||
178 | AC_SUBST(APACHE_CPPFLAGS) | ||
179 | AC_SUBST(APACHE_INCDIR) | ||
180 | AC_SUBST(APR_INCDIR) | ||
181 | AC_SUBST(APU_INCDIR) | ||
182 | AC_SUBST(APACHE_MODDIR) | ||
183 | AC_SUBST(APACHE_VERSION) | ||
184 | AC_SUBST(APXS_EXTENSION) | ||
185 | fi | ||
186 | ]) | ||
diff --git a/m4/mod_ssl.m4 b/m4/mod_ssl.m4 deleted file mode 100644 index c431bce..0000000 --- a/m4/mod_ssl.m4 +++ /dev/null | |||
@@ -1,50 +0,0 @@ | |||
1 | dnl CHECK_PATH_MOD_SSL([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) | ||
2 | dnl Test for mod_ssl and openssl header directory. | ||
3 | dnl | ||
4 | AC_DEFUN(CHECK_PATH_MOD_SSL, | ||
5 | [dnl | ||
6 | AC_ARG_ENABLE( | ||
7 | ssl, | ||
8 | [AC_HELP_STRING([--enable-ssl],[Compile in SSL support])], | ||
9 | ssl_val=yes, | ||
10 | ssl_val=no | ||
11 | ) | ||
12 | AC_ARG_WITH( | ||
13 | ssl-inc, | ||
14 | [AC_HELP_STRING([--with-ssl-inc=DIR],[Location of SSL header files])], | ||
15 | ssl_incdir="$withval", | ||
16 | ) | ||
17 | AC_ARG_WITH( | ||
18 | db-inc, | ||
19 | [AC_HELP_STRING([--with-db-inc=DIR],[Location of DB header files])], | ||
20 | db_incdir="$withval", | ||
21 | db_incdir="/usr/include/db1" | ||
22 | ) | ||
23 | |||
24 | if test "x$ssl_val" = "xyes"; then | ||
25 | ac_save_CFLAGS=$CFLAGS | ||
26 | ac_save_CPPFLAGS=$CPPFLAGS | ||
27 | MOD_SSL_CFLAGS="-I/usr/include/openssl" | ||
28 | if test "x$ssl_incdir" != "x"; then | ||
29 | MOD_SSL_CFLAGS="-I$ssl_incdir -I$ssl_incdir/openssl $MOD_SSL_CFLAGS" | ||
30 | fi | ||
31 | if test "x$db_incdir" != "x"; then | ||
32 | MOD_SSL_CFLAGS="-I$db_incdir $MOD_SSL_CFLAGS" | ||
33 | fi | ||
34 | CFLAGS="$APACHE_CFLAGS $APACHE_CPPFLAGS $MOD_SSL_CFLAGS $CFLAGS" | ||
35 | CPPFLAGS="$APACHE_CFLAGS $APACHE_CPPFLAGS $MOD_SSL_CFLAGS $CPPFLAGS" | ||
36 | AC_CHECK_HEADERS([mod_ssl.h], | ||
37 | mod_ssl_h=yes | ||
38 | ) | ||
39 | CFLAGS=$ac_save_CFLAGS | ||
40 | CPPFLAGS=$ac_save_CPPFLAGS | ||
41 | if test "x$mod_ssl_h" = "x"; then | ||
42 | ifelse([$2], , :, [$2]) | ||
43 | else | ||
44 | AC_SUBST(MOD_SSL_CFLAGS) | ||
45 | ifelse([$1], , :, [$1]) | ||
46 | fi | ||
47 | else | ||
48 | ifelse([$2], , :, [$2]) | ||
49 | fi | ||
50 | ]) | ||
diff --git a/m4/mysql.m4 b/m4/mysql.m4 deleted file mode 100644 index 7892f88..0000000 --- a/m4/mysql.m4 +++ /dev/null | |||
@@ -1,64 +0,0 @@ | |||
1 | dnl CHECK_PATH_MYSQL([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUNT]]) | ||
2 | dnl Check for MySQL Libs | ||
3 | dnl | ||
4 | AC_DEFUN(CHECK_PATH_MYSQL, | ||
5 | [dnl | ||
6 | AC_ARG_WITH( | ||
7 | mysql, | ||
8 | [AC_HELP_STRING([--with-mysql],[Path to MySQL client library])], | ||
9 | mysql_prefix="$withval", | ||
10 | |||
11 | ) | ||
12 | AC_ARG_ENABLE( | ||
13 | mysqltest, | ||
14 | [AC_HELP_STRING([--disble-mysqltest],[Do not try to compile and run mysql test program])], | ||
15 | , | ||
16 | enable_apachetest=yes) | ||
17 | |||
18 | AC_REQUIRE([AC_CANONICAL_TARGET]) | ||
19 | ac_save_CFLAGS=$CFLAGS | ||
20 | ac_save_LDFLAGS=$LDFLAGS | ||
21 | if test "x$mysql_prefix" != "x" && test "x$mysql_prefix" != "xyes"; then | ||
22 | MYSQL_LDFLAGS="-L${mysql_prefix}/lib -L${mysql_prefix}/lib/mysql -L${mysql_prefix}/mysql/lib" | ||
23 | MYSQL_CFLAGS="-I${mysql_prefix}/include -I${mysql_prefix}/include/mysql -I${mysql_prefix}/mysql/include" | ||
24 | else | ||
25 | MYSQL_LDFLAGS="-L/usr/local/mysql/lib -L/usr/lib/mysql -L/usr/mysql/lib -L/usr/local/lib/mysql -L/usr/local/mysql/lib/mysql -L/usr/mysql/lib/mysql" | ||
26 | MYSQL_CFLAGS="-I/usr/local/mysql/include -I/usr/include/mysql -I/usr/mysql/include -I/usr/local/include/mysql -I/usr/local/mysql/include/mysql -I/usr/mysql/include/mysql" | ||
27 | fi | ||
28 | CFLAGS="$CFLAGS $MYSQL_CFLAGS" | ||
29 | LDFLAGS="$LDFLAGS $MYSQL_LDFLAGS" | ||
30 | AC_CHECK_LIB(m, floor) | ||
31 | AC_CHECK_LIB(z, gzclose) | ||
32 | with_mysql="yes" | ||
33 | AC_DEFINE(WITH_MYSQL,1,[Define to 1 if we are compiling with mysql]) | ||
34 | AC_CHECK_LIB(mysqlclient, mysql_init, , | ||
35 | [AC_MSG_ERROR(libmysqlclient is needed for MySQL support)]) | ||
36 | MYSQL_LIBS=$LIBS | ||
37 | AC_CHECK_FUNCS(mysql_real_escape_string) | ||
38 | AC_MSG_CHECKING(whether mysql clients can run) | ||
39 | AC_TRY_RUN([ | ||
40 | #include <stdio.h> | ||
41 | #include <mysql.h> | ||
42 | int main(void) | ||
43 | { | ||
44 | MYSQL *a = mysql_init(NULL); | ||
45 | return 0; | ||
46 | } | ||
47 | ], , no_mysql=yes,[echo $ac_n "cross compiling; assumed OK.... $ac_c"]) | ||
48 | CFLAGS=$ac_save_CFLAGS | ||
49 | LDFLAGS=$ac_save_LDFLAGS | ||
50 | if test "x$no_mysql" = x; then | ||
51 | AC_MSG_RESULT(yes) | ||
52 | ifelse([$1], , :, [$1]) | ||
53 | else | ||
54 | AC_MSG_RESULT(no) | ||
55 | echo "*** MySQL could not be found ***" | ||
56 | MYSQL_CFLAGS="" | ||
57 | MYSQL_LDFLAGS="" | ||
58 | MYSQL_LIBS="" | ||
59 | ifelse([$2], , :, [$2]) | ||
60 | fi | ||
61 | AC_SUBST(MYSQL_LDFLAGS) | ||
62 | AC_SUBST(MYSQL_CFLAGS) | ||
63 | AC_SUBST(MYSQL_LIBS) | ||
64 | ]) | ||