]> git.draconx.ca Git - slotifier.git/blob - configure.ac
Trivial manual fixes.
[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 DX_PATCH_GNULIB
8
9 AC_INIT([slotifier], [1.2a], [nbowler@draconx.ca])
10 AC_CONFIG_HEADERS([config.h])
11
12 AM_INIT_AUTOMAKE([-Wall -Wno-portability foreign subdir-objects dist-xz])
13 AM_SILENT_RULES([yes])
14 DX_AUTOMAKE_COMPAT
15
16 AC_PROG_CC
17 AM_PROG_CC_C_O
18 gl_EARLY
19
20 LT_INIT
21 gl_INIT
22
23 AC_CACHE_SAVE
24
25 m4_include([lib/gnulib.mk])
26
27 dnl We provide our own makefile rules for gettext.  Disable tracing of
28 dnl AM_GNU_GETTEXT to prevent autoreconf from running autopoint, and to
29 dnl prevent automake from growing gratuitous error conditions.
30 m4_traceoff([AM_GNU_GETTEXT])
31 AM_GNU_GETTEXT([external])
32 DX_LINGUAS
33
34 DX_LIB_CNEARTREE
35 DX_LIB_LIBGERBV
36 AC_DEFINE([GLIB_DISABLE_DEPRECATION_WARNINGS], [1],
37   [Define to shut up glib deprecation silliness.])
38
39 AS_IF([test x"$dx_cv_libgerbv_lib_found" = x"yes"],
40 [AC_CACHE_CHECK([if libgerbv supports G85 slots], [dx_cv_gerbv_supports_g85],
41 [save_CFLAGS=$CFLAGS
42 CFLAGS="$CFLAGS $LIBGERBV_CFLAGS"
43 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
44 [#include <gerbv.h>
45 #include <stddef.h>
46 ], [static int g85_supported@<:@
47   offsetof(gerbv_drill_stats_t, G85) >= 0 ? 1 : -1
48 @:>@;])], [dx_cv_gerbv_supports_g85=yes], [dx_cv_gerbv_supports_g85=no])
49 CFLAGS=$save_CFLAGS])])
50
51 AS_IF([test x"$dx_cv_gerbv_supports_g85" != x"yes"],
52 [AC_MSG_FAILURE([Your installation of libgerbv appears not to
53 support slots.  An updated version of libgerbv is likely required.
54 The latest version may be found at <http://gerbv.geda-project.org/>.
55 m4_newline([DX_LIB_USERFLAG_BLURB([libgerbv])])
56 m4_newline([DX_LIB_PKGCONFIG_BLURB([libgerbv])])
57 ])])
58
59 AM_CONDITIONAL([USE_NLS], [test x"$USE_NLS" = x"yes"])
60
61 AC_CONFIG_TESTDIR([.])
62 DX_PROG_AUTOTEST
63 AM_CONDITIONAL([HAVE_AUTOTEST], [test x"$dx_cv_autotest_works" = x"yes"])
64
65 AC_CONFIG_FILES([Makefile])
66 AC_OUTPUT