2010-03-10 13:24:58 +01:00
|
|
|
JNLIB - This is a collection of utility function which are too small
|
|
|
|
to put into a library. The code here is licensed under the LGPL.
|
|
|
|
|
|
|
|
libjnlib-config.h should be be modified for each project to make these
|
|
|
|
functions fit into the software. Mainly these are memory functions in
|
|
|
|
case you need another allocator.
|
|
|
|
|
|
|
|
Files which make up jnlib:
|
|
|
|
README.jnlib
|
|
|
|
ChangeLog.jnlib
|
|
|
|
libjnlib-config.h
|
|
|
|
argparse.c
|
|
|
|
argparse.h
|
|
|
|
dotlock.c
|
|
|
|
dotlock.h
|
|
|
|
dynload.h
|
|
|
|
logging.c
|
|
|
|
logging.h
|
|
|
|
mischelp.c
|
|
|
|
mischelp.h
|
|
|
|
stringhelp.c
|
|
|
|
stringhelp.h
|
|
|
|
strlist.c
|
|
|
|
strlist.h
|
|
|
|
types.h
|
|
|
|
utf8conv.c
|
|
|
|
utf8conv.h
|
|
|
|
w32-afunix.c
|
|
|
|
w32-afunix.h
|
|
|
|
w32-reg.c
|
|
|
|
w32help.h
|
|
|
|
xmalloc.c
|
|
|
|
xmalloc.h
|
|
|
|
t-stringhelp.c
|
|
|
|
t-support.c
|
|
|
|
t-support.h
|
|
|
|
t-timestuff.c
|
|
|
|
t-w32-reg.c
|
|
|
|
|
|
|
|
|
|
|
|
Here is a template Makefile.am for these jnlib modules:
|
|
|
|
===8<==================================================
|
2003-01-09 13:36:05 +01:00
|
|
|
EXTRA_DIST = README
|
2007-06-19 11:11:11 +02:00
|
|
|
noinst_PROGRAMS = $(module_tests)
|
|
|
|
TESTS = $(module_tests)
|
2003-01-09 13:36:05 +01:00
|
|
|
|
2004-02-12 10:29:00 +01:00
|
|
|
AM_CPPFLAGS = -I$(top_srcdir)/intl
|
|
|
|
|
|
|
|
# We need libgcrypt because libjnlib-config includes gcrypt.h
|
2010-03-10 13:24:58 +01:00
|
|
|
AM_CFLAGS = $(LIBGCRYPT_CFLAGS)
|
2003-01-09 13:36:05 +01:00
|
|
|
|
|
|
|
noinst_LIBRARIES = libjnlib.a
|
|
|
|
|
|
|
|
libjnlib_a_SOURCES = \
|
|
|
|
libjnlib-config.h \
|
|
|
|
stringhelp.c stringhelp.h \
|
|
|
|
strlist.c strlist.h \
|
2003-06-18 21:56:13 +02:00
|
|
|
utf8conv.c utf8conv.h \
|
2003-01-09 13:36:05 +01:00
|
|
|
argparse.c argparse.h \
|
|
|
|
logging.c logging.h \
|
|
|
|
dotlock.c dotlock.h \
|
2010-03-10 13:24:58 +01:00
|
|
|
types.h mischelp.c mischelp.h dynload.h w32help.h \
|
|
|
|
xmalloc.c xmalloc.h
|
2007-06-06 20:12:30 +02:00
|
|
|
|
|
|
|
if HAVE_W32_SYSTEM
|
2010-02-26 19:44:36 +01:00
|
|
|
libjnlib_a_SOURCES += w32-reg.c w32-afunix.c w32-afunix.h
|
2007-06-06 20:12:30 +02:00
|
|
|
endif
|
|
|
|
|
2007-06-19 11:11:11 +02:00
|
|
|
#
|
|
|
|
# Module tests.
|
|
|
|
#
|
|
|
|
# These tests should only be used at the canonical location of jnlib
|
|
|
|
# which is the GnuPG package. The reason for this is that t-support.c
|
|
|
|
# defines replacements for the actual used memory allocation functions
|
|
|
|
# so that there is no dependency on libgcrypt.
|
|
|
|
#
|
2010-02-26 19:44:36 +01:00
|
|
|
module_tests = t-stringhelp t-timestuff
|
2010-03-01 13:49:17 +01:00
|
|
|
if HAVE_W32_SYSTEM
|
|
|
|
module_tests += t-w32-reg
|
|
|
|
endif
|
2007-06-19 11:11:11 +02:00
|
|
|
|
|
|
|
t_jnlib_src = t-support.c t-support.h
|
|
|
|
t_jnlib_ldadd = libjnlib.a $(LIBINTL) $(LIBICONV)
|
2010-02-26 19:44:36 +01:00
|
|
|
# For W32 we need libgpg-error because it provides gettext.
|
|
|
|
if HAVE_W32_SYSTEM
|
|
|
|
t_jnlib_ldadd += $(GPG_ERROR_LIBS)
|
|
|
|
endif
|
2007-06-19 11:11:11 +02:00
|
|
|
|
|
|
|
t_stringhelp_SOURCES = t-stringhelp.c $(t_jnlib_src)
|
|
|
|
t_stringhelp_LDADD = $(t_jnlib_ldadd)
|
|
|
|
|
2010-02-26 19:44:36 +01:00
|
|
|
t_timestuff_SOURCES = t-timestuff.c $(t_jnlib_src)
|
|
|
|
t_timestuff_LDADD = $(t_jnlib_ldadd)
|
|
|
|
|
2010-03-01 13:49:17 +01:00
|
|
|
if HAVE_W32_SYSTEM
|
|
|
|
t_w32_reg_SOURCES = t-w32-reg.c $(t_jnlib_src)
|
|
|
|
t_w32_reg_LDADD = $(t_jnlib_ldadd)
|
|
|
|
endif
|
2010-03-10 13:24:58 +01:00
|
|
|
==>8===================================================
|
|
|
|
|
2010-02-26 19:44:36 +01:00
|
|
|
|