Edit report at https://bugs.php.net/bug.php?id=28960&edit=1
ID: 28960
Comment by: mamfelt at gmail dot com
Reported by: Joerg dot Dieter dot Friedrich at uni-konstanz dot
de
Summary: When INSTALL_ROOT don't use apxs with Option '-a'
Status: Open
Type: Feature/Change Request
Package: Feature/Change Request
Operating System: irrelevant
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
I have been trying to figure out how to get information into Makefile so that
looking at the value of INSTALL_ROOT is determined at 'make install' time.
The following logic is run either at buildconf, or configure time
(does this mean INSTALL_ROOT needs to be defined BEFORE running ./configure??)
because it seems the outoput is always coming from the 'else' block
if test -z `$APXS -q SYSCONFDIR`; then
INSTALL_IT="\$(mkinstalldirs) '$APXS_LIBEXECDIR' && \
$APXS -S LIBEXECDIR='$APXS_LIBEXECDIR' \
-i -n php5"
else
APXS_SYSCONFDIR='$(INSTALL_ROOT)'`$APXS -q SYSCONFDIR`
INSTALL_IT="\$(mkinstalldirs) '$APXS_LIBEXECDIR' && \
\$(mkinstalldirs) '$APXS_SYSCONFDIR' && \
$APXS -S LIBEXECDIR='$APXS_LIBEXECDIR' \
-S SYSCONFDIR='$APXS_SYSCONFDIR' \
-i -a -n php5"
fi
as the -a option is hard coded as the only statement in Makefile
Previous Comments:
------------------------------------------------------------------------
[2004-06-29 16:38:02] Joerg dot Dieter dot Friedrich at uni-konstanz dot de
OK, my patch is obviously wrong.
I'm not really good at autoconf and configure.
my ifeq-test is make-syntax not configure, I thought this will be put into the
Makefile, which is not, and configure fails :-(
please look at it.
------------------------------------------------------------------------
[2004-06-29 15:54:31] Joerg dot Dieter dot Friedrich at uni-konstanz dot de
oops, typo in patch:
--- sapi/apache/config.m4.orig Tue Jun 29 15:44:21 2004
+++ sapi/apache/config.m4 Tue Jun 29 15:52:54 2004
@@ -70,9 +70,16 @@
# Test whether apxs support -S option
$APXS -q -S CFLAGS="$APXS_CFLAGS" CFLAGS >/dev/null 2>&1
+
+ # Test whether INSTALL_ROOT is set
+ ifeq ($(strip $(INSTALL_ROOT)),)
+ APXS_ACTIVATE="-a"
+ else
+ APXS_ACTIVATE=""
+ endif
if test "$?" != "0"; then
- APACHE_INSTALL="$APXS -i -a -n php4 $SAPI_SHARED" # Old apxs does not have
-S option
+ APACHE_INSTALL="$APXS -i $APXS_ACTIVATE -n php4 $SAPI_SHARED" # Old apxs
does not have -S option
else
APXS_LIBEXECDIR='$(INSTALL_ROOT)'`$APXS -q LIBEXECDIR`
if test -z `$APXS -q SYSCONFDIR`; then
@@ -85,7 +92,7 @@
\$(mkinstalldirs) '$APXS_SYSCONFDIR' && \
$APXS -S LIBEXECDIR='$APXS_LIBEXECDIR' \
-S SYSCONFDIR='$APXS_SYSCONFDIR' \
- -i -a -n php4 $SAPI_SHARED"
+ -i $APXS_ACTIVATE -n php4 $SAPI_SHARED"
fi
fi
------------------------------------------------------------------------
[2004-06-29 15:51:28] Joerg dot Dieter dot Friedrich at uni-konstanz dot de
Description:
------------
It would be really great if apxs would not be called with '-a' when
INSTALL_ROOT is set.
This would make package building easier.
this is a patch to sapi/apache/config.m4 which I think it must fix it. But
please proove-read it.
--- sapi/apache/config.m4.orig Tue Jun 29 15:44:21 2004
+++ sapi/apache/config.m4 Tue Jun 29 15:48:26 2004
@@ -70,9 +70,16 @@
# Test whether apxs support -S option
$APXS -q -S CFLAGS="$APXS_CFLAGS" CFLAGS >/dev/null 2>&1
+
+ # Test whether INSTALL_ROOT is set
+ ifeq ($(strip $(INSTALL_ROOT)),)
+ APXS_ACTIVATE="-a"
+ else
+ APXS_ACTIVATE="-a"
+ endif
if test "$?" != "0"; then
- APACHE_INSTALL="$APXS -i -a -n php4 $SAPI_SHARED" # Old apxs does not have
-S option
+ APACHE_INSTALL="$APXS -i $APXS_ACTIVATE -n php4 $SAPI_SHARED" # Old apxs
does not have -S option
else
APXS_LIBEXECDIR='$(INSTALL_ROOT)'`$APXS -q LIBEXECDIR`
if test -z `$APXS -q SYSCONFDIR`; then
@@ -85,7 +92,7 @@
\$(mkinstalldirs) '$APXS_SYSCONFDIR' && \
$APXS -S LIBEXECDIR='$APXS_LIBEXECDIR' \
-S SYSCONFDIR='$APXS_SYSCONFDIR' \
- -i -a -n php4 $SAPI_SHARED"
+ -i $APXS_ACTIVATE -n php4 $SAPI_SHARED"
fi
fi
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=28960&edit=1