Re: Mixing C and C++?

2008-06-06 Thread Ralf Wildenhues
Hi Erik, * Erik de Castro Lopo wrote on Fri, Jun 06, 2008 at 11:25:45AM CEST: I have an project that uses automake, autoconf and libtool and for one of the generated binaries, I'm trying to mix C and C++, but automake is giving me the following error: tests/Makefile.am: object

Re: Mixing C and C++?

2008-06-06 Thread Erik de Castro Lopo
Ralf Wildenhues wrote: Please post a small example package that exposes this, or, if that's too much work, the configure.ac and tests/Makefile.am files; and state which program versions you use. Trying to set up a test showed up an even bigger problem. I'm using: automake (GNU automake)

Re: Mixing C and C++?

2008-06-06 Thread Ralf Wildenhues
* Erik de Castro Lopo wrote on Fri, Jun 06, 2008 at 01:49:15PM CEST: http://www.mega-nerd.com/tmp/amtest-0.1.tar.gz gcc -g -O2 -o amtest amtest.o amtest.o: In function `main': /tmp/amtest-0.1/amtest.c:10: undefined reference to `cpp_test' For some reason, the automake

install-exec-hook question

2008-06-06 Thread Maynard Johnson
Hi, I have a need to run some post-install commands that may print a message that the user must see (so it must be near the end of the output). I was hoping that adding the install-exec-hook in my Makefile.am was the answer. However, when I run 'make install', what I see is something like this:

Re: Mixing C and C++?

2008-06-06 Thread Olly Betts
On 2008-06-06, Erik de Castro Lopo [EMAIL PROTECTED] wrote: Ralf Wildenhues wrote: amtest_SOURCES = cpp.cc amtest.c amtest.h Ah, that fixed that problem. The test project now works as it should. Getting back to real project I managed to fix that as well, but I not sure what I was doing

A global _CFLAGS assigment?

2008-06-06 Thread Steven Woody
Hi, My project tree have many Makefile.am in a recursive directory tree and I want every Makefile.am has a line some thing like xxx_CFLAGS = -Wall. What's the way to do that? You see, there are many different xxx_ in different Makefile.am. Thanks. - narke

Re: A global _CFLAGS assigment?

2008-06-06 Thread Ralf Wildenhues
Hello Steven, * Steven Woody wrote on Fri, Jun 06, 2008 at 06:17:30PM CEST: My project tree have many Makefile.am in a recursive directory tree and I want every Makefile.am has a line some thing like xxx_CFLAGS = -Wall. What's the way to do that? You see, there are many different xxx_ in

How to define a `prefix' other than the default vaule?

2008-06-06 Thread Steven Woody
Hi, I want all my stuff by default installed in /usr/local/mypkg unless user specified another 'preflex' value when run 'configure' script. How can I? Thank you. - narke

Re: How to define a `prefix' other than the default vaule?

2008-06-06 Thread John Calcote
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Steven Woody wrote: Hi, I want all my stuff by default installed in /usr/local/mypkg unless user specified another 'preflex' value when run 'configure' script. How can I? Thank you. Try AC_PREFIX_DEFAULT([/usr/local/mypkg]) in your

Re: How to define a `prefix' other than the default vaule?

2008-06-06 Thread Ralf Wildenhues
* Steven Woody wrote on Fri, Jun 06, 2008 at 06:22:40PM CEST: I want all my stuff by default installed in /usr/local/mypkg unless user specified another 'preflex' value when run 'configure' script. How can I? Thank you.

Re: A global _CFLAGS assigment?

2008-06-06 Thread Steven Woody
On Sat, Jun 7, 2008 at 12:22 AM, Ralf Wildenhues [EMAIL PROTECTED] wrote: Hello Steven, * Steven Woody wrote on Fri, Jun 06, 2008 at 06:17:30PM CEST: My project tree have many Makefile.am in a recursive directory tree and I want every Makefile.am has a line some thing like xxx_CFLAGS =

Re: How to define a `prefix' other than the default vaule?

2008-06-06 Thread Steven Woody
On Sat, Jun 7, 2008 at 12:30 AM, John Calcote [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Steven Woody wrote: Hi, I want all my stuff by default installed in /usr/local/mypkg unless user specified another 'preflex' value when run 'configure' script. How can I?

Re: A global _CFLAGS assigment?

2008-06-06 Thread Ralf Wildenhues
* Steven Woody wrote on Fri, Jun 06, 2008 at 06:44:46PM CEST: On Sat, Jun 7, 2008 at 12:22 AM, Ralf Wildenhues [EMAIL PROTECTED] wrote: (you can also AC_SUBST([AM_CFLAGS], [...]) from within configure.ac) The big problem may be, the AM_CFLAGS will disappear if in a Makefile.am, there is a

Re: install-exec-hook question

2008-06-06 Thread Ralf Wildenhues
* Maynard Johnson wrote on Wed, Jun 04, 2008 at 08:21:37PM CEST: I have a need to run some post-install commands that may print a message that the user must see (so it must be near the end of the output). You have a graph of Makefile.am vertices connected by directed edges, SUBDIRS entries.

Re: A global _CFLAGS assigment?

2008-06-06 Thread Steven Woody
On Sat, Jun 7, 2008 at 1:23 AM, Ralf Wildenhues [EMAIL PROTECTED] wrote: * Steven Woody wrote on Fri, Jun 06, 2008 at 06:44:46PM CEST: On Sat, Jun 7, 2008 at 12:22 AM, Ralf Wildenhues [EMAIL PROTECTED] wrote: (you can also AC_SUBST([AM_CFLAGS], [...]) from within configure.ac) The big

Why I can not overwrite CXXFLAGS values?

2008-06-06 Thread Steven Woody
In my system, the default CXXFLAGS is '-g -O2'. But, for a particular program, I need -O0 and without -g. I tried something like: bin_PROGRAS = xxx xxx_CXXFLAGS = -O0 in Makefile.am. But, the final CXXFLAGS used when I compile is actually -O0 -g -O2, the default CXXFLAGS appended to my

How can I change shared library's version number?

2008-06-06 Thread Steven Woody
When I use autoconf/automake with its integrated libtool to build a shared library, I got shared libraray named 'libfoo.so.0.0.0'. I don't sure where the 0.0.0 comes from, and I don't like it. How can I change it? I searched info page but found no answer. Thanks in advance. - narke

Re: How can I change shared library's version number?

2008-06-06 Thread Andreas Schwab
Steven Woody [EMAIL PROTECTED] writes: When I use autoconf/automake with its integrated libtool to build a shared library, I got shared libraray named 'libfoo.so.0.0.0'. I don't sure where the 0.0.0 comes from, and I don't like it. How can I change it? I searched info page but found no

Re: Mixing C and C++?

2008-06-06 Thread Erik de Castro Lopo
Olly Betts wrote: You'd written test_sources = ... which has no special meaning to automake. You should have written amtest_SOURCES = In the absence of amtest_SOURCES, automake implicitly assumes amtest_SOURCES = amtest.c. Yes, thats what I'd done in the small test project I had

Re: Mixing C and C++?

2008-06-06 Thread Ralf Wildenhues
* Erik de Castro Lopo wrote on Sat, Jun 07, 2008 at 12:13:36AM CEST: Organization: Erik Conspiracy Secret Labs LOL! It's been several years since I last read about the Eric conspiracy. Olly Betts wrote: You'd written test_sources = ... which has no special meaning to automake. You

Re: Mixing C and C++?

2008-06-06 Thread Erik de Castro Lopo
Ralf Wildenhues wrote: Hmm, can you relate the main project to us? Have you tried automake -Wall? Its my main project libsndfile. I fixed it somehow and can't remember how to get it back into the state where I reported the bug. Sorry :-) Cheers, Erik --