Mac OS X autoconf changes, this is

Peter O'Gorman peter@pogma.com
Sat, 5 Oct 2002 23:24:40 +0900


I want to put this into configure.in, this is a big hack, but there is  
no way that libtool would accept this as a patch, because it is just  
plain wrong for most software, but is required for gnucash on macos...  
is this acceptable, is there a "better way"?


AC_MSG_CHECKING(for darwin)
case $host_os in
	rhapsody* | darwin1*)
		AC_MSG_RESULT([yes, but too old])
		AC_MSG_ERROR([This platform is not supported, please update to latest  
darwin])
		;;
	darwin*)
		AC_MSG_RESULT([yes, patching libtool to always build dylibs])
		mv libtool libtool.old
		sed -e 's/^deplibs_check_method.*/deplibs_check_method=pass_all/g' \
			-e 's|^archive_cmds.*|archive_cmds="$CC -dynamiclib  
\\$allow_undefined_flag -o \\$lib \\$libobjs \\$deplibs\\$linker_flags  
-install_name \\$rpath/\\$soname \\$verstring"|g' \
			-e  
's|^library_names_spec.*|library_names_spec="\\$libname\\$release\\$vers 
uffix.dylib \\$libname\\$release\\${major}.dylib \\$libname.dylib"|g' \
			-e  
's|^soname_spec.*|soname_spec="\\$libname\\$release\\$major.dylib"|g' \
			< libtool.old > libtool
		rm libtool.old
		;;
	*)
		AC_MSG_RESULT(no)
		;;	
esac