|
From: <mor...@us...> - 2008-12-11 15:49:04
|
Revision: 3303
http://ecell.svn.sourceforge.net/ecell/?rev=3303&view=rev
Author: moriyoshi
Date: 2008-12-11 15:49:00 +0000 (Thu, 11 Dec 2008)
Log Message:
-----------
* Fix for darwin
Modified Paths:
--------------
ecell3/branches/ecell-3.1/dmtool/configure.in
ecell3/branches/ecell-3.1/dmtool/dmcompile.in
ecell3/branches/ecell-3.1/ecell/bin/ecell3-dmc.in
Modified: ecell3/branches/ecell-3.1/dmtool/configure.in
===================================================================
--- ecell3/branches/ecell-3.1/dmtool/configure.in 2008-12-11 14:11:30 UTC (rev 3302)
+++ ecell3/branches/ecell-3.1/dmtool/configure.in 2008-12-11 15:49:00 UTC (rev 3303)
@@ -77,6 +77,7 @@
dnl
dnl Create the top-level Makefile.
dnl
-AC_OUTPUT(Makefile dmcompile,chmod +x dmcompile)
+AC_CONFIG_FILES(dmcompile, [chmod +x dmcompile])
+AC_CONFIG_FILES(Makefile)
+AC_OUTPUT
-
Modified: ecell3/branches/ecell-3.1/dmtool/dmcompile.in
===================================================================
--- ecell3/branches/ecell-3.1/dmtool/dmcompile.in 2008-12-11 14:11:30 UTC (rev 3302)
+++ ecell3/branches/ecell-3.1/dmtool/dmcompile.in 2008-12-11 15:49:00 UTC (rev 3303)
@@ -6,6 +6,7 @@
import os
import glob
import getopt
+from distutils.sysconfig import get_config_var
from distutils.ccompiler import new_compiler
from distutils.errors import CompileError, LinkError
from distutils.util import split_quoted
@@ -34,6 +35,11 @@
%(progname)s [-h|--help]
Acceptable compiler / linker options:
+ -g
+ -W[warning options]
+ -f[compiler-specific-option]
+ -m[architecture-specific-option]
+ -O[optimizatin-option]
-Dname=value
-Iincludedir
-Llibdir
@@ -45,7 +51,9 @@
print "%s: %s" % ( progname, outstr )
def main():
- opts , args = getopt.gnu_getopt( sys.argv[1:], "hvI:L:l:o:D:", ["help", "verbose", "output=" ])
+ global ORIG_CXXFLAGS, ORIG_CPPFLAGS, ORIG_LDFLAGS, SHLEXT, \
+ CXXSUFFIX, CXXFLAGS, CPPFLAGS, LDFLAGS
+ opts , args = getopt.gnu_getopt( sys.argv[1:], "hvI:L:l:o:D:f:m:O:W:g", ["help", "verbose", "output=" ])
include_dirs = []
library_dirs = []
@@ -61,6 +69,8 @@
return 0
elif anOption in ( '-v', '--verbose'):
verbose = True
+ elif anOption in ( '-f', '-m', '-g', '-O', '-W' ):
+ CXXFLAGS += ' ' + anOption + anArg
elif anOption == '-I':
include_dirs.append( anArg )
elif anOption == '-D':
@@ -119,11 +129,23 @@
msg( "failed to compile the specified source files: " + repr( e ) )
return 1
+ if sys.platform == 'darwin':
+ compiler.linker_so = [ arg for arg in compiler.linker_so if arg != '-shard' ]
+
+ dlflags = []
+ dlflags.extend(
+ split_quoted(
+ get_config_var( 'LDSHARED' ).replace(
+ get_config_var( 'LINKCC' ), '' ).replace(
+ get_config_var( 'LDFLAGS' ), '' ) ) )
+
try:
try:
compiler.link( output_filename = out,
- target_desc = compiler.SHARED_LIBRARY,
- objects = objects, extra_preargs = ldflags )
+ target_desc = compiler.SHARED_OBJECT,
+ objects = objects,
+ extra_preargs = ldflags + dlflags,
+ target_lang = 'c++' )
except LinkError, e:
msg( "failed to link the object files: " + repr( e ) )
return 1
Modified: ecell3/branches/ecell-3.1/ecell/bin/ecell3-dmc.in
===================================================================
--- ecell3/branches/ecell-3.1/ecell/bin/ecell3-dmc.in 2008-12-11 14:11:30 UTC (rev 3302)
+++ ecell3/branches/ecell-3.1/ecell/bin/ecell3-dmc.in 2008-12-11 15:49:00 UTC (rev 3303)
@@ -119,7 +119,7 @@
# set ldflags
if anOption == "--ldflags":
- LDFLAGS.extend( split_quoted( LDFLAGS ) )
+ LDFLAGS.extend( split_quoted( anArg ) )
# set no-define-cxxflags
if anOption == "--no-define-cxxflags":
@@ -143,7 +143,7 @@
msg( "no source file is given." )
return 1
- cmdList.append( DMCOMPILE )
+ cmdList.append( dmcompile )
if VERBOSE:
cmdList.append( '-v' )
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|