diff options
-rw-r--r-- | Makefile.am | 17 | ||||
-rwxr-xr-x | bootstrap | 2 | ||||
-rw-r--r-- | configure.ac | 251 | ||||
-rw-r--r-- | doc/generate.sh | 3 | ||||
-rw-r--r-- | include/Makefile.am | 7 | ||||
l--------- | include/include | 1 | ||||
-rw-r--r-- | include/meson.build | 24 | ||||
-rw-r--r-- | meson.build | 59 | ||||
-rw-r--r-- | src/Makefile.am | 47 | ||||
-rw-r--r-- | src/meson.build | 43 | ||||
-rw-r--r-- | tests/Makefile.am | 34 | ||||
-rw-r--r-- | tests/meson.build | 55 |
12 files changed, 184 insertions, 359 deletions
diff --git a/Makefile.am b/Makefile.am deleted file mode 100644 index e8d6340..0000000 --- a/Makefile.am +++ /dev/null | |||
@@ -1,17 +0,0 @@ | |||
1 | # This Makefile.am is in the public domain | ||
2 | |||
3 | EXTRA_DIST = \ | ||
4 | Doxyfile \ | ||
5 | HOWTO.md | ||
6 | |||
7 | SUBDIRS = \ | ||
8 | include \ | ||
9 | src \ | ||
10 | tests | ||
11 | |||
12 | ACLOCAL_AMFLAGS = -I m4 | ||
13 | |||
14 | docs: | ||
15 | mkdir -p doc | ||
16 | doxygen | ||
17 | |||
diff --git a/bootstrap b/bootstrap deleted file mode 100755 index 68341a5..0000000 --- a/bootstrap +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | #!/bin/sh | ||
2 | autoreconf -vfi | ||
diff --git a/configure.ac b/configure.ac deleted file mode 100644 index 9118b56..0000000 --- a/configure.ac +++ /dev/null | |||
@@ -1,251 +0,0 @@ | |||
1 | # This file is part of GNUnet. | ||
2 | # Copyright (C) 2022 GNUnet e.V. | ||
3 | # | ||
4 | # GNUnet is free software: you can redistribute it and/or modify it | ||
5 | # under the terms of the GNU Affero General Public License as published | ||
6 | # by the Free Software Foundation, either version 3 of the License, | ||
7 | # or (at your option) any later version. | ||
8 | # | ||
9 | # GNUnet is distributed in the hope that it will be useful, but | ||
10 | # WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
12 | # Affero General Public License for more details. | ||
13 | # | ||
14 | # You should have received a copy of the GNU Affero General Public License | ||
15 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
16 | # | ||
17 | # SPDX-License-Identifier: AGPL3.0-or-later | ||
18 | # | ||
19 | # Process this file with autoconf to produce a configure script. | ||
20 | # | ||
21 | # | ||
22 | AC_INIT([libgnunetchat],[m4_esyscmd_s(sh contrib/get_version.sh)],[bug-gnunet@gnu.org]) | ||
23 | |||
24 | AC_CONFIG_AUX_DIR([build-aux]) | ||
25 | AC_CONFIG_MACRO_DIRS([m4]) | ||
26 | |||
27 | AC_CONFIG_HEADERS([ | ||
28 | include/gnunet/gnunet_chat_config.h | ||
29 | ]) | ||
30 | |||
31 | AC_CANONICAL_TARGET | ||
32 | AC_CANONICAL_HOST | ||
33 | |||
34 | AM_INIT_AUTOMAKE([tar-ustar]) | ||
35 | AM_SILENT_RULES | ||
36 | |||
37 | # maybe use AC_USE_SYSTEM_EXTENSIONS? | ||
38 | AH_TOP([#define _GNU_SOURCE 1]) | ||
39 | |||
40 | AC_PROG_AWK | ||
41 | AC_PROG_CC | ||
42 | AC_PROG_CC_C_O | ||
43 | AC_PROG_INSTALL | ||
44 | AC_PROG_LN_S | ||
45 | AC_PROG_MAKE_SET | ||
46 | AC_PROG_MKDIR_P | ||
47 | PKG_PROG_PKG_CONFIG([0.29.2]) | ||
48 | |||
49 | LT_INIT([disable-static dlopen]) | ||
50 | |||
51 | AS_IF([test "x$enable_shared" = "xno"], | ||
52 | [AC_MSG_ERROR([GNUnet works only with shared libraries, sorry])]) | ||
53 | |||
54 | # test for GNUnet core | ||
55 | gnunet=0 | ||
56 | lookin=${prefix} | ||
57 | GNUNET_CFLAGS="" | ||
58 | GNUNET_CPPFLAGS="" | ||
59 | GNUNET_LIBS="" | ||
60 | AC_MSG_CHECKING(for GNUnet core) | ||
61 | AC_ARG_WITH(gnunet, | ||
62 | [ --with-gnunet=PFX Base of GNUnet installation], | ||
63 | [AC_MSG_RESULT([$with_gnunet]) | ||
64 | AS_CASE([$with_gnunet], | ||
65 | [no],[lookin=""], | ||
66 | [yes],[lookin="${prefix}"], | ||
67 | [lookin="$with_gnunet"]) | ||
68 | ], | ||
69 | [ | ||
70 | AC_MSG_RESULT([--with-gnunet not specified]) | ||
71 | PKG_CHECK_MODULES([GNUNET], [gnunetutil >= 0.18.0], gnunet=1) | ||
72 | AC_CHECK_HEADERS([gnunet/gnunet_util_lib.h], | ||
73 | AC_CHECK_LIB([gnunetutil], [GNUNET_xfree_], | ||
74 | [ | ||
75 | EXT_LIB_PATH="-L${lookin}/lib $EXT_LIB_PATH" | ||
76 | if test -d "${lookin}/lib64"; then | ||
77 | EXT_LIB_PATH="-L${lookin}/lib64 $EXT_LIB_PATH" | ||
78 | fi | ||
79 | ] | ||
80 | ),,[#include <gnunet/platform.h>] | ||
81 | ) | ||
82 | AC_CHECK_HEADERS([gnunet/gnunet_arm_service.h], | ||
83 | AC_CHECK_LIB([gnunetarm], [GNUNET_ARM_connect], | ||
84 | [ | ||
85 | gnunet_arm=1 | ||
86 | ] | ||
87 | ),,[#include <gnunet/platform.h>] | ||
88 | ) | ||
89 | AC_CHECK_HEADERS([gnunet/gnunet_fs_service.h], | ||
90 | AC_CHECK_LIB([gnunetfs], [GNUNET_FS_start], | ||
91 | [ | ||
92 | gnunet_fs=1 | ||
93 | ] | ||
94 | ),,[#include <gnunet/platform.h>] | ||
95 | ) | ||
96 | AC_CHECK_HEADERS([gnunet/gnunet_gns_service.h], | ||
97 | AC_CHECK_LIB([gnunetgns], [GNUNET_GNS_connect], | ||
98 | [ | ||
99 | gnunet_gns=1 | ||
100 | ] | ||
101 | ),,[#include <gnunet/platform.h>] | ||
102 | ) | ||
103 | AC_CHECK_HEADERS([gnunet/gnunet_identity_service.h], | ||
104 | AC_CHECK_LIB([gnunetidentity], [GNUNET_IDENTITY_connect], | ||
105 | [ | ||
106 | gnunet_identity=1 | ||
107 | ] | ||
108 | ),,[#include <gnunet/platform.h>] | ||
109 | ) | ||
110 | AC_CHECK_HEADERS([gnunet/gnunet_messenger_service.h], | ||
111 | AC_CHECK_LIB([gnunetmessenger], [GNUNET_MESSENGER_connect], | ||
112 | [ | ||
113 | gnunet_messenger=1 | ||
114 | ] | ||
115 | ),,[#include <gnunet/platform.h>] | ||
116 | ) | ||
117 | AC_CHECK_HEADERS([gnunet/gnunet_namestore_service.h], | ||
118 | AC_CHECK_LIB([gnunetnamestore], [GNUNET_NAMESTORE_connect], | ||
119 | [ | ||
120 | gnunet_namestore=1 | ||
121 | ] | ||
122 | ),,[#include <gnunet/platform.h>] | ||
123 | ) | ||
124 | AC_CHECK_HEADERS([gnunet/gnunet_regex_service.h], | ||
125 | AC_CHECK_LIB([gnunetregex], [GNUNET_REGEX_search], | ||
126 | [ | ||
127 | gnunet_regex=1 | ||
128 | ] | ||
129 | ),,[#include <gnunet/platform.h>] | ||
130 | ) | ||
131 | ] | ||
132 | ) | ||
133 | |||
134 | AS_IF([test "x$gnunet" = "x0" -a ! "x$lookin" = "x"], | ||
135 | [ | ||
136 | AC_MSG_CHECKING(for GNUnet util library in $lookin) | ||
137 | backup_LIBS="$LIBS" | ||
138 | backup_CFLAGS="$CFLAGS" | ||
139 | backup_CPPFLAGS="$CPPFLAGS" | ||
140 | GNUNET_LIBS="-L${lookin}/lib" | ||
141 | if test -d "${lookin}/lib64"; then | ||
142 | GNUNET_LIBS="-L${lookin}/lib64 $GNUNET_LIBS" | ||
143 | fi | ||
144 | GNUNET_CFLAGS="-I${lookin}/include" | ||
145 | GNUNET_CPPFLAGS="-I${lookin}/include" | ||
146 | LIBS="$GNUNET_LIBS $backup_LIBS" | ||
147 | CFLAGS="$GNUNET_CFLAGS $backup_CFLAGS" | ||
148 | CPPFLAGS="$GNUNET_CPPFLAGS $backup_CPPFLAGS" | ||
149 | AC_CHECK_HEADERS([gnunet/gnunet_util_lib.h], | ||
150 | AC_CHECK_LIB([gnunetutil], [GNUNET_xfree_], | ||
151 | [ | ||
152 | gnunet=1 | ||
153 | EXT_LIB_PATH="-L${lookin}/lib $EXT_LIB_PATH" | ||
154 | if test -d "${lookin}/lib64"; then | ||
155 | EXT_LIB_PATH="-L${lookin}/lib64 $EXT_LIB_PATH" | ||
156 | fi | ||
157 | ] | ||
158 | ),,[#include <gnunet/platform.h>] | ||
159 | ) | ||
160 | AC_CHECK_HEADERS([gnunet/gnunet_arm_service.h], | ||
161 | AC_CHECK_LIB([gnunetarm], [GNUNET_ARM_connect], | ||
162 | [ | ||
163 | gnunet_arm=1 | ||
164 | ] | ||
165 | ),,[#include <gnunet/platform.h>] | ||
166 | ) | ||
167 | AC_CHECK_HEADERS([gnunet/gnunet_fs_service.h], | ||
168 | AC_CHECK_LIB([gnunetfs], [GNUNET_FS_start], | ||
169 | [ | ||
170 | gnunet_fs=1 | ||
171 | ] | ||
172 | ),,[#include <gnunet/platform.h>] | ||
173 | ) | ||
174 | AC_CHECK_HEADERS([gnunet/gnunet_gns_service.h], | ||
175 | AC_CHECK_LIB([gnunetgns], [GNUNET_GNS_connect], | ||
176 | [ | ||
177 | gnunet_gns=1 | ||
178 | ] | ||
179 | ),,[#include <gnunet/platform.h>] | ||
180 | ) | ||
181 | AC_CHECK_HEADERS([gnunet/gnunet_identity_service.h], | ||
182 | AC_CHECK_LIB([gnunetidentity], [GNUNET_IDENTITY_connect], | ||
183 | [ | ||
184 | gnunet_identity=1 | ||
185 | ] | ||
186 | ),,[#include <gnunet/platform.h>] | ||
187 | ) | ||
188 | AC_CHECK_HEADERS([gnunet/gnunet_messenger_service.h], | ||
189 | AC_CHECK_LIB([gnunetmessenger], [GNUNET_MESSENGER_connect], | ||
190 | [ | ||
191 | gnunet_messenger=1 | ||
192 | ] | ||
193 | ),,[#include <gnunet/platform.h>] | ||
194 | ) | ||
195 | AC_CHECK_HEADERS([gnunet/gnunet_namestore_service.h], | ||
196 | AC_CHECK_LIB([gnunetnamestore], [GNUNET_NAMESTORE_connect], | ||
197 | [ | ||
198 | gnunet_namestore=1 | ||
199 | ] | ||
200 | ),,[#include <gnunet/platform.h>] | ||
201 | ) | ||
202 | AC_CHECK_HEADERS([gnunet/gnunet_regex_service.h], | ||
203 | AC_CHECK_LIB([gnunetregex], [GNUNET_REGEX_search], | ||
204 | [ | ||
205 | gnunet_regex=1 | ||
206 | ] | ||
207 | ),,[#include <gnunet/platform.h>] | ||
208 | ) | ||
209 | |||
210 | LIBS="$backup_LIBS" | ||
211 | CFLAGS="$backup_CFLAGS" | ||
212 | CPPFLAGS="$backup_CPPFLAGS" | ||
213 | ]) | ||
214 | |||
215 | AS_IF([ | ||
216 | test "x$gnunet" = "x0" || | ||
217 | test "x$gnunet_arm" = "x0" || | ||
218 | test "x$gnunet_fs" = "x0" || | ||
219 | test "x$gnunet_gns" = "x0" || | ||
220 | test "x$gnunet_identity" = "x0" || | ||
221 | test "x$gnunet_messenger" = "x0" || | ||
222 | test "x$gnunet_namestore" = "x0" || | ||
223 | test "x$gnunet_regex" = "x0" | ||
224 | ], | ||
225 | [ | ||
226 | AC_MSG_ERROR([libgnunetchat requires GNUnet]) | ||
227 | ] | ||
228 | ) | ||
229 | |||
230 | AC_SUBST(GNUNET_CFLAGS) | ||
231 | AC_SUBST(GNUNET_LIBS) | ||
232 | CFLAGS="$GNUNET_CFLAGS $CFLAGS" | ||
233 | LIBS="$GNUNET_LIBS $LIBS" | ||
234 | |||
235 | AC_ARG_ENABLE([debug], | ||
236 | [ --enable-debug turn on debugging], | ||
237 | [case "${enableval}" in | ||
238 | yes) debug=true ;; | ||
239 | no) debug=false ;; | ||
240 | *) AC_MSG_ERROR([bad value ${enableval} for --enable-debug]) ;; | ||
241 | esac],[debug=false]) | ||
242 | AM_CONDITIONAL([DEBUG], [test x$debug = xtrue]) | ||
243 | |||
244 | AC_CONFIG_FILES([ | ||
245 | Makefile | ||
246 | include/Makefile | ||
247 | src/Makefile | ||
248 | tests/Makefile | ||
249 | ]) | ||
250 | |||
251 | AC_OUTPUT | ||
diff --git a/doc/generate.sh b/doc/generate.sh new file mode 100644 index 0000000..27c94bf --- /dev/null +++ b/doc/generate.sh | |||
@@ -0,0 +1,3 @@ | |||
1 | #!/bin/sh | ||
2 | cd "${MESON_SOURCE_ROOT}" | ||
3 | doxygen 'Doxyfile' \ No newline at end of file | ||
diff --git a/include/Makefile.am b/include/Makefile.am deleted file mode 100644 index c1fed22..0000000 --- a/include/Makefile.am +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | # This Makefile.am is in the public domain | ||
2 | |||
3 | gnunetincludedir = $(includedir)/gnunet | ||
4 | |||
5 | gnunetinclude_HEADERS = \ | ||
6 | gnunet/gnunet_chat_lib.h | ||
7 | |||
diff --git a/include/include b/include/include deleted file mode 120000 index f5030fe..0000000 --- a/include/include +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | ../include \ No newline at end of file | ||
diff --git a/include/meson.build b/include/meson.build new file mode 100644 index 0000000..193f7fb --- /dev/null +++ b/include/meson.build | |||
@@ -0,0 +1,24 @@ | |||
1 | # | ||
2 | # This file is part of GNUnet. | ||
3 | # Copyright (C) 2023 GNUnet e.V. | ||
4 | # | ||
5 | # GNUnet is free software: you can redistribute it and/or modify it | ||
6 | # under the terms of the GNU Affero General Public License as published | ||
7 | # by the Free Software Foundation, either version 3 of the License, | ||
8 | # or (at your option) any later version. | ||
9 | # | ||
10 | # GNUnet is distributed in the hope that it will be useful, but | ||
11 | # WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
13 | # Affero General Public License for more details. | ||
14 | # | ||
15 | # You should have received a copy of the GNU Affero General Public License | ||
16 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
17 | # | ||
18 | # SPDX-License-Identifier: AGPL3.0-or-later | ||
19 | # | ||
20 | |||
21 | install_headers( | ||
22 | 'gnunet/gnunet_chat_lib.h', | ||
23 | subdir: 'gnunet', | ||
24 | ) | ||
diff --git a/meson.build b/meson.build new file mode 100644 index 0000000..afa51e2 --- /dev/null +++ b/meson.build | |||
@@ -0,0 +1,59 @@ | |||
1 | # | ||
2 | # This file is part of GNUnet. | ||
3 | # Copyright (C) 2023 GNUnet e.V. | ||
4 | # | ||
5 | # GNUnet is free software: you can redistribute it and/or modify it | ||
6 | # under the terms of the GNU Affero General Public License as published | ||
7 | # by the Free Software Foundation, either version 3 of the License, | ||
8 | # or (at your option) any later version. | ||
9 | # | ||
10 | # GNUnet is distributed in the hope that it will be useful, but | ||
11 | # WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
13 | # Affero General Public License for more details. | ||
14 | # | ||
15 | # You should have received a copy of the GNU Affero General Public License | ||
16 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
17 | # | ||
18 | # SPDX-License-Identifier: AGPL3.0-or-later | ||
19 | # | ||
20 | |||
21 | project( | ||
22 | 'libgnunetchat', | ||
23 | 'c', | ||
24 | license: 'AGPL3.0-or-later', | ||
25 | version: run_command('contrib/get_version.sh').stdout().strip(), | ||
26 | ) | ||
27 | |||
28 | src_include = include_directories('src', 'include/gnunet') | ||
29 | tests_include = include_directories('tests', 'include') | ||
30 | |||
31 | gnunetchat_deps = [ | ||
32 | dependency('gnunetarm'), | ||
33 | dependency('gnunetfs'), | ||
34 | dependency('gnunetgns'), | ||
35 | dependency('gnunetidentity'), | ||
36 | dependency('gnunetmessenger'), | ||
37 | dependency('gnunetnamestore'), | ||
38 | dependency('gnunetregex'), | ||
39 | dependency('gnunetutil'), | ||
40 | ] | ||
41 | |||
42 | subdir('include') | ||
43 | subdir('src') | ||
44 | |||
45 | gnunetchat_lib = library( | ||
46 | 'gnunetchat', | ||
47 | gnunetchat_sources, | ||
48 | install: true, | ||
49 | dependencies: gnunetchat_deps, | ||
50 | include_directories: src_include, | ||
51 | extra_files: gnunetchat_internal, | ||
52 | ) | ||
53 | |||
54 | subdir('tests') | ||
55 | |||
56 | run_target( | ||
57 | 'docs', | ||
58 | command: 'doc/generate.sh', | ||
59 | ) | ||
diff --git a/src/Makefile.am b/src/Makefile.am deleted file mode 100644 index 9c4482c..0000000 --- a/src/Makefile.am +++ /dev/null | |||
@@ -1,47 +0,0 @@ | |||
1 | # This Makefile.am is in the public domain | ||
2 | AM_CFLAGS = -I$(top_srcdir)/include/gnunet | ||
3 | |||
4 | EXTRA_DIST = \ | ||
5 | gnunet_chat_contact_intern.c \ | ||
6 | gnunet_chat_context_intern.c \ | ||
7 | gnunet_chat_group_intern.c \ | ||
8 | gnunet_chat_handle_intern.c \ | ||
9 | gnunet_chat_lib_intern.c \ | ||
10 | gnunet_chat_lobby_intern.c | ||
11 | |||
12 | lib_LTLIBRARIES = libgnunetchat.la | ||
13 | |||
14 | libgnunetchat_la_SOURCES = \ | ||
15 | gnunet_chat_account.c gnunet_chat_account.h \ | ||
16 | gnunet_chat_contact.c gnunet_chat_contact.h \ | ||
17 | gnunet_chat_context.c gnunet_chat_context.h \ | ||
18 | gnunet_chat_file.c gnunet_chat_file.h \ | ||
19 | gnunet_chat_group.c gnunet_chat_group.h \ | ||
20 | gnunet_chat_handle.c gnunet_chat_handle.h \ | ||
21 | gnunet_chat_invitation.c gnunet_chat_invitation.h \ | ||
22 | gnunet_chat_lobby.c gnunet_chat_lobby.h \ | ||
23 | gnunet_chat_message.c gnunet_chat_message.h \ | ||
24 | gnunet_chat_uri.c gnunet_chat_uri.h \ | ||
25 | gnunet_chat_util.c gnunet_chat_util.h \ | ||
26 | gnunet_chat_lib.c | ||
27 | |||
28 | libgnunetchat_la_LIBADD = \ | ||
29 | -lgnunetarm \ | ||
30 | -lgnunetfs \ | ||
31 | -lgnunetgns \ | ||
32 | -lgnunetidentity \ | ||
33 | -lgnunetmessenger \ | ||
34 | -lgnunetnamestore \ | ||
35 | -lgnunetregex \ | ||
36 | -lgnunetutil | ||
37 | |||
38 | libgnunetchat_la_CFLAGS = \ | ||
39 | -fPIC -pedantic -Wall -Wextra | ||
40 | |||
41 | if DEBUG | ||
42 | libgnunetchat_la_CFLAGS += \ | ||
43 | -O0 -D _DEBUG -ggdb3 | ||
44 | else | ||
45 | libgnunetchat_la_CFLAGS += \ | ||
46 | -O2 -D NDEBUG | ||
47 | endif | ||
diff --git a/src/meson.build b/src/meson.build new file mode 100644 index 0000000..2c8420d --- /dev/null +++ b/src/meson.build | |||
@@ -0,0 +1,43 @@ | |||
1 | # | ||
2 | # This file is part of GNUnet. | ||
3 | # Copyright (C) 2023 GNUnet e.V. | ||
4 | # | ||
5 | # GNUnet is free software: you can redistribute it and/or modify it | ||
6 | # under the terms of the GNU Affero General Public License as published | ||
7 | # by the Free Software Foundation, either version 3 of the License, | ||
8 | # or (at your option) any later version. | ||
9 | # | ||
10 | # GNUnet is distributed in the hope that it will be useful, but | ||
11 | # WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
13 | # Affero General Public License for more details. | ||
14 | # | ||
15 | # You should have received a copy of the GNU Affero General Public License | ||
16 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
17 | # | ||
18 | # SPDX-License-Identifier: AGPL3.0-or-later | ||
19 | # | ||
20 | |||
21 | gnunetchat_sources = files([ | ||
22 | 'gnunet_chat_account.c', 'gnunet_chat_account.h', | ||
23 | 'gnunet_chat_contact.c', 'gnunet_chat_contact.h', | ||
24 | 'gnunet_chat_context.c', 'gnunet_chat_context.h', | ||
25 | 'gnunet_chat_file.c', 'gnunet_chat_file.h', | ||
26 | 'gnunet_chat_group.c', 'gnunet_chat_group.h', | ||
27 | 'gnunet_chat_handle.c', 'gnunet_chat_handle.h', | ||
28 | 'gnunet_chat_invitation.c', 'gnunet_chat_invitation.h', | ||
29 | 'gnunet_chat_lobby.c', 'gnunet_chat_lobby.h', | ||
30 | 'gnunet_chat_message.c', 'gnunet_chat_message.h', | ||
31 | 'gnunet_chat_uri.c', 'gnunet_chat_uri.h', | ||
32 | 'gnunet_chat_util.c', 'gnunet_chat_util.h', | ||
33 | 'gnunet_chat_lib.c', | ||
34 | ]) | ||
35 | |||
36 | gnunetchat_internal = files([ | ||
37 | 'gnunet_chat_contact_intern.c', | ||
38 | 'gnunet_chat_context_intern.c', | ||
39 | 'gnunet_chat_group_intern.c', | ||
40 | 'gnunet_chat_handle_intern.c', | ||
41 | 'gnunet_chat_lobby_intern.c', | ||
42 | 'gnunet_chat_lib_intern.c', | ||
43 | ]) | ||
diff --git a/tests/Makefile.am b/tests/Makefile.am deleted file mode 100644 index b0d7805..0000000 --- a/tests/Makefile.am +++ /dev/null | |||
@@ -1,34 +0,0 @@ | |||
1 | # This Makefile.am is in the public domain | ||
2 | AM_CFLAGS = -I$(top_srcdir)/include | ||
3 | AM_LDFLAGS = -L$(top_srcdir) | ||
4 | |||
5 | EXTRA_DIST = \ | ||
6 | test_gnunet_chat.h | ||
7 | |||
8 | check_PROGRAMS = \ | ||
9 | test_gnunet_chat_handle.test \ | ||
10 | test_gnunet_chat_lobby.test \ | ||
11 | test_gnunet_chat_file.test | ||
12 | |||
13 | AM_TESTS_ENVIRONMENT = \ | ||
14 | export LD_LIBRARY_PATH=$(top_srcdir); | ||
15 | TESTS = \ | ||
16 | $(check_PROGRAMS) | ||
17 | |||
18 | test_gnunet_chat_handle_test_SOURCES = \ | ||
19 | test_gnunet_chat_handle.c | ||
20 | test_gnunet_chat_handle_test_LDADD = \ | ||
21 | -lcheck \ | ||
22 | $(top_builddir)/src/libgnunetchat.la | ||
23 | |||
24 | test_gnunet_chat_lobby_test_SOURCES = \ | ||
25 | test_gnunet_chat_lobby.c | ||
26 | test_gnunet_chat_lobby_test_LDADD = \ | ||
27 | -lcheck \ | ||
28 | $(top_builddir)/src/libgnunetchat.la | ||
29 | |||
30 | test_gnunet_chat_file_test_SOURCES = \ | ||
31 | test_gnunet_chat_file.c | ||
32 | test_gnunet_chat_file_test_LDADD = \ | ||
33 | -lcheck \ | ||
34 | $(top_builddir)/src/libgnunetchat.la | ||
diff --git a/tests/meson.build b/tests/meson.build new file mode 100644 index 0000000..e0cde5f --- /dev/null +++ b/tests/meson.build | |||
@@ -0,0 +1,55 @@ | |||
1 | # | ||
2 | # This file is part of GNUnet. | ||
3 | # Copyright (C) 2023 GNUnet e.V. | ||
4 | # | ||
5 | # GNUnet is free software: you can redistribute it and/or modify it | ||
6 | # under the terms of the GNU Affero General Public License as published | ||
7 | # by the Free Software Foundation, either version 3 of the License, | ||
8 | # or (at your option) any later version. | ||
9 | # | ||
10 | # GNUnet is distributed in the hope that it will be useful, but | ||
11 | # WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
13 | # Affero General Public License for more details. | ||
14 | # | ||
15 | # You should have received a copy of the GNU Affero General Public License | ||
16 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
17 | # | ||
18 | # SPDX-License-Identifier: AGPL3.0-or-later | ||
19 | # | ||
20 | |||
21 | test_deps = [ | ||
22 | dependency('check'), | ||
23 | dependency('gnunetutil'), | ||
24 | ] | ||
25 | |||
26 | test_gnunet_chat_handle = executable( | ||
27 | 'test_gnunet_chat_handle.test', | ||
28 | 'test_gnunet_chat_handle.c', | ||
29 | dependencies: test_deps, | ||
30 | link_with: gnunetchat_lib, | ||
31 | include_directories: tests_include, | ||
32 | extra_files: 'test_gnunet_chat.h', | ||
33 | ) | ||
34 | |||
35 | test_gnunet_chat_lobby = executable( | ||
36 | 'test_gnunet_chat_lobby.test', | ||
37 | 'test_gnunet_chat_lobby.c', | ||
38 | dependencies: test_deps, | ||
39 | link_with: gnunetchat_lib, | ||
40 | include_directories: tests_include, | ||
41 | extra_files: 'test_gnunet_chat.h', | ||
42 | ) | ||
43 | |||
44 | test_gnunet_chat_file = executable( | ||
45 | 'test_gnunet_chat_file.test', | ||
46 | 'test_gnunet_chat_file.c', | ||
47 | dependencies: test_deps, | ||
48 | link_with: gnunetchat_lib, | ||
49 | include_directories: tests_include, | ||
50 | extra_files: 'test_gnunet_chat.h', | ||
51 | ) | ||
52 | |||
53 | test('test_gnunet_chat_handle', test_gnunet_chat_handle, depends: gnunetchat_lib) | ||
54 | test('test_gnunet_chat_lobby', test_gnunet_chat_lobby, depends: gnunetchat_lib) | ||
55 | test('test_gnunet_chat_file', test_gnunet_chat_file, depends: gnunetchat_lib) | ||