aboutsummaryrefslogtreecommitdiffstats
path: root/SoftHSMv2/m4/acx_dlopen.m4
blob: 2d67614555a146ef4838d7c53d18a2127d3246a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
AC_DEFUN([ACX_DLOPEN],[
  AC_CHECK_FUNC(dlopen, [AC_DEFINE(HAVE_DLOPEN,1,[Define if you have dlopen])],
  [
    AC_CHECK_LIB([dl],[dlopen], 
      [AC_DEFINE(HAVE_DLOPEN,1,[Define if you have dlopen])
      LIBS="$LIBS -ldl"],
      [AC_CHECK_FUNC(LoadLibrary, 
        [if test $ac_cv_func_LoadLibrary = yes; then
          AC_DEFINE(HAVE_LOADLIBRARY, 1, [Whether LoadLibrary is available])
        fi
        ], [AC_MSG_ERROR(No dynamic library loading support)]
      )]
    )
  ])
])