Browse files

Get apxs and perl's config vars in configure

  • Loading branch information...
1 parent 5fc2eef commit f3f60413e50150837acde5eaa1f629dbed1b4570 @spiritloose committed Oct 13, 2009
Showing with 15 additions and 6 deletions.
  1. +6 −6 Makefile.in
  2. +9 −0 configure.ac
View
12 Makefile.in
@@ -8,19 +8,19 @@ PERL=@PERL@
TESTS=t
builddir=.
-installbuilddir=$(shell $(APXS) -q installbuilddir)
-top_srcdir=$(shell dirname $(installbuilddir))
-top_builddir=$(top_srcdir)
-include $(installbuilddir)/special.mk
+installbuilddir=@AP_INSTALLBUILDDIR@
+top_srcdir=@AP_TOP_SRCDIR@
+top_builddir=@AP_TOP_BUILDDIR@
+include @AP_INSTALLBUILDDIR@/special.mk
ifdef MOD_PSGI_DEBUG
DEBUG_DEFS=-DDEBUG
else
DEBUG_DEFS=
endif
DEFS=-DMOD_PSGI_VERSION=\"$(PACKAGE_VERSION)\" $(DEBUG_DEFS)
-INCLUDES=$(shell $(PERL) -MExtUtils::Embed -e ccopts)
-LDFLAGS=$(shell $(PERL) -MExtUtils::Embed -e ldopts)
+INCLUDES=@PERL_CCOPTS@
+LDFLAGS=@PERL_LDOPTS@
all: local-shared-build
View
9 configure.ac
@@ -11,6 +11,11 @@ if test "$APXS" = no; then
fi
AC_SUBST(APXS)
+AP_INSTALLBUILDDIR=`$APXS -q installbuilddir`
+AP_TOP_BUILDDIR=`dirname $AP_INSTALLBUILDDIR`
+AP_TOP_SRCDIR=$AP_TOP_SRCDIR
+AC_SUBST([AP_INSTALLBUILDDIR AP_TOP_BUILDDIR AP_TOP_SRCDIR])
+
AC_ARG_WITH(apachectl, AC_HELP_STRING([--with-apctl=NAME],
[name of the apachectl executable [[apachectl]]]),
[APACHECTL="$with_apctl"])
@@ -33,6 +38,10 @@ if test "$PERL" = no; then
fi
AC_SUBST(PERL)
+PERL_CCOPTS=`$PERL -MExtUtils::Embed -e ccopts`
+PERL_LDOPTS=`$PERL -MExtUtils::Embed -e ldopts`
+AC_SUBST([PERL_CCOPTS PERL_LDOPTS])
+
AC_OUTPUT([Makefile t/Config.pm])
echo "

0 comments on commit f3f6041

Please sign in to comment.