Re: problem with ifelse

2009-03-06 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Vincent Torri on 3/6/2009 7:30 AM: > As the value of want_ecore_win32 changes acoording to the host, i think > I'll have to use AS_IF or if / then /else. Which one is better ? AS_IF is nicer if you invoke other autoconf macros within the

Re: problem with ifelse

2009-03-06 Thread Vincent Torri
Here is an example of use: want_ecore_win32="no" ECORE_CHECK_MODULE([Win32], [${want_ecore_win32}], [yes], [ecore_win32_libs="-lole32 -lgdi32"]) Bingo. You are attempting to mix a shell variable ${want_ecore_win32} (expanded at ./configure time) with an m4 argument $2 (expanded at autoconf

Re: problem with ifelse

2009-03-06 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Vincent Torri on 3/5/2009 11:15 PM: > > autoconf -t ECORE_CHECK_MODULE > > Is it the good option ? That will indeed trace the arguments that ECORE_CHECK_MODULE was called with (although in this case, it seems like you wanted the expansi

Re: problem with ifelse

2009-03-05 Thread Vincent Torri
On Thu, 5 Mar 2009, Eric Blake wrote: Most of the m4sugar macros I referred to are quite old. The nice thing about git development is that it is easy to find when something was introduced. For example, m4_toupper was only mentioned in two commit messages: I have looked in the ChangeLog fil

Re: problem with ifelse

2009-03-05 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Vincent Torri on 3/5/2009 8:33 AM: > > Hey, > > thanks for all the typo. Unfortunately, we want to support old versions > of the autotools, so i will have to check that the m4 macro are not too > recent. Most of the m4sugar macros I ref

Re: problem with ifelse

2009-03-05 Thread Vincent Torri
On Thu, 5 Mar 2009, Eric Blake wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Vincent Torri on 3/4/2009 1:34 PM: dnl use: ECORE_CHECK_MODULE(Foo, default-enabled[, dependancy[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]]) AC_DEFUN([ECORE_CHECK_MODULE], [ pushdef([UP], transl

Re: problem with ifelse

2009-03-05 Thread Vincent Torri
Hey, thanks for all the typo. Unfortunately, we want to support old versions of the autotools, so i will have to check that the m4 macro are not too recent. The problem is with ifelse([$2], [no] *) Whatever the 2nd parameter is ("yes" or "no"), it seems that the test always fails. I t

Re: problem with ifelse

2009-03-05 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Vincent Torri on 3/4/2009 1:34 PM: > > dnl use: ECORE_CHECK_MODULE(Foo, default-enabled[, dependancy[, > ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]]) > AC_DEFUN([ECORE_CHECK_MODULE], > [ > pushdef([UP], translit([$1], [a-z], [A-Z]))dnl > pus

problem with ifelse

2009-03-04 Thread Vincent Torri
Hey, I want to write an m4 macro which specify the correct AC_ARG_ENABLE options according to the value ("yes" or "no") of a parameter. Here is the macro: dnl use: ECORE_CHECK_MODULE(Foo, default-enabled[, dependancy[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]]) AC_DEFUN([ECORE_CHECK_MODULE]