comparison configure.in @ 2079:9402c85dcf6f

[xemacs-hg @ 2004-05-14 15:35:28 by james] Second LTDL patch due to the still unknown problem preventing the first commit from committing the stuff in the top-level directory.
author james
date Fri, 14 May 2004 15:35:31 +0000
parents a741f294362b
children 3c2d928e17ad
comparison
equal deleted inserted replaced
2078:0bcc1e4dfd91 2079:9402c85dcf6f
3348 3348
3349 dnl This must come before the detection code for anything that is in a module 3349 dnl This must come before the detection code for anything that is in a module
3350 if test "$with_modules" != "no"; then 3350 if test "$with_modules" != "no"; then
3351 AC_CHECKING(for module support) 3351 AC_CHECKING(for module support)
3352 3352
3353 dnl Check for MS-Windows 3353 case "$opsys" in
3354 if test "$with_msw" = "yes"; then 3354 mingw* | cygwin* ) have_dl=yes ;;
3355 have_dl=yes; 3355 darwin ) have_dl=yes
3356 else 3356 AC_DEFINE(HAVE_DYLD)
3357 case "$opsys" in 3357 ;;
3358 darwin ) have_dl=yes; AC_DEFINE(HAVE_DYLD) ;; 3358 * )
3359 * ) 3359 dnl Check for the ELFish dlopen()
3360 dnl Find headers and libraries
3361 AC_CHECK_HEADER(dlfcn.h, [ 3360 AC_CHECK_HEADER(dlfcn.h, [
3362 AC_MSG_CHECKING([for dlopen in -lc]) 3361 AC_MSG_CHECKING([for dlopen in -lc])
3363 AC_TRY_LINK([#include <dlfcn.h>],dnl 3362 AC_TRY_LINK([#include <dlfcn.h>],dnl
3364 [dlopen ("", 0);], [ have_dl=yes ], [ 3363 [dlopen ("", 0);], [ have_dl=yes ], [
3365 AC_MSG_CHECKING([for dlopen in -ldl]) 3364 AC_MSG_CHECKING([for dlopen in -ldl])
3366 ac_save_LIBS="$LIBS" 3365 ac_save_LIBS="$LIBS"
3367 LIBS="-ldl $LIBS" 3366 LIBS="$LIBS -ldl"
3368 AC_TRY_LINK([#include <dlfcn.h>],dnl 3367 AC_TRY_LINK([#include <dlfcn.h>],dnl
3369 [dlopen ("", 0);], [ have_dl=yes ], 3368 [dlopen ("", 0);], [ have_dl=yes ], [
3370 [LIBS="$ac_save_LIBS"]) 3369 AC_MSG_CHECKING([for dlopen in -lsvld])
3371 ac_save_LIBS=])]) 3370 LIBS="$ac_save_LIBS -lsvld"
3372 if test -n "$have_dl"; then 3371 AC_TRY_LINK([#include <dlfcn.h>],dnl
3372 [dlopen ("", 0);], [ have_dl=yes ], [LIBS="$ac_save_LIBS"])])])])
3373 if test "$have_dl" = "yes"; then
3373 AC_DEFINE(HAVE_DLOPEN) 3374 AC_DEFINE(HAVE_DLOPEN)
3375 else
3376 dnl Check for HP/UX shl_load
3377 AC_CHECK_HEADER(dl.h, [
3378 AC_MSG_CHECKING([for shl_load in -lc])
3379 AC_TRY_LINK([#include <dl.h>],dnl
3380 [shl_load ("", 0, 0);], [have_dl=yes], [
3381 AC_MSG_CHECKING([for shl_load in -ldl])
3382 ac_save_LIBS="$LIBS"
3383 LIBS="$LIBS -ldld"
3384 AC_TRY_LINK([#include <dl.h>],dnl
3385 [shl_load ("", 0, 0);], [have_dl=yes], [LIBS="$ac_save_LIBS"])])])
3386 if test "$have_dl" = "yes"; then
3387 AC_DEFINE(HAVE_SHL_LOAD)
3388 else
3389 dnl Check for libtool's libltdl
3390 AC_CHECK_HEADER(ltdl.h, [
3391 AC_MSG_CHECKING([for lt_dlinit in -lltdl])
3392 ac_save_LIBS="$LIBS"
3393 LIBS="$LIBS -lltdl"
3394 AC_TRY_LINK([#include <ltdl.h>],dnl
3395 [lt_dlinit ();], [have_dl=yes], [LIBS="$ac_save_LIBS"])])
3396 if test "$have_dl" = "yes"; then
3397 AC_DEFINE(HAVE_LTDL)
3398 fi
3399 dnl end !HP/UX
3400 fi
3401 dnl end !dlopen
3374 fi 3402 fi
3375 esac dnl end !darwin 3403 ac_save_LIBS=
3376 fi dnl end !MS-Windows 3404 dnl end !darwin
3405 esac
3377 3406
3378 if test -n "$have_dl"; then 3407 if test -n "$have_dl"; then
3379 dnl XE_SHLIB_STUFF (in aclocal.m4) defines $can_build_shared 3408 dnl XE_SHLIB_STUFF (in aclocal.m4) defines $can_build_shared
3380 XE_SHLIB_STUFF 3409 XE_SHLIB_STUFF
3381 fi 3410 fi