install.html 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <!--
  4. Copyright: Darren Hester 2006, http://www.designsbydarren.com
  5. License: Released Under the "Creative Commons License",
  6. http://creativecommons.org/licenses/by-nc/2.5/
  7. -->
  8. <head>
  9. <!-- Meta Data -->
  10. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  11. <meta name="description" content="Check unit testing framework for C" />
  12. <meta name="keywords" content="check, unit test, c" />
  13. <!-- Site Title -->
  14. <title>Check | Installing Check</title>
  15. <!-- Link to Style External Sheet -->
  16. <link href="css/style.css" type="text/css" rel="stylesheet" />
  17. </head>
  18. <body>
  19. <div id="page_wrapper">
  20. <div id="header_wrapper">
  21. <div id="header">
  22. <h1>Check</h1>
  23. <h2>Unit Testing Framework for C</h2>
  24. </div>
  25. <div id="navcontainer">
  26. <ul id="navlist">
  27. <li><a href="../index.html">Home</a></li>
  28. <li><a href="../NEWS">NEWS</a></li>
  29. <li id="active"><a href="#" id="current">Install</a></li>
  30. <li><a href="../doc/doxygen/html/check_8h.html">API</a></li>
  31. <li><a href="../doc/check_html/check_3.html">Tutorial</a></li>
  32. <li><a href="../doc/check_html/index.html">Reference</a></li>
  33. <li><a href="https://github.com/libcheck/check/releases">Download</a></li>
  34. </ul>
  35. </div>
  36. </div>
  37. <div id="content">
  38. <h3>Installing Check</h3>
  39. <p>
  40. The following instructions show how one can either install Check from
  41. a package manager or compile from source on one's platform.
  42. </p>
  43. <ul>
  44. <li>GNU/Linux</li>
  45. <ul>
  46. <li><a href="#aptitude">Ubuntu/Debian via Aptitude</a></li>
  47. <li><a href="#yum">Fedora via Yum</a></li>
  48. <li><a href="#pacman">Arch Linux via Pacman</a></li>
  49. <li><a href="#linuxsource">From Source</a></li>
  50. </ul>
  51. <li>GNU/Hurd</li>
  52. <ul>
  53. <li><a href="#hurdsource">Debian GNU/Hurd From Source</a></li>
  54. </ul>
  55. <li>OSX</li>
  56. <ul>
  57. <li><a href="#osxmacports">MacPorts</a></li>
  58. <li><a href="#osxhomebrew">Homebrew</a></li>
  59. <li><a href="#osxsource">From Source</a></li>
  60. </ul>
  61. <li>BSD</li>
  62. <ul>
  63. <li><a href="#openbsd">OpenBSD via Packages</a></li>
  64. <li><a href="#bsdsource">From Source</a></li>
  65. </ul>
  66. <li>Windows</li>
  67. <ul>
  68. <li><a href="#cygwinpackage">Cygwin via Package Manager</a></li>
  69. <li><a href="#cygwinsource">Cygwin From Source</a></li>
  70. <li><a href="#mingwsource">MinGW/MinGW-w64 From Source</a></li>
  71. <li><a href="#visualstudios">Visual Studios From Source</a></li>
  72. <li><a href="#msvc">MSVC From Source</a></li>
  73. </ul>
  74. <li>Solaris</li>
  75. <ul>
  76. <li><a href="#solaris">From Source</a></li>
  77. </ul>
  78. </ul>
  79. <hr></hr>
  80. <a name="aptitude"></a>
  81. <h3>Ubuntu/Debian via Aptitude</h3>
  82. <p>
  83. Ubuntu and Debian both provide a Check package that can be installed.
  84. To install, in a terminal, type:
  85. <div id="code"><pre class="command">
  86. $ sudo apt-get install check
  87. </pre></div>
  88. </p>
  89. <br></br>
  90. <a name="yum"></a>
  91. <h3>Fedora via Yum</h3>
  92. <p>
  93. Fedora provides a Check package that can be installed. To install,
  94. in a terminal, type:
  95. <div id="code"><pre class="command">
  96. $ sudo yum install check
  97. </pre></div>
  98. </p>
  99. <br></br>
  100. <a name="pacman"></a>
  101. <h3>Arch Linux via Pacman</h3>
  102. <p>
  103. Arch Linux provides a Check package that can be installed. To install,
  104. in a terminal, type:
  105. <div id="code"><pre class="command">
  106. $ sudo pacman -S check
  107. </pre></div>
  108. </p>
  109. <a name="linuxsource"></a>
  110. <h3>GNU/Linux From Source</h3>
  111. <p>
  112. Check uses autotools as a build system, and the default steps
  113. work on GNU/Linux systems. After the
  114. <a href="https://github.com/libcheck/check/releases">latest Check source</a>
  115. has been downloaded and unpacked, open a terminal in the unpacked
  116. directory, then:
  117. </p>
  118. <div id="code"><pre class="command">
  119. $ ./configure
  120. $ make
  121. $ make check
  122. $ sudo make install
  123. </pre></div>
  124. <p>
  125. If the "make check" step fails, please send an email to Check's
  126. <a href="https://lists.sourceforge.net/lists/listinfo/check-devel">mailing list</a>
  127. and give details as to the failure so it may be investigated and fixed.
  128. </p>
  129. <br></br>
  130. <a name="hurdsource"></a>
  131. <h3>Debian GNU/Hurd From Source</h3>
  132. <p>
  133. Debian GNU/Hurd does not yet provide a package for Check, so it must
  134. be compiled from source. Check uses autotools as a build system, and the
  135. default steps work on Debian GNU/Hurd systems. After the
  136. <a href="https://github.com/libcheck/check/releases">latest Check source</a>
  137. has been downloaded and unpacked, open a terminal in the unpacked
  138. directory, then:
  139. </p>
  140. <div id="code"><pre class="command">
  141. $ ./configure
  142. $ make
  143. $ make check
  144. $ sudo make install
  145. </pre></div>
  146. <p>
  147. If the "make check" step fails, please send an email to Check's
  148. <a href="https://lists.sourceforge.net/lists/listinfo/check-devel">mailing list</a>
  149. and give details as to the failure so it may be investigated and fixed.
  150. </p>
  151. <br></br>
  152. <a name="osxmacports"></a>
  153. <h3>OSX via MacPorts</h3>
  154. <p>
  155. MacPorts provides a Check package that can be installed. First,
  156. <a href="www.macports.org/install.php">install MacPorts</a>
  157. if not done already. Then, in a terminal, type:
  158. <div id="code"><pre class="command">
  159. $ sudo port install check
  160. </pre></div>
  161. </p>
  162. <br></br>
  163. <a name="osxhomebrew"></a>
  164. <h3>OSX via Homebrew</h3>
  165. <p>
  166. Homebrew provides a Check package that can be installed. First,
  167. <a href="brew.sh">install Homebrew</a>
  168. if not done already. Then, in a terminal, type:
  169. <div id="code"><pre class="command">
  170. $ brew install check
  171. </pre></div>
  172. </p>
  173. <br></br>
  174. <a name="osxsource"></a>
  175. <h3>OSX From Source</h3>
  176. <p>
  177. Check uses autotools as a build system, and the default steps
  178. work on OSX systems. You must have Xcode installed. After the
  179. <a href="https://github.com/libcheck/check/releases">latest Check source</a>
  180. has been downloaded and unpacked, open a terminal in the unpacked
  181. directory, then:
  182. </p>
  183. <div id="code"><pre class="command">
  184. $ ./configure
  185. $ make
  186. $ make check
  187. $ sudo make install
  188. </pre></div>
  189. <p>
  190. If the "make check" step fails, please send an email to Check's
  191. <a href="https://lists.sourceforge.net/lists/listinfo/check-devel">mailing list</a>
  192. and give details as to the failure so it may be investigated and fixed.
  193. </p>
  194. <br></br>
  195. <a name="openbsd"></a>
  196. <h3>OpenBSD via Packages</h3>
  197. <p>
  198. OpenBSD provides a Check package that can be installed. To install,
  199. in a terminal, type:
  200. <div id="code"><pre class="command">
  201. $ sudo pkg_add check
  202. </pre></div>
  203. </p>
  204. <br></br>
  205. <a name="bsdsource"></a>
  206. <h3>BSD From Source</h3>
  207. <p>
  208. Check uses autotools as a build system, and the default steps
  209. work when building on the BSD system. Special care is required when
  210. cross compiling, which is described below.
  211. <br></br>
  212. After the <a href="https://github.com/libcheck/check/releases">latest Check source</a>
  213. has been downloaded and unpacked, open a terminal in the unpacked
  214. directory. To compile on the BSD system directly, type:
  215. </p>
  216. <div id="code"><pre class="command">
  217. $ ./configure
  218. $ make
  219. $ make check
  220. $ sudo make install
  221. </pre></div>
  222. <p>
  223. If the "make check" step fails, please send an email to Check's
  224. <a href="https://lists.sourceforge.net/lists/listinfo/check-devel">mailing list</a>
  225. and give details as to the failure so it may be investigated and fixed.
  226. </p>
  227. <p>
  228. Cross compiling for BSD may require an additional configure argument:
  229. <em>--enable-timer-replacement</em> .
  230. Check attempts to use high resolution timers via the timer_create(),
  231. timer_settime(), and timer_delete() functions. For some BSD systems
  232. (e.g. OpenBSD), these functions exist but are non-functional stubs.
  233. If the functions are available, when compiling on the target system the
  234. configure script will verify that the calls are not stubs. If they are
  235. valid, Check will use them. When cross compiling, the validity check
  236. cannot be performed. To prevent Check from using these when cross
  237. compiling for affected BSD systems, add the <em>--enable-timer-replacement</em>
  238. configure option.
  239. </p>
  240. <br></br>
  241. <a name="cygwinpackage"></a>
  242. <h3>Cygwin on Windows via Package Manager</h3>
  243. <p>
  244. Cygwin provides a Check package that can be installed. To install,
  245. launch the Cygwin setup program, locate the Check package under
  246. the Devel folder, then install.
  247. </p>
  248. <br></br>
  249. <a name="cygwinsource"></a>
  250. <h3>Cygwin on Windows From Source</h3>
  251. <p>
  252. Check uses autotools as a build system, and the default steps
  253. work on Cygwin. You must have gcc, and make installed. After the
  254. <a href="https://github.com/libcheck/check/releases">latest Check source</a>
  255. has been downloaded and unpacked, open a Cygwin terminal in the unpacked
  256. directory, then:
  257. </p>
  258. <div id="code"><pre class="command">
  259. $ ./configure
  260. $ make
  261. $ make check
  262. $ sudo make install
  263. </pre></div>
  264. <p>
  265. If the "make check" step fails, please send an email to Check's
  266. <a href="https://lists.sourceforge.net/lists/listinfo/check-devel">mailing list</a>
  267. and give details as to the failure so it may be investigated and fixed.
  268. </p>
  269. <br></br>
  270. <a name="mingwsource"></a>
  271. <h3>MinGW/MinGW-w64 on Windows From Source</h3>
  272. <p>
  273. MinGW and MinGW-w64 do not provide a package for Check, so it must be
  274. compiled from source. Check uses autotools as a build system, and the
  275. default steps work on both MinGW and MinGW-w64. Note that because both
  276. MinGW and MinGW-w64 do not provide a fork() alternative, Check's fork
  277. mode will be disabled. After the
  278. <a href="https://github.com/libcheck/check/releases">latest Check source</a>
  279. has been downloaded and unpacked, open a MSYS terminal in the unpacked
  280. directory, then:
  281. </p>
  282. <div id="code"><pre class="command">
  283. $ ./configure
  284. $ make
  285. $ make check
  286. $ make install
  287. </pre></div>
  288. <p>
  289. If the "make check" step fails, please send an email to Check's
  290. <a href="https://lists.sourceforge.net/lists/listinfo/check-devel">mailing list</a>
  291. and give details as to the failure so it may be investigated and fixed.
  292. </p>
  293. <br></br>
  294. <a name="visualstudios"></a>
  295. <h3>Visual Studios on Windows From Source</h3>
  296. <p>
  297. Check must be compiled from source for Windows. Note that no fork()
  298. call is available, and Check's fork mode will be disabled. The CMake build system
  299. is supported for compiling Check with Visual Studios, so download
  300. <a href="http://www.cmake.org/cmake/resources/software.html">CMake</a> first.
  301. </p>
  302. <p>
  303. After the
  304. <a href="https://github.com/libcheck/check/releases">latest Check source</a>
  305. has been downloaded and unpacked, open the CMake GUI program. Fill in the
  306. "Where is the source code" and "Where to build the binaries" fields to
  307. point to the unpacked location of the Check source, and press the
  308. Configure button. Select the version of Visual Studios to use, and click
  309. "OK". Once the configuration completes, CMake will highlight two settings,
  310. CMAKE_CONFIGURATION_TYPES and CMAKE_INSTALL_PREFIX. You may leave them as
  311. their defaults or modify them. Finally, click "Generate" to create the
  312. Visual Studio project files.
  313. </p>
  314. <p>
  315. Open Visual Studios and load the generated project files. The following
  316. is a summary of the important build targets:
  317. <ul>
  318. <li><b>ALL_BUILD</b>: Build Check and all unit tests</li>
  319. <li><b>RUN_TESTS</b>: Execute Check's unit tests</li>
  320. <li><b>INSTALL</b>: Install Check to the CMAKE_INSTALL_PREFIX location
  321. listed from the CMake GUI</li>
  322. </ul>
  323. </p>
  324. <p>
  325. To compile, validate, and install Check, run these three targets from
  326. Visual Studios. Note that the RUN_TESTS target only runs Check's unit
  327. tests which do not require a shell interpreter. The remaining tests must
  328. be run in a MSYS or comparable environment.
  329. </p>
  330. <p>
  331. If any of the build targets fail, including the RUN_TESTS target,
  332. please send an email to Check's
  333. <a href="https://lists.sourceforge.net/lists/listinfo/check-devel">mailing list</a>
  334. and give details as to the failure so it may be investigated and fixed.
  335. </p>
  336. <br></br>
  337. <a name="msvc"></a>
  338. <h3>MSVC on Windows From Source</h3>
  339. <p>
  340. Check must be compiled from source for Windows. Note that no fork()
  341. call is available, and Check's fork mode will be disabled. The CMake build system
  342. is supported for compiling Check with Visual Studios, so download
  343. <a href="http://www.cmake.org/cmake/resources/software.html">CMake</a> first.
  344. </p>
  345. <p>
  346. After the
  347. <a href="https://github.com/libcheck/check/releases">latest Check source</a>
  348. has been downloaded and unpacked, open a terminal (cmd.exe). If MSVC
  349. is not in the path, execute the bat file in the MSVC install directory
  350. to load it into the path. For example, with Visual Studios 10:
  351. </p>
  352. <div id="code"><pre class="command">
  353. > C:\Program Files\Microsoft Visual Studios 10.0\VC\vcvarsall.bat
  354. </pre></div>
  355. <p>
  356. Navigate to the unpacked location of the Check source, then:
  357. </p>
  358. <div id="code"><pre class="command">
  359. > cmake -G "NMake Makefiles" .
  360. > nmake
  361. > nmake test
  362. > nmake install
  363. </pre></div>
  364. <p>
  365. Note that the "nmake test" step only runs Check's unit tests which
  366. do not require a shell interpreter. The remaining tests must be
  367. run in a MSYS or comparable environment.
  368. </p>
  369. <p>
  370. If the "make test" step fails, please send an email to Check's
  371. <a href="https://lists.sourceforge.net/lists/listinfo/check-devel">mailing list</a>
  372. and give details as to the failure so it may be investigated and fixed.
  373. </p>
  374. <br></br>
  375. <a name="solaris"></a>
  376. <h3>Solaris From Source</h3>
  377. <p>
  378. Check uses autotools as a build system. The PATH must be setup such that
  379. POSIX versions of tools are found before legacy once.
  380. (see also standards(5) for more details). If the compiler is GCC, setup
  381. the PATH as follows:
  382. </p>
  383. <div id="code"><pre class="command">
  384. PATH=/usr/xpg6/bin:/usr/xpg4/bin:/usr/ccs/bin:/usr/bin:/sbin:/usr/sbin:/opt/csw/bin
  385. </pre></div>
  386. <p>
  387. Otherwise, for Solaris Studio use the following PATH:
  388. </p>
  389. <div id="code"><pre class="command">
  390. PATH=/opt/solarisstudio12.3/bin:/usr/xpg6/bin:/usr/xpg4/bin:/usr/ccs/bin:/usr/bin:/sbin:/usr/sbin:/opt/csw/bin
  391. </pre></div>
  392. <p>
  393. Further, ensure that the environment variables LD_LIBRARY_PATH and
  394. LD_LIBRARY_PATH_64 are unset. It is recommended to use OpenCSW packages
  395. (/opt/csw/bin) to get recent versions of required programs.
  396. The configure script will likely find gcc by default; to use Solaris
  397. Studio also set the following environment variable:
  398. </p>
  399. <div id="code"><pre class="command">
  400. CC=cc
  401. </pre></div>
  402. <p>
  403. After the
  404. <a href="https://github.com/libcheck/check/releases">latest Check source</a>
  405. has been downloaded and unpacked, open a terminal in the unpacked
  406. directory, then:
  407. </p>
  408. <div id="code"><pre class="command">
  409. $ ./configure CFLAGS=-m64 LDFLAGS=-m64
  410. $ gmake
  411. $ gmake check
  412. $ gmake install
  413. </pre></div>
  414. <p>
  415. If the "gmake check" step fails, please send an email to Check's
  416. <a href="https://lists.sourceforge.net/lists/listinfo/check-devel">mailing list</a>
  417. and give details as to the failure so it may be investigated and fixed.
  418. </p>
  419. <br></br>
  420. </div>
  421. <div id="footer">
  422. <a href="http://sourceforge.net">Sourceforge</a>
  423. | <a href="http://www.cloudbees.com/foss/index.cb">Cloudbees</a>
  424. <br />
  425. Template provided by:
  426. <a href="http://www.designsbydarren.com" target="_blank">DesignsByDarren.com</a>
  427. </div>
  428. </div>
  429. </body>
  430. </html>