]> git.draconx.ca Git - dxcommon.git/blob - configure.ac
help_print_optstring: Test fullwidth/halfwidth character output.
[dxcommon.git] / configure.ac
1 dnl Copyright © 2015, 2019-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_PREREQ([2.68])
8 AC_INIT([dxcommon], [0], [nbowler@draconx.ca])
9 AC_CONFIG_SRCDIR([m4/base.m4])
10
11 # To ensure automake --add-missing copies config.guess/config.sub
12 AC_CANONICAL_HOST
13
14 AC_PROG_CC
15 AC_PROG_RANLIB
16 AC_PROG_AWK
17
18 AM_INIT_AUTOMAKE([-Wall -Wno-portability foreign subdir-objects])
19 AM_SILENT_RULES([yes])
20
21 DX_INIT([.])
22
23 AC_USE_SYSTEM_EXTENSIONS
24 AC_CHECK_FUNCS_ONCE([wcwidth])
25 AM_CONDITIONAL([HAVE_WCWIDTH], [test x"$ac_cv_func_wcwidth" = x"yes"])
26
27 AC_CONFIG_TESTDIR([.])
28 DX_PROG_AUTOTEST
29 AM_CONDITIONAL([HAVE_AUTOTEST], [test x"$dx_cv_autotest_works" = x"yes"])
30
31 AC_CACHE_CHECK([for struct option in <getopt.h>], [dx_cv_have_struct_option],
32   [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <getopt.h>],
33 [[struct option opt = { "aaaa", 2, (void *)0, 'a' };
34 return opt.name[opt.flag ? opt.val : opt.has_arg];]])],
35   [dx_cv_have_struct_option=yes], [dx_cv_have_struct_option=no])])
36 AM_CONDITIONAL([HAVE_STRUCT_OPTION],
37   [test x"$dx_cv_have_struct_option" = x"yes"])
38
39 AC_ARG_VAR([PERL], [command to execute perl programs])
40 AC_CHECK_PROGS([PERL], [perl], [false])
41
42 AC_CONFIG_FILES([Makefile atlocal])
43 AC_OUTPUT