shlibpath_var=DYLD_LIBRARY_PATH
shrext='$(test .$module = .yes && echo .so || echo .dylib)'
# Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
- sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g"`
+ sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
+ sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
;;
dgux*)
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
LIBM=
case $host in
-*-*-beos* | *-*-cygwin* | *-*-pw32*)
+*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
# These system don't have libm
;;
*-ncr-sysv4.3*)
test "$enable_shared" = yes && enable_static=no
fi
;;
+ darwin* | rhapsody*)
+ _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+ case "$host_os" in
+ rhapsody* | darwin1.[[012]])
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
+ ;;
+ *) # Darwin 1.3 on
+ test -z ${LD_TWOLEVEL_NAMESPACE} && _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
+ ;;
+ esac
+ _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+ # FIXME: Relying on posixy $() will cause problems for
+ # cross-compilation, but unfortunately the echo tests do not
+ # yet detect zsh echo's removal of \ escapes. Also zsh mangles
+ # `"' quotes if we put them in here... so don't!
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags $(test .$module != .yes && echo -install_name $rpath/$soname $verstring)'
+ # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
+ if test -z ${ZSH_VERSION} ; then
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym && $CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags $(test .$module != .yes && echo -install_name $rpath/$soname $verstring) && strip -s $output_objdir/${libname}-symbols.expsym -u ${lib}'
+ else
+ #just in case a default was set somewhere
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)=''
+ fi
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
+ ;;
esac
AC_MSG_RESULT([$enable_shared])
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
;;
*) # Darwin 1.3 on
- _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
+ test -z ${LD_TWOLEVEL_NAMESPACE} && _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
;;
esac
-
+ _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
# FIXME: Relying on posixy $() will cause problems for
# cross-compilation, but unfortunately the echo tests do not
# yet detect zsh echo's removal of \ escapes. Also zsh mangles
# `"' quotes if we put them in here... so don't!
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs && $CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib ${lib}-master.o $deplibs$compiler_flags $(test .$module != .yes && echo -install_name $rpath/$soname $verstring)'
- # We need to add '_' to the symbols in $export_symbols first
- #_LT_AC_TAGVAR(archive_expsym_cmds, $1)="$_LT_AC_TAGVAR(archive_cmds, $1)"' && strip -s $export_symbols'
+ # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
+ if test -z ${ZSH_VERSION} ; then
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym && $CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs && $CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib ${lib}-master.o $deplibs$compiler_flags $(test .$module != .yes && echo -install_name $rpath/$soname $verstring) && strip -s $output_objdir/${libname}-symbols.expsym -u ${lib}'
+ else
+ #just in case a default was set somewhere
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)=''
+ fi
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
_LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
;;
*) # Darwin 1.3 on
- _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
+ test -z ${LD_TWOLEVEL_NAMESPACE} && _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
;;
esac
-
+ _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
# FIXME: Relying on posixy $() will cause problems for
# cross-compilation, but unfortunately the echo tests do not
# yet detect zsh echo's removal of \ escapes. Also zsh mangles
# `"' quotes if we put them in here... so don't!
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs && $CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib ${lib}-master.o $deplibs$compiler_flags $(test .$module != .yes && echo -install_name $rpath/$soname $verstring)'
- # We need to add '_' to the symbols in $export_symbols first
- #_LT_AC_TAGVAR(archive_expsym_cmds, $1)="$_LT_AC_TAGVAR(archive_cmds, $1)"' && strip -s $export_symbols'
+ # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
+ if test -z ${ZSH_VERSION} ; then
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym && $CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs && $CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib ${lib}-master.o $deplibs$compiler_flags $(test .$module != .yes && echo -install_name $rpath/$soname $verstring) && strip -s $output_objdir/${libname}-symbols.expsym -u ${lib}'
+ else
+ #just in case a default was set somewhere
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)=''
+ fi
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
if test "$link_all_deplibs" != no; then
# Add the search paths of all dependency libraries
for deplib in $dependency_libs; do
+ depdepl=
case $deplib in
-L*) path="$deplib" ;;
*.la)
;;
esac
if grep "^installed=no" $deplib > /dev/null; then
- path="-L$absdir/$objdir"
+ path="$absdir/$objdir"
else
eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
if test -z "$libdir"; then
if test "$absdir" != "$libdir"; then
$echo "$modename: warning: \`$deplib' seems to be moved" 1>&2
fi
- path="-L$absdir"
+ path="$absdir"
fi
+ depdepl=
+ case $host in
+ *-*-darwin*)
+ depdepl=`$echo "X$deplib" | ${SED} -e 's,.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
+ depdepl="-l$depdepl"
+ newlib_search_path="$newlib_search_path $path"
+ ;;
+ esac
+ path="-L$path"
+ ;;
+ -l*)
+ case $host in
+ *-*-darwin*)
+ depdepl=$deplib
+ ;;
+ *) continue ;;
+ esac
;;
*) continue ;;
esac
case " $deplibs " in
+ *" $depdepl "*) ;;
+ *) deplibs="$deplibs $depdepl" ;;
+ esac
+ case " $deplibs " in
*" $path "*) ;;
*) deplibs="$deplibs $path" ;;
esac
case $host in
*darwin*)
# Don't allow lazy linking, it breaks C++ global constructors
+ if test "$tagname" = CXX ; then
compile_command="$compile_command ${wl}-bind_at_load"
finalize_command="$finalize_command ${wl}-bind_at_load"
+ fi
;;
esac
$echo "$modename: warning: to ensure that POSIX-compatible ar will work" 1>&2
AR_FLAGS=cq
fi
+ # Is there a better way of finding the last object in the list?
+ for obj in $save_oldobjs
+ do
+ last_oldobj=$obj
+ done
for obj in $save_oldobjs
do
oldobjs="$objlist $obj"
else
# the above command should be used before it gets too long
oldobjs=$objlist
+ if test "$obj" = "$last_oldobj" ; then
+ RANLIB=$save_RANLIB
+ fi
test -z "$concat_cmds" || concat_cmds=$concat_cmds~
eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
objlist=