Compiling when using debian packages without source

Comment on Asterisk spandsp
Joined: Tue 28 of Dec, 2004

Compiling when using debian packages without source

Posted:Tue 28 of Dec, 2004 (00:12 UTC)
I am using the debian sarge packages for asterisk, which means I did not compile from source. (BTW...extremely easy install and a great way to handle dependencies...thanks to the package developers!!!) Therefore, in case others might find this of value, here is what I did to get app_rxfax and app_txfax compiled and installed on sarge:

1. For the spandsp library, it is pretty simple. Simply download, configure , make and install.
2. For the app_rxfax and app_txfax:
a. Downloaded the source files to their own dir
b. created a simple makefile: (sorry, did not know how to show the tabs! (:sad:) )
all: app_rxfax.so app_txfax.so

app_rxfax.so: app_rxfax.c
gcc -shared -Xlinker -x -O2 -D_GNU_SOURCE -o $@ app_rxfax.c -lspandsp -ltiff

app_txfax.so: app_txfax.c
gcc -shared -Xlinker -x -O2 -D_GNU_SOURCE -o $@ app_txfax.c -lspandsp -ltiff

c. Edit app_rx|txfax.c and fix the errno.h issue (as discussed above)
d. make
e. cp the *.so files to /usr/lib/asterisk/modules/
f. Make sure the /etc/asterisk/modules.conf files is doing autoload=yes; or load the fax modules automatically.
g. Make sure the spandsp library is in your LD_LIBRARY_PATH before starting asterisk. I was lazy and simply created sym links from /usr/lib to the installed directory.

This comment is perhaps quite trivial, but perhaps it will save someone time.