libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

darwin support


From: Simon Spero
Subject: darwin support
Date: Sat, 21 Apr 2001 20:27:27 -0400

Here are a few fixes that seem to make libtool better behaved under MacOS X 10.0.1 (darwin 1.3.1). Testing was done with dl compatibility library installed as libdl.

Changes:
1) change archive_cmd to look like version in darwin cvs tree. (quoting problems) 2) add hardcode_libdir_flag_spec. Hack, but fixed problems with isntall tests
3) set lt_cv_deplibs_check_method.
4) Add LIBADD_DL to LIBS when checking to see if  dlsym needs _

[ I also had to make some changes to automake to fix bug with clean targets if glibtool is found]

Things now seem to work, but there are 2 failures when running the check:

1) hardcode.test
                I can understand this one failing; don't know if it's harmful
2) quote.test
fails \\ quoting. may be related to problem with archive_cmd getting mangled.

Patches are against cvs tree and in the public domain.


Simon   

Index: libtool.m4
===================================================================
RCS file: /cvsroot/libtool/libtool/libtool.m4,v
retrieving revision 1.160
diff -c -r1.160 libtool.m4
*** libtool.m4  2001/04/20 20:55:18     1.160
--- libtool.m4  2001/04/22 00:02:11
***************
*** 1506,1516 ****

   darwin* | rhapsody*)
     allow_undefined_flag='-undefined suppress'
! archive_cmds='$CC `test .$module = .yes && echo -bundle || echo -dynamiclib` $allow_undefined_flag -o $lib $libobjs $deplibs$linkopts -install_name $rpath/$sona
me `test -n "$verstring" -a x$verstring != x0.0 && echo $verstring`'
     # We need to add '_' to the symbols in $export_symbols first
     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
     hardcode_direct=yes
     hardcode_shlibpath_var=no
     whole_archive_flag_spec='-all_load $convenience'
     ;;

--- 1506,1518 ----

   darwin* | rhapsody*)
     allow_undefined_flag='-undefined suppress'
! archive_cmds="\$CC \$(if test .\$module = .yes; then echo -bundle; else echo -dynamiclib; fi) \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$linkopts -in stall_name \$rpath/\$soname \$(if test -n \"\$verstring\" -a x \$verstring != x0.0
; then echo \$verstring ; fi)"
!
     # We need to add '_' to the symbols in $export_symbols first
     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
     hardcode_direct=yes
     hardcode_shlibpath_var=no
+     hardcode_libdir_flag_spec=' '
     whole_archive_flag_spec='-all_load $convenience'
     ;;

***************
*** 3134,3139 ****
--- 3136,3142 ----
   ;;

 darwin* | rhapsody*)
+ lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library
'
   lt_cv_file_magic_cmd='/usr/bin/file -L'
   case "$host_os" in
   rhapsody* | darwin1.[012])
Index: ltdl.m4
===================================================================
RCS file: /cvsroot/libtool/libtool/ltdl.m4,v
retrieving revision 1.18
diff -c -r1.18 ltdl.m4
*** ltdl.m4     2001/02/05 00:24:55     1.18
--- ltdl.m4     2001/04/22 00:02:12
***************
*** 266,274 ****
--- 266,277 ----
       AC_CACHE_CHECK([whether we have to add an underscore for dlsym],
               libltdl_cv_need_uscore, [dnl
               libltdl_cv_need_uscore=unknown
+               LIBSAVE="$LIBS"
+                LIBS="$LIBS $LIBADD_DL"
               _LT_AC_TRY_DLOPEN_SELF(
                 libltdl_cv_need_uscore=no, libltdl_cv_need_uscore=yes,
                 [],                        libltdl_cv_need_uscore=cross)
+              LIBS=$LIBSAVE
       ])
   fi
 fi



reply via email to

[Prev in Thread] Current Thread [Next in Thread]