From 25c1ac58b0e8b45a8247e68d6ce950a2a11409ab Mon Sep 17 00:00:00 2001 From: imaginos Date: Tue, 24 Aug 2004 23:03:39 +0000 Subject: [PATCH] solaris doesn't like -rdynamic flag git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@16 726aef4b-f618-498e-8847-2d620e286838 --- configure | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++-- configure.in | 9 +++++-- 2 files changed, 71 insertions(+), 4 deletions(-) diff --git a/configure b/configure index ea71fc40..186c31f2 100755 --- a/configure +++ b/configure @@ -2699,7 +2699,68 @@ if test -z "$NOSSL"; then fi if test "$MODULES" = "yes"; then - echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 + if test -n "$ISSUN"; then + echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 +if test "${ac_cv_lib_dl_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dlopen (); +int +main () +{ +dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_dl_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_dl_dlopen=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 +if test $ac_cv_lib_dl_dlopen = yes; then + appendCXX -D_MODULES +fi + + MODFLAGS="$CXXFLAGS" + else + echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -2757,7 +2818,8 @@ if test $ac_cv_lib_dl_dlopen = yes; then appendCXX -D_MODULES -rdynamic fi - MODFLAGS=`echo $CXXFLAGS | sed 's/-rdynamic//g'` + MODFLAGS=`echo $CXXFLAGS | sed 's/-rdynamic//g'` + fi MODFLAGS="$MODFLAGS -I`pwd`" MODTARGET="modules" appendLib -ldl diff --git a/configure.in b/configure.in index 05ae48af..fd793b56 100644 --- a/configure.in +++ b/configure.in @@ -52,8 +52,13 @@ if test -z "$NOSSL"; then fi if test "$MODULES" = "yes"; then - AC_CHECK_LIB( dl, dlopen, appendCXX -D_MODULES -rdynamic,, ) - MODFLAGS=`echo $CXXFLAGS | sed 's/-rdynamic//g'` + if test -n "$ISSUN"; then + AC_CHECK_LIB( dl, dlopen, appendCXX -D_MODULES,, ) + MODFLAGS="$CXXFLAGS" + else + AC_CHECK_LIB( dl, dlopen, appendCXX -D_MODULES -rdynamic,, ) + MODFLAGS=`echo $CXXFLAGS | sed 's/-rdynamic//g'` + fi MODFLAGS="$MODFLAGS -I`pwd`" MODTARGET="modules" appendLib -ldl