당신이해야 할 첫 번째 일은 아파치 확장 도구 apxs를 또는 때 apxs2를 찾을 수있다 (아파치 버전 및/또는 플랫폼 당신을 위해 구축에 따라 다름). 도구가 어디에 있는지 알게되면 쿼리를 실행하여 특정 apache 구성 매개 변수를 가져올 수 있습니다. 예를 들어 시스템 구성 디렉토리를 얻을 위해 당신은 실행할 수 있습니다 (이 구문 오류가있을 수 있습니다주의)
dnl Note: AC_DEFUN goes here plus other stuff
AC_MSG_CHECKING(for apache APXS)
AC_ARG_WITH(apxs,
[AS_HELP_STRING([[--with-apxs[=FILE]]],
[path to the apxs, defaults to "apxs".])],
[
if test "$withval" = "yes"; then
APXS=apxs
else
APXS="$withval"
fi
])
if test -z "$APXS"; then
for i in /usr/sbin /usr/local/apache/bin /usr/bin ; do
if test -f "$i/apxs2"; then
APXS="$i/apxs2"
break
fi
if test -f "$i/apxs"; then
APXS="$i/apxs"
break
fi
done
fi
AC_SUBST(APXS)
방법에 : 여기
apxs2 -q SYSCONFDIR
당신이 아파치 확장 도구를 찾을 수있는 방법의 조각입니다 다음과 같이 보일 것이다 당신의 automake는 Makefile.am에서 APXS를 사용
## Find apache sys config dir
APACHE2_SYSCONFDIR = `@[email protected] -q SYSCONFDIR`
## Misc automake stuff goes here
install: install-am
cp my.conf $(DESTDIR)${APACHE2_SYSCONFDIR}/conf.d/my.conf
난 당신이 automake에와 autoconf를 도구에 익숙 가정합니다.
감사합니다. 그게 내가 원하는거야. –