Use pipe and sed in configure.ac

2011-02-10 Thread Lyre
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`

AC_SUBST(CCLD)

2011-02-10 Thread Too, Justin A.
Hi, I am using Autotools (Autoconf, Automake, Libtools): Currently, I have CCLD set to $(CC). Using AC_SUBST, all Makefile's will contain this variable. Config: CC=gcc CCLD=$(CC) AC_SUBST(CCLD) Generated Makefiles: CCLD = gcc The problem, however, is that I use different compilers for certain

AC_SUBST(CCLD)

2011-02-10 Thread Too, Justin A.
Hi, I am using Autotools (Autoconf, Automake, Libtools): Currently, I have CCLD set to $(CC). Using AC_SUBST, all Makefile's will contain this variable. Config: CC=gcc CCLD=$(CC) AC_SUBST(CCLD) Generated Makefiles: CCLD = gcc The problem, however, is that I use different compilers for certain

Re: Paralizing configure

2011-02-10 Thread Olaf Lenz
Hi! On 02/09/2011 04:29 AM, Bob Friesenhahn wrote: There are quite a lot of things to address before something exotic like parallelization is considered. I must say I disagree with most of your points. Frankly, I do not really understand the fuzz about configure running for a few tens of

Re: Paralizing configure

2011-02-10 Thread Bob Friesenhahn
On Wed, 9 Feb 2011, Olaf Lenz wrote: On 02/09/2011 04:29 AM, Bob Friesenhahn wrote: There are quite a lot of things to address before something exotic like parallelization is considered. I must say I disagree with most of your points. Good! Frankly, I do not really understand the fuzz

Detect Cross Compiler

2011-02-10 Thread Too, Justin A.
Hi, As a whole, my project is not being cross-compiled, but there is a test that uses a user-specified compiler on some test code and then runs the generated executable. The problem is that the user may specify to cross-compile this test code, in which case the executable should NOT be run.

Re: Use pipe and sed in configure.ac

2011-02-10 Thread Ralf Wildenhues
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

Re: Paralizing configure

2011-02-10 Thread Ralf Wildenhues
Hi Olaf, all, * Olaf Lenz wrote on Wed, Feb 09, 2011 at 03:54:31PM CET: Frankly, I do not really understand the fuzz about configure running for a few tens of seconds. After all, you usually have to do it only once if you are a user. If you are a developer, you have to run it only whenever a

Re: Use pipe and sed in configure.ac

2011-02-10 Thread Eric Blake
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

What shells fail to work if comparing with ?

2011-02-10 Thread Dr. David Kirkby
I know its considered bad practice to check for an empty string with something like: if [ $STR = ] ; then but what shells do actually break with this, and under what conditions? I was proposing someone change a test like that to if [ x$STR = ] ; then but someone has argued against this,

Re: Use pipe and sed in configure.ac

2011-02-10 Thread Gary V. Vaughan
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

aclocal not looking into /usr/local/

2011-02-10 Thread Hans Aberg
[I am not on this list, so please cc me.] On Mac OS X 10.6.6, I have: $ /usr/bin/autoconf --version autoconf (GNU Autoconf) 2.61 This comes with the system. $ /usr/local/bin/autoconf --version autoconf (GNU Autoconf) 2.68 The latter was installed by ./configure make. When running the

Re: What shells fail to work if comparing with ?

2011-02-10 Thread Eric Blake
On 02/10/2011 11:56 AM, Dr. David Kirkby wrote: I know its considered bad practice to check for an empty string with something like: if [ $STR = ] ; then but what shells do actually break with this, and under what conditions? At least Solaris /bin/sh mishandles particular $STR: $

Re: Use pipe and sed in configure.ac

2011-02-10 Thread Eric Blake
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:

Re: Use pipe and sed in configure.ac

2011-02-10 Thread Lyre
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.

Re: Use pipe and sed in configure.ac

2011-02-10 Thread Peter O'Gorman
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

Re: Paralizing configure

2011-02-10 Thread Ralf Wildenhues
* Marian Marinov wrote on Wed, Feb 09, 2011 at 01:38:16AM CET: On Tuesday 08 February 2011 22:51:20 Paul Eggert wrote: Oh yes, I quite agree, it would require a real change to the Autoconf implementation, and people who write tests would have to be disciplined about their dependencies.

Re: What shells fail to work if comparing with ?

2011-02-10 Thread Ralf Wildenhues
Hello David, * Dr. David Kirkby wrote on Thu, Feb 10, 2011 at 07:56:24PM CET: I know its considered bad practice to check for an empty string with something like: if [ $STR = ] ; then but what shells do actually break with this, and under what conditions? It's not shells that break.

Re: What shells fail to work if comparing with ?

2011-02-10 Thread Stefano Lattarini
On Thursday 10 February 2011, Dr David wrote: I know its considered bad practice to check for an empty string with something like: if [ $STR = ] ; then but what shells do actually break with this, and under what conditions? Solaris 10 /bin/sh breaks with [ $var != ] for some (very

Re: aclocal not looking into /usr/local/

2011-02-10 Thread Eric Blake
On 02/09/2011 03:46 PM, Hans Aberg wrote: [I am not on this list, so please cc me.] On Mac OS X 10.6.6, I have: $ /usr/bin/autoconf --version autoconf (GNU Autoconf) 2.61 This comes with the system. $ /usr/local/bin/autoconf --version autoconf (GNU Autoconf) 2.68 The latter was

Re: What shells fail to work if comparing with ?

2011-02-10 Thread David Kirkby
On 10 February 2011 18:56, Dr. David Kirkby david.kir...@onetel.net wrote: I know its considered bad practice to check for an empty string with something like: if [ $STR = ] ; then but what shells do actually break with this, and under what conditions? I was proposing someone change a

AM_COND_IF with m4_foreach+m4_include

2011-02-10 Thread Dave Goodell
I'm extremely confused about some behavior I recently encountered while adding AM_CONDITIONAL and AM_COND_IF to my project. For some reason m4/autoconf don't want to expand AM_COND_IF when I use it in a particular fashion. Here's my configure.in: 8 AC_INIT([foo],[1.0])

Re: AM_COND_IF with m4_foreach+m4_include

2011-02-10 Thread Eric Blake
On 02/10/2011 02:02 PM, Dave Goodell wrote: m4_foreach([subsys_i],[[subconfigure]],[m4_include(subsys_i[.m4])]) So you are indirectly including a file whose name is not immediately apparent in the parent file... #end AC_OUTPUT([Makefile]) 8 and here's subconfigure.m4: 8

Re: What shells fail to work if comparing with ?

2011-02-10 Thread Eric Blake
On 02/10/2011 12:40 PM, Ralf Wildenhues wrote: Hello David, * Dr. David Kirkby wrote on Thu, Feb 10, 2011 at 07:56:24PM CET: I know its considered bad practice to check for an empty string with something like: if [ $STR = ] ; then but what shells do actually break with this, and under

Re: aclocal not looking into /usr/local/

2011-02-10 Thread Hans Aberg
On 10 Feb 2011, at 20:56, Eric Blake wrote: On Mac OS X 10.6.6, I have: $ /usr/bin/autoconf --version autoconf (GNU Autoconf) 2.61 This comes with the system. $ /usr/local/bin/autoconf --version autoconf (GNU Autoconf) 2.68 The latter was installed by ./configure make. However, that

Re: AM_COND_IF with m4_foreach+m4_include

2011-02-10 Thread Ralf Wildenhues
Hello Dave, * Dave Goodell wrote on Thu, Feb 10, 2011 at 10:02:12PM CET: I'm extremely confused about some behavior I recently encountered while adding AM_CONDITIONAL and AM_COND_IF to my project. For some reason m4/autoconf don't want to expand AM_COND_IF when I use it in a particular

Re: AM_COND_IF with m4_foreach+m4_include

2011-02-10 Thread Dave Goodell
On Feb 10, 2011, at 3:27 PM CST, Ralf Wildenhues wrote: * Dave Goodell wrote on Thu, Feb 10, 2011 at 10:02:12PM CET: autoreconf: running: /Users/goodell/prefix/bin/autoconf --force configure.in:8: error: possibly undefined macro: AM_COND_IF If this token and others are legitimate,

Re: Update GTK+ autotools configuration

2011-02-10 Thread Javier Jardón
2011/2/7 Ralf Wildenhues ralf.wildenh...@gmx.de: Hello Javier, * Javier Jardón wrote on Sun, Feb 06, 2011 at 03:37:24AM CET: I'm trying to update the GTK+ autotools configuration [1] (comments welcomed ;)). The patches posted there look sane to me, at a glance.  The semantic change to use

Re: What shells fail to work if comparing with ?

2011-02-10 Thread Bob Friesenhahn
On Thu, 10 Feb 2011, Stefano Lattarini wrote: but someone has argued against this, saying he knows of no shell where the former is not acceptable. I realise this issue is probably more of a problem with older shells, Solaris 10 /bin/sh is not really old. I do see the issues you mention

configure.ac vs configure.in

2011-02-10 Thread Reuben Hawkins
Hi, Which version introduced configure.ac? Is configure.in deprecated? If so, was it deprecated in the same version that introduced configure.ac? Thanks in advance, Reu ___ Autoconf mailing list Autoconf@gnu.org

Re: configure.ac vs configure.in

2011-02-10 Thread Ralf Corsepius
On 02/11/2011 07:23 AM, Reuben Hawkins wrote: Hi, Which version introduced configure.ac? It was gradually introduced during the autoconf-2.49/2.50 phase, ca. 10 years ago. Is configure.in deprecated? De-facto yes. The official nomenclature being used is configure.ac is preferred. If so,