You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

82 lines
2.4 KiB

  1. --- a/SConstruct
  2. +++ b/SConstruct
  3. @@ -133,21 +133,21 @@ env = Environment(
  4. )
  5. # handle options/environment varibles.
  6. -if os.environ.has_key('CC'):
  7. +if 'CC' in os.environ:
  8. env.Replace(CC = os.environ['CC'])
  9. # CFLAGS
  10. if GetOption("cflags") != "":
  11. env.Append(CFLAGS = GetOption("cflags"))
  12. -elif os.environ.has_key('CFLAGS'):
  13. +elif 'CFLAGS' in os.environ:
  14. env.Append(CFLAGS = os.environ['CFLAGS'])
  15. # LDFLAGS
  16. if GetOption("ldflags") != "":
  17. env.Replace(LINKFLAGS = GetOption("ldflags"))
  18. -elif os.environ.has_key('LDFLAGS'):
  19. +elif 'LDFLAGS' in os.environ:
  20. env.Replace(LINKFLAGS = os.environ['LDFLAGS'])
  21. -elif os.environ.has_key('LINKFLAGS'):
  22. +elif 'LINKFLAGS' in os.environ:
  23. env.Replace(LINKFLAGS = os.environ['LINKFLAGS'])
  24. # LIBS
  25. @@ -183,10 +183,10 @@ elif GetOption("transport") == 'built-in' or GetOption("transport") == '':
  26. elif GetOption("evloop") == 'select' or GetOption("evloop") == '':
  27. pass
  28. else:
  29. - print "Error: Not the right event driving type"
  30. + print("Error: Not the right event driving type")
  31. Exit(1)
  32. else:
  33. - print "Error: Transport not found!"
  34. + print("Error: Transport not found!")
  35. Exit(1)
  36. # autoconf
  37. @@ -205,18 +205,18 @@ else:
  38. if GetOption("transport") == 'built-in' or GetOption("transport") == '':
  39. if GetOption("evloop") == 'epoll':
  40. if not conf.CheckEpoll():
  41. - print "Error: epoll failed"
  42. + print("Error: epoll failed")
  43. Exit(1)
  44. elif GetOption("evloop") == 'kqueue':
  45. if not conf.CheckKqueue():
  46. - print "Error: Kqueue failed"
  47. + print("Error: Kqueue failed")
  48. Exit(1)
  49. elif GetOption("evloop") == 'select' or GetOption("evloop") == '':
  50. if not conf.CheckSelect():
  51. - print "Error: select failed"
  52. + print("Error: select failed")
  53. Exit(1)
  54. else:
  55. - print "Error: Not the right event driving type"
  56. + print("Error: Not the right event driving type")
  57. Exit(1)
  58. # CFLAGS
  59. @@ -232,7 +232,7 @@ if conf.CheckLib('lua'):
  60. elif conf.CheckLib('lua5.1'):
  61. env.Append(LIBS = ['lua5.1'])
  62. else:
  63. - print "Error: liblua or liblua5.1 not found!"
  64. + print("Error: liblua or liblua5.1 not found!")
  65. Exit(1)
  66. # find lua header files
  67. @@ -241,7 +241,7 @@ if conf.CheckCHeader('lua.h'):
  68. elif conf.CheckCHeader('lua5.1/lua.h'):
  69. env.Append(CFLAGS = ['-I/usr/include/lua5.1'])
  70. else:
  71. - print "Error: lua.h not found"
  72. + print("Error: lua.h not found")
  73. Exit(1)
  74. env = conf.Finish()