Hi. I had problems compiling modwaklog using CentOS and the latest
openafs from git.
I managed to work out generally-useful solutions to the problems, so I
thought I'd send this patch on.
1. I added a configuration option to tell it where to find the apr
headers.
2. The afs headers to include have changed. It was complaining that
afs_int32 was undefined. I now include <afs/param.h>, which is
apparently the accepted thing to do for afs programs.
3. When my build was completed, I found the .so file not in the main
directory, but in .libs/mod_waklog.so. I updated the documentation to
say to look for it there.
I attached a patch that fixed these problems for me.
Thanks.
--Ryan
./regen.sh
./configure --with-afs-libs=/usr/lib/afs --with-afs-headers=/usr/include/afs
make
- cp mod_waklog.so <wherever>
+ cp ./.libs/mod_waklog.so <wherever>
Debian:
all: mod_waklog.so
APXS = @APXS@
-INCLUDES = -I@KRB5_INC@ -I@AFS_INC@ -I@APACHE_INC@
+INCLUDES = -I@KRB5_INC@ -I@AFS_INC@ -I@APACHE_INC@ -I@APR_INC@
LIB = -L@AFS_LIBS@ -L@KRB5_LIBS@ -L@APACHE_LIBS@ -lkrb5 -lk5crypto \
-lprot -lauth -lresolv -lubik -lrxkad -lsys -lrx -llwp -ldes \
-lcom_err -lafsutil
APXSCC = `${APXS} -q CC` \
@WAKLOG_DEBUG@ \
${INCLUDES} \
- -DEAPI \
+ -DEAPI -fPIC \
-g \
`${APXS} -q CFLAGS`
______________________________________________________________________________
INSTALL
-Copy the mod_waklog.so to somewhere Apache can read and execute it.
+Copy the ./.libs/mod_waklog.so to somewhere Apache can read and execute it.
Add the following lines to your httpd.conf file:
[AFS_INC=/usr/include/afs])
AC_SUBST(AFS_INC)
+AC_ARG_WITH([apr-headers],
+ [AC_HELP_STRING([--with-apr-headers],[path to apr headers])],
+ [APR_INC=$withval],
+ [APR_INC=/usr/include/apr-1])
+AC_SUBST(APR_INC)
+
AC_ARG_WITH([krb5-libs],
[AC_HELP_STRING([--with-krb5-libs],[path to krb5 libraries])],
[KRB5_LIBS=$withval],
#include <krb5.h>
#include <stropts.h>
+
+#include <afs/param.h>
+
#include <afs/venus.h>
#include <afs/auth.h>
#include <afs/dirpath.h>