I have committed the new autotools setup to svn-trunk today ...

http://trac.openpbx.org/cgi-bin/trac.cgi/changeset/2461


IN A NUTSHELL

this fixes some quirks with configure, and it adds user defined  
layouts and install options for docs and man-pages.


USER DEFINED LAYOUTS

The singledir directory layout remains hardcoded into configure, but  
all other layouts now reside in separate plaintext files, one file  
for each layout. The filename convention is layout.<name> and there  
are at present 5 predefined layout files:

filename                                configure option
  layout.bsd                     --with-directory-layout=bsd
  layout.bsd-romfs               --with-directory-layout=bsd-romfs
  layout.fhs                     --with-directory-layout=fhs
  layout.lsb                     --with-directory-layout=lsb
  layout.lsb-romfs               --with-directory-layout=lsb-romfs

Configure will pick up any layout.* files but only the predefined  
ones above are listed by configure's online help. This makes it  
possible to add custom layout files as needed. Just copy an existing  
layout file and change the paths therein.

Note, that the default layout is now dependent on the OS of the build  
host. On BSD systems (incl. MacOS X), the default is BSD, on Linux  
systems it is LSB, on Solaris it is SINGLEDIR with prefix /opt/csw/ 
openpbx.org, on any other systems it is SINGLEDIR with prefix /opt/ 
openpbx.org.

In order to force the same default behaviour as before this change,  
option --with-directory-layout=singledir needs to be specified, which  
will also set the prefix to /opt/openpbx.org and unless a different  
prefix is desired, it is no longer required to use the --prefix option.


BINARIES/UTILITIES

The Makefile now distinguishes between the main executable (daemon)  
and user binaries/utilities. The daemon (openpbx) will be installed  
into the directory specified by opbxexecdir and utilities (opbxcli  
and safe_openpbx) will be installed into the directory specified by  
opbxutilsdir.


OPTIONS FOR MAN-PAGES AND DOCS

The following options for man-page and document installation have  
been added to configure:

--with-man-pages=yes/no, default is yes
--with-readme=yes/no, default is yes
--with-license=yes/no, default is yes
--with-credits=yes/no, default is yes
--with-sgml-docs=yes/no, default is no

Man pages will be installed into the directory specified by  
opbxmandir and the docs will be installed into the directory  
specified by opbxdocsdir.


QUIRK FIXES

- several duplicated options have been consolidated and apps are in  
alphabetic order to prevent duplication
- configure stops with an error message when --enable-mysql is yes  
but no mysql is installed
- configure warns and disables zaptel when zaptel version is older  
than 1.2
- readline is checked
- misc fixes


MISC

The bootstrap script now gives feedback about what it is doing. This  
seems to also have fixed a problem whereby a ssh session might die as  
a result of a slow going bootstrap.

A shell script (opbxcli) to mimic a CLI client has been added, mostly  
for testing the SCRIPTS directive of automake, but it is quite usable  
anyway. Hopefully, we can replace this script with a real CLI client  
in the not so distant future.


RC3

This has also been tested with RC3 and an RC3 specific configure.ac  
file can be found in my branch at

http://trac.openpbx.org/cgi-bin/trac.cgi/browser/openpbx/branches/ 
benjk/configure.ac.rc3

all the other files must be copied from svn-trunk: bootstrap.sh,  
Makefile.am, layout.*, opbxcli.in, substitute.mak


ACKNOWLEDGEMENTS

Thanks to all who helped testing and working around some sed and M4  
weirdness, in particular, coppice, dlynes, fulgas, mdh, sbingner (in  
alphabetical order).


CAUTION

I learned a few things about autotools, but this week long struggle  
has me now totally convinced that moving away from it is the only  
sane thing to do. I would therefore advise against any notion to take  
this overhaul as an invitation to make any further efforts towards  
improving the autotools setup. I believe the time is better spent on  
conversion to a different build system. I almost regret to have spent  
all that time on this because I can't avoid thinking that it would  
have gone a long way towards migrating to CMake, but hindsight is 20/20.

rgds
benjk
_______________________________________________
Openpbx-dev mailing list
[email protected]
http://lists.openpbx.org/mailman/listinfo/openpbx-dev

Reply via email to