+2001-04-01 Christoph Pfisterer <cp@chrisp.de>
+
+ * libtool.m4, ltconfig.in, ltcf-c.sh, ltcf-cxx.sh: Fixed
+ support for Darwin and Rhapsody. Now correctly hardcodes the
+ library path and adds versioning. Other small fixes.
+ * ltmain.in: Fixed special cases for libc and libm on Rhapsody and
+ Darwin. One of them was misplaced. Added version_type case for
+ Rhapsody and Darwin, named "darwin".
+
2001-03-31 Gary V. Vaughan <gvv@techie.com>
* ltmain.in: Remove the code for stripping duplicate deplibs
* libltdl can now be built as a dll with win32.
* m4 macros needed to configure libltdl split out into libltdl/ltdl.m4.
* New port to NEWS-OS Release 6.
-* Improved support for mingw32, Compaq Tru64 V5.0 and Digital Unix V4.*.
+* Improved support for darwin (rhapsody), mingw32, Compaq Tru64 V5.0
+ and Digital Unix V4.*.
* Initial support for ia64 linux.
* Initial support for a.out freebsd shared libs.
* Initial support for Paul Sokolovsky's pw32 POSIX over win32 layer.
darwin* | rhapsody*)
lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
+ lt_cv_file_magic_cmd='/usr/bin/file -L'
+ case "$host_os" in
+ rhapsody* | darwin1.[012])
+ lt_cv_file_magic_test_file='/System/Library/Frameworks/System.framework/System'
+ ;;
+ *) # Darwin 1.3 on
+ lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
+ ;;
+ esac
;;
freebsd* )
$CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
;;
- darwin*|rhapsody*)
- allow_undefined_flag='-undefined warning'
- archive_cmds='$CC $(if test "$module" = "yes"; then echo -bundle; else
- echo -dynamiclib; fi) -o $lib $libobjs $deplibs $linkopts'
- archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
- ## What we need is to hardcode the path to the library, not the search path
- #hardcode_direct=yes
- #hardcode_libdir_flag_spec='-install_name $libdir/$lib'
+ 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/$soname `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'
+ whole_archive_flag_spec='-all_load $convenience'
;;
netbsd*)
ac_cv_prog_cc_static='-static'
case $host_os in
- beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
- # PIC is the default for these OSes.
- ;;
aix*)
# All AIX code is PIC.
if test "$host_cpu" = ia64; then
lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
fi
;;
- *djgpp*)
- # DJGPP does not support shared libraries at all
- ac_cv_prog_cc_pic=
+ amigaos*)
+ # FIXME: we need at least 68020 code to build shared libraries, but
+ # adding the `-m68020' flag to GCC prevents building anything better,
+ # like `-m68040'.
+ ac_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
+ ;;
+ beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
+ # PIC is the default for these OSes.
;;
cygwin* | mingw* | os2*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
ac_cv_prog_cc_pic='-DDLL_EXPORT'
;;
- amigaos*)
- # FIXME: we need at least 68020 code to build shared libraries, but
- # adding the `-m68020' flag to GCC prevents building anything better,
- # like `-m68040'.
- ac_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ lt_cv_prog_cc_pic='-fno-common'
+ ;;
+ *djgpp*)
+ # DJGPP does not support shared libraries at all
+ ac_cv_prog_cc_pic=
;;
sysv4*MP*)
if test -d /usr/nec; then
ac_cv_prog_cc_static='-static'
case $host_os in
- beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
- # PIC is the default for these OSes.
- ;;
aix*)
# All AIX code is PIC.
if test "$host_cpu" = ia64; then
lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
fi
;;
- *djgpp*)
- # DJGPP does not support shared libraries at all
- ac_cv_prog_cc_pic=
+ amigaos*)
+ # FIXME: we need at least 68020 code to build shared libraries, but
+ # adding the `-m68020' flag to GCC prevents building anything better,
+ # like `-m68040'.
+ ac_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
+ ;;
+ beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
+ # PIC is the default for these OSes.
;;
cygwin* | mingw* | os2*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
ac_cv_prog_cc_pic='-DDLL_EXPORT'
;;
- amigaos*)
- # FIXME: we need at least 68020 code to build shared libraries, but
- # adding the `-m68020' flag to GCC prevents building anything better,
- # like `-m68040'.
- ac_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ lt_cv_prog_cc_pic='-fno-common'
+ ;;
+ *djgpp*)
+ # DJGPP does not support shared libraries at all
+ ac_cv_prog_cc_pic=
;;
sysv4*MP*)
if test -d /usr/nec; then
;;
darwin* | rhapsody*)
- library_names_spec='${libname}.`if test "$module" = "yes"; then echo so; else echo dylib; fi`'
+ dynamic_linker="$host_os dyld"
+ version_type=darwin
need_lib_prefix=no
need_version=no
- postinstall_cmds='chmod +x $lib'
+ library_names_spec='${libname}${release}${versuffix}.`test .$module = .yes && echo so || echo dylib` ${libname}${release}${major}.$`test .$module = .yes && echo so || echo dylib` ${libname}.`test .$module = .yes && echo so || echo dylib`'
+ soname_spec='${libname}${release}${major}.`test .$module = .yes && echo so || echo dylib`'
shlibpath_overrides_runpath=yes
shlibpath_var=DYLD_LIBRARY_PATH
;;
# These systems don't actually have c library (as such)
continue
;;
- *-*-rhapsody* | *-*-darwin*)
- # Darwin C library is in the System framework
+ *-*-rhapsody* | *-*-darwin1.[012])
+ # Rhapsody C library is in the System framework
deplibs="$deplibs -framework System"
+ continue
;;
esac
elif test "$arg" = "-lm"; then
# These systems don't actually have math library (as such)
continue
;;
- *-*-rhapsody* | *-*-darwin*)
- # Darwin math library is in the System framework
+ *-*-rhapsody* | *-*-darwin1.[012])
+ # Rhapsody math library is in the System framework
deplibs="$deplibs -framework System"
+ continue
;;
esac
fi
$echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
fast_install=no
;;
- *-*-rhapsody* | *-*-darwin*)
- # Darwin C library is in the System framework
- deplibs="$deplibs -framework System"
- ;;
*)
no_install=yes
;;
case $version_type in
none) ;;
+ darwin)
+ # Like Linux, but with the current version available in
+ # verstring for coding it into the library header
+ major=.`expr $current - $age`
+ versuffix="$major.$age.$revision"
+ # Darwin ld doesn't like 0 for these options...
+ minor_current=`expr $current + 1`
+ verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
+ ;;
+
+ freebsd-aout)
+ major=".$current"
+ versuffix=".$current.$revision";
+ ;;
+
+ freebsd-elf)
+ major=".$current"
+ versuffix=".$current";
+ ;;
+
irix)
major=`expr $current - $age + 1`
verstring="sgi$major.$revision"
versuffix=".$current.$revision"
;;
- freebsd-aout)
- major=".$current"
- versuffix=".$current.$revision";
- ;;
-
- freebsd-elf)
- major=".$current"
- versuffix=".$current";
- ;;
-
windows)
# Use '-' rather than '.', since we only want one
# extension on DOS 8.3 filesystems.
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*)
# these systems don't actually have a c library (as such)!
;;
+ *-*-rhapsody* | *-*-darwin1.[012])
+ # Rhapsody C library is in the System framework
+ deplibs="$deplibs -framework System"
+ ;;
*)
# Add libc to deplibs on all other systems if necessary.
if test $build_libtool_need_lc = "yes"; then