mirror of
https://github.com/troglobit/libite.git
synced 2026-11-13 17:01:18 +00:00
Experiment with syntax highlighting
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
1 parent
80d11dccf7
commit
612290c9e2
1 file changed
+25
-15
@@ -48,10 +48,12 @@ To prevent clashing with include files of the same name `-lite` employs
|
|||||||
an include file namespace `libite/`, which is strongly recommended to
|
an include file namespace `libite/`, which is strongly recommended to
|
||||||
use in your applications:
|
use in your applications:
|
||||||
|
|
||||||
#include <libite/lite.h>
|
```C
|
||||||
#include <libite/conio.h>
|
#include <libite/lite.h>
|
||||||
#include <libite/queue.h>
|
#include <libite/conio.h>
|
||||||
#include <libite/tree.h>
|
#include <libite/queue.h>
|
||||||
|
#include <libite/tree.h>
|
||||||
|
```
|
||||||
|
|
||||||
> **Note:** prior to v2.5.0, the `lite/` namespace was used for headers,
|
> **Note:** prior to v2.5.0, the `lite/` namespace was used for headers,
|
||||||
> which is still available in the default install. This clashed with
|
> which is still available in the default install. This clashed with
|
||||||
@@ -59,30 +61,38 @@ use in your applications:
|
|||||||
|
|
||||||
The output from the `pkg-config` tool holds no surprises:
|
The output from the `pkg-config` tool holds no surprises:
|
||||||
|
|
||||||
$ pkg-config --libs --static --cflags libite
|
```sh
|
||||||
-I/usr/local/include -D_LIBITE_LITE -L/usr/local/lib -lite
|
$ pkg-config --libs --static --cflags libite
|
||||||
|
-I/usr/local/include -D_LIBITE_LITE -L/usr/local/lib -lite
|
||||||
|
```
|
||||||
|
|
||||||
Notice that `_LIBITE_LITE` is defined since v2.5.0, useful for software
|
Notice that `_LIBITE_LITE` is defined since v2.5.0, useful for software
|
||||||
that want to be able to build against headers from an older libite:
|
that want to be able to build against headers from an older libite:
|
||||||
|
|
||||||
#ifdef _LIBITE_LITE
|
```C
|
||||||
# include <libite/lite.h>
|
#ifdef _LIBITE_LITE
|
||||||
#else
|
# include <libite/lite.h>
|
||||||
# include <lite/lite.h>
|
#else
|
||||||
#endif
|
# include <lite/lite.h>
|
||||||
|
#endif
|
||||||
|
```
|
||||||
|
|
||||||
The prefix path `/usr/local/` shown here is only the default. Use the
|
The prefix path `/usr/local/` shown here is only the default. Use the
|
||||||
`configure` script to select a different prefix when installing libite.
|
`configure` script to select a different prefix when installing libite.
|
||||||
|
|
||||||
For GNU autotools based projects, use the following in `configure.ac`:
|
For GNU autotools based projects, use the following in `configure.ac`:
|
||||||
|
|
||||||
# Check for required libraries
|
```m4
|
||||||
PKG_CHECK_MODULES([lite], [libite >= 1.5.0])
|
# Check for required libraries
|
||||||
|
PKG_CHECK_MODULES([lite], [libite >= 1.5.0])
|
||||||
|
```
|
||||||
|
|
||||||
and in your `Makefile.am`:
|
and in your `Makefile.am`:
|
||||||
|
|
||||||
proggy_CFLAGS = $(lite_CFLAGS)
|
```Makefile
|
||||||
proggy_LDADD = $(lite_LIBS)
|
proggy_CFLAGS = $(lite_CFLAGS)
|
||||||
|
proggy_LDADD = $(lite_LIBS)
|
||||||
|
```
|
||||||
|
|
||||||
> API Documentaion: https://codedocs.xyz/troglobit/libite/
|
> API Documentaion: https://codedocs.xyz/troglobit/libite/
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user