]> git.draconx.ca Git - slotifier.git/blob - configure.ac
Replace Gnulib striconv with copyright_symbol from dxcommon.
[slotifier.git] / configure.ac
1 dnl Copyright © 2018-2019, 2021-2023 Nick Bowler
2 dnl
3 dnl License WTFPL2: Do What The Fuck You Want To Public License, version 2.
4 dnl This is free software: you are free to do what the fuck you want to.
5 dnl There is NO WARRANTY, to the extent permitted by law.
6
7 AC_INIT([slotifier], [1.2a], [nbowler@draconx.ca])
8 AC_CONFIG_HEADERS([config.h])
9
10 AM_INIT_AUTOMAKE([-Wall -Wno-portability foreign subdir-objects dist-xz])
11 AM_SILENT_RULES([yes])
12 DX_AUTOMAKE_COMPAT
13
14 AC_PROG_CC
15 AM_PROG_CC_C_O
16 gl_EARLY
17
18 LT_INIT
19 gl_INIT
20
21 AC_CACHE_SAVE
22
23 m4_include([lib/gnulib.mk])
24
25 dnl We provide our own makefile rules for gettext.  Disable tracing of
26 dnl AM_GNU_GETTEXT to prevent autoreconf from running autopoint, and to
27 dnl prevent automake from growing gratuitous error conditions.
28 m4_traceoff([AM_GNU_GETTEXT])
29 AM_GNU_GETTEXT([external])
30 DX_LINGUAS
31
32 DX_LIB_CNEARTREE
33 DX_LIB_LIBGERBV
34 AC_DEFINE([GLIB_DISABLE_DEPRECATION_WARNINGS], [1],
35   [Define to shut up glib deprecation silliness.])
36
37 AS_IF([test x"$dx_cv_libgerbv_lib_found" = x"yes"],
38 [AC_CACHE_CHECK([if libgerbv supports G85 slots], [dx_cv_gerbv_supports_g85],
39 [save_CFLAGS=$CFLAGS
40 CFLAGS="$CFLAGS $LIBGERBV_CFLAGS"
41 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
42 [#include <gerbv.h>
43 #include <stddef.h>
44 ], [static int g85_supported@<:@
45   offsetof(gerbv_drill_stats_t, G85) >= 0 ? 1 : -1
46 @:>@;])], [dx_cv_gerbv_supports_g85=yes], [dx_cv_gerbv_supports_g85=no])
47 CFLAGS=$save_CFLAGS])])
48
49 AS_IF([test x"$dx_cv_gerbv_supports_g85" != x"yes"],
50 [AC_MSG_FAILURE([Your installation of libgerbv appears not to
51 support slots.  An updated version of libgerbv is likely required.
52 The latest version may be found at <http://gerbv.geda-project.org/>.
53 m4_newline([DX_LIB_USERFLAG_BLURB([libgerbv])])
54 m4_newline([DX_LIB_PKGCONFIG_BLURB([libgerbv])])
55 ])])
56
57 AM_CONDITIONAL([USE_NLS], [test x"$USE_NLS" = x"yes"])
58
59 AC_CONFIG_TESTDIR([.])
60 DX_PROG_AUTOTEST
61 AM_CONDITIONAL([HAVE_AUTOTEST], [test x"$dx_cv_autotest_works" = x"yes"])
62
63 AC_CONFIG_FILES([Makefile])
64 AC_OUTPUT