1dnl Checks for required headers and functions 2dnl 3dnl Version: 20170918 4 5dnl Function to detect if libluksde dependencies are available 6AC_DEFUN([AX_LIBLUKSDE_CHECK_LOCAL], 7 [dnl Check for internationalization functions in libluksde/libluksde_i18n.c 8 AC_CHECK_FUNCS([bindtextdomain]) 9 10 dnl Check if library should be build with verbose output 11 AX_COMMON_CHECK_ENABLE_VERBOSE_OUTPUT 12 13 dnl Check if library should be build with debug output 14 AX_COMMON_CHECK_ENABLE_DEBUG_OUTPUT 15 16 dnl Check if DLL support is needed 17 AS_IF( 18 [test "x$enable_shared" = xyes], 19 [AS_CASE( 20 [$host], 21 [*cygwin* | *mingw*], 22 [AC_DEFINE( 23 [HAVE_DLLMAIN], 24 [1], 25 [Define to 1 to enable the DllMain function.]) 26 AC_SUBST( 27 [HAVE_DLLMAIN], 28 [1]) 29 ]) 30 ]) 31]) 32 33dnl Function to detect if luksdetools dependencies are available 34AC_DEFUN([AX_LUKSDETOOLS_CHECK_LOCAL], 35 [AC_CHECK_HEADERS([signal.h sys/signal.h unistd.h]) 36 37 AC_CHECK_FUNCS([close getopt setvbuf]) 38 39 AS_IF( 40 [test "x$ac_cv_func_close" != xyes], 41 [AC_MSG_FAILURE( 42 [Missing function: close], 43 [1]) 44 ]) 45 46 dnl Headers included in luksdetools/luksdemount.c 47 AC_CHECK_HEADERS([errno.h]) 48 49 AC_HEADER_TIME 50 51 dnl Functions included in luksdetools/luksdemount.c 52 AS_IF( 53 [test "x$ac_cv_enable_winapi" = xno], 54 [AC_CHECK_FUNCS([getegid geteuid time]) 55 ]) 56 57 dnl Check if tools should be build as static executables 58 AX_COMMON_CHECK_ENABLE_STATIC_EXECUTABLES 59 60 dnl Check if DLL support is needed 61 AS_IF( 62 [test "x$enable_shared" = xyes && test "x$ac_cv_enable_static_executables" = xno], 63 [AS_CASE( 64 [$host], 65 [*cygwin* | *mingw*], 66 [AC_SUBST( 67 [LIBLUKSDE_DLL_IMPORT], 68 ["-DLIBLUKSDE_DLL_IMPORT"]) 69 ]) 70 ]) 71]) 72 73