8.6. Manually Compiling VLINK and TLINK
Change directories to the src directory, then run the GNU configure script:
cd src ./configure
There will be some output displayed as the configure script checks the system. Then, compile the programs:
To compile manually:
cc vlink.c -o vlink cc tlink.c -o tlink
On manual compiles, ensure that the C compiler will be invoked properly with this little ditty:
perl -e 'do "syscfg"; system("$CC $LIBS $CFLAGS $DEFS -o tlink tlink.c");' perl -e 'do "syscfg"; system("$CC $LIBS $CFLAGS $DEFS -o vlink vlink.c");'
On some systems, the executable can be made smaller with the strip program, if available. It is not required.
strip vlink strip tlink
If Interchange is to run under a different user account than the individual configuring the program, make that user the owner of vlink. Do not make vlink owned by root, because making vlink SETUID root is an huge and unnecessary security risk. It should also not normally run as the default Web user (often nobody or http)).
chown interchange vlink
Move the vlink executable to the cgi-bin directory:
mv vlink /the/cgi-bin/directory
Make vlink SETUID:
chmod u+s /the/cgi-bin/directory/vlink
Most systems unset the SUID bit when moving the file, so change it after moving.
The SCRIPT_NAME, as produced by the HTTP server, must match the name of the program. (As usual, let the makecat program do the work.)