Commit 7971fc1555271a697f2d910792808bd5a3f861e4

Authored by root
Committed by Georg Hopp
1 parent 650fdb7d

now this seem to build.

... ... @@ -2,13 +2,12 @@ ACLOCAL_AMFLAGS = -I m4
2 2
3 3 lib_LTLIBRARIES = libmodentropy.la
4 4
5   -libmodentropy_la_SOURCES = mod_entropy.c mod_entropy_get_entropy_bits.c \
6   - mod_entropy_add_entropy.c
  5 +libmodentropy_la_SOURCES = mod_entropy.c
7 6 libmodentropy_la_LDFLAGS = -lrt -lm
8 7
9 8 install: libmodentropy.la
10   - apxs -i -a -n entropy libmodentropy.la
  9 + @APXS@ -i -a -n entropy libmodentropy.la
11 10
12 11 ## Define that an include directory is required.
13   -#INCLUDES = -I@apache_dir@/include -I/usr/include/apr-1
  12 +INCLUDES = -I@AP_INCLUDE@ -I@APR_INCLUDE@
14 13
... ...
1 1 AC_PREREQ([2.68])
2 2
3 3 AC_INIT([mod_entropy], [0.1.0], [Georg Hopp <georg@steffers.org])
  4 +LT_INIT
4 5 AM_INIT_AUTOMAKE
5 6
6 7 AC_CONFIG_SRCDIR([mod_entropy.c])
... ... @@ -9,7 +10,7 @@ AC_CONFIG_MACRO_DIR([m4])
9 10
10 11 #AM_SILENT_RULES([yes])
11 12 AC_COPYRIGHT([Copyright © 2012 Georg Hopp])
12   -AC_REVISION([$Revision: 0.02 $])
  13 +AC_REVISION([$Revision: 0.01 $])
13 14
14 15 # Checks for programs.
15 16 AC_PROG_CC
... ... @@ -20,25 +21,32 @@ AC_CHECK_LIB([m], [log])
20 21 AC_CHECK_LIB([rt], [clock_gettime])
21 22 AC_CHECK_LIB([aprutil], [apr_palloc])
22 23
23   -# apache apxs linking
24   -AC_SUBST(APXS)
  24 +# apache apxs
  25 +AC_SUBST(APXS)
25 26 AC_CHECK_PROGS(APXS, apxs)
26 27
27   -if test -z "$APXS"; then
28   - AC_MSG_WARN([[apxs missing]])
29   -fi
  28 +if test -z "$APXS"; then
  29 + AC_MSG_ERROR([[apxs missing]])
  30 +fi
30 31
31   -AC_SUBST(MODULEDIR)
32   -AC_MSG_CHECKING(apache module directory)
33   -if test -x "$APXS"; then
34   - MODULEDIR=`${APXS} -q LIBEXECDIR`
35   -else
36   - MODULEDIR=/usr/local/lib
37   -fi
38   -AC_MSG_RESULT($MODULEDIR)
  32 +# apache include dir
  33 +AC_SUBST(AP_INCLUDE)
  34 +AC_MSG_CHECKING(apache include directory)
  35 +AP_INCLUDE=$(${APXS} -q INCLUDEDIR)
  36 +AC_MSG_RESULT($AP_INCLUDE)
  37 +
  38 +# apr-1
  39 +AC_SUBST(APR1)
  40 +AC_CHECK_PROGS(APR1, apr-1-config)
  41 +
  42 +# apr-1 include dir
  43 +AC_SUBST(APR_INCLUDE)
  44 +AC_MSG_CHECKING(apr-1 include directory)
  45 +APR_INCLUDE=$(${APR1} --includedir)
  46 +AC_MSG_RESULT($APR_INCLUDE)
39 47
40 48 # Checks for header files.
41   -AC_CHECK_HEADERS([fcntl.h sys/ioctl.h])
  49 +AC_CHECK_HEADERS([fcntl.h sys/ioctl.h linux/random.h])
42 50
43 51 # Checks for typedefs, structures, and compiler characteristics.
44 52 AC_TYPE_SIZE_T
... ...
... ... @@ -13,11 +13,15 @@
13 13 */
14 14 #define _POSIX_C_SOURCE 199309L
15 15
16   -#include <apache2/httpd.h>
17   -#include <apache2/http_core.h>
18   -#include <apr-1/apu.h>
19   -#include <apr-1/apr_general.h>
20   -#include <apr-1/apr_sha1.h>
  16 +#include "httpd.h"
  17 +#include "http_core.h"
  18 +#include "http_connection.h"
  19 +#include "http_config.h"
  20 +#include "http_core.h"
  21 +#include "http_log.h"
  22 +#include "apu.h"
  23 +#include "apr_general.h"
  24 +#include "apr_sha1.h"
21 25
22 26 #include <time.h>
23 27 #include <math.h>
... ... @@ -127,8 +131,8 @@ entropy_filter_in(
127 131 */
128 132 apr_sha1_update(
129 133 &sha1_ctx,
130   - connection->client_ip,
131   - strlen(connection->client_ip));
  134 + connection->remote_ip,
  135 + strlen(connection->remote_ip));
132 136
133 137 /**
134 138 * add request line to sha1
... ...
Please register or login to post a comment