954,496 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

make configure configure.ac

Hey everyone

I have this huge program which comes with different directories like lib, include, test, modules, services etc.
Every directory has a
-Makefile
-Makefile.am
-Makefile.in

The root directory has the following files
-missing
-Makefile
-Makefile.in
-Makefile.am
-configure
-configure.ac

I added two classes with 2 header files and one of the existing classes in that project includes these header files, since he instanciates objects of the new 2 classes I added.
My problem is now that I don't know where in all these files I have to modify something that my 2 classes are compiled and liked correctly. If I run the ./configure + make without any changes in one of those files, it does not create the o files of the new classes, even if I include the header files in one of the existing classes.

I don't know if I am clear, but what I want is to know which files from the above I have to modify in order that the program recompiles again, when I added the header files in the lib directory and the cc files in the lib directory?

Thank you for helping me out in all those make and configure files or for giving me a hint.

wyssen
Newbie Poster
4 posts since Jul 2010
Reputation Points: 10
Solved Threads: 0
 

This building tool is "autoconf", which is really bad compared to cmake.. but if you don't have a choice. I have worked a little with this, but not so much. The file you are looking to modify has the name "Makefile.in" in the folder where your additional source code is (along with other source code that is already properly compiled). Open that file, find a place where there is a list of other .cpp files and add your new one there. That's what I did in a similar situation and it worked, but I don't know much more about how to use autoconf.

mike_2000_17
Posting Virtuoso
Moderator
2,134 posts since Jul 2010
Reputation Points: 1,634
Solved Threads: 457
 

My suggestion (same as Mike's) is to convert everything to a CMakeLists.txt file. It will take some initial time, but it will make everything MUCH easier.

daviddoria
Posting Virtuoso
1,996 posts since Feb 2008
Reputation Points: 437
Solved Threads: 204
 

Thank you guys. I finally found the problem. It was because I forgot to add the shared library information for the linker. But since the project is so big, I totally forgot about that. And the output from the make command was hundreds of lines long, so I did not get it in the first place.

I used the macro PKG_CHECK_MODULES() in the configure.ac file in order to check for the library and get the necessary information for the linker (path etc).
Then I ran autoreconf to rebuild the makefiles.

And thats it ;)

Thank you, it helped me out!

wyssen
Newbie Poster
4 posts since Jul 2010
Reputation Points: 10
Solved Threads: 0
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: