Mercurial > hg > octave-avbm
changeset 4163:811ec5317aeb
[project @ 2002-11-11 03:40:16 by jwe]
author | jwe |
---|---|
date | Mon, 11 Nov 2002 03:40:16 +0000 |
parents | bcdf1c264e08 |
children | 67ef87a80c49 |
files | ChangeLog configure.in |
diffstat | 2 files changed, 51 insertions(+), 32 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2002-11-10 Per Persson <persquare@mac.com> + + * configure.in: Detect dyld API for dynamic linking on OS X. + 2002-11-09 Per Persson <persquare@mac.com> * configure.in: Use $(TOPDIR)/src/octave, not $(bindir)/octave for
--- a/configure.in +++ b/configure.in @@ -22,7 +22,7 @@ ### 02111-1307, USA. AC_INIT -AC_REVISION($Revision: 1.387 $) +AC_REVISION($Revision: 1.388 $) AC_PREREQ(2.52) AC_CONFIG_SRCDIR([src/octave.cc]) AC_CONFIG_HEADER(config.h) @@ -916,40 +916,45 @@ dlopen_api=false shl_load_api=false loadlibrary_api=false -if $SHARED_LIBS; then +dyld_api=false - LIBOCTINTERP=-loctinterp$SHLLINKEXT - LIBOCTAVE=-loctave$SHLLINKEXT - LIBCRUFT=-lcruft$SHLLINKEXT +if $SHARED_LIBS || $ENABLE_DYNAMIC_LINKING; then + + ### Check for dyld first since OS X can have a non-standard libdl - AC_CHECK_LIB(dl, dlopen) - AC_CHECK_FUNCS(dlopen dlsym dlerror dlclose) - if test $ac_cv_func_dlclose = yes && test $ac_cv_func_dlerror = yes \ - && test $ac_cv_func_dlopen = yes && test $ac_cv_func_dlsym = yes; then - dlopen_api=true - else - AC_CHECK_LIB(dld, shl_load) - AC_CHECK_FUNCS(shl_load shl_findsym) - if test $ac_cv_func_shl_load = yes \ - && test $ac_cv_func_shl_findsym = yes; then - shl_load_api=true + AC_CHECK_HEADER(Mach-O/dyld.h) + if test $ac_cv_header_Mach_O_dyld_h = yes; then + dyld_api=true + else + AC_CHECK_LIB(dl, dlopen) + AC_CHECK_FUNCS(dlopen dlsym dlerror dlclose) + if test $ac_cv_func_dlclose = yes && test $ac_cv_func_dlerror = yes \ + && test $ac_cv_func_dlopen = yes && test $ac_cv_func_dlsym = yes; then + dlopen_api=true else - AC_CHECK_LIB(wsock32, LoadLibrary) - AC_CHECK_FUNCS(LoadLibrary) - if test $ac_cv_func_loadlibrary = yes; then - loadlibrary_api=true + AC_CHECK_LIB(dld, shl_load) + AC_CHECK_FUNCS(shl_load shl_findsym) + if test $ac_cv_func_shl_load = yes \ + && test $ac_cv_func_shl_findsym = yes; then + shl_load_api=true else - case "$canonical_host_type" in - rs6000-ibm-aix* | powerpc-ibm-aix*) - LIBDLFCN="-ldlfcn -ll -lld" - DLFCN_INCFLAGS='-I$(top_srcdir)/dlfcn -I$(TOPDIR)/dlfcn' - dlopen_api=true - ;; - i[[3456]]86-*-sco3.2v5*) - LD_CXX='LD_RUN_PATH=$LD_RUN_PATH:$(octlibdir) $(CXX)' - dlopen_api=true - ;; - esac + AC_CHECK_LIB(wsock32, LoadLibrary) + AC_CHECK_FUNCS(LoadLibrary) + if test $ac_cv_func_loadlibrary = yes; then + loadlibrary_api=true + else + case "$canonical_host_type" in + rs6000-ibm-aix* | powerpc-ibm-aix*) + LIBDLFCN="-ldlfcn -ll -lld" + DLFCN_INCFLAGS='-I$(top_srcdir)/dlfcn -I$(TOPDIR)/dlfcn' + dlopen_api=true + ;; + i[[3456]]86-*-sco3.2v5*) + LD_CXX='LD_RUN_PATH=$LD_RUN_PATH:$(octlibdir) $(CXX)' + dlopen_api=true + ;; + esac + fi fi fi fi @@ -964,17 +969,27 @@ elif $loadlibrary_api; then DL_API_MSG="(LoadLibrary)" AC_DEFINE(HAVE_LOADLIBRARY_API, 1, [Define if your system has LoadLibrary for dynamic linking]) + elif $dyld_api; then + DL_API_MSG="(dyld)" + AC_DEFINE(HAVE_DYLD_API, 1, [Define if your system has dyld for dynamic linking]) fi - if $dlopen_api || $shl_load_api || $loadlibrary_api; then + if $dlopen_api || $shl_load_api || $loadlibrary_api || $dyld_api; then ENABLE_DYNAMIC_LINKING=true AC_DEFINE(ENABLE_DYNAMIC_LINKING, 1, [Define if using dynamic linking]) fi +fi + +if $SHARED_LIBS; then + LIBOCTINTERP=-loctinterp$SHLLINKEXT + LIBOCTAVE=-loctave$SHLLINKEXT + LIBCRUFT=-lcruft$SHLLINKEXT else LIBOCTINTERP='$(TOPDIR)/src/liboctinterp.$(LIBEXT)' LIBOCTAVE='$(TOPDIR)/liboctave/liboctave.$(LIBEXT)' LIBCRUFT='$(TOPDIR)/libcruft/libcruft.$(LIBEXT)' fi + AC_SUBST(LD_CXX) AC_SUBST(LIBDLFCN) AC_SUBST(DLFCN_INCFLAGS)