diff --git a/Makefile.global b/Makefile.global index ce47c8d712a..40f1c5d771d 100644 --- a/Makefile.global +++ b/Makefile.global @@ -16,15 +16,15 @@ build-modules: $(PHP_MODULES) libphp5.la: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS) $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -rpath $(phptempdir) $(EXTRA_LDFLAGS) $(LDFLAGS) $(PHP_RPATHS) $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@ + -@$(LIBTOOL) --silent --mode=install cp libphp5.la $(phptempdir)/libphp5.la >/dev/null 2>&1 libs/libphp5.bundle: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS) $(CC) $(MH_BUNDLE_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(PHP_GLOBAL_OBJS:.lo=.o) $(PHP_SAPI_OBJS:.lo=.o) $(PHP_FRAMEWORKS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@ && cp $@ libs/libphp5.so install: $(all_targets) $(install_targets) -install-sapi: libphp5.la +install-sapi: $(OVERALL_TARGET) @echo "Installing PHP SAPI module" - -@$(LIBTOOL) --silent --mode=install cp libphp5.la $(phptempdir)/libphp5.la >/dev/null 2>&1 -@$(mkinstalldirs) $(INSTALL_ROOT)$(bindir) -@if test ! -r $(phptempdir)/libphp5.$(SHLIB_SUFFIX_NAME); then \ for i in 0.0.0 0.0 0; do \ diff --git a/configure.in b/configure.in index e462fd59238..c6ff569b351 100644 --- a/configure.in +++ b/configure.in @@ -1125,22 +1125,10 @@ INLINE_CFLAGS="$INLINE_CFLAGS $standard_libtool_flag" CXXFLAGS="$CXXFLAGS $standard_libtool_flag" all_targets='$(OVERALL_TARGET) $(PHP_MODULES) $(PHP_CLI_TARGET)' -install_targets="install-modules $install_pear install-build install-headers install-programs" - -case $PHP_SAPI in - cgi) - dnl Install CGI only (CLI is not installed even if it's enabled) - install_targets="install-cgi $install_targets" - ;; - cli) - dnl Install CLI only (--disable-cgi used, no other SAPIs enabled) - install_targets="install-cli $install_targets" - ;; - *) - dnl Install CLI and another SAPI - install_targets="$PHP_INSTALL_CLI_TARGET install-sapi $install_targets" - ;; -esac +install_targets="install-sapi install-modules $install_pear install-build install-headers install-programs" +if test "$PHP_SAPI" != "cgi"; then + install_targets="$PHP_INSTALL_CLI_TARGET $install_targets" +fi PHP_SUBST(all_targets) PHP_SUBST(install_targets) diff --git a/sapi/cgi/Makefile.frag b/sapi/cgi/Makefile.frag index 02398ae8b3c..57a3b2937c0 100644 --- a/sapi/cgi/Makefile.frag +++ b/sapi/cgi/Makefile.frag @@ -1,6 +1,2 @@ $(SAPI_CGI_PATH): $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS) $(BUILD_CGI) - -install-cgi: $(SAPI_CGI_PATH) - @echo "Installing PHP CGI binary: $(INSTALL_ROOT)$(bindir)/" - @$(INSTALL_CGI) diff --git a/sapi/cgi/config9.m4 b/sapi/cgi/config9.m4 index f594e7035b6..c6c5e665dd9 100644 --- a/sapi/cgi/config9.m4 +++ b/sapi/cgi/config9.m4 @@ -147,6 +147,7 @@ if test "$PHP_SAPI" = "default"; then AC_DEFINE_UNQUOTED(PHP_FCGI_STATIC, $PHP_FCGI_STATIC, [ ]) AC_MSG_RESULT($PHP_ENABLE_FASTCGI) + INSTALL_IT="\$(INSTALL) -m 0755 \$(SAPI_CGI_PATH) \$(INSTALL_ROOT)\$(bindir)/php" PHP_SELECT_SAPI(cgi, program, $PHP_FCGI_FILES cgi_main.c getopt.c, $PHP_FCGI_INCLUDE, '$(SAPI_CGI_PATH)') case $host_alias in @@ -157,10 +158,8 @@ if test "$PHP_SAPI" = "default"; then BUILD_CGI="\$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS) \$(LDFLAGS) \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_SAPI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CGI_PATH)" ;; esac - INSTALL_CGI="\$(mkinstalldirs) \$(INSTALL_ROOT)\$(bindir); \$(INSTALL) -m 0755 \$(SAPI_CGI_PATH) \$(INSTALL_ROOT)\$(bindir)/php" PHP_SUBST(BUILD_CGI) - PHP_SUBST(INSTALL_CGI) elif test "$PHP_SAPI_CLI" != "no"; then AC_MSG_RESULT(no)