There are a whole load of patches floating around for mod_waklog. I think
this was also an issue on RHEL6, certainly I have a patch for the
Makefile.am and configure.in files (attached) which seems to be along these
lines.


Stephen


On 11 December 2014 at 20:46, Randy Philipp <ra...@umbc.edu> wrote:
>
> I am having some issues with compiling mod_waklog with openafs-1.6.10 on
> a RHEL 7 64 bit machine. I am using the latest git version, and I am
> getting the following error:
>
> apxs -c -L/usr/lib/afs -L/usr/lib/ -L/usr/lib/ -lkrb5 -lk5crypto
> -lafsauthent -lafsrpc -lkopenafs mod_waklog.o lifetime.o version.o
> /usr/lib64/apr-1/build/libtool --silent --mode=link gcc -std=gnu99
> -Wl,-z,relro,-z,now   -o mod_waklog.la  -L/usr/lib/afs -L/usr/lib/
> -L/usr/lib/ -lkrb5 -lk5crypto -lafsauthent -lafsrpc -lkopenafs -rpath
> /usr/lib64/httpd/modules -module -avoid-version    mod_waklog.o
> lifetime.o version.o
>
> *** Warning: Linking the shared library mod_waklog.la against the
> non-libtool
> *** objects  mod_waklog.o lifetime.o version.o is not portable!
>
> Anyone have any information on resolving this issue? Any help would be
> appreciated.
>
> --
> -------------------
> Randy Philipp
> ra...@umbc.edu
>
> _______________________________________________
> OpenAFS-devel mailing list
> OpenAFS-devel@openafs.org
> https://lists.openafs.org/mailman/listinfo/openafs-devel
>
diff --git a/Makefile.am b/Makefile.am
index 932b17b..cb0d6d0 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,31 +1,35 @@
 all: mod_waklog.so
 
+# APXS
 APXS = @APXS@
-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  \
+# KRB5
+KRB5_CONFIG = @KRB5_CONFIG@
+KRB5_CFLAGS = `${KRB5_CONFIG} --cflags`
+KRB5_LIBS = `${KRB5_CONFIG} --libs krb5` 
+
+INCLUDES = -I@AFS_INC@ -I@APACHE_INC@ -I@APR_INC@
+LIB = -L@AFS_LIBS@ -lkrb5 -lk5crypto  \
        -lprot -lauth -lresolv -lubik -lrxkad -lsys -lrx -llwp -ldes \
        -lcom_err -lafsutil
 
-APXSCC = `${APXS} -q CC` \
-         @WAKLOG_DEBUG@ \
-         ${INCLUDES} \
-         -DEAPI -fPIC \
-         -g \
-         `${APXS} -q CFLAGS`
+APXSCFLAGS = ${KRB5_CFLAGS} ${KRB5_LIBS} \
+             @WAKLOG_DEBUG@ \
+             ${INCLUDES} \
+             -DEAPI -fPIC \
+             -g 
 
 VERSION: mod_waklog.c
 	date '+SVN_%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
+mod_waklog.so: VERSION
+	${APXS} -c -o mod_waklog.so ${APXSCCFLAG} ${LIB} ${INCLUDES} \
+        -DVERSION="\\\"`cat VERSION`\\\"" \
+        mod_waklog.c lifetime.c version.c
+	cp -f .libs/mod_waklog.so .
 
+# .lo, .slo, .la created as a result of APXS using libtool
+# .libs is a libtool thing...
 clean:
-	rm -f *.o *.so
+	rm -f *.o *.so *.lo *.slo *.la
+	rm -rf .libs
 	rm -f mod_waklog.so
diff --git a/configure.in b/configure.in
index 0ec2ebe..004881b 100644
--- a/configure.in
+++ b/configure.in
@@ -3,6 +3,8 @@ AM_INIT_AUTOMAKE(mod_waklog_so,1.0)
 AC_PROG_CC
 AC_PROG_INSTALL
 
+AC_CHECK_HEADERS([stropts.h])
+
 AC_ARG_WITH([afs-libs],
             [AC_HELP_STRING([--with-afs-libs],[path to afs libraries])],
             [AFS_LIBS=$withval],
@@ -21,36 +23,28 @@ AC_ARG_WITH([apr-headers],
             [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],
-            [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([krb5-config],
+            [AC_HELP_STRING([--with-krb5-config],[path to krb5-config])],
+            [KRB5_CONFIG=$withval],
+            [KRB5_CONFIG=krb5-config])
+AC_PATH_PROG(KRB5_CONFIG,krb5-config,no)
+AC_SUBST(KRB5_CONFIG)
+
+if test "x$KRB5_CONFIG" = "xno" && ! test -f ${KRB5_CONFIG}; then
+	AC_MSG_ERROR(apxs not found)
+fi
 
 AC_ARG_WITH([apxs],
             [AC_HELP_STRING([--with-apxs],[path to apxs])],
             [APXS=$withval],
             [APXS=apxs])
+AC_PATH_PROG(APXS,apxs,no)
 AC_SUBST(APXS)
 
+if test "x$APXS" = "xno" && ! test -f ${APXS}; then
+	AC_MSG_ERROR(apxs not found)
+fi
+
 AC_ARG_ENABLE(debug,
  [  --enable-debug uncomment this if you want an insane amount of debug information
  ],

Reply via email to