[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Use pipe and sed in configure.ac
From: |
Lyre |
Subject: |
Use pipe and sed in configure.ac |
Date: |
Thu, 10 Feb 2011 11:39:41 +0800 |
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`
PHPCDIR=`php-config --configure-options | sed -n
's|.*--with-config-file-scan-dir=\([^ ]*\).*|\1|p'`
AC_SUBST([PHPINC])
AC_SUBST([PHPCDIR])
After subsitution in Makefile, the PHPCDIR is empty, meanwhile PHPINC get
the correct result.
What' the correct way to use it?
- Use pipe and sed in configure.ac,
Lyre <=