mirror of
git://git.savannah.gnu.org/libtool.git
synced 2025-01-18 14:16:00 +08:00
* libtool.m4 (AC_LIBTOOL_DLOPEN): do not depend on the existence
of dlfcn.h nor on the definition of RTLD_LAZY
This commit is contained in:
parent
f3b997d2ad
commit
8bc4fc86d9
@ -1,5 +1,8 @@
|
|||||||
1999-03-08 Alexandre Oliva <oliva@dcc.unicamp.br>
|
1999-03-08 Alexandre Oliva <oliva@dcc.unicamp.br>
|
||||||
|
|
||||||
|
* libtool.m4 (AC_LIBTOOL_DLOPEN): do not depend on the existence
|
||||||
|
of dlfcn.h nor on the definition of RTLD_LAZY
|
||||||
|
|
||||||
* tests/build-relink.test: hellT was renamed to lt-hell
|
* tests/build-relink.test: hellT was renamed to lt-hell
|
||||||
|
|
||||||
* libltdl/Makefile.am (@TOINST@/libltdl.la): do not hide the
|
* libltdl/Makefile.am (@TOINST@/libltdl.la): do not hide the
|
||||||
|
17
libtool.m4
vendored
17
libtool.m4
vendored
@ -136,17 +136,24 @@ AC_CHECK_FUNC(dlopen, [lt_cv_dlopen="dlopen"],
|
|||||||
|
|
||||||
case "$lt_cv_dlopen" in
|
case "$lt_cv_dlopen" in
|
||||||
dlopen)
|
dlopen)
|
||||||
|
LT_SAVE_LIBS="$LIBS"
|
||||||
|
LT_SAVE_CPPFLAGS="$CPPFLAGS"
|
||||||
|
LIBS="$lt_cv_dlopen_libs $LIBS"
|
||||||
|
AC_CHECK_HEADER(dlfcn.h, [CPPFLAGS="-DHAVE_DLFCN_H $CPPFLAGS"])
|
||||||
AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self,
|
AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self,
|
||||||
[LT_SAVE_LIBS="$LIBS"; LIBS="$lt_cv_dlopen_libs $LIBS"
|
[AC_TRY_RUN([
|
||||||
AC_TRY_RUN([
|
#if HAVE_DLFCN_H
|
||||||
#include <dlfcn.h>
|
#include <dlfcn.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
fnord() { int i=42;}
|
fnord() { int i=42;}
|
||||||
main() { void *self, *ptr1, *ptr2; self=dlopen(0,RTLD_LAZY);
|
main() { void *self, *ptr1, *ptr2; self=dlopen(0,0);
|
||||||
if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord");
|
if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord");
|
||||||
if(ptr1 || ptr2) exit(0); } exit(1); }
|
if(ptr1 || ptr2) exit(0); } exit(1); }
|
||||||
], lt_cv_dlopen_self=no, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=cross)
|
], lt_cv_dlopen_self=no, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=cross)])
|
||||||
LIBS="$LT_SAVE_LIBS"])
|
LIBS="$LT_SAVE_LIBS"
|
||||||
|
CPPFLAGS="$LT_SAVE_CPPFLAGS"
|
||||||
;;
|
;;
|
||||||
# We should probably test other for NULL support in other dlopening
|
# We should probably test other for NULL support in other dlopening
|
||||||
# mechanisms too.
|
# mechanisms too.
|
||||||
|
Loading…
Reference in New Issue
Block a user