]> git.draconx.ca Git - slotifier.git/blob - configure.ac
Release 1.2.
[slotifier.git] / configure.ac
1 dnl Copyright © 2018-2019, 2021 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.2], [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
35 AS_IF([test x"$dx_cv_libgerbv_lib_found" = x"yes"],
36 [AC_CACHE_CHECK([if libgerbv supports G85 slots], [dx_cv_gerbv_supports_g85],
37 [save_CFLAGS=$CFLAGS
38 CFLAGS="$CFLAGS $LIBGERBV_CFLAGS"
39 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
40 [#include <gerbv.h>
41 #include <stddef.h>
42 ], [static int g85_supported@<:@
43   offsetof(gerbv_drill_stats_t, G85) >= 0 ? 1 : -1
44 @:>@;])], [dx_cv_gerbv_supports_g85=yes], [dx_cv_gerbv_supports_g85=no])
45 CFLAGS=$save_CFLAGS])])
46
47 AS_IF([test x"$dx_cv_gerbv_supports_g85" != x"yes"],
48 [AC_MSG_FAILURE([Your installation of libgerbv appears not to
49 support slots.  An updated version of libgerbv is likely required.
50 The latest version may be found at <http://gerbv.geda-project.org/>.
51 m4_newline([DX_LIB_USERFLAG_BLURB([libgerbv])])
52 m4_newline([DX_LIB_PKGCONFIG_BLURB([libgerbv])])
53 ])])
54
55 AC_CONFIG_TESTDIR([.])
56 DX_PROG_AUTOTEST
57 AM_CONDITIONAL([HAVE_AUTOTEST], [test x"$dx_cv_autotest_works" = x"yes"])
58
59 AC_CONFIG_FILES([Makefile])
60 AC_OUTPUT