Permalink
Browse files

пофиксены ошибки установки в FreBSD

  • Loading branch information...
DmitryChemerik DmitryChemerik
DmitryChemerik authored and DmitryChemerik committed Nov 23, 2010
1 parent cb971c8 commit 4c614583cd27078930ca6b59923c2ce635e2ba52
Showing with 18 additions and 5 deletions.
  1. +0 −3 Makefile.am
  2. +8 −1 configure.in
  3. +10 −1 m4/httpd.m4
View
@@ -12,9 +12,6 @@ dist-hook:
find $(distdir) -type d -name .svn | xargs rm -rf
docdir = $(datadir)/doc/$(PACKAGE)-$(VERSION)
-HTTPD_ROOT = $(shell $(httpd_server) -V |grep HTTPD_ROOT|sed -e 's/"//g'|sed -e 's/=/ /g'|awk '{print $$3}' |sed -e 's/\n//g'|sed -e 's/ //g')
-SERVER_CONFIG_FILE = $(HTTPD_ROOT)/$(shell `/usr/bin/which httpd` -V |grep SERVER_CONFIG_FILE|sed -e 's/"//g'|sed -e 's/=/ /g'|awk '{print $$3}' |sed -e 's/\n//g'|sed -e 's/ //g')
-HTTPD_INCLUDE = $(HTTPD_ROOT)/$(shell grep ^"Include " $(SERVER_CONFIG_FILE) |sed -e 's|/.*$ |/|g'|awk '{print $$2,$$3,$$4}'|sed -e 's, ,,g')
install-data-local:
# $(mkinstalldirs) $(DESTDIR)/$(datadir)/$(distdir)
View
@@ -61,6 +61,10 @@ AC_CHECK_PQ([use_pq_dev])
AC_CHECK_UNIXODBC([use_unixodbc_dev])
AC_CHECK_HTTPD([httpd_server])
AC_SUBST(httpd_server)
+AC_SUBST(HTTPD_ROOT)
+AC_SUBST(SERVER_CONFIG_FILE)
+AC_SUBST(HTTPD_INCLUDE)
+
use_dl_dev="no"
if test "$lt_cv_dlopen" = "dlopen"; then
@@ -92,6 +96,9 @@ eval path_bindir=$path_bindir
eval path_datadir=$datadir
eval path_datadir=$path_datadir
eval httpd_server=$httpd_server
+eval HTTPD_ROOT=$HTTPD_ROOT
+eval SERVER_CONFIG_FILE=$SERVER_CONFIG_FILE
+eval HTTPD_INCLUDE=$HTTPD_INCLUDE
echo ""
echo "Use MySQL API: $use_mysql_dev"
@@ -106,7 +113,7 @@ echo "config file: $path_sysconfdir/sams2.conf"
echo "daemons: $path_bindir"
echo "web interface: $path_datadir/${PACKAGE}"
echo "documentation: $path_datadir/doc/${PACKAGE}-${VERSION}"
-echo "httpd server: $httpd_server"
+
echo ""
echo "Note: If later on, you will use"
echo " make install exec_prefix=/foo"
View
@@ -3,11 +3,20 @@ AC_DEFUN([AC_CHECK_HTTPD],
[
ac_httpd="/usr/sbin/httpd /usr/local/sbin/httpd /usr/sbin/httpd2 /usr/local/sbin/httpd2 /usr/sbin/apache /usr/local/sbin/apache /usr/sbin/apache2 /usr/local/sbin/apache2"
for i in $ac_httpd; do
- if [[ -a $i ]]
+ if test -e $i
then
$1="$i"
HTTPD_SERVER="$i"
fi
done
+HTTPD_ROOT=`$HTTPD_SERVER -V |grep HTTPD_ROOT|sed -e 's/"//g'|sed -e 's/=/ /g'|sed -e 's/-D HTTPD_ROOT//g'|sed -e 's/\n//g'|sed -e 's/ //g'`
+SERVER_CONFIG_FILE=$HTTPD_ROOT/`$HTTPD_SERVER -V |grep SERVER_CONFIG_FILE|sed -e 's/"//g'|sed -e 's/=/ /g'|sed -e 's/-D SERVER_CONFIG_FILE//g'|sed -e 's/\n//g'|sed -e 's/ //g'`
+HTTPD_INCLUDE=$HTTPD_ROOT/`grep ^"Include " $SERVER_CONFIG_FILE |sed -e 's|/.*$ |/|g'|sed -e 's/Include//g'|sed -e 's, ,,g'| sed -e 's/[[^\/]]*$//g'`
+
+if [[ "$HTTPD_INCLUDE" = "$HTTPD_ROOT/" ]]
+then
+ HTTPD_INCLUDE=`echo $SERVER_CONFIG_FILE |sed -e 's/\/httpd.conf//g'`
+fi
+
])

0 comments on commit 4c61458

Please sign in to comment.