I tried to exact an option from php-config using:
php-config --configure-options | sed -n
's|.*--with-config-file-scan-dir=\([^ ]*\).*|\1|p'
It works on shell, and outputs /etc/php5/conf.d/ on opensuse.
And I tired it in configure.ac, as following:
PHPINC=`php-config --includes`
Hello Lyre,
* Lyre wrote on Thu, Feb 10, 2011 at 04:39:41AM CET:
php-config --configure-options | sed -n
's|.*--with-config-file-scan-dir=\([^ ]*\).*|\1|p'
It works on shell, and outputs /etc/php5/conf.d/ on opensuse.
And I tired it in configure.ac, as following:
PHPCDIR=`php-config
On 02/10/2011 12:05 PM, Ralf Wildenhues wrote:
Hello Lyre,
* Lyre wrote on Thu, Feb 10, 2011 at 04:39:41AM CET:
php-config --configure-options | sed -n
's|.*--with-config-file-scan-dir=\([^ ]*\).*|\1|p'
It works on shell, and outputs /etc/php5/conf.d/ on opensuse.
And I tired it in
On 10 Feb 2011, at 10:39, Lyre 417...@gmail.com wrote:
I tried to exact an option from php-config using:
php-config --configure-options | sed -n
's|.*--with-config-file-scan-dir=\([^ ]*\).*|\1|p'
It works on shell, and outputs /etc/php5/conf.d/ on opensuse.
And I tired it in
On 02/09/2011 08:39 PM, Lyre wrote:
I tried to exact an option from php-config using:
php-config --configure-options | sed -n
's|.*--with-config-file-scan-dir=\([^ ]*\).*|\1|p'
It works on shell, and outputs /etc/php5/conf.d/ on opensuse.
And I tired it in configure.ac, as following:
Thanks to peter and Eric.
Yes, the problem is the square backect. It should be \([[^ ]]*\).
After I put it in set -vx/set +vx block, I notice the command exactly
executed was:
php-config --configure-options | sed -n 's|.*--with-config-file-scan-dir=\(^
*\).*|\1|p'
both backet were missing.
On 02/09/2011 09:39 PM, Lyre wrote:
PHPINC=`php-config --includes`
PHPCDIR=`php-config --configure-options | sed -n
's|.*--with-config-file-scan-dir=\([^ ]*\).*|\1|p'`
Probably the [] in your sed expression need extra quoting.
e.g.
\([[^ ]]*\)
You can verify by looking at the generated