![]() |
| | #1 |
| Registered User Join Date: Dec 2007
Posts: 2
| GNU Build System and referring to Libraries I know there is the LDADD in Makefile.am but how do you specify the installed library name and where to look for it. I thought one of those auto tools (aclocal, autoconf, automake, etc) would automatically figure out the location of library files so that you could just specify the library name but it doesn't appear to work that way. Please help. Jim Y. |
| orwb is offline | |
| | #2 |
| Senior software engineer Join Date: Mar 2007 Location: Portland, OR
Posts: 5,381
| Unless you can very clearly justify why you think you need a full automake and configure script, don't use it. I've seen projects on Sourceforge that consist of about 500 lines of code and over 50,000 lines of build framework. Frankly, that's insane. Too many projects use ./configure when they could get away with a simple makefile. Why do you feel you need to use automake? |
| brewbuck is offline | |
| | #3 |
| Registered User Join Date: Dec 2007
Posts: 2
| I am doing this as a favor to a friend who makes usb digital I/O boards. He wanted a Linux driver for it so I ported it for him. It seems like it would be great if he could distribute it using the GNU Build System so that anyone on any flavor of Linux could just: ./configure make You're right about the complexity of the GNU Build system. I know I am lost. The last time I did a Unix project was back in 1990 and it was a simple edit/compile/link. I have spent 10 hours porting the code and 30 hours trying to figure out how to configure the GNU Build System so he could distribute it to all flavors of Linux. It seems like it should be a one or two line thing to specify the installed library I need. I just haven't been able to find any documentation on how to do that. Jim |
| orwb is offline | |
| | #4 |
| Kernel hacker Join Date: Jul 2007 Location: Farncombe, Surrey, England
Posts: 15,686
| It obviously depends quite a lot on the "wideness" you imply by "any linux distribution". One way to solve the problem is to just "expect" certain libraries & packages to be installed, and document that in a readme file, and leave it to the user to build the files and install the correct packages. Automake is really quite complex and arcane. -- Mats
__________________ Compilers can produce warnings - make the compiler programmers happy: Use them! Please don't PM me for help - and no, I don't do help over instant messengers. |
| matsp is offline | |
| | #5 | |||
| Senior software engineer Join Date: Mar 2007 Location: Portland, OR
Posts: 5,381
| Quote:
Automake is dedicated (mostly) to configuring user-space software. Most of what it does is completely irrelevant to the kernel. Quote:
If you can explain some of the specific things you need to configure, we can probably help with a script that does it. But I can't give help on automake because honestly, I don't understand it either. Quote:
The result is lots of tiny projects with configure scripts that take 15 minutes to run, and do all sorts of pointless things like detect whether alloca() works (in a program that doesn't even use alloca()). | |||
| brewbuck is offline | |
| | #6 |
| Registered User Join Date: Nov 2006
Posts: 502
| I also don't understand automake. But if you really need to, try to setup your program with kdevelop. It is able to manage automake for you (also with additional libraries). I think the most important thing automake does is to configure the code so it can find the place it's installed in. I don't know any alternative on linux how to do that at run time. All software I saw which doesn't use automake does go to /opt and uses a shell script to switch to the right directory before the app is started. If I'm wrong I'd love to know
__________________ http://sourceforge.net/projects/path-finder-as Last edited by pheres; 12-06-2007 at 03:14 AM. |
| pheres is offline | |
| | #7 | |
| Cat without Hat Join Date: Apr 2003
Posts: 8,439
| Quote:
./configure --prefix=/usr/local results in a line in config.h like this: #define APP_PREFIX "/usr/local" Not too hard to emulate without autoconf.
__________________ All the buzzt! CornedBee"There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code." - Flon's Law | |
| CornedBee is offline | |
| | #8 |
| Registered User Join Date: Nov 2006
Posts: 502
| Now you are even able to answer questions I haven't spoken out yet. Because "how does automake do that internally" would have been my next one ![]() Thanks!
__________________ http://sourceforge.net/projects/path-finder-as |
| pheres is offline | |
![]() |
| Thread Tools | |
| Display Modes | |
|