X-Git-Url: https://git.teslayout.com/public/public/public/?a=blobdiff_plain;f=SConstruct;h=517b1a66c88a185c102551e98d2250f1f7c6ea9b;hb=2bbb5ef5ed8fc5997d9c9a973860ca8aae769ad5;hp=f5cde93eb64c4466335d254b92c7935bac4077e0;hpb=c9038f2ab1936162717beb212541063abfaffed9;p=anna.git diff --git a/SConstruct b/SConstruct index f5cde93..517b1a6 100644 --- a/SConstruct +++ b/SConstruct @@ -1,4 +1,5 @@ import os +import sys, select # Basic paths prefix = ARGUMENTS.get ('prefix', "/usr/local") @@ -23,7 +24,13 @@ rc = os.system("clang++ --version >/dev/null 2>/dev/null") if rc == 0: print "\nDetected clang++ installed in the system" print "\nSelect compiler:\n 1. g++\n 2. clang++" - option = raw_input("\nInput option [1]: ") or "1" + #option = raw_input("\nInput option [1]: ") or "1" + # Read with timeout: + print "\nInput option [1]: " + option = 1 + i, o, e = select.select( [sys.stdin], [], [], 60 ) + if (i): option = sys.stdin.readline().strip() + else: print "expired! using default ..." if option == "2": env = Environment(CXX = 'clang++') env.Append (CCFLAGS = '-DIS_CLANG')