[asterisk-users] Best way to handle include files?

Doug Doug at NaTel.net
Fri Nov 21 12:43:00 CST 2008


Thanks, Tzafrir, for your reply!

At 13:25 11/19/2008, Tzafrir Cohen wrote:
 >On Wed, Nov 19, 2008 at 01:14:55PM -0600, Doug wrote:
 >> Hi folks,
 >>
 >> I am building a new box.  Want it to look
 >> pretty much like an older Asterisk 1.2,
 >> Debian box that is in production.  The new
 >> box will used as a test box before we
 >> implement changes to the production box.
 >>
 >> New box:
 >> ================================================
 >> # cat /etc/issue;  uname -a
 >> Debian GNU/Linux 4.0 \n \l
 >>
 >> Linux ServerName 2.6.18-6-686 #1 SMP Mon Oct 13
 >> 16:13:09 UTC 2008 i686 GNU/Linux
 >> ================================================
 >>
 >> I've got Asterisk compiled and running:
 >>
 >> ================================================
 >> # asterisk -rvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
 >>    == Parsing '/etc/asterisk/asterisk.conf': Found
 >>    == Parsing '/etc/asterisk/extconfig.conf': Found
 >> Asterisk 1.2.30.2, Copyright (C) 1999 - 2007 Digium, Inc. and others.
 >> Created by Mark Spencer <markster at digium.com>
 >> Asterisk comes with ABSOLUTELY NO WARRANTY; 
type 'show warranty' for details.
 >> ================================================
 >>
 >> The problem lies when I try to compile rxfax and
 >> txfax.  The compiler jumps out of the
 >>
 >>    /usr/src/asterisk/asterisk/asterisk-1.2.30.2/apps/
 >>
 >> directory:
 >>
 >> /bin/sh: curl-config: command not found
 >> cc -fPIC   -c -o app_dial.o app_dial.c
 >> app_dial.c:37:22: error: asterisk.h: No such file or directory
 >> app_dial.c:39: error: expected declaration
 >> specifiers or â...â before string constant
 >>
 >> "asterisk.h" is located:
 >>
 >> # find / -name "asterisk.h"
 >> /usr/src/asterisk/asterisk/asterisk-1.2.30.2/include/asterisk.h
 >>
 >> I am finding that other Asterisk-related
 >> include files are located:
 >>
 >> /usr/include/asterisk/
 >>
 >> but, they have a recent time stamp.  I prefer
 >> a time stamp that indicated the last "real"
 >> modification date.
 >
 >[Use package management rather than gueswork?]

Do you mean:

# apt-get update
Get:1 http://ftp.uwsg.indiana.edu etch Release.gpg [386B]
Hit http://ftp.uwsg.indiana.edu etch Release
Get:2 http://security.debian.org etch/updates Release.gpg [189B]
Get:3 http://security.debian.org etch/updates Release [37.6kB]
Ign http://ftp.uwsg.indiana.edu etch/main Packages/DiffIndex
Ign http://ftp.uwsg.indiana.edu etch/non-free Packages/DiffIndex
Ign http://ftp.uwsg.indiana.edu etch/main Sources/DiffIndex
Ign http://ftp.uwsg.indiana.edu etch/non-free Sources/DiffIndex
Hit http://ftp.uwsg.indiana.edu etch/main Packages
Hit http://ftp.uwsg.indiana.edu etch/non-free Packages
Hit http://ftp.uwsg.indiana.edu etch/main Sources
Hit http://ftp.uwsg.indiana.edu etch/non-free Sources
Ign http://security.debian.org etch/updates/main Packages/DiffIndex
Ign http://security.debian.org etch/updates/contrib Packages/DiffIndex
Ign http://security.debian.org etch/updates/non-free Packages/DiffIndex
Ign http://security.debian.org etch/updates/main Sources/DiffIndex
Ign http://security.debian.org etch/updates/contrib Sources/DiffIndex
Ign http://security.debian.org etch/updates/non-free Sources/DiffIndex
Get:4 http://security.debian.org etch/updates/main Packages [291kB]
Hit http://security.debian.org etch/updates/contrib Packages
Hit http://security.debian.org etch/updates/non-free Packages
Get:5 http://security.debian.org etch/updates/main Sources [45.9kB]
Hit http://security.debian.org etch/updates/contrib Sources
Hit http://security.debian.org etch/updates/non-free Sources
Fetched 375kB in 1s (309kB/s)
Reading package lists... Done

http://www.google.com/search?q=asterisk+%22package+management%22

 >
 >>
 >> Researching on the Web, some people suggest
 >> copying all the include files to:
 >>
 >> /usr/include/asterisk/
 >
 >This is indeed normally installed by 'make install' of Asterisk.

Right.  Why do the .h files have the install date
instead of the last modified date?

 >
 >>
 >> Others suggest making a symbolic link that
 >> translates:
 >>
 >> /usr/include/asterisk/
 >>
 >> to:
 >>
 >> /usr/src/asterisk/asterisk/asterisk-1.2.30.2/include/
 >
 >Why do you actually want to keep the build directory around?

Well, we've got plenty of disk space, and it
gives a historical record of upgrades.

Why wouldn't we want to keep them around?


This seems to imply that the include files should
be copied into:

/usr/include/asterisk/

Is this correct?



 >
 >(Note that Asterisk modules don't link at build time with and Asterisk
 >component (e.g.: library), and hence the sterisk-devel only includes
 >only the header files)

I am confused.  Are you saying that when compiling
or recompiling the Asterisk modules don't link?
I am not exactly sure what you are saying.

Again, what is the best way to handle include files
so that rxfax and txfax will compile, and will allow
for future upgrades of Asterisk versions?


 >
 >--
 >               Tzafrir Cohen
 >icq#16849755              jabber:tzafrir.cohen at xorcom.com
 >+972-50-7952406           mailto:tzafrir.cohen at xorcom.com
 >http://www.xorcom.com iax:guest at local.xorcom.com/tzafrir
 >
 >_______________________________________________
 >-- Bandwidth and Colocation Provided by http://www.api-digital.com --
 >
 >asterisk-users mailing list
 >To UNSUBSCRIBE or update options visit:
 >   http://lists.digium.com/mailman/listinfo/asterisk-users




More information about the asterisk-users mailing list