Added configure check for RTLD_NEXT, which necessary for LIBC's I/O tracing
This commit was SVN r19883.
Этот коммит содержится в:
родитель
58fe779388
Коммит
c4f0eb276a
@ -549,6 +549,8 @@ AC_DEFUN([ACVT_DL],
|
|||||||
dl_error="no"
|
dl_error="no"
|
||||||
have_dl="no"
|
have_dl="no"
|
||||||
|
|
||||||
|
have_rtld_next="no"
|
||||||
|
|
||||||
DLDIR=
|
DLDIR=
|
||||||
DLINCDIR=
|
DLINCDIR=
|
||||||
DLLIBDIR=
|
DLLIBDIR=
|
||||||
@ -583,7 +585,7 @@ AC_DEFUN([ACVT_DL],
|
|||||||
])
|
])
|
||||||
CPPFLAGS=$sav_CPPFLAGS
|
CPPFLAGS=$sav_CPPFLAGS
|
||||||
|
|
||||||
AS_IF([test x"$DLLIB" = x -a "$dl_error" = "no"],
|
AS_IF([test x"$DLLIB" = x -a x"$dl_error" = "xno"],
|
||||||
[
|
[
|
||||||
sav_LIBS=$LIBS
|
sav_LIBS=$LIBS
|
||||||
LIBS="$LIBS $DLLIBDIR -ldl"
|
LIBS="$LIBS $DLLIBDIR -ldl"
|
||||||
@ -593,13 +595,41 @@ AC_DEFUN([ACVT_DL],
|
|||||||
LIBS=$sav_LIBS
|
LIBS=$sav_LIBS
|
||||||
])
|
])
|
||||||
|
|
||||||
AS_IF([test x"$DLLIB" = x -a "$dl_error" = "no"],
|
AS_IF([test x"$DLLIB" = x -a x"$dl_error" = "xno"],
|
||||||
[
|
[
|
||||||
AC_MSG_NOTICE([error: no libdl found; check path for libdl package first...])
|
AC_MSG_NOTICE([error: no libdl found; check path for libdl package first...])
|
||||||
dl_error="yes"
|
dl_error="yes"
|
||||||
])
|
])
|
||||||
|
|
||||||
AS_IF([test x"$DLLIB" != x -a "$dl_error" = "no"], [have_dl="yes"])
|
AS_IF([test x"$dl_error" = "xno"],
|
||||||
|
[
|
||||||
|
AC_CHECK_DECL([RTLD_NEXT], [have_rtld_next="yes"], [], [#include <dlfcn.h>])
|
||||||
|
|
||||||
|
AS_IF([test x"$have_rtld_next" = "xno"],
|
||||||
|
[
|
||||||
|
AC_MSG_CHECKING([whether we need to define _GNU_SOURCE to get RTLD_NEXT])
|
||||||
|
AC_TRY_COMPILE(
|
||||||
|
[
|
||||||
|
#define _GNU_SOURCE
|
||||||
|
#include <dlfcn.h>
|
||||||
|
],
|
||||||
|
[
|
||||||
|
#ifndef RTLD_NEXT
|
||||||
|
(void) RTLD_NEXT;
|
||||||
|
#endif
|
||||||
|
],
|
||||||
|
[
|
||||||
|
AC_MSG_RESULT([yes])
|
||||||
|
have_rtld_next="yes"
|
||||||
|
CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
AC_MSG_RESULT([no])
|
||||||
|
])
|
||||||
|
])
|
||||||
|
])
|
||||||
|
|
||||||
|
AS_IF([test x"$DLLIB" != x -a x"$dl_error" = "xno"], [have_dl="yes"])
|
||||||
|
|
||||||
AC_SUBST(DLINCDIR)
|
AC_SUBST(DLINCDIR)
|
||||||
AC_SUBST(DLLIBDIR)
|
AC_SUBST(DLLIBDIR)
|
||||||
@ -753,12 +783,13 @@ AC_DEFUN([ACVT_IOWRAP],
|
|||||||
AS_IF([test x"$check_iowrap" = "xyes"],
|
AS_IF([test x"$check_iowrap" = "xyes"],
|
||||||
[
|
[
|
||||||
AS_IF([test x"$dl_error" = x], [ACVT_DL])
|
AS_IF([test x"$dl_error" = x], [ACVT_DL])
|
||||||
AS_IF([test x"$have_dl" = "xno"], [iowrap_error="yes"])
|
AS_IF([test x"$have_dl" = "xno" -o x"$have_rtld_next" = "xno"],
|
||||||
|
[iowrap_error="yes"])
|
||||||
|
|
||||||
AS_IF([test x"$iowrap_error" = "xno"],
|
AS_IF([test x"$iowrap_error" = "xno"],
|
||||||
[
|
[
|
||||||
sav_CFLAGS=$CFLAGS
|
sav_CPPFLAGS=$CPPFLAGS
|
||||||
CFLAGS="$CFLAGS -D_LARGEFILE64_SOURCE"
|
CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE"
|
||||||
AC_CHECK_FUNCS([ \
|
AC_CHECK_FUNCS([ \
|
||||||
creat64 \
|
creat64 \
|
||||||
fopen64 \
|
fopen64 \
|
||||||
@ -769,7 +800,7 @@ AC_DEFUN([ACVT_IOWRAP],
|
|||||||
open64 \
|
open64 \
|
||||||
pread64 \
|
pread64 \
|
||||||
pwrite64])
|
pwrite64])
|
||||||
CFLAGS=$sav_CFLAGS
|
CPPFLAGS=$sav_CPPFLAGS
|
||||||
|
|
||||||
have_iowrap="yes"
|
have_iowrap="yes"
|
||||||
])
|
])
|
||||||
|
@ -10,9 +10,6 @@
|
|||||||
* See the file COPYING in the package base directory for details
|
* See the file COPYING in the package base directory for details
|
||||||
**/
|
**/
|
||||||
|
|
||||||
#ifndef _GNU_SOURCE
|
|
||||||
#define _GNU_SOURCE
|
|
||||||
#endif
|
|
||||||
#ifndef _LARGEFILE64_SOURCE
|
#ifndef _LARGEFILE64_SOURCE
|
||||||
#define _LARGEFILE64_SOURCE
|
#define _LARGEFILE64_SOURCE
|
||||||
#endif
|
#endif
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user