From ba76b7a3cce22f3a2b0d5e417f6beeedd6229d11 Mon Sep 17 00:00:00 2001 From: mainzelm Date: Tue, 27 Jan 2004 10:38:36 +0000 Subject: [PATCH] Fixed check for rdynamic, provided by Stephen Ma --- configure.in | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/configure.in b/configure.in index d50ed90..d6fbc21 100644 --- a/configure.in +++ b/configure.in @@ -33,8 +33,10 @@ dnl Note, on some Sun's, you can link with -rdynamic but the resulting dnl a.out always core dumps. define(S48_RDYNAMIC, [dnl AC_MSG_CHECKING([link with -rdynamic]) - AC_TRY_COMPILE([#include - #include ], + AC_RUN_IFELSE(AC_LANG_PROGRAM([ +#include +#include +int export_test = 0;], [ #ifndef RTLD_LAZY #define RTLD_LAZY 0 @@ -44,7 +46,6 @@ define(S48_RDYNAMIC, [dnl #define RTLD_GLOBAL 0 #endif - int export_test = 0; void *dlhandle; void *intp; char *err; @@ -52,21 +53,19 @@ define(S48_RDYNAMIC, [dnl dlhandle = dlopen(NULL, RTLD_LAZY | RTLD_GLOBAL); if ((err = dlerror()) != NULL) { - printf("dlerror: %s\n", err); return 1; } (void *)intp = dlsym(dlhandle, "export_test"); if ((err = dlerror()) != NULL) { - printf("dlerror: %s\n", err); return 1; } return 0; -], +]), [AC_MSG_RESULT(no)], [AC_MSG_RESULT(yes) LDFLAGS="$LDFLAGS -rdynamic"])