mirror of
https://github.com/php/php-src.git
synced 2024-11-24 10:24:11 +08:00
Add dlsym underscore detection, by Jani Taskinen
This commit is contained in:
parent
b0970f1421
commit
2a0a07b883
14
Zend/Zend.m4
14
Zend/Zend.m4
@ -21,6 +21,7 @@ AC_REQUIRE([AC_PROG_CC])
|
||||
AC_REQUIRE([AC_PROG_CC_C_O])
|
||||
AC_REQUIRE([AC_PROG_LEX])
|
||||
AC_REQUIRE([AC_HEADER_STDC])
|
||||
AC_REQUIRE([AC_PROG_LIBTOOL])
|
||||
|
||||
LIBZEND_BISON_CHECK
|
||||
|
||||
@ -54,6 +55,19 @@ AC_TYPE_SIGNAL
|
||||
AC_CHECK_LIB(dl, dlopen, [LIBS="-ldl $LIBS"])
|
||||
AC_CHECK_FUNC(dlopen,[AC_DEFINE(HAVE_LIBDL, 1,[ ])])
|
||||
|
||||
dnl
|
||||
dnl Ugly hack to check if dlsym() requires a leading underscore in symbol name.
|
||||
dnl
|
||||
AC_MSG_CHECKING([whether dlsym() requires a leading underscode in symbol names])
|
||||
_LT_AC_TRY_DLOPEN_SELF([
|
||||
AC_MSG_RESULT(no)
|
||||
], [
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(DLSYM_NEEDS_UNDERSCORE, 1, [Define if dlsym() requires a leading underscode in symbol names. ])
|
||||
], [
|
||||
AC_MSG_RESULT(no)
|
||||
], [])
|
||||
|
||||
dnl This is required for QNX and may be some BSD derived systems
|
||||
AC_CHECK_TYPE( uint, unsigned int )
|
||||
AC_CHECK_TYPE( ulong, unsigned long )
|
||||
|
@ -71,7 +71,11 @@
|
||||
|
||||
# define DL_LOAD(libname) dlopen(libname, RTLD_LAZY | RTLD_GLOBAL)
|
||||
# define DL_UNLOAD dlclose
|
||||
# define DL_FETCH_SYMBOL dlsym
|
||||
# if defined(DLSYM_NEEDS_UNDERSCORE)
|
||||
# define DL_FETCH_SYMBOL(h,s) dlsym((h), "_" ## s)
|
||||
# else
|
||||
# define DL_FETCH_SYMBOL dlsym
|
||||
# endif
|
||||
# define DL_HANDLE void *
|
||||
# define ZEND_EXTENSIONS_SUPPORT 1
|
||||
#elif defined(ZEND_WIN32)
|
||||
|
Loading…
Reference in New Issue
Block a user