X-Git-Url: https://git.draconx.ca/gitweb/dxcommon.git/blobdiff_plain/476f42d951d7e9f9f30e1a6acb34982466936490..7b34413e9942b5777aed4fd3dc9c261214981e74:/configure.ac diff --git a/configure.ac b/configure.ac index 0aabe47..cf152d8 100644 --- a/configure.ac +++ b/configure.ac @@ -21,6 +21,10 @@ AM_SILENT_RULES([yes]) DX_INIT([.]) AC_USE_SYSTEM_EXTENSIONS +AC_C_INLINE + +AC_SUBST([STUB_INCLUDES], [@&t@]) + AC_CHECK_FUNCS_ONCE([wcwidth]) AM_CONDITIONAL([HAVE_WCWIDTH], [test x"$ac_cv_func_wcwidth" = x"yes"]) @@ -33,6 +37,9 @@ AC_CACHE_CHECK([for struct option in ], [dx_cv_have_struct_option], [[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"])