From 122e879f09cd94d791e0f32141544dacc96bb135 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Tue, 15 Apr 2014 21:08:52 -0400 Subject: [PATCH] Simplify configure.ac and makefile.am files Remove unnecessary cruft, that was only making things harder to read. --- configure.ac | 21 ++++----------------- src/Makefile.am | 26 +++++--------------------- 2 files changed, 9 insertions(+), 38 deletions(-) diff --git a/configure.ac b/configure.ac index 85c72ae..fe3ce9e 100644 --- a/configure.ac +++ b/configure.ac @@ -31,24 +31,8 @@ AC_ARG_WITH([apxs], [AC_PATH_PROGS(APXS, [apxs2 apxs])]) AS_IF([test "x${APXS}" != "x" -a -x "${APXS}"], [AC_MSG_NOTICE([apxs found at $APXS]) - APXS_CPPFLAGS=`${APXS} -q CFLAGS` - AC_SUBST(APXS_CPPFLAGS) - APXS_LDFLAGS=`${APXS} -q LDFLAGS_SHLIB` - AC_SUBST(APXS_LDFLAGS) - APXS_LIBS=`${APXS} -q LIBS_SHLIB` - AC_SUBST(APXS_LIBS) - APXS_INCLUDES=-I`${APXS} -q INCLUDEDIR` - AC_SUBST(APXS_INCLUDES) - APXS_CPPFLAGS_SHLIB=`${APXS} -q CFLAGS_SHLIB` - AC_SUBST(APXS_CPPFLAGS_SHLIB) - APXS_LD_SHLIB=`${APXS} -q LD_SHLIB` - AC_SUBST(APXS_LD_SHLIB) APXS_LIBEXECDIR=`${APXS} -q LIBEXECDIR` - AC_SUBST(APXS_LIBEXECDIR) - APXS_SYSCONFDIR=`${APXS} -q SYSCONFDIR` - AC_SUBST(APXS_SYSCONFDIR) - APXS_PREFIX=`${APXS} -q PREFIX` - AC_SUBST(APXS_PREFIX)], + AC_SUBST(APXS_LIBEXECDIR)], [AC_MSG_FAILURE(["apxs not found. Use --with-apxs"])]) AC_ARG_WITH([apr], @@ -81,6 +65,9 @@ AC_CHECK_FUNCS(gss_store_cred_into) AC_SUBST([GSSAPI_CFLAGS]) AC_SUBST([GSSAPI_LIBS]) +CFLAGS="`${APXS} -q CFLAGS` `${APR} --cflags` ${GSSAPI_CFLAGS} -I`${APXS} -q INCLUDEDIR` -I`${APR} --includes`" +LIBS="`${APR} --link-libtool --libs` ${GSSAPI_LIBS}" + AC_CONFIG_FILES([Makefile src/Makefile]) AC_OUTPUT diff --git a/src/Makefile.am b/src/Makefile.am index a725b52..95b85b3 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,25 +1,9 @@ -MAG_CFLAGS = @APR_CPPFLAGS@ @APXS_CPPFLAGS@ @APXS_CPPFLAGS_SHLIB@ -MAG_INCLUDES = @INCLTDL@ @APR_INCLUDES@ @APXS_INCLUDES@ -MAG_LIBS = @LIBLTDL@ @APR_LDFLAGS@ @APXS_LDFLAGS@ @APXS_LIBS@ @APXS_LD_SHLIB@ -MAG_LIBEXECDIR = @APXS_LIBEXECDIR@ +all-local: + @APXS@ -c ${LIBS} ${CFLAGS} mod_auth_gssapi.c -if HAVE_GCC - MAG_CFLAGS += -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith \ - -Wcast-qual -Wcast-align -Wwrite-strings \ - -Werror-implicit-function-declaration \ - -fno-strict-aliasing -endif - -lib_LTLIBRARIES = mod_auth_gssapi.la - -mod_auth_gssapi_la_LDFLAGS = -module - -mod_auth_gssapi.la: mod_auth_gssapi.c - @APXS@ -c ${LIBS} -Wc,"${MAG_CFLAGS} ${MAG_INCLUDES}" -Wl,"${MAG_LIBS}" mod_auth_gssapi.c - -install: mod_auth_gssapi.la - if test ! -d ${MAG_LIBEXECDIR}; then mkdir -p ${MAG_LIBEXECDIR}; fi - @APXS@ -i -S LIBEXECDIR=${MAG_LIBEXECDIR} mod_auth_gssapi.la +install-exec-local: + if test ! -d ${APXS_LIBEXECDIR}; then mkdir -p ${APXS_LIBEXECDIR}; fi + @APXS@ -i -S LIBEXECDIR=${APXS_LIBEXECDIR} mod_auth_gssapi.la clean-local: rm -f mod_auth_gssapi.slo mod_auth_gssapi.la mod_auth_gssapi.lo .libs -- 2.1.4