Debian Codegraph @

acinclude.m4

raw
1 dnl Checks for required headers and functions
2 dnl
3 dnl Version: 20200713
4
5 dnl Function to detect if libvhdi dependencies are available
6 AC_DEFUN([AX_LIBVHDI_CHECK_LOCAL],
7 [dnl Check for internationalization functions in libvhdi/libvhdi_i18n.c
8 AC_CHECK_FUNCS([bindtextdomain])
9 ])
10
11 dnl Function to detect if vhditools dependencies are available
12 AC_DEFUN([AX_VHDITOOLS_CHECK_LOCAL],
13 [AC_CHECK_HEADERS([signal.h sys/signal.h unistd.h])
14
15 AC_CHECK_FUNCS([close getopt setvbuf])
16
17 AS_IF(
18 [test "x$ac_cv_func_close" != xyes],
19 [AC_MSG_FAILURE(
20 [Missing function: close],
21 [1])
22 ])
23
24 dnl Headers included in vhditools/vhdimount.c
25 AC_CHECK_HEADERS([errno.h sys/time.h])
26
27 dnl Functions included in vhditools/mount_file_system.c and vhditools/mount_file_entry.c
28 AS_IF(
29 [test "x$ac_cv_enable_winapi" = xno],
30 [AC_CHECK_FUNCS([clock_gettime getegid geteuid time])
31 ])
32 ])
33
34 dnl Function to check if DLL support is needed
35 AC_DEFUN([AX_LIBVHDI_CHECK_DLL_SUPPORT],
36 [AS_IF(
37 [test "x$enable_shared" = xyes && test "x$ac_cv_enable_static_executables" = xno],
38 [AS_CASE(
39 [$host],
40 [*cygwin* | *mingw* | *msys*],
41 [AC_DEFINE(
42 [HAVE_DLLMAIN],
43 [1],
44 [Define to 1 to enable the DllMain function.])
45 AC_SUBST(
46 [HAVE_DLLMAIN],
47 [1])
48
49 AC_SUBST(
50 [LIBVHDI_DLL_EXPORT],
51 ["-DLIBVHDI_DLL_EXPORT"])
52
53 AC_SUBST(
54 [LIBVHDI_DLL_IMPORT],
55 ["-DLIBVHDI_DLL_IMPORT"])
56 ])
57 ])
58 ])
59