1dnl Checks for required headers and functions
2dnl
3dnl Version: 20200713
4
5dnl Function to detect if liblnk dependencies are available
6AC_DEFUN([AX_LIBLNK_CHECK_LOCAL],
7  [dnl Check for internationalization functions in liblnk/liblnk_i18n.c
8  AC_CHECK_FUNCS([bindtextdomain])
9])
10
11dnl Function to detect if lnktools dependencies are available
12AC_DEFUN([AX_LNKTOOLS_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
25dnl Function to check if DLL support is needed
26AC_DEFUN([AX_LIBLNK_CHECK_DLL_SUPPORT],
27  [AS_IF(
28    [test "x$enable_shared" = xyes && test "x$ac_cv_enable_static_executables" = xno],
29    [AS_CASE(
30      [$host],
31      [*cygwin* | *mingw* | *msys*],
32      [AC_DEFINE(
33        [HAVE_DLLMAIN],
34        [1],
35        [Define to 1 to enable the DllMain function.])
36      AC_SUBST(
37        [HAVE_DLLMAIN],
38        [1])
39
40      AC_SUBST(
41        [LIBLNK_DLL_EXPORT],
42        ["-DLIBLNK_DLL_EXPORT"])
43
44      AC_SUBST(
45        [LIBLNK_DLL_IMPORT],
46        ["-DLIBLNK_DLL_IMPORT"])
47      ])
48    ])
49  ])
50
51