-
- *-*-darwin* )
- dnl For Unix to MacOS X porting instructions, see:
- dnl http://fink.sourceforge.net/doc/porting/porting.html
- TOOLCHAIN_DEFS="${TOOLCHAIN_DEFS} -DWXMAKINGDLL"
- CFLAGS="$CFLAGS -fno-common"
- CXXFLAGS="$CXXFLAGS -fno-common"
- dnl wxWindows must be fully binded (lazy binding breaks RTTI classinfo)
- dnl this can be done either with the exe linker flag -Wl,-bind_at_load
- dnl or with a double stage link in order to create a single module
- dnl "-init _wxWindowsDylibInit" not useful with lazy linking solved
- SHARED_LD="\${top_srcdir}/distrib/mac/shared-ld-sh -undefined suppress -flat_namespace -o"
- PIC_FLAG="-dynamic -fPIC"
- ;;
-
- *-*-aix* )
- dnl default settings are ok for gcc
- if test "$GCC" != "yes"; then
- dnl the abs path below used to be hardcoded here so I guess it must
- dnl be some sort of standard location under AIX?
- AC_CHECK_PROG(AIX_CXX_LD, makeC++SharedLib,
- makeC++SharedLib, /usr/lpp/xlC/bin/makeC++SharedLib)
-
- SHARED_LD="$(AIX_CXX_LD) -p 0 -o"
- fi
- ;;
-
- *-*-cygwin* | *-*-mingw32* )
- WX_LIBRARY_IMPORTLIB="${WX_LIBRARY_NAME_SHARED}.a"
-
- SHARED_LD="${CXX} -shared -Wl,--out-implib,lib/${WX_LIBRARY_IMPORTLIB} -o"
- TOOLCHAIN_DLL_DEFS="${TOOLCHAIN_DLL_DEFS} -DWXUSINGDLL=1"
-
- PIC_FLAG="-UWXUSINGDLL -DWXMAKINGDLL=1 -D_DLL=1 -D_WINDLL=1"
-
- dnl Don't build seperate GL library
- WX_ALL="\$(build_libdir)/${WX_LIBRARY_NAME_SHARED}"
- WX_ALL_INSTALLED="CREATE_INSTALLED_LINKS"
-
- if test "$wxUSE_OPENGL" = "yes"; then
- LIBS="${LIBS} ${OPENGL_LIBS}"
- fi
- ;;
-
- *-*-beos* )
- dnl can't use gcc under BeOS for shared library creation because it
- dnl complains about missing 'main'
- SHARED_LD="${LD} -shared -o"
- ;;
-
- *-*-irix* )
- dnl default settings are ok for gcc
- if test "$GCC" != "yes"; then
- PIC_FLAG="-KPIC"
- fi
- ;;
-
- *-*-freebsd* | *-*-openbsd* | *-*-netbsd* | \
- *-*-sunos4* | \
- *-*-osf* | \
- *-*-dgux5* | \
- *-*-sysv5* )
- dnl defaults are ok
+
+ powerpc-*-darwin* )
+ SAMPLES_RPATH_POSTLINK="\$(top_builddir)change-install-names \$(LIBDIRNAME) \$(prefix) \$@"
+ cat <<EOF >change-install-names
+#!/bin/sh
+libnames=\`cd \${1} ; ls -1 | grep '\.[[0-9]][[0-9]]*\.dylib\$'\`
+inst_cmd="install_name_tool "
+for i in \${libnames} ; do
+ inst_cmd="\${inst_cmd} -change \${2}/lib/\${i} \${1}/\${i}"
+done
+\${inst_cmd} \${3}
+EOF
+ chmod +x change-install-names