NingSun | 0c89b3c | 2018-02-08 08:34:03 -0800 | [diff] [blame^] | 1 | AC_DEFUN([ACX_DLOPEN],[ |
2 | AC_CHECK_FUNC(dlopen, [AC_DEFINE(HAVE_DLOPEN,1,[Define if you have dlopen])], | ||||
3 | [ | ||||
4 | AC_CHECK_LIB([dl],[dlopen], | ||||
5 | [AC_DEFINE(HAVE_DLOPEN,1,[Define if you have dlopen]) | ||||
6 | LIBS="$LIBS -ldl"], | ||||
7 | [AC_CHECK_FUNC(LoadLibrary, | ||||
8 | [if test $ac_cv_func_LoadLibrary = yes; then | ||||
9 | AC_DEFINE(HAVE_LOADLIBRARY, 1, [Whether LoadLibrary is available]) | ||||
10 | fi | ||||
11 | ], [AC_MSG_ERROR(No dynamic library loading support)] | ||||
12 | )] | ||||
13 | ) | ||||
14 | ]) | ||||
15 | ]) |