summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimo Sorce <simo@redhat.com>2014-09-11 17:01:26 -0400
committerSimo Sorce <simo@redhat.com>2014-09-11 17:01:26 -0400
commite3d818c06bf103a6121e3f3198d70e60b60cd454 (patch)
treef45bb68c04c549bbc495231c5b06f70ce1b5ce81
parent3f74c69e8b1b47584818dfc44a64d69ecaabb0eb (diff)
Change the modules build process
USe automake directives to directly invoke the apxs favored libtool, and use APXS only to perform the final install. Fixes #4
-rw-r--r--configure.ac11
-rw-r--r--src/Makefile.am17
2 files changed, 23 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac
index e20a83a..b709373 100644
--- a/configure.ac
+++ b/configure.ac
@@ -69,8 +69,15 @@ AC_CHECK_FUNCS(gss_store_cred_into)
AC_SUBST([GSSAPI_CFLAGS])
AC_SUBST([GSSAPI_LIBS])
-CFLAGS="`${APXS} -q CFLAGS` `${APR} --cflags` ${GSSAPI_CFLAGS} ${OPENSSL_CFLAGS} -I`${APXS} -q INCLUDEDIR` -I`${APR} --includes`"
-LIBS="`${APR} --libs` ${GSSAPI_LIBS} ${OPENSSL_LIBS}"
+MAG_CFLAGS="`${APXS} -q CFLAGS` `${APR} --cflags` ${GSSAPI_CFLAGS} ${OPENSSL_CFLAGS} -I`${APXS} -q INCLUDEDIR` `${APR} --includes`"
+MAG_LIBS="`${APR} --libs` ${GSSAPI_LIBS} ${OPENSSL_LIBS}"
+LIBTOOL="`${APXS} -q LIBTOOL`"
+MAG_LIBDIR="`${APXS} -q libexecdir`"
+
+AC_SUBST([MAG_CFLAGS])
+AC_SUBST([MAG_LIBS])
+AC_SUBST([LIBTOOL])
+AC_SUBST([MAG_LIBDIR])
AC_CONFIG_FILES([Makefile src/Makefile])
diff --git a/src/Makefile.am b/src/Makefile.am
index 9fac277..01a1220 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,7 +1,18 @@
-EXTRA_DIST = mod_auth_gssapi.c sessions.c crypto.c mod_auth_gssapi.h sessions.h crypto.h
+magdir = $(MAG_LIBDIR)
+mag_LTLIBRARIES = \
+ mod_auth_gssapi.la
-all-local:
- @APXS@ -c ${LIBS} mod_auth_gssapi.c sessions.c crypto.c
+dist_noinst_HEADERS = \
+ mod_auth_gssapi.h crypto.h sessions.h
+
+mod_auth_gssapi_la_SOURCES = \
+ mod_auth_gssapi.c crypto.c sessions.c
+mod_auth_gssapi_la_CFLAGS = \
+ $(MAG_CFLAGS)
+mod_auth_gssapi_la_LDFLAGS = \
+ $(MAG_LIBS) \
+ -avoid-version \
+ -module
install-exec-local:
if test ! -d ${APXS_LIBEXECDIR}; then mkdir -p ${APXS_LIBEXECDIR}; fi