AC_ARG_WITH?

2006-01-07 Thread Paulo J. Matos
Hi all, If I want to make my package have an option to enable or disable the use of GMP, should I use AC_ARG_ENABLE or AC_ARG_WITH? If the user wants GMP then I will want to check if GMP is installed and set a config variable so that in the code I can check if the user set GMP. What's the best wa

Re: AC_ARG_WITH?

2006-01-07 Thread Paulo J. Matos
Braden McDaniel <[EMAIL PROTECTED]> wrote: > On Sat, 2006-01-07 at 18:34 +, Paulo J. Matos wrote: > > Hi all, > > > > If I want to make my package have an option to enable or disable the > > use of GMP, should I use AC_ARG_ENABLE or AC_ARG_WITH? > > If

Checking for GCC 4

2006-01-29 Thread Paulo J. Matos
Hi all, How can I make sure user has at least gcc4 installed? Cheers, -- Paulo Jorge Matos - pocm at sat inesc-id pt Web: http://sat.inesc-id.pt/~pocm Computer and Software Engineering INESC-ID - SAT Group ___ Autoconf mailing list Autoconf@gnu.org ht

Re: Checking for GCC 4

2006-01-29 Thread Paulo J. Matos
Ah, ok... I understand what you mean. Thanks. Paulo Matos On 29/01/06, Ralf Corsepius <[EMAIL PROTECTED]> wrote: > On Sun, 2006-01-29 at 12:11 +0000, Paulo J. Matos wrote: > > Hi all, > > > > How can I make sure user has at least gcc4 installed? > What for? >

Setting autotools for static compilation

2006-04-29 Thread Paulo J. Matos
ATT: Cross-sent to automake and autoconf MLs since problem spans both worlds, I think! Hi all, I'm currently using autoconf for the for my libraries with AC_CHECK_LIB, and to generate static binaries I do everytime I configure: ./configure LDFLAGS="-static" However, in google groups: http://gro

Re: Setting autotools for static compilation

2006-04-29 Thread Paulo J. Matos
On 29/04/06, Ralf Wildenhues <[EMAIL PROTECTED]> wrote: Hi Paulo, * Paulo J. Matos wrote on Sat, Apr 29, 2006 at 01:15:47PM CEST: > ATT: Cross-sent to automake and autoconf MLs since problem spans both > worlds, I think! Do you use Libtool? Then it would probably a Libtool q

top_srcdir is incorrect

2006-05-12 Thread Paulo J. Matos
Hi all, I've been having a discussion on a thread in automake, however I think I hit a autoconf problem and not a automake one. Still, it is difficult, at least for me, to draw a line between these tools. I have a software with contains 2 libraries lib1 and lib2, a convenience library liblogger

Re: top_srcdir is incorrect

2006-05-12 Thread Paulo J. Matos
Ralf on the automake mailing list already helped me on this issue. Thanks anyway, Paulo Matos -- Paulo Jorge Matos - pocm at sat inesc-id pt Web: http://sat.inesc-id.pt/~pocm Computer and Software Engineering INESC-ID - SAT Group ___ Autoconf maili

Autoconf disabling shared

2006-05-23 Thread Paulo J. Matos
Hi all, I'm trying to use libtool so that it links all libraries as static so I added to configure.ac: AC_DISABLE_SHARED before AC_PROG_LIBTOOL and I added the libraries (*.la files) I wanted to link in Makefile.am LDADD. but still, it is linking all the librares as shared. Any ideas on what's

Conditional Configuration

2006-05-25 Thread Paulo J. Matos
Hi all, I have defined a feature as follows in configure.ac: AC_ARG_ENABLE([static-modules], AC_HELP_STRING([--enable-static-modules], [link dynamic modules with static linkage (default is NO)]), enable_static_modules=yes, enable_static_modules=no) And I'm doing: if test "${enable_static_module

Re: Conditional Configuration

2006-05-25 Thread Paulo J. Matos
On 25/05/06, Ralf Wildenhues <[EMAIL PROTECTED]> wrote: Hi Paulo, * Paulo J. Matos wrote on Thu, May 25, 2006 at 05:06:29PM CEST: > > I have defined a feature as follows in configure.ac: > AC_ARG_ENABLE([static-modules], > AC_HELP_STRING([--enable-static-modules], [link dyn

Re: Conditional Configuration

2006-05-25 Thread Paulo J. Matos
On 25/05/06, Ralf Wildenhues <[EMAIL PROTECTED]> wrote: Heh. Thanks for noticing and reporting! I'll see whether it's safe to put a fix in Libtool, that certainly looks suboptimal to me. Meanwhile, there's a cheap workaround: if test "${enable_static_modules}" = "no"; then : AC_LIBTOOL_D

Re: Conditional Configuration

2006-05-25 Thread Paulo J. Matos
On 25/05/06, Ralf Wildenhues <[EMAIL PROTECTED]> wrote: * Paulo J. Matos wrote on Thu, May 25, 2006 at 08:02:26PM CEST: > On 25/05/06, Ralf Wildenhues <[EMAIL PROTECTED]> wrote: > > > >if test "${enable_static_modules}" = "no"; then > > : &g

Using config binaries to find libraries and include dirs

2006-05-31 Thread Paulo J. Matos
Hi all, Some libraries include a xxx-config which accepts --libs or --includes and report the flags and the include dirs the compiler should use. How can one use this information in the context of autotools? Is there a way to tell autoconf which config-binary to use to a given lib? Cheers, -- P

Re: Using config binaries to find libraries and include dirs

2006-06-01 Thread Paulo J. Matos
Thank you all for your help. Cheers, -- Paulo Jorge Matos - pocm at sat inesc-id pt Web: http://sat.inesc-id.pt/~pocm Computer and Software Engineering INESC-ID - SAT Group ___ Autoconf mailing list Autoconf@gnu.org http://lists.gnu.org/mailman/listin

libltdlc.la doesn't exist but autoconf adds it

2006-06-05 Thread Paulo J. Matos
Hi all, In my project I'm doing in configure.ac: AC_LIBLTDL_CONVENIENCE AC_LIBLTDL_DLOPEN AC_PROG_LIBTOOL AC_SUBST(LIBLTDL) AC_SUBST(LTDLINCL) and in Makefile.am I'm adding LIBLTDL and LTDLINCL in LDADD and CPPFLAGS respectively. However, LIBLTDL seems to turn out to be ../libltdl/libltdlc.la wh

Re: libltdlc.la doesn't exist but autoconf adds it

2006-06-05 Thread Paulo J. Matos
Got it! Problem with AC_LIBLTDL_CONVENIENCE. Should have had autoreconf after adding this to configure.ac. Paulo Matos On 05/06/06, Paulo J. Matos <[EMAIL PROTECTED]> wrote: Hi all, In my project I'm doing in configure.ac: AC_LIBLTDL_CONVENIENCE AC_LIBLTDL_DLOPEN AC_PROG_LIBTO

CPPUNIT M4

2006-08-01 Thread Paulo J. Matos
Hi all, CPPUNIT provides an m4 macro AM_PATH_CPPUNIT which is in: /usr/share/aclocal/cppunit.m4 Still, when I try to use AM_PATH_CPPUNIT in my configure.ac I get an error. Shouldn't it find cppunit.m4 and use the macro? Or I need to setup autoconf to find the macro? Error: configure.ac:13: erro

Re: CPPUNIT M4

2006-08-01 Thread Paulo J. Matos
On 01/08/06, Familie Porschberg <[EMAIL PROTECTED]> wrote: In our project we have an autogen.sh script and call "aclocal -I config/m4" there. Under config/m4 there are all the m4 macros we are using. Thanks a lot, indeed just calling aclocal did the trick. :-) I seem to finally be entering th

Different types of configure for same program

2006-08-01 Thread Paulo J. Matos
Hi all, Sometimes I wish to call configure with different flags. For example: ./configure CXXFLAGS="-ggdb -Wall -std=c++98" or ./configure CXXFLAGS="-O3 -funroll-loops" --with-gmp or some more like these. Having to be writing these all the time is cumbersome and error-prone since for debugging

Bison configuration is incorrect

2006-10-24 Thread Paulo J. Matos
Hi all, For some unknown reason when I use AC_PROG_YACC, I get when I run configure: checking for bison... byacc -d but: $ make (...) make[2]: Entering directory `/home/pmatos/software/trainer-build/src' byacc -d -d ../../dolphin/trainer/src/foo-parser.yy make[2]: byacc: Command not found make[

Re: Bison configuration is incorrect

2006-10-30 Thread Paulo J. Matos
On 10/24/06, Paulo J. Matos <[EMAIL PROTECTED]> wrote: For some unknown reason when I use AC_PROG_YACC, I get when I run configure: checking for bison... byacc -d The reason is not unknown anymore and it was my fault which copied a bunch of bash configuration to my .bashrc and one

Integrating Code Generator

2006-11-14 Thread Paulo J. Matos
Hello, I'm quite curious how can I with autotools integrate a code generator during the make process. For example: a generator receives as input .gen files and produces .hh files which are then used for compilation. How can I integrate this generator by running the program in all .gen files and t

Re: Defining variable depending on uname output

2008-01-11 Thread Paulo J. Matos
Got it: AM_CONDITIONAL([DARWIN], [test x$uname == xDarwin]) On Jan 11, 2008 5:00 PM, Paulo J. Matos <[EMAIL PROTECTED]> wrote: > Hello all, > > I'm doing this: > AM_CONDITIONAL([DARWIN], ["$(uname)" == "Darwin"]) > > But this is not working, I

Defining variable depending on uname output

2008-01-11 Thread Paulo J. Matos
Hello all, I'm doing this: AM_CONDITIONAL([DARWIN], ["$(uname)" == "Darwin"]) But this is not working, I get: ./configure: line 3797: Linux: command not found In a common make file I would use ifeq($(shell uname), Darwin) ... but with configure.ac I'm quite stuck. Any suggestions? -- Paulo J

Re: Defining variable depending on uname output

2008-01-11 Thread Paulo J. Matos
On Jan 11, 2008 5:16 PM, Ralf Wildenhues <[EMAIL PROTECTED]> wrote: > Hello Paulo, > > * Paulo J. Matos wrote on Fri, Jan 11, 2008 at 06:05:40PM CET: > > Got it: > > AM_CONDITIONAL([DARWIN], [test x$uname == xDarwin]) > > Sure you want to test the build sytem,

Re: Can't open configure

2008-01-28 Thread Paulo J. Matos
On Jan 28, 2008 8:18 PM, Eric Blake <[EMAIL PROTECTED]> wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > According to Paulo J. Matos on 1/28/2008 1:06 PM: > | Hi all, > | > | I never had this issue and I can't understand the problem. I'm getting &

Re: Can't open configure

2008-01-28 Thread Paulo J. Matos
On Jan 28, 2008 9:00 PM, Ralf Wildenhues <[EMAIL PROTECTED]> wrote: > Hello Paulo, > > * Paulo J. Matos wrote on Mon, Jan 28, 2008 at 09:06:23PM CET: > > > > I never had this issue and I can't understand the problem. I'm getting > > the follo

Can't open configure

2008-01-28 Thread Paulo J. Matos
Hi all, I never had this issue and I can't understand the problem. I'm getting the following in a certain project: $ autoreconf /usr/share/aclocal/soup.m4:7: warning: underquoted definition of AM_PATH_SOUP /usr/share/aclocal/soup.m4:7: run info '(automake)Extending aclocal' /usr/share/aclocal/so

Re: Can't open configure

2008-01-28 Thread Paulo J. Matos
After running: $ rm -Rf aclocal.m4 autom4te.cache/ config.h.in config.guess config.log config.status config.sub configure depcomp install-sh libtool libltdl/ ltmain.sh missing $ autoreconf -v -i autoreconf-2.61: Entering directory `.' autoreconf-2.61: configure.ac: not using Gettext autoreconf-2

Re: Can't open configure

2008-01-29 Thread Paulo J. Matos
On Jan 29, 2008 6:54 AM, Ralf Wildenhues <[EMAIL PROTECTED]> wrote: > * Paulo J. Matos wrote on Mon, Jan 28, 2008 at 10:34:30PM CET: > > After running: > > > > $ rm -Rf aclocal.m4 autom4te.cache/ config.h.in config.guess > > config.log config.status config