Changeset 1389 for branches/libffado-2.0
- Timestamp:
- 10/29/08 14:20:22 (15 years ago)
- Files:
-
- branches/libffado-2.0/SConstruct (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/libffado-2.0/SConstruct
r1371 r1389 160 160 def CompilerCheck( context ): 161 161 context.Message( "Checking for a working C-compiler " ) 162 ret = context.Try Link( """162 ret = context.TryRun( """ 163 163 #include <stdlib.h> 164 164 … … 166 166 printf( "Hello World!" ); 167 167 return 0; 168 }""", '.c' ) 168 }""", '.c' )[0] 169 169 context.Result( ret ) 170 170 if ret == 0: 171 171 return False; 172 172 context.Message( "Checking for a working C++-compiler " ) 173 ret = context.Try Link( """173 ret = context.TryRun( """ 174 174 #include <iostream> 175 175 … … 177 177 std::cout << "Hello World!" << std::endl; 178 178 return 0; 179 }""", ".cpp" ) 179 }""", ".cpp" )[0] 180 180 context.Result( ret ) 181 181 return ret … … 202 202 203 203 if not env.GetOption('clean'): 204 # #205 # # Check if the environment can actually compile c-files by checking for a206 # # header shipped with gcc.207 # #208 # if not conf.CheckHeader( "stdio.h", language="C" ):209 # print "It seems as if stdio.h is missing. This probably means that your build environment is broken, please make sure you have a working c-compiler and libstdc installed and usable."210 # Exit( 1 )211 # #212 # # ... and do the same with a c++-header. Because some distributions have213 # # distinct packages for gcc and g++.214 # #215 # if not conf.CheckHeader( "iostream", language="C++" ):216 # print "It seems as if iostream is missing. This probably means that your build environment is broken, please make sure you have a working c++-compiler installed and usable."217 # Exit( 1 )218 219 204 # 220 # Seems as if the above tests don't really work. This one should do the trick!?205 # Check for working gcc and g++ compilers and their environment. 221 206 # 222 207 if not conf.CompilerCheck(): 223 print "It seems as if your system isn't even able to compile any C-/C++-programs. Probably you don't have gcc and g++ installed. Compiling a package from source without a working compiler is very hard to do, please install the needed packages (Hint: on *ubuntu you need both gcc- and g++-packages installed)."208 print "It seems as if your system isn't even able to compile any C-/C++-programs. Probably you don't have gcc and g++ installed. Compiling a package from source without a working compiler is very hard to do, please install the needed packages.\nHint: on *ubuntu you need both gcc- and g++-packages installed, easiest solution is to install build-essential which depends on gcc and g++." 224 209 Exit( 1 ) 225 210