X-Git-Url: https://git.draconx.ca/gitweb/dxcommon.git/blobdiff_plain/02e6afe4c4956fd667dfefc04e8f129b5b84f709..HEAD:/configure.ac diff --git a/configure.ac b/configure.ac index 0aabe47..8bbda6e 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -dnl Copyright © 2015, 2019-2023 Nick Bowler +dnl Copyright © 2015, 2019-2024 Nick Bowler dnl dnl License WTFPL2: Do What The Fuck You Want To Public License, version 2. dnl This is free software: you are free to do what the fuck you want to. @@ -8,6 +8,12 @@ AC_PREREQ([2.68]) AC_INIT([dxcommon], [0], [nbowler@draconx.ca]) AC_CONFIG_SRCDIR([m4/base.m4]) +DX_INIT([.]) + +AM_INIT_AUTOMAKE([-Wall -Wno-portability foreign subdir-objects]) +AM_SILENT_RULES([yes]) +DX_AUTOMAKE_COMPAT + # To ensure automake --add-missing copies config.guess/config.sub AC_CANONICAL_HOST @@ -15,24 +21,26 @@ AC_PROG_CC AC_PROG_RANLIB AC_PROG_AWK -AM_INIT_AUTOMAKE([-Wall -Wno-portability foreign subdir-objects]) -AM_SILENT_RULES([yes]) +AC_USE_SYSTEM_EXTENSIONS +AC_C_INLINE +AM_PROG_AR -DX_INIT([.]) +AC_SUBST([STUB_INCLUDES], [@&t@]) -AC_USE_SYSTEM_EXTENSIONS AC_CHECK_FUNCS_ONCE([wcwidth]) AM_CONDITIONAL([HAVE_WCWIDTH], [test x"$ac_cv_func_wcwidth" = x"yes"]) -AC_CONFIG_TESTDIR([.]) -DX_PROG_AUTOTEST -AM_CONDITIONAL([HAVE_AUTOTEST], [test x"$dx_cv_autotest_works" = x"yes"]) +AC_CONFIG_TESTDIR([.], [t:$srcdir/t]) +DX_PROG_AUTOTEST_AM AC_CACHE_CHECK([for struct option in ], [dx_cv_have_struct_option], [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include ], [[struct option opt = { "aaaa", 2, (void *)0, 'a' }; return opt.name[opt.flag ? opt.val : opt.has_arg];]])], [dx_cv_have_struct_option=yes], [dx_cv_have_struct_option=no])]) +AS_IF([test x"$dx_cv_have_struct_option" != x"yes"], + [AS_VAR_APPEND([STUB_INCLUDES], ['-I${top_srcdir}/t/getopt'])]) + AM_CONDITIONAL([HAVE_STRUCT_OPTION], [test x"$dx_cv_have_struct_option" = x"yes"])