autoconfization
authormegacz <megacz@0d961d1b-a432-0410-8fea-cc29f225fe07>
Wed, 13 Jun 2007 21:52:04 +0000 (21:52 +0000)
committermegacz <megacz@0d961d1b-a432-0410-8fea-cc29f225fe07>
Wed, 13 Jun 2007 21:52:04 +0000 (21:52 +0000)
git-svn-id: https://modwaklog.svn.sourceforge.net/svnroot/modwaklog/trunk/modwaklog@38 0d961d1b-a432-0410-8fea-cc29f225fe07

INSTALL [new file with mode: 0644]
Makefile [deleted file]
Makefile.am [new file with mode: 0644]
VERSION
configure.in [new file with mode: 0644]
mod_waklog.c
regen.sh [new file with mode: 0644]

diff --git a/INSTALL b/INSTALL
new file mode 100644 (file)
index 0000000..1df39a4
--- /dev/null
+++ b/INSTALL
@@ -0,0 +1,10 @@
+Installation Instructions
+
+Type:
+
+   ./regen.sh
+   ./configure --with-afs-libs=/usr/lib/afs --with-afs-headers=/usr/include/afs
+   make
+   cp mod_waklog.so <wherever>
+
+
diff --git a/Makefile b/Makefile
deleted file mode 100644 (file)
index 10411ac..0000000
--- a/Makefile
+++ /dev/null
@@ -1,32 +0,0 @@
-ALL=   mod_waklog.so
-
-APXS=  /usr/sbin/apxs
-CC=    gcc
-
-INC=    -I/usr/local/mit-k5/include \
-        -I/usr/include \
-       -I/usr/include/apr-0
-
-LIB=    -L/usr/local/mit-k5/lib \
-       -lkrb5 -lk5crypto -lcom_err \
-       -L/usr/lib/afs -lsys -lrx -llwp -lauth -lafsutil -lresolv 
-
-CFLAGS=        ${DEF} ${INC} -DEAPI -g
-OBJ=   mod_waklog.o lifetime.o version.o
-
-all:   ${ALL}
-
-version.o : version.c
-       date +%Y%m%d > VERSION
-       ${CC} ${CFLAGS} \
-           -DVERSION=\"`cat VERSION`\" \
-           -c version.c
-
-mod_waklog.so:  ${OBJ}
-       ${APXS} -c ${LIB} ${OBJ}
-       mv  .libs/${ALL} .
-
-clean:
-       rm -f *.o *.so a.out core 
-       rm -f ${ALL}
-       rm -rf .libs
diff --git a/Makefile.am b/Makefile.am
new file mode 100644 (file)
index 0000000..bc9c755
--- /dev/null
@@ -0,0 +1,31 @@
+all: mod_waklog.so
+
+APXS = @APXS@
+INCLUDES = -I@KRB5_INC@ -I@AFS_INC@ -I@APACHE_INC@
+LIB = -L@KRB5_LIBS@ -lkrb5 -lk5crypto -L@AFS_LIBS@ -L@APACHE_LIBS@ \
+       -lprot -lauth -lresolv -lubik -lrxkad -lrx -lsys -llwp -ldes \
+       -lcom_err -L@AFS_LIBS@ -lafsutil
+
+APXSCC = `${APXS} -q CC` \
+         @WAKLOG_DEBUG@ \
+         ${INCLUDES} \
+         -DEAPI \
+         -g \
+         `${APXS} -q CFLAGS`
+
+VERSION: mod_waklog.c
+       date '+UMBC_%Y%m%d' > VERSION
+
+version.o: version.c mod_waklog.c VERSION
+       ${APXSCC} \
+           -DVERSION=\"`cat VERSION`\" \
+           -c version.c
+
+%.o: %.c
+       ${APXSCC} -c $< -o $@
+mod_waklog.so: mod_waklog.o lifetime.o version.o
+       ${APXS} -c ${LIB} mod_waklog.o lifetime.o version.o
+
+clean:
+       rm -f *.o *.so
+       rm -f mod_waklog.so
diff --git a/VERSION b/VERSION
index 3afbb68..1af3c47 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-20061130
+UMBC_20070613
diff --git a/configure.in b/configure.in
new file mode 100644 (file)
index 0000000..b467136
--- /dev/null
@@ -0,0 +1,56 @@
+AC_INIT(mod_waklog.c)
+AM_INIT_AUTOMAKE(mod_waklog_so,1.0)
+AC_PROG_CC
+AC_PROG_INSTALL
+AC_PATH_PROGS(APXS, apxs)
+
+AC_ARG_WITH([afs-libs],
+            [AC_HELP_STRING([--with-afs-libs],[path to afs libraries])],
+            [AFS_LIBS=$withval],
+            [AFS_LIBS=/usr/lib/afs])
+AC_SUBST(AFS_LIBS)
+
+AC_ARG_WITH([afs-headers],
+            [AC_HELP_STRING([--with-afs-headers],[path to afs headers])],
+            [AFS_INC=$withval],
+            [AFS_INC=/usr/include/afs])
+AC_SUBST(AFS_INC)
+
+AC_ARG_WITH([krb5-libs],
+            [AC_HELP_STRING([--with-krb5-libs],[path to krb5 libraries])],
+            [KRB5_LIBS=$withval],
+            [KRB5_LIBS=/usr/lib/])
+AC_SUBST(KRB5_LIBS)
+
+AC_ARG_WITH([krb5-headers],
+            [AC_HELP_STRING([--with-krb5-headers],[path to krb5 headers])],
+            [KRB5_INC=$withval],
+            [KRB5_INC=/usr/include/])
+AC_SUBST(KRB5_INC)
+
+AC_ARG_WITH([apache-libs],
+            [AC_HELP_STRING([--with-apache-libs],[path to apache libraries])],
+            [APACHE_LIBS=$withval],
+            [APACHE_LIBS=/usr/lib/])
+AC_SUBST(APACHE_LIBS)
+
+AC_ARG_WITH([apache-headers],
+            [AC_HELP_STRING([--with-apache-headers],[path to apache headers])],
+            [APACHE_INC=$withval],
+            [APACHE_INC=/usr/include/apache-1.3])
+AC_SUBST(APACHE_INC)
+
+AC_ARG_WITH([apxs],
+            [AC_HELP_STRING([--with-apxs],[path to apxs])],
+            [APXS=$withval],
+            [APXS=apxs])
+AC_SUBST(APXS)
+
+AC_ARG_ENABLE(debug,
+ [  --enable-debug uncomment this if you want an insane amount of debug information
+ ],
+ [ WAKLOG_DEBUG=-DWAKLOG_DEBUG
+ ])
+AC_SUBST(WAKLOG_DEBUG)
+
+AC_OUTPUT(Makefile)
index a5eba8c..fefca54 100644 (file)
@@ -537,8 +537,10 @@ waklog_child_routine( void *s, child_info *pinfo )
                 "mod_waklog: waklog_child_routine called as root" );
 
        /* this was causing the credential file to get owned by root */
+#ifdef STANDARD20_MODULE_STUFF
        setgid(ap_group_id);
        setuid(ap_user_id);
+#endif
     }
 
     while( 1 ) {
diff --git a/regen.sh b/regen.sh
new file mode 100644 (file)
index 0000000..0e5fd2f
--- /dev/null
+++ b/regen.sh
@@ -0,0 +1,7 @@
+#!/bin/sh -e
+touch aclocal.m4
+touch INSTALL NEWS AUTHORS ChangeLog COPYING
+aclocal
+autoconf
+automake -a
+automake
\ No newline at end of file