blob: 60c7af251d7608caaf9fdce1f8d580895e6b01af (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
== Intro ==
The heavy lifting is done in libvxiclient.c.
This can be linked against some other C code to make a
little VXI11 client. client.c is a little scrappy test
client..
== Requirements ==
- portmapper or rpcbind is needed for the interrupt server.
If you don't use interrupts you don't need it.
- glib/gthread, these are used to create threads for things
like the interrupt service and to handle some inter-thread
things like waiting for the interrupt service thread to
start and get a port number.
- a libc that supports rpc.. all unix oses should be fine.
== Debugging output ==
There are lots of printf("blah.. in the source code to help
with finding weird bugs (mainly issues interacting with perl)
these can all be disabled by removing #define DEBUG from the
top of libvxi11client.c
== Perl module ==
The perl module is a thin wrapper around the C code using
perl's XS functionality (http://perldoc.perl.org/perlxs.html).
The guts of this are are perlbits/Client.xs.
There are then some perl wrapper functions to help with
pulling arguments out of a hash and passing it to the XS code.
These are in perlbits/Client.pm.
The perl module has one more requirement; ExtUtils::PkgConfig.
This is only used at build time and is used to find where
the glib/gthread headers are and get the right CFLAGS.
$make perl; will generate the source for a perl module;
-- it generates a skeleton module with h2xs
-- it copies in the parts of the module that I have customised
-- it copies in the bits of source code needed
-- it then runs the Makefile.PL to generate the real make file
-- it then calls make and make test to compile the module and run
the test script
The perl module is free standing and doesn't depend on the main
source. If you want to distribute the perl module as a perl module
you would distribute the VXI11-Client directory that is generated by
make perl.
Once the module source has been created with make perl it works like
a normal perl module. make will build it, make install will install it.
The main libvxi11client directory isn't used inside the module source.
The main libvxi11client source doesn't need to be compiled or even
present to use the perl module.
|