From 3cb7bdb7c0ee5ae67ff85cc1d98134353d037553 Mon Sep 17 00:00:00 2001 From: Ryan Jud Hughes Date: Tue, 4 Aug 2009 11:18:58 -0700 Subject: [PATCH] Fix build issues on CentOS 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 , 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 --- INSTALL | 2 +- Makefile.am | 4 ++-- README | 2 +- configure.in | 6 ++++++ debian/rules | 0 mod_waklog.c | 3 +++ regen.sh | 0 7 files changed, 13 insertions(+), 4 deletions(-) mode change 100644 => 100755 debian/rules mode change 100644 => 100755 regen.sh diff --git a/INSTALL b/INSTALL index 5924887..27040f5 100644 --- a/INSTALL +++ b/INSTALL @@ -5,7 +5,7 @@ Type: ./regen.sh ./configure --with-afs-libs=/usr/lib/afs --with-afs-headers=/usr/include/afs make - cp mod_waklog.so + cp ./.libs/mod_waklog.so Debian: diff --git a/Makefile.am b/Makefile.am index 01d4142..932b17b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,7 +1,7 @@ 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 @@ -9,7 +9,7 @@ LIB = -L@AFS_LIBS@ -L@KRB5_LIBS@ -L@APACHE_LIBS@ -lkrb5 -lk5crypto \ APXSCC = `${APXS} -q CC` \ @WAKLOG_DEBUG@ \ ${INCLUDES} \ - -DEAPI \ + -DEAPI -fPIC \ -g \ `${APXS} -q CFLAGS` diff --git a/README b/README index dd33453..b74c4e8 100644 --- a/README +++ b/README @@ -96,7 +96,7 @@ being undefined, you may need to add or comment out the above line. ______________________________________________________________________________ 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: diff --git a/configure.in b/configure.in index f84f77c..0ec2ebe 100644 --- a/configure.in +++ b/configure.in @@ -15,6 +15,12 @@ AC_ARG_WITH([afs-headers], [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], diff --git a/debian/rules b/debian/rules old mode 100644 new mode 100755 diff --git a/mod_waklog.c b/mod_waklog.c index 99f1de6..023028b 100644 --- a/mod_waklog.c +++ b/mod_waklog.c @@ -72,6 +72,9 @@ const char *userdata_key = "waklog_init"; #include #include + +#include + #include #include #include diff --git a/regen.sh b/regen.sh old mode 100644 new mode 100755 -- 2.20.1