tony2001                                 Wed, 02 Dec 2009 17:20:25 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=291597

Log:
various configure & build improvements

Changed paths:
    U   php/php-src/branches/PHP_5_3_FPM/sapi/fpm/Makefile.frag
    U   php/php-src/branches/PHP_5_3_FPM/sapi/fpm/config.m4

Modified: php/php-src/branches/PHP_5_3_FPM/sapi/fpm/Makefile.frag
===================================================================
--- php/php-src/branches/PHP_5_3_FPM/sapi/fpm/Makefile.frag     2009-12-02 
16:51:48 UTC (rev 291596)
+++ php/php-src/branches/PHP_5_3_FPM/sapi/fpm/Makefile.frag     2009-12-02 
17:20:25 UTC (rev 291597)
@@ -1,2 +1,47 @@
+fpm: $(SAPI_FPM_PATH)
+
 $(SAPI_FPM_PATH): $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS) $(SAPI_EXTRA_DEPS)
        $(BUILD_FPM)
+
+install: install-fpm
+
+install-fpm: all
+       @echo "Installing PHP FPM binary:        
$(INSTALL_ROOT)$(php_fpm_bin_path)"
+       @$(mkinstalldirs) $(INSTALL_ROOT)$(php_fpm_bin_dir)
+       @$(mkinstalldirs) $(INSTALL_ROOT)$(php_fpm_pid_dir)
+       @$(mkinstalldirs) $(INSTALL_ROOT)$(php_fpm_log_dir)
+       @$(INSTALL) -m 0755 $(SAPI_FPM_PATH) 
$(INSTALL_ROOT)$(php_fpm_bin_path)$(program_suffix)$(EXEEXT)
+
+       @test "$(php_fpm_conf)" && \
+       echo "Installing PHP FPM config:        
$(INSTALL_ROOT)$(php_fpm_conf_path)" && \
+       $(mkinstalldirs) $(INSTALL_ROOT)$(php_fpm_conf_dir) || :
+
+       @test "$(php_fpm_conf)" && \
+       test -f "$(INSTALL_ROOT)$(php_fpm_conf_path)" && \
+       $(INSTALL_DATA) --backup=numbered $(INSTALL_ROOT)$(php_fpm_conf_path) 
$(INSTALL_ROOT)$(php_fpm_conf_path).old || :
+
+       @test "$(php_fpm_conf)" && \
+       $(INSTALL_DATA) sapi/fpm/conf/php-fpm.conf 
$(INSTALL_ROOT)$(php_fpm_conf_path).default && \
+       ln -sf $(INSTALL_ROOT)$(php_fpm_conf_path).default 
$(INSTALL_ROOT)$(php_fpm_conf_path) || :
+
+       @echo "Installing PHP FPM man page:      
$(INSTALL_ROOT)$(mandir)/man1/$(php_fpm_bin)$(program_suffix).1"
+       @$(mkinstalldirs) $(INSTALL_ROOT)$(mandir)/man1
+       @$(INSTALL_DATA) sapi/fpm/$(php_fpm_bin).1 
$(INSTALL_ROOT)$(mandir)/man1/$(php_fpm_bin)$(program_suffix).1
+
+       @test -d /etc/nginx/ && \
+       echo "Installing NGINX sample config:   
/etc/nginx/nginx-site-conf.sample" && \
+       $(mkinstalldirs) $(INSTALL_ROOT)/etc/nginx && \
+       $(INSTALL_DATA) -b sapi/fpm/nginx-site-conf.sample 
$(INSTALL_ROOT)/etc/nginx/nginx-site-conf.sample || :
+
+       @test -d /usr/local/etc/nginx/ && \
+       echo "Installing NGINX sample config:   
/usr/local/etc/nginx/nginx-site-conf.sample" && \
+       $(mkinstalldirs) $(INSTALL_ROOT)/usr/local/etc/nginx && \
+       $(INSTALL_DATA) -b sapi/fpm/nginx-site-conf.sample 
$(INSTALL_ROOT)/usr/local/etc/nginx/nginx-site-conf.sample || :
+
+       @test -d /usr/local/nginx/conf/ && \
+       echo "Installing NGINX sample config:   
/usr/local/nginx/conf/nginx-site-conf.sample" && \
+       $(mkinstalldirs) $(INSTALL_ROOT)/usr/local/nginx/conf && \
+       $(INSTALL_DATA) -b sapi/fpm/nginx-site-conf.sample 
$(INSTALL_ROOT)/usr/local/nginx/conf/nginx-site-conf.sample || :
+
+       @echo "" || :
+

Modified: php/php-src/branches/PHP_5_3_FPM/sapi/fpm/config.m4
===================================================================
--- php/php-src/branches/PHP_5_3_FPM/sapi/fpm/config.m4 2009-12-02 16:51:48 UTC 
(rev 291596)
+++ php/php-src/branches/PHP_5_3_FPM/sapi/fpm/config.m4 2009-12-02 17:20:25 UTC 
(rev 291597)
@@ -510,16 +510,16 @@
 AC_DEFUN([AC_FPM_ARGS],
 [
   PHP_ARG_WITH(fpm-bin,,
-  [  --with-fpm-bin[=PATH]   Set the path for php-fpm binary. (default: 
/usr/local/bin/php-fpm)], /usr/local/bin/php-fpm, no)
+  [  --with-fpm-bin[=PATH]   Set the path for php-fpm binary. (default: 
\$bindir/php-fpm)], yes, no)

   PHP_ARG_WITH(fpm-conf,,
-  [  --with-fpm-conf[=PATH]  Set the path for php-fpm configuration file. 
(default: /etc/php-fpm.conf)], /etc/php-fpm.conf, no)
+  [  --with-fpm-conf[=PATH]  Set the path for php-fpm configuration file. 
(default: \$sysconfdir/php-fpm.conf)], yes, no)

   PHP_ARG_WITH(fpm-log,,
-  [  --with-fpm-log[=PATH]   Set the path for php-fpm log file. (default: 
/var/log/php-fpm.log)], /var/log/php-fpm.log, no)
+  [  --with-fpm-log[=PATH]   Set the path for php-fpm log file. (default: 
/var/log/php-fpm.log)], yes, no)

   PHP_ARG_WITH(fpm-pid,,
-  [  --with-fpm-pid[=PATH]   Set the path for php-fpm pid file. (default: 
/var/run/php-fpm.pid)], /var/run/php-fpm.pid, no)
+  [  --with-fpm-pid[=PATH]   Set the path for php-fpm pid file. (default: 
/var/run/php-fpm.pid)], yes, no)

   PHP_ARG_WITH(fpm-user,,
   [  --with-fpm-user[=USER]  Set the user for php-fpm to run as. (default: 
nobody)], nobody, no)
@@ -531,39 +531,51 @@

 AC_DEFUN([AC_FPM_VARS],
 [
-  if test -z "$PHP_FPM_BIN" -o "$with_fpm_bin" = "yes" -o "$with_fpm_bin" = 
"no"; then
-    php_fpm_bin_path="$fpm_prefix/bin/php-fpm"
+  if test -z "$PHP_FPM_BIN" -o "$PHP_FPM_BIN" = "yes" -o "$PHP_FPM_BIN" = 
"no"; then
+    php_fpm_bin_path="$bindir/php-fpm"
   else
     php_fpm_bin_path="$PHP_FPM_BIN"
   fi
+  php_fpm_bin_dir=`dirname $php_fpm_bin_path`
   php_fpm_bin=`basename $php_fpm_bin_path`

-  if test -z "$PHP_FPM_CONF" -o "$with_fpm_conf" = "yes" -o "$with_fpm_conf" = 
"no"; then
-    php_fpm_conf_path="/etc/php-fpm.conf"
+ if test -z "$PHP_FPM_CONF" -o "$PHP_FPM_CONF" = "yes"; then
+    php_fpm_conf_path="$sysconfdir/php-fpm.conf"
+  elif test "$PHP_FPM_CONF" = "no"; then
+    php_fpm_conf_path=""
   else
     php_fpm_conf_path="$PHP_FPM_CONF"
   fi
-  php_fpm_conf=`basename $php_fpm_conf_path`

-  if test -z "$PHP_FPM_LOG" -o "$with_fpm_log" = "yes" -o "$with_fpm_log" = 
"no"; then
+  if test -z "$php_fpm_conf_path"; then
+    php_fpm_conf=""
+    php_fpm_conf_dir=""
+  else
+    php_fpm_conf=`basename $php_fpm_conf_path`
+    php_fpm_conf_dir=`dirname $php_fpm_conf_path`
+  fi
+
+  if test -z "$PHP_FPM_LOG" -o "$PHP_FPM_LOG" = "yes" -o "$PHP_FPM_LOG" = 
"no"; then
     php_fpm_log_path="/var/log/php-fpm.log"
   else
     php_fpm_log_path="$PHP_FPM_LOG"
   fi
+  php_fpm_log_dir=`dirname $php_fpm_log_path`

-  if test -z "$PHP_FPM_PID" -o "$with_fpm_pid" = "yes" -o "$with_fpm_pid" = 
"no"; then
+  if test -z "$PHP_FPM_PID" -o "$PHP_FPM_PID" = "yes" -o "$PHP_FPM_PID" = 
"no"; then
     php_fpm_pid_path="/var/run/php-fpm.pid"
   else
     php_fpm_pid_path="$PHP_FPM_PID"
   fi
+  php_fpm_pid_dir=`dirname $php_fpm_pid_path`

-  if test -z "$PHP_FPM_USER" -o "$with_fpm_user" = "yes" -o "$with_fpm_user" = 
"no"; then
+  if test -z "$PHP_FPM_USER" -o "$PHP_FPM_USER" = "yes" -o "$PHP_FPM_USER" = 
"no"; then
     php_fpm_user="nobody"
   else
     php_fpm_user="$PHP_FPM_USER"
   fi

-  if test -z "$PHP_FPM_GROUP" -o "$with_fpm_group" = "yes" -o 
"$with_fpm_group" = "no"; then
+  if test -z "$PHP_FPM_GROUP" -o "$PHP_FPM_GROUP" = "yes" -o "$PHP_FPM_GROUP" 
= "no"; then
     php_fpm_group="nobody"
   else
     php_fpm_group="$PHP_FPM_GROUP"
@@ -573,9 +585,14 @@
   PHP_SUBST_OLD(fpm_version)
   PHP_SUBST_OLD(php_fpm_bin)
   PHP_SUBST_OLD(php_fpm_bin_path)
+  PHP_SUBST_OLD(php_fpm_conf)
   PHP_SUBST_OLD(php_fpm_conf_path)
   PHP_SUBST_OLD(php_fpm_log_path)
   PHP_SUBST_OLD(php_fpm_pid_path)
+  PHP_SUBST_OLD(php_fpm_bin_dir)
+  PHP_SUBST_OLD(php_fpm_conf_dir)
+  PHP_SUBST_OLD(php_fpm_log_dir)
+  PHP_SUBST_OLD(php_fpm_pid_dir)
   PHP_SUBST_OLD(php_fpm_user)
   PHP_SUBST_OLD(php_fpm_group)

@@ -650,8 +667,8 @@

   SAPI_EXTRA_LIBS="$LIBEVENT_LIBS"
   PHP_SUBST(SAPI_EXTRA_LIBS)
-
-  INSTALL_IT="@echo \"Installing PHP FPM binary:        
\$(INSTALL_ROOT)\$(bindir)/\"; \$(INSTALL) -m 0755 \$(SAPI_FPM_PATH) 
\$(INSTALL_ROOT)\$(bindir)/\$(program_prefix)php-fpm\$(program_suffix)\$(EXEEXT);
 echo \"Installing PHP FPM man page:      \$(INSTALL_ROOT)\$(mandir)/man1/\"; 
\$(mkinstalldirs) \$(INSTALL_ROOT)\$(mandir)/man1; \$(INSTALL_DATA) 
\$(builddir)/sapi/fpm/php-fpm.1 
\$(INSTALL_ROOT)\$(mandir)/man1/\$(program_prefix)php-fpm\$(program_suffix).1"
+
+  INSTALL_IT=":"
   PHP_SELECT_SAPI(fpm, program, $PHP_FPM_FILES $PHP_FPM_TRACE_FILES, 
$PHP_FPM_CFLAGS, '$(SAPI_FPM_PATH)')

   case $host_alias in

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to