Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I was wondering what the preferred way of building software in the BSDs is and if they are actively using and encouraging the use of GNU autotools.

I found the following section about GNU autoconf in the OpenBSD Handbook:

autoconf is a gnu tool that is supposed to help in writing portable programs. It is often used together with automake (portable makefiles) and libtool (portable shared libraries).

Those tools do not work all that well, and often create specific challenges in porting software to OpenBSD.

This seems not very encouraging. Does OpenBSD have its own autotools-like programs? Are you supposed to write the configure scripts yourself? I see that for example OpenSSH is using autoconf.

FreeBSD has a neutral section in its Handbook, but it is still in the "Special Considerations" section:

The various GNU autotools provide an abstraction mechanism for building a piece of software over a wide variety of operating systems and machine architectures. [...]

share|improve this question
    
Do you create an own program? If yes and the program isn't too big and complex you can create a Makefile by hand. I think it's a simpliest solution. Or your program is Qt-based, you can use qmake. –  uzsolt Mar 25 at 15:45
    
This is more a general question of mine. I use Linux and have successfully used autotools for some projects, but I have also heard many people talking bad about autotools. I know and have used cmake, (s)cons, GYP, waf and many more. As people from BSD tend to avoid GNU tools, I thought maybe they have a better solution for the problem. –  user846 Mar 26 at 9:56
    
Many people are talking bad about many things but as far as I know noone came out with a full featured autotools replacement. I personally feel cmake is rather awkward and doesn't fit the autotools configure/Makefile standards nor improve on it. –  Pavel Šimerda Sep 20 at 19:21

1 Answer 1

Not sure there is any "officially BSD preferred" way, but my preferred method is cmake. While it's name is misleading as it performs the configure step and generates make files, it doesn't replace make or gmake. It can generate unix makefiles as well as xcode, qtcreator, visual studio, borland and many other project files.

Cmake's syntax is clear and easy to understand. It also provides a cli and a gui app that can be used to adjust configuration options, which I think is easier than adding a list of items after a configure command.

share|improve this answer
2  
downvoted because while this is a nice review of your favourite build system, it doens't answer the question. –  strugee Mar 25 at 16:00
1  
Well he asked preferred and it is my preferred way. I see more projects using it, so it is becoming more preferred by more people. I'm not sure of any "officially BSD preferred" way. –  sambler Mar 26 at 17:49
2  
he asked preferred by OpenBSD. you answered preferred by you. therein lies the distinction. if you know that OpenBSD has no such preference, say that there is no answer - don't fill it in with opinion. –  strugee Mar 27 at 3:02
    
Same as @strugee –  enedil Mar 27 at 6:56

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.