Re: detecting automake version
On Tue, 2002-01-01 at 23:58, Tom Tromey wrote: > >>>>> "Murray" == Murray Cumming <[EMAIL PROTECTED]> writes: > > I didn't see a response to this. > > Murray> I'm trying to make a package work with both automake 1.4 and > Murray> automake 1.5. I think that I could do this with some > Murray> conditionals in the Makefile.am files. > > Murray> So is there a macro that I can put in configure.in to detect > Murray> the automake version number? > > There isn't a pre-canned one. Somehow we managed to get gtkmm working for both versions of automake without doing this anyway. -- Murray Cumming [EMAIL PROTECTED] www.murrayc.com
detecting automake version
I'm trying to make a package work with both automake 1.4 and automake 1.5. I think that I could do this with some conditionals in the Makefile.am files. So is there a macro that I can put in configure.in to detect the automake version number? -- Murray Cumming [EMAIL PROTECTED] www.murrayc.com
Re: Alternative to configure substitution in _SOURCES
On Tue, 2001-10-09 at 13:15, Murray Cumming wrote: > With automake 1.5, when I use a configure variable in the list of > sources in a Makefile.am here: > http://cvs.gnome.org/lxr/source/gtkmm-root/gtk-build/Makefile.am#32 > > I get this error: > > gtk/gtkmm/Makefile.am:32: libgtkmm_la_SOURCES includes configure > substitution `@GTKMM_H_FILES@ > > and the list of files is not added to libgtkmm_la_SOURCES. > > However, we need to use the same list of sources in several Makefile.am > files, and we would like to generate that list automatically based on > file extensions. So what is the best way to do this? I decided to manually list the files in an automake fragment that's included with the new automake include feature. That seems like a pretty good solution. -- Murray Cumming [EMAIL PROTECTED] www.murrayc.com
Alternative to configure substitution in _SOURCES
With automake 1.5, when I use a configure variable in the list of sources in a Makefile.am here: http://cvs.gnome.org/lxr/source/gtkmm-root/gtk-build/Makefile.am#32 I get this error: gtk/gtkmm/Makefile.am:32: libgtkmm_la_SOURCES includes configure substitution `@GTKMM_H_FILES@ and the list of files is not added to libgtkmm_la_SOURCES. However, we need to use the same list of sources in several Makefile.am files, and we would like to generate that list automatically based on file extensions. So what is the best way to do this? -- Murray Cumming [EMAIL PROTECTED] www.murrayc.com
Replacement for AC_CONFIG_HEADERS?
When I use AC_CONFIG_HEADERS in configure.in like this: AC_CONFIG_HEADERS(glib/glibmmconfig.h gdk/gdkmmconfig.h gtk/gtkmmconfig.h) I get this error from automake 1.5 configure.in: 53: `automake requires `AM_CONFIG_HEADER', not `AC_CONFIG_HEADER' But there doesn't seem to eb a AC_CONFIG_HEADERS, so what should I use? -- Murray Cumming [EMAIL PROTECTED] www.murrayc.com
Re: [Combining libraries in subdirectories into one library]
Tim Heath <[EMAIL PROTECTED]> wrote: > I need to understand better the way to combine libraries in > subdirectories into one library at the top_srcdir. Does anyone know of > an example that does this with static libraries I could look at? I > created the static libraries myself so I don't beleive there is any m4 > macros for them to use in configure.in. If the page on my site does not explain this well enough then I would welcome a suggestion about something that should be improved. The downloadable example on the 'Building C/C++ libraries...' page combines libtool libraries from sub directories. The example on the 'Using autoconf and automake...' page combines static libraries from sub directories into an executable. It should take much more work to combine static libraries into one static library. Although, I believe that there is some way that a libtool library can be used to generate a static library. Murray Cumming [EMAIL PROTECTED] www.murrayc.com +44 7971 226563 Get free email and a permanent address at http://www.netaddress.com/?N=1
RE: Combining subdirectories into one library
Time Heath wrote: > Can someone give me an example of how to combine the object files from > a deep project into one library with automake.am's? http://www.murrayc.com/learning/linux/building_libraries/building_libraries. shtml
Newbie docs about libraries
I just put 2 newbie-orientated docs on my site, about building and using libraries with automake and autoconf. I would welcome anybody's input and corrections. http://www.murrayc.com/learning/linux/building_libraries/building_libraries.shtml http://www.murrayc.com/learning/linux/using_libraries/using_libraries.shtml Murray Cumming [EMAIL PROTECTED] www.murrayc.com +44 7971 226563 Get free email and a permanent address at http://www.netaddress.com/?N=1
Re: [Re: Solaris: Finds library at build-time, not at run-time.]
"Thomas E. Dickey" <[EMAIL PROTECTED]> wrote: > see the -R option of ld. Many thanks. That fixed it. Murray Cumming [EMAIL PROTECTED] www.murrayc.com +44 7971 226563 Get free email and a permanent address at http://www.netaddress.com/?N=1
Solaris: Finds library at build-time, not at run-time.
I apologise for this being slightly off-topic, but there's no list for the binutils, and I'm a stranger to Solaris. I have a program foo which uses library libbar. libbar is a shared library built using automake/autoconf with the LTLIBRARIES variables. libbar is installed and foo links to it when it builds. So far so good. But when I try to run the foo program I get the following error: ld.so.1: ./foo: fatal: libbar-0.1.so.1: open failed: No such file or directory killed Here's the thing: This works fine on Linux. I only get the error on Solaris 7. I have all the latest GNU tools installed, and I'm installing the library in usr/local. I am not setting LD_LIBRARY_PATH, and I use the -L/usr/local/lib argument when linking the library to the program. Solaris 7 has no ld.so.conf file. Murray Cumming [EMAIL PROTECTED] www.murrayc.com +44 7971 226563 Get free email and a permanent address at http://www.netaddress.com/?N=1
Antwort: Re: Telling aclocal about prefix/share/aclocal/something.m4
Murray> However, if the share/aclocal/something.m4 is installed in Murray> under a --prefix which is not where aclocal is installed, how Murray> should I (or the user) tell aclocal to look in this second Murray> directory as well as it's normal share/aclocal/ directory? Tom Tromey wrote: > aclocal -I /the/directory Of course. I was worrying about when the user runs configure, but, of couse, at that time all the macros have been copied to the project. Murray Cumming [EMAIL PROTECTED] www.murrayc.com Roaming Mobile: +44 7971 226563 German Mobile: 0174 4792588
Telling aclocal about prefix/share/aclocal/something.m4
I generally install an AM_PATH_SOMETHING and a something-config script, so that the user can use it to set CFLAGS and LIBS in his own configure.in. However, if the share/aclocal/something.m4 is installed in under a --prefix which is not where aclocal is installed, how should I (or the user) tell aclocal to look in this second directory as well as it's normal share/aclocal/ directory? Murray Cumming [EMAIL PROTECTED] www.murrayc.com
Re: [Re: Shared library with source in sub directories]
Murray Cumming wrote: >> I'm trying to use automake/autoconf to build a shared library whose source >> code is neatly organised sub directories (about 5 levels wide and 5 levels >> deep). >> >> If this was an application then I would build static libraries in each of the >> subfolders and link them all together at the top. But when I do something like >> this: >> >> libfoo_la_LDADD = exceptions/libexceptions.la factories/libfactories.la > > libtool complains that the .la libraries are not libtool objects. I could >> build libtool libraries in the sub directories instead of static libraries, ?> but then I'd have to install each of those temporary libraries. That would be >> stupid. >> >> So, how should I use automake to build a shared library if the source is in >> sub directories? Paul Berrevoets <[EMAIL PROTECTED]> wrote: > You create what are called 'convenience' libraries in libtool. > In exceptions/Makefile.am: > noinst_LTLIBRARIES = libexceptions.la > ... > Convenience libraries are not installed, and the object they contain will be > included in the higher level ltlibrary that LDADD's them. I've got that working now. But here's a couple of important details for the record: 1) This doesn't work recursively. For instance, if sub contains, subsub, which contains subsusbsub, then the library at sub will contain subsub but not subsubsub. Therefore you have to LIBADD all the libraries in the top makefile. 2) noinst libraries with the same names in different directories will conflict, leading to multiple definitions of one of them. So you should probably name each noinst library according to its complete path. e.g. libsub_subsub_subsubsub.la. Is there any news on a timeline for the prophesied version of automake that properly handles sources in sub directories? Murray Cumming [EMAIL PROTECTED] www.murrayc.com +44 7971 226563 Get free email and a permanent address at http://www.netaddress.com/?N=1
Re: [Re: Shared library with source in sub directories]
Murray Cumming wrote: >> libfoo_la_LDADD = exceptions/libexceptions.la factories/libfactories.la <> libtool complains that the .la libraries are not libtool >> objects. Tom Tromey <[EMAIL PROTECTED]> > This seems like it should work. > Maybe it is a libtool problem of some kind? > I'd like to add an example of this working to the automake manual. Sorry, I meant that libfoo_la_LDADD = exceptions/libexceptions.a factories/libfactories.a doesn't work. Notice the .a instead of the .la. Apparently I should do with this with a noinst_LTLIBRARIES, so you do need to correct the bit in the automake manual that says that it isn't allowed. Murray Cumming [EMAIL PROTECTED] www.murrayc.com +44 7971 226563 Get free email and a permanent address at http://www.netaddress.com/?N=1
Re: [Re: Shared library with source in sub directories]
Paul Berrevoets <[EMAIL PROTECTED]> wrote: > You create what are called 'convenience' libraries in libtool. > In exceptions/Makefile.am: > noinst_LTLIBRARIES = libexceptions.la > ... > Convenience libraries are not installed, and the object they contain will be > included in the higher level ltlibrary that LDADD's them. Thanks. I'll try this. I didn't do it before because the automake manual explicitly states that noinst_LTLIBRARIES is not allowed. I guess that's wrong. Murray Cumming [EMAIL PROTECTED] www.murrayc.com +44 7971 226563 Get free email and a permanent address at http://www.netaddress.com/?N=1
Shared library with source in sub directories
I'm trying to use automake/autoconf to build a shared library whose source code is neatly organised sub directories (about 5 levels wide and 5 levels deep). If this was an application then I would build static libraries in each of the subfolders and link them all together at the top. But when I do something like this: libfoo_la_LDADD = exceptions/libexceptions.la factories/libfactories.la libtool complains that the .la libraries are not libtool objects. I could build libtool libraries in the sub directories instead of static libraries, but then I'd have to install each of those temporary libraries. That would be stupid. So, how should I use automake to build a shared library if the source is in sub directories? Murray Cumming [EMAIL PROTECTED] www.murrayc.com +44 7971 226563 Get free email and a permanent address at http://www.netaddress.com/?N=1