diff options
author | rmanfredi <rmanfredi@2592e710-e01b-42a5-8df0-11608a6cc53d> | 2010-11-27 11:55:39 +0000 |
---|---|---|
committer | rmanfredi <rmanfredi@2592e710-e01b-42a5-8df0-11608a6cc53d> | 2010-11-27 11:55:39 +0000 |
commit | 13158f86e3904284dce3dad36b64f07414459551 (patch) | |
tree | 12cc7b8d1b808c8c3505bb44cf067bd9ab98b1e6 /mcon/U/d_dlopen.U | |
parent | 194d1db97053d853d5f81c362c461d71c05ea80e (diff) |
Applied mega patch from Christian Biere to greatly improve feature detection
and make a huge step towards better support for cross-compiling.
git-svn-id: svn://svn.code.sf.net/p/dist/code/trunk/dist@34 2592e710-e01b-42a5-8df0-11608a6cc53d
Diffstat (limited to 'mcon/U/d_dlopen.U')
-rw-r--r-- | mcon/U/d_dlopen.U | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/mcon/U/d_dlopen.U b/mcon/U/d_dlopen.U index ad62c53..5c2a0b0 100644 --- a/mcon/U/d_dlopen.U +++ b/mcon/U/d_dlopen.U @@ -17,7 +17,7 @@ ?RCS: Revision 3.0.1.1 1994/08/29 16:07:34 ram ?RCS: patch32: created by ADO ?RCS: -?MAKE:d_dlopen: Inlibc runnm +?MAKE:d_dlopen: Trylink cat i_dlfcn ?MAKE: -pick add $@ %< ?S:d_dlopen: ?S: This variable conditionally defines the HAS_DLOPEN symbol, which @@ -29,17 +29,20 @@ ?C:. ?H:#$d_dlopen HAS_DLOPEN /**/ ?H:. -?T: xxx_runnm ?LINT:set d_dlopen -?X: We don't permanently change runnm, but we do temporarily. -?LINT: change runnm : see if dlopen exists -?X: On NetBSD and FreeBSD, dlopen is available, but it is in -?X: /usr/lib/crt0.o, not in any of the libraries. Therefore, do not -?X: use the nm extraction, but use a real compile and link test instead. -xxx_runnm="$runnm" -runnm=false -set dlopen d_dlopen -eval $inlibc -runnm="$xxx_runnm" +$cat >try.c <<EOC +#$i_dlfcn I_DLFCN +#ifdef I_DLFCN +#include <dlfcn.h> +#endif +int main(void) +{ + void *p; + p = dlopen("file", RTLD_GLOBAL); + return p ? 0 : 1; +} +EOC +set d_dlopen '-ldl' +eval $trylink |