Skip to content

Commit e3d818c

Browse files
committed
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
1 parent 3f74c69 commit e3d818c

File tree

2 files changed

+23
-5
lines changed

2 files changed

+23
-5
lines changed

configure.ac

+9-2
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,15 @@ AC_CHECK_FUNCS(gss_store_cred_into)
6969
AC_SUBST([GSSAPI_CFLAGS])
7070
AC_SUBST([GSSAPI_LIBS])
7171

72-
CFLAGS="`${APXS} -q CFLAGS` `${APR} --cflags` ${GSSAPI_CFLAGS} ${OPENSSL_CFLAGS} -I`${APXS} -q INCLUDEDIR` -I`${APR} --includes`"
73-
LIBS="`${APR} --libs` ${GSSAPI_LIBS} ${OPENSSL_LIBS}"
72+
MAG_CFLAGS="`${APXS} -q CFLAGS` `${APR} --cflags` ${GSSAPI_CFLAGS} ${OPENSSL_CFLAGS} -I`${APXS} -q INCLUDEDIR` `${APR} --includes`"
73+
MAG_LIBS="`${APR} --libs` ${GSSAPI_LIBS} ${OPENSSL_LIBS}"
74+
LIBTOOL="`${APXS} -q LIBTOOL`"
75+
MAG_LIBDIR="`${APXS} -q libexecdir`"
76+
77+
AC_SUBST([MAG_CFLAGS])
78+
AC_SUBST([MAG_LIBS])
79+
AC_SUBST([LIBTOOL])
80+
AC_SUBST([MAG_LIBDIR])
7481

7582
AC_CONFIG_FILES([Makefile src/Makefile])
7683

src/Makefile.am

+14-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,18 @@
1-
EXTRA_DIST = mod_auth_gssapi.c sessions.c crypto.c mod_auth_gssapi.h sessions.h crypto.h
1+
magdir = $(MAG_LIBDIR)
2+
mag_LTLIBRARIES = \
3+
mod_auth_gssapi.la
24

3-
all-local:
4-
@APXS@ -c ${LIBS} mod_auth_gssapi.c sessions.c crypto.c
5+
dist_noinst_HEADERS = \
6+
mod_auth_gssapi.h crypto.h sessions.h
7+
8+
mod_auth_gssapi_la_SOURCES = \
9+
mod_auth_gssapi.c crypto.c sessions.c
10+
mod_auth_gssapi_la_CFLAGS = \
11+
$(MAG_CFLAGS)
12+
mod_auth_gssapi_la_LDFLAGS = \
13+
$(MAG_LIBS) \
14+
-avoid-version \
15+
-module
516

617
install-exec-local:
718
if test ! -d ${APXS_LIBEXECDIR}; then mkdir -p ${APXS_LIBEXECDIR}; fi

0 commit comments

Comments
 (0)