# Kbtv configure script, version 1.2.5 import sys, os.path, commands, string PY_MINVER = "2.3" PY_VER = sys.version.split()[0] PY_PLATFORM = sys.platform PY_PREFIX = sys.prefix PY_INCDIR = os.path.join(sys.prefix, "include", "python" + PY_VER[0:3]) PY_LIBDIR = os.path.join(sys.prefix, "lib", "python" + PY_VER[0:3]) PY_COMPILE = "python " + os.path.join(PY_LIBDIR, "compileall.py") SUPPORTED = ("freebsd5", "freebsd6", "freebsd7") if not PY_PLATFORM in SUPPORTED: print "Platform", PY_PLATFORM, "not supported. Stop." sys.exit(1) print "Platform is", PY_PLATFORM if PY_VER < PY_MINVER: print "Need Python 2.3 or newer. Stop." sys.exit(1) print "Got Python", PY_VER CC = commands.getoutput("which cc") if not CC: print "Compiler (cc) not found. Stop." sys.exit(1) CC_VER = commands.getoutput(CC + " -v").split("\n")[-1] print "Got", string.capitalize(CC_VER) PATCH = commands.getoutput("which patch") if not PATCH: print "Patch not found. Stop." sys.exit(1) PATCH_VER = commands.getoutput("patch -v") print "Got", PATCH_VER MAKE = commands.getoutput("which make") if not MAKE: print "Make not found. Stop." sys.exit(1) print "Got", MAKE SWIG = commands.getoutput("which swig") SWIG_VER = commands.getoutput(SWIG + " -version").split("\n")[1].split()[2] if not SWIG: print "Swig not found. Stop." sys.exit(1) if SWIG_VER < "1.3": print "Need swig 1.3 or newer. Stop." sys.exit(1) print "Got swig", SWIG_VER SDLCONF = commands.getoutput("which sdl-config") if not SDLCONF: SDLCONF = commands.getoutput("which sdl11-config") if not SDLCONF: print "SDL not found. Stop." sys.exit(1) else: SDL_VER = commands.getoutput(SDLCONF + " --version") print "Got SDL", SDL_VER if not os.path.exists("/usr/src/sys/Makefile"): print "Warning! You seem to have no kernel sources, needed for saa and pwc support." else: print "Got kernel source tree" PYUIC = commands.getoutput("which pyuic") KDEPYUIC = commands.getoutput("which kdepyuic") if not PYUIC: print "PyQt (pyuic) not found. Stop." sys.exit(1) # PyQt3 (not 4) try: from qt import QT_VERSION_STR except ImportError: print "PyQt qt import failed. Stop." sys.exit(1) QT_VER = QT_VERSION_STR if QT_VER < "3": print "Qt/PyQt version is ancient. Stop." sys.exit(1) print "Got PyQt for Qt", QT_VER if not KDEPYUIC: print "PyKDE (kdepyuic) not found. Stop." sys.exit(1) try: from kdecore import KDE except ImportError: print "PyKDE kdecore import failed. Stop." sys.exit(1) KDE_VER = KDE.versionString() if KDE_VER < "3": print "KDE/PyKDE version is ancient. Stop." sys.exit(1) print "Got PyKDE for KDE", KDE_VER MEINPROC = commands.getoutput("which meinproc") if not MEINPROC: print "Meinproc not found. This is unusual. Stop." sys.exit(1)