Changeset 1107

Show
Ignore:
Timestamp:
04/25/09 23:33:29 (17 months ago)
Author:
dane
Message:

Add FULL_LIB_PATH option for OS X to link in the full path to libmapnik.dylib in the library itself

Location:
trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/SConstruct

    r1100 r1107  
    157157    # Other variables 
    158158    ('SYSTEM_FONTS','Provide location for python bindings to register fonts (if given aborts installation of bundled DejaVu fonts)',''), 
    159     ('LIB_DIR_NAME','Name to use for lib folder where fonts and plugins are installed','/mapnik/'), 
     159    ('LIB_DIR_NAME','Name to use for the "lib" folder where fonts and plugins are installed','/mapnik/'), 
    160160    PathVariable('PYTHON','Full path to Python executable used to build bindings', sys.executable), 
    161     BoolVariable('FRAMEWORK_PYTHON', 'Link against Framework Python on Mac OSX', 'True'), 
     161    BoolVariable('FRAMEWORK_PYTHON', 'Link against Framework Python on Mac OS X', 'True'), 
     162    BoolVariable('FULL_LIB_PATH', 'Use the full path for the libmapnik.dylib "install_name" when linking on Mac OS X', 'False'), 
    162163    ListVariable('BINDINGS','Language bindings to build','all',['python']), 
    163164    EnumVariable('THREADING','Set threading support','multi', ['multi','single']), 
  • trunk/src/SConscript

    r1045 r1107  
    3030prefix = env['PREFIX'] 
    3131 
     32lib_dir = os.path.normpath(prefix + '/' + env['LIBDIR_SCHEMA']) 
     33 
    3234install_prefix = env['DESTDIR'] + '/' + prefix 
    3335 
     
    3840 
    3941if env['PLATFORM'] == 'Darwin': 
    40     linkflags = '-Wl,-install_name,libmapnik.dylib' 
     42    if env['FULL_LIB_PATH']: 
     43        lib_path = '%s/libmapnik.dylib' % lib_dir 
     44    else: 
     45        lib_path = 'libmapnik.dylib' 
     46    linkflags = '-Wl,-install_name,%s' % lib_path 
    4147elif env['PLATFORM'] == 'SunOS' and env['CXX'].startswith('CC'): 
    4248    linkflags = '-R. -h libmapnik.so' 
    4349else: # Linux and others 
    44     linkflags = '-Wl,-rpath-link,. -Wl,-soname,libmapnik.so.' + ("%d.%d" % (ABI_VERSION[0],ABI_VERSION[1]))  
     50    linkflags = '-Wl,-rpath-link,. -Wl,-soname,libmapnik.so.' + ("%d.%d" % (ABI_VERSION[0],ABI_VERSION[1])) 
    4551 
    4652source = Split(