Fix build issues on CentOS master origin/HEAD origin/master
authorRyan Jud Hughes <ryan@linuxbox.com>
Tue, 4 Aug 2009 18:18:58 +0000 (11:18 -0700)
committerAdam Megacz <megacz@hcoop.net>
Tue, 4 Aug 2009 18:18:58 +0000 (11:18 -0700)
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

INSTALL
Makefile.am
README
configure.in
debian/rules [changed mode: 0644->0755]
mod_waklog.c
regen.sh [changed mode: 0644->0755]

diff --git a/INSTALL b/INSTALL
index 5924887..27040f5 100644 (file)
--- 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 <wherever>
+   cp ./.libs/mod_waklog.so <wherever>
 
 Debian:
 
index 01d4142..932b17b 100644 (file)
@@ -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 (file)
--- 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:
 
index f84f77c..0ec2ebe 100644 (file)
@@ -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],
old mode 100644 (file)
new mode 100755 (executable)
index 99f1de6..023028b 100644 (file)
@@ -72,6 +72,9 @@ const char *userdata_key = "waklog_init";
 
 #include <krb5.h>
 #include <stropts.h>
+
+#include <afs/param.h>
+
 #include <afs/venus.h>
 #include <afs/auth.h>
 #include <afs/dirpath.h>
old mode 100644 (file)
new mode 100755 (executable)