File tree Expand file tree Collapse file tree 2 files changed +14
-6
lines changed
Expand file tree Collapse file tree 2 files changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ install-include install the C++ header files
1111install-data install data files used by the library
1212alltests build the unit test program "alltests"
1313test execute unit tests (requires the cxxtest framework)
14- sdist create source distribution tarball (requires git repo)
14+ sdist create source distribution tarball from git repository
1515
1616Build configuration variables:
1717%s
@@ -68,7 +68,7 @@ vars.Add(PathVariable('datadir',
6868 env ['prefix' ] + '/share' ,
6969 PathVariable .PathAccept ))
7070vars .Add (BoolVariable ('enable_objcryst' ,
71- 'enable objcryst support, when installed' , True ))
71+ 'enable objcryst support, when installed' , None ))
7272vars .Update (env )
7373env .Help (MY_SCONS_HELP % vars .GenerateHelpText (env ))
7474
Original file line number Diff line number Diff line change @@ -55,10 +55,18 @@ if not conf.CheckBoostVersion(boost_required):
5555# boost_serialization
5656configure_boost_library ('boost_serialization' )
5757
58- # check for ObjCryst, autoadd appends to LIBS if found.
59- conf .env ['has_objcryst' ] = (conf .env ['enable_objcryst' ] and
60- conf .CheckLibWithHeader ('ObjCryst' , 'ObjCryst/ObjCryst/Crystal.h' ,
61- language = 'C++' , autoadd = True ))
58+ # ObjCryst - assume a no-objcryst fallback configuration.
59+ conf .env ['has_objcryst' ] = False
60+ # Detect ObjCryst and exit with error if requested and not found.
61+ # By default conf.env does not contain the 'enable_objcryst' key.
62+ if conf .env .get ('enable_objcryst' , True ):
63+ conf .env ['has_objcryst' ] = conf .CheckLibWithHeader (
64+ 'ObjCryst' , 'ObjCryst/ObjCryst/Crystal.h' ,
65+ language = 'C++' , autoadd = True )
66+ objcryst_requested = conf .env .get ('enable_objcryst' , False )
67+ if objcryst_requested and not conf .env ['has_objcryst' ]:
68+ print ('Adjust compiler paths or build with "enable_objcryst=False".' )
69+ Exit (1 )
6270
6371env = conf .Finish ()
6472
You can’t perform that action at this time.
0 commit comments