src/class-make-{proto,impl}.lisp: Don't always add initializers to classes.
[sod] / lib / sod.m4
CommitLineData
0fafa094
MW
1dnl -*-autoconf-*-
2dnl
3dnl Autoconf machinery for packages using Sod
4dnl
5dnl (c) 2019 Straylight/Edgeware
6dnl
7
8dnl ----- Licensing notice --------------------------------------------------
9dnl
10dnl This file is part of the Sensible Object Design, an object system for C.
11dnl
12dnl SOD is free software: you can redistribute it and/or modify it under
13dnl the terms of the GNU General Public License as published by the Free
14dnl Software Foundation; either version 2 of the License, or (at your
15dnl option) any later version.
16dnl
17dnl SOD is distributed in the hope that it will be useful, but WITHOUT ANY
18dnl WARRANTY; without even the implied warranty of MERCHANTABILITY or
19dnl FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
20dnl for more details.
21dnl
22dnl You should have received a copy of the GNU General Public License
23dnl along with SOD. If not, write to the Free Software Foundation, Inc.,
24dnl 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25
26#serial 1
27
28### SOD_CHECK([ACTION-IF-LIBRARY-FOUND], [ACTION-IF-LIBRARY-NOT-FOUND])
29###
30### Check that (a) the sod(1) translator and (b) the `libsod' library are
31### available.
32###
33### If sod(1) can't be found, this isn't a problem: we assume that the
34### generated output files are included in the distribution, and use a fake
35### definition which will report an error if the files need rebuilding, as a
36### poor person's version of the `missing' script.
37###
38### If the library can't be found, we have a more serious problem. The
39### default behaviour is to (let `PKG_CHECK_MODULES') report a fatal error,
40### but packages can override this behaviour by setting ACTION-IF-LIBRARY-
41### NOT-FOUND to something non-empty. If the library /is/ found then do
42### ACTION-IF-LIBRARY-FOUND; the default is to add the necessary compiler
43### flags to `AM_CFLAGS'. (You are expected to make your own arrangements to
44### link against `$SOD_LIBS'.)
45AC_DEFUN([SOD_CHECK],
46 [AC_CHECK_PROGS([SOD], [sod], [none])
47 if test "$SOD" = "none"; then
48 AC_MSG_WARN([Sod translator not found: relying on distributed output files!])
49 SOD="echo >&2 \"Sod translator not found! Can't rebuild \\\`\$[]@'.\" && exit 2; \\#"
50 fi
51 PKG_CHECK_MODULES([SOD], [sod],
d504247b 52 [m4_default([$1], [AM_CFLAGS="$AM_CFLAGS $SOD_CFLAGS"])],
0fafa094
MW
53 [$2])])
54
55dnl ----- That's all, folks -------------------------------------------------