Linux HOWTOs

About | Home | Search


HOWTO: check
Description: Unit test framework for C
Click here for ChangeLog
NOTE: I use GNU tar >= 1.13.25 so it's -j for .tar.bz2 files,
it's safe to assume that make, gcc, binutils, fileutils/coreutils, gawk, sed, and grep are prerequisites for almost everything


# Check 0.9.5
# ===========
# Some things that use Check that I have howtos for are:
# gstreamer
# libxcb
# There is a list of others on the web site.

cd
test -f installed/check-0.9.5.tar.gz && mv installed/check-0.9.5.tar.gz .
test ! -f check-0.9.5.tar.gz &&
 wget http://downloads.sf.net/check/check-0.9.5.tar.gz
mkdir -p -m 0700 src
cd src
find -maxdepth 1 -type d -name "check-*" -exec rm -r {} \;
tar xzvf ~/check-0.9.5.tar.gz
cd check-0.9.5
test $UID = 0 && chown -R root:root .
./configure
make

# Become root to install it
su

# Remove old library files, install it
rm -f /usr/local/lib/libcheck.*
make install
ldconfig

# Make sure your non-root user can remove the source later
chown -R $USER .
chmod -R u+w .

# Become yourself again
exit

cd
mkdir -p -m 0700 installed
rm -f installed/check-*.tar.*
mv check-0.9.5.tar.gz installed/


# If you ever want to uninstall Check, this should do it:
cd
su
test -d src/check-* && ( cd src/check-* ; make uninstall )
rm -f /usr/local/lib/libcheck.* /usr/local/include/check.h \
 /usr/local/share/aclocal/check.m4
find /usr/local/share/doc -maxdepth 1 -type d -name "check-*" \
 -exec rm -r {} \;
ldconfig
exit
find ~/src -maxdepth 1 -type d -name "check-*" -exec rm -r {} \;
rm -f ~/installed/check-*.tar.*

Back to the list


Last updated: Tue, 07 Aug 2018 12:06:17 -0400
Jason Englander <jason at englanders dot us>