[asterisk-dev] Zaptel Config

Tony Plack Tony at plack.net
Wed Aug 29 10:19:45 CDT 2007


>
> I frankly don't understand the purpose of the target "install-
> include". Could you please explain what you think it is supposed to
> do?
>
>
Well, not that I am defending it (cuz I am not)... but the include for zaptel is used for cross-compile when compiling asterisk.  Most of the changes I am looking at deal with cross compile.  So we use the "with-zaptel" and "with-tonezone" options in asterisk's configure command to point to these in the build directory.

Clearly, just doing a stock make works.  No issues there, it is when you have people with cross compile scripts and these things change that it impacts their scripts to build the systems.  That is where I had issues.  Going from a glibc to uclib system.  Sure nuf, nano is a very convenient way to fix this change in the script, but the question of permanency and changing INSTALL_PREFIX to DESTDIR is okay.  But is this permanent?

Most embedded systems are not that convenient to do a direct compile upon them.

>> Lastly, includedir is pointed to ${prefix}/include.  It appears
>> that prefix is by default root so include files are being placed
>> in /include which is not correct. I believe that these should be
>> exec_prefix which would place include files in /usr/include.
>>
>> Which of these need to be in the patch system.
>>
> # libdir, includedir and mandir are defined in makeopts (from #
> configure).
> # we use /sbin, rather than configure's $(sbindir) because we use
> /sbin # for historical reasons. BIN_DIR:=/sbin LIB_DIR:=$(libdir)
> INC_DIR:=$(includedir)/zaptel
>
>
> Looking in makeopts, as suggested (the comment above was added for
> greppers), you'll see:
>
>
> prefix = /usr
> exec_prefix = ${prefix}
>
> bindir = ${exec_prefix}/bin
> datarootdir = ${prefix}/share
> datadir = ${datarootdir}
> includedir = ${prefix}/include

Agreed, that is my point, the includedir is not correct.  ${prefix} is by default / (root).  That places the include directory in the root of the fs during install.  By any fs standard, we NEVER have a /include.  We may have a /usr/include but never a /include.

INC_DIR is fine, we just need includedir changed to make sure that it is not /.

If you change this in configure to $(exec_prefix), it then seems to place the include directory in /usr/include which is proper.

Unless I have missed something and we now need to have an include in the root directory.



More information about the asterisk-dev mailing list