--- ../src/makelib.env.in.orig	Tue Dec 14 13:41:50 2004
+++ ../src/makelib.env.in	Tue Dec 14 14:08:57 2004
@@ -34,14 +34,25 @@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_DATA = @INSTALL_DATA@
 
+SO_SUFFIX = @SO_SUFFIX@
 TARGETLIB_STATIC = $(TARGET_LIBNAME).a
+ifeq ($(SO_SUFFIX),dylib)
+TARGETLIB_SHARED = $(TARGET_LIBNAME).$(LIBVERSION_CURRENT).$(LIBVERSION_REVISION).$(LIBVERSION_AGE).$(SO_SUFFIX)
+TARGETLIB_LINK1 = $(TARGET_LIBNAME).$(LIBVERSION_CURRENT).$(SO_SUFFIX)
+TARGETLIB_LINK2 = $(TARGET_LIBNAME).$(SO_SUFFIX)
+else
 TARGETLIB_SHARED = $(TARGET_LIBNAME).so.$(LIBVERSION_CURRENT).$(LIBVERSION_REVISION).$(LIBVERSION_AGE)
 TARGETLIB_LINK1 = $(TARGET_LIBNAME).so.$(LIBVERSION_CURRENT)
 TARGETLIB_LINK2 = $(TARGET_LIBNAME).so
+endif
 
 TARGETLIB_SONAME = @WX_TARGET_LIBRARY_SONAME@
 
+ifeq ($(SO_SUFFIX),dylib)
+LDFLAGS_VERSIONING = -compatibility_version @WX_MAJOR_VERSION_NUMBER@.@WX_MINOR_VERSION_NUMBER@ -current_version @WX_MAJOR_VERSION_NUMBER@.@WX_MINOR_VERSION_NUMBER@.@WX_RELEASE_NUMBER@ -install_name $(libdir)/$(TARGETLIB_LINK1)
+else
 LDFLAGS_VERSIONING = @LDFLAGS_VERSIONING@
+endif
 
 # NB: see remark in Makefile.in as to why we don't use %.foo: %.bar rules
 .SUFFIXES: .o .c .cpp .cxx
