Simplify configure.ac and makefile.am files
authorSimo Sorce <simo@redhat.com>
Wed, 16 Apr 2014 01:08:52 +0000 (21:08 -0400)
committerSimo Sorce <simo@redhat.com>
Wed, 16 Apr 2014 01:44:49 +0000 (21:44 -0400)
Remove unnecessary cruft, that was only making things harder to read.

configure.ac
src/Makefile.am

index 85c72ae..fe3ce9e 100644 (file)
@@ -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])
             [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`
        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],
       [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])
 
 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
 AC_CONFIG_FILES([Makefile src/Makefile])
 
 AC_OUTPUT
index a725b52..95b85b3 100644 (file)
@@ -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
 
 clean-local:
        rm -f mod_auth_gssapi.slo mod_auth_gssapi.la mod_auth_gssapi.lo .libs