--- wscript.old	2010-09-14 23:02:24.000000000 +0200
+++ wscript	2010-09-14 23:02:31.000000000 +0200
@@ -87,6 +87,7 @@
         return dirvalue
 
     conf.check_tool ('compiler_cc')
+    conf.check_tool ('osx')
     if option_enabled ('vala'):
         if find_program_impl (conf.env, 'valac'):
             conf.check_tool ('vala')
@@ -331,6 +332,7 @@
     if unique == 'yes' and conf.check_cfg (modversion='unique-1.0') == '1.0.4':
         Utils.pprint ('RED', 'unique 1.0.4 found, this version is erroneous.')
         Utils.pprint ('RED', 'Please use an older or newer version.')
+    conf.env['macbundle_PATTERN'] = '%s.so'
 
 def set_options (opt):
     def is_maemo (): return os.path.exists ('/etc/osso-af-init/')
@@ -345,6 +347,7 @@
             default=disable, help='Disable ' + desc, dest='disable_' + option_)
 
     opt.tool_options ('compiler_cc')
+    opt.tool_options ('osx')
     opt.get_option_group ('--check-c-compiler').add_option('-d', '--debug-level',
         action = 'store', default = '',
         help = 'Specify the debugging level. [\'none\', \'debug\', \'full\']',
@@ -505,7 +508,7 @@
                 if os.path.exists (source):
                     bld.install_files ('${SYSCONFDIR}/xdg/' + APPNAME + \
                                        '/extensions/' + folder, source)
-        elif Options.platform == 'linux':
+        else:
             extensions = os.listdir ('data/extensions')
             for extension in extensions:
                 folder = 'lib' + extension + '.so'
