[wpdev-commits] wolfpack wolfpack.pro,1.200,1.201 configure.py,1.13,1.14
Brought to you by:
rip,
thiagocorrea
From: Richard M. <dr...@us...> - 2004-08-05 20:15:01
|
Update of /cvsroot/wpdev/wolfpack In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14022 Modified Files: wolfpack.pro configure.py Log Message: Some stuff for future checking. This should work better... Also, configure.py now makes sure it looks for a 2.3 folder. It was finding 2.2 and selecting it rather than selecting 2.3. This is a problem since most distros carry both 2.2 and 2.3 Python versions. Index: wolfpack.pro =================================================================== RCS file: /cvsroot/wpdev/wolfpack/wolfpack.pro,v retrieving revision 1.200 retrieving revision 1.201 diff -C2 -d -r1.200 -r1.201 *** wolfpack.pro 4 Aug 2004 23:17:37 -0000 1.200 --- wolfpack.pro 5 Aug 2004 20:14:52 -0000 1.201 *************** *** 9,35 **** TARGET = wolfpack TEMPLATE = app ! CONFIG += qt thread exceptions rtti unix { # Common unix settings # Lets try to figure some paths ! CONFIG += console ! # MySQL ! LIBS += $$MYSQL_LIB ! INCLUDEPATH += $$MYSQL_INC # Python includes. Run configure script to initialize it. ! LIBS += $$PYTHON_LIB ! INCLUDEPATH += $$PYTHON_INC ! LIBS += $$STLPORT_LIB ! INCLUDEPATH += $$STLPORT_INC ! LIBS += -L/usr/local/lib -L/usr/lib -ldl -lutil ! # we dont use those. QMAKE_LIBS_X11 -= -lX11 -lXext -lm } --- 9,118 ---- TARGET = wolfpack TEMPLATE = app ! ! CONFIG += qt thread exceptions rtti debug unix { + debug { + message( "Debugging is enabled!" ) + DEFINES +=_DEBUG _AIDEBUG + } + QMAKE_LIBDIR_FLAGS = -L/usr/lib -L/usr/local/lib + LIBS = -ldl -lutil + + CONFIG += console # Common unix settings # Lets try to figure some paths + # Checking in /usr first, then /usr/local + # This will use custom installs over package installs. ! # MySQL Checks ! isEmpty( MYSQL_INCDIR ) { ! message( "Warning: MYSQL_INCDIR was not defined!" ) ! exists( /usr/local/include/mysql/mysql.h ) { ! message( "MySQL included found in: /usr/local/include/mysql" ) ! MYSQL_INCDIR = /usr/local/include/mysql ! } ! else:exists( /usr/include/mysql/mysql.h ) { ! message( "MySQL included found in: /usr/include/mysql" ) ! MYSQL_INCDIR = /usr/include/mysql ! } ! } ! isEmpty( MYSQL_LIBDIR ) { ! message( "Warning: MYSQL_LIBDIR was not defined!" ) ! exists( /usr/local/lib/mysql/libmysqlclient.so ) { ! message( "Found libmysqlclient.so in: /usr/local/lib/mysql" ) ! MYSQL_LIBDIR = -L/usr/local/lib/mysql -lmysqlclient ! } ! else:exists( /usr/lib/mysql/libmysqlclient.so ) { ! message( "Found libmysqlclient.so in: /usr/lib/mysql" ) ! MYSQL_LIBDIR = -L/usr/lib/mysql -lmysqlclient ! } ! } ! ! # SQLite Checks ! isEmpty( SQLITE_INCDIR ) { ! message( "Warning: SQLITE_INCDIR was not defined!" ) ! SQLITE_INCDIR = sqlite ! } ! isEmpty( SQLITE_LIBDIR ) { ! message( "Warning: SQLITE_LIBDIR was not defined!" ) ! SQLITE_LIBDIR = -Lsqlite ! } # Python includes. Run configure script to initialize it. ! isEmpty( PY_INCDIR ) { ! message( "Warinng: PY_INCDIR was not defined!" ) ! exists( /usr/local/include/python2.3/Python.h ) { ! message( "Python includes found in: /usr/local/include/python2.3" ) ! PY_INCDIR = /usr/local/include/python2.3 ! } ! else:exists( /usr/local/include/Python2.3/Python.h ) { ! message( "Python includes found in: /usr/local/include/Python2.3" ) ! PY_INCDIR = /usr/local/include/Python2.3 ! } ! else:exists( /usr/include/python2.3/Python.h ) { ! message( "Python includes found in: /usr/include/python2.3" ) ! PY_INCDIR = /usr/include/python2.3 ! } ! else:exists( /usr/include/Python2.3/Python.h ) { ! message( "Python includes found in: /usr/include/Python2.3" ) ! PY_INCDIR = /usr/include/Python2.3 ! } ! } ! isEmpty( PY_LIBDIR ) { ! message( "Warinng: PY_LIBDIR was not defined!" ) ! shared { ! message( "Using Shared Python Configuration..." ) ! exists( /usr/local/lib/python2.3/config/libpython2.3.a ) { ! message( "Found libpython2.3.a in /usr/local/lib/python2.3/config" ) ! PY_LIBDIR = -L/usr/local/lib/python2.3/config -lpython2.3 ! } ! else:exists( /usr/lib/python2.3/config/libpython2.3.a ) { ! message( "Found libpython2.3.a in /usr/lib/python2.3/config" ) ! PY_LIBDIR = -L/usr/lib/python2.3/config -lpython2.3 ! } ! } ! else { ! message( "Using Static Python Configuration..." ) ! exists( /usr/local/lib/libpython2.3.so ) { ! message( "Found libpython2.3.so in /usr/local/lib" ) ! PY_LIBDIR = -lpython2.3 ! } ! exists( /usr/lib/libpython2.3.so ) { ! message( "Found libpython2.3.so in /usr/lib" ) ! PY_LIBDIR = -lpython2.3 ! } ! } ! } ! ! INCLUDEPATH += $$PY_INCDIR $$MYSQL_INCDIR $$SQLITE_INCDIR ! LIBS += $$PY_LIBDIR $$MYSQL_LIBDIR $$SQLITE_LIBDIR ! ! # We need to remove these to be safe QMAKE_LIBS_X11 -= -lX11 -lXext -lm } *************** *** 39,43 **** MOC_DIR = obj ! INCLUDEPATH += sqlite win32:DEFINES -= UNICODE --- 122,126 ---- MOC_DIR = obj ! win32:INCLUDEPATH += sqlite win32:DEFINES -= UNICODE *************** *** 288,289 **** --- 371,376 ---- data/AUTHORS.txt \ LICENSE.GPL + + unix { + INCPATH -= /usr/include/python2.2 + } \ No newline at end of file Index: configure.py =================================================================== RCS file: /cvsroot/wpdev/wolfpack/configure.py,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** configure.py 2 Aug 2004 04:17:26 -0000 1.13 --- configure.py 5 Aug 2004 20:14:52 -0000 1.14 *************** *** 52,56 **** sys.stdout.write( "Searching for qmake..." ) temp = "" ! QMAKESEARCHPATH = [ os.path.join(os.path.join(os.environ["QTDIR"], "bin"), QMAKE_EXECUTABLE) ] for dir in string.split( os.environ["PATH"], os.path.pathsep ): --- 52,56 ---- sys.stdout.write( "Searching for qmake..." ) temp = "" ! QMAKESEARCHPATH = [ os.path.join(os.path.join(os.environ["QTDIR"], "bin"), QMAKE_EXECUTABLE) ] for dir in string.split( os.environ["PATH"], os.path.pathsep ): *************** *** 61,65 **** qt_qmake = os.path.join(qmake_path, qmake_file) sys.stdout.write( "%s\n" % qt_qmake ) ! return True --- 61,65 ---- qt_qmake = os.path.join(qmake_path, qmake_file) sys.stdout.write( "%s\n" % qt_qmake ) ! return True *************** *** 69,101 **** PYTHONINCSEARCHPATH = [ sys.prefix + "\include\Python.h" ] elif sys.platform == "linux2": ! PYTHONLIBSEARCHPATH = [ "/usr/local/lib/libpython*.so", \ ! "/usr/local/lib/[Pp]ython*/libpython*.so", \ ! "/usr/lib/libpython*.so", \ ! "/usr/lib/[Pp]ython*/libpython*.so", \ ! "/usr/lib/[Pp]ython*/config/libpython*.so", \ ! "/usr/local/lib/[Pp]ython*/config/libpython*.so"] ! PYTHONLIBSTATICSEARCHPATH = [ "/usr/local/lib/libpython*.a", \ ! "/usr/local/lib/[Pp]ython*/libpython*.a", \ ! "/usr/lib/libpython*.a", \ ! "/usr/lib/[Pp]ython*/libpython*.a", \ ! "/usr/lib/[Pp]ython*/config/libpython*.a", \ ! "/usr/local/lib/[Pp]ython*/config/libpython*.a"] ! PYTHONINCSEARCHPATH = [ "/usr/local/include/[Pp]ython*/Python.h", \ ! "/usr/include/[Pp]ython*/Python.h"] elif sys.platform == "freebsd4": ! PYTHONLIBSEARCHPATH = [ "/usr/local/lib/libpython*.so", \ ! "/usr/local/lib/[Pp]ython*/libpython*.so", \ ! "/usr/lib/libpython*.so", \ ! "/usr/lib/[Pp]ython*/libpython*.so", \ ! "/usr/lib/[Pp]ython*/config/libpython*.so", \ ! "/usr/local/lib/[Pp]ython*/config/libpython*.so"] ! PYTHONLIBSTATICSEARCHPATH = [ "/usr/local/lib/libpython*.a", \ ! "/usr/local/lib/[Pp]ython*/libpython*.a", \ ! "/usr/lib/libpython*.a", \ ! "/usr/lib/[Pp]ython*/libpython*.a", \ ! "/usr/lib/[Pp]ython*/config/libpython*.a", \ ! "/usr/local/lib/[Pp]ython*/config/libpython*.a"] ! PYTHONINCSEARCHPATH = [ "/usr/local/include/[Pp]ython*/Python.h", \ ! "/usr/include/[Pp]ython*/Python.h"] else: --- 69,101 ---- PYTHONINCSEARCHPATH = [ sys.prefix + "\include\Python.h" ] elif sys.platform == "linux2": ! PYTHONLIBSEARCHPATH = [ "/usr/local/lib/libpython2.3*.so", \ ! "/usr/local/lib/[Pp]ython*/libpython2.3*.so", \ ! "/usr/lib/libpython2.3*.so", \ ! "/usr/lib/[Pp]ython*/libpython2.3*.so", \ ! "/usr/lib/[Pp]ython*/config/libpython2.3*.so", \ ! "/usr/local/lib/[Pp]ython*/config/libpython2.3*.so"] ! PYTHONLIBSTATICSEARCHPATH = [ "/usr/local/lib/libpython2.3*.a", \ ! "/usr/local/lib/[Pp]ython2.3*/libpython2.3*.a", \ ! "/usr/lib/libpython2.3*.a", \ ! "/usr/lib/[Pp]ython2.3*/libpython2.3*.a", \ ! "/usr/lib/[Pp]ython2.3*/config/libpython2.3*.a", \ ! "/usr/local/lib/[Pp]ython2.3*/config/libpython2.3*.a"] ! PYTHONINCSEARCHPATH = [ "/usr/local/include/[Pp]ython2.3*/Python.h", \ ! "/usr/include/[Pp]ython2.3*/Python.h"] elif sys.platform == "freebsd4": ! PYTHONLIBSEARCHPATH = [ "/usr/local/lib/libpython2.3*.so", \ ! "/usr/local/lib/[Pp]ython2.3*/libpython2.3*.so", \ ! "/usr/lib/libpython2.3*.so", \ ! "/usr/lib/[Pp]ython2.3*/libpython2.3*.so", \ ! "/usr/lib/[Pp]ython2.3*/config/libpython2.3*.so", \ ! "/usr/local/lib/[Pp]ython2.3*/config/libpython2.3*.so"] ! PYTHONLIBSTATICSEARCHPATH = [ "/usr/local/lib/libpython2.3*.a", \ ! "/usr/local/lib/[Pp]ython2.3*/libpython2.3*.a", \ ! "/usr/lib/libpython2.3*.a", \ ! "/usr/lib/[Pp]ython2.3*/libpython2.3*.a", \ ! "/usr/lib/[Pp]ython2.3*/config/libpython2.3*.a", \ ! "/usr/local/lib/[Pp]ython2.3*/config/libpython2.3*.a"] ! PYTHONINCSEARCHPATH = [ "/usr/local/include/[Pp]ython2.3*/Python.h", \ ! "/usr/include/[Pp]ython2.3*/Python.h"] else: *************** *** 112,116 **** if options.py_libpath: PYTHONLIBSEARCHPATH = [ options.py_libpath ] ! sys.stdout.write( "Checking Python version... " ) if sys.hexversion >= 0x020300F0: --- 112,116 ---- if options.py_libpath: PYTHONLIBSEARCHPATH = [ options.py_libpath ] ! sys.stdout.write( "Checking Python version... " ) if sys.hexversion >= 0x020300F0: *************** *** 133,139 **** sys.stdout.write("\nError: Wolfpack currently only supports little endian systems\n" ) sys.exit(); ! sys.stdout.write( "Searching for Python library... " ) ! global py_libpath global py_libfile --- 133,139 ---- sys.stdout.write("\nError: Wolfpack currently only supports little endian systems\n" ) sys.exit(); ! sys.stdout.write( "Searching for Python library... " ) ! global py_libpath global py_libfile *************** *** 155,159 **** sys.stdout.write("Not Found!\n") sys.exit() ! return True --- 155,159 ---- sys.stdout.write("Not Found!\n") sys.exit() ! return True *************** *** 169,173 **** parser.add_option("--static", action="store_true", dest="staticlink", help="Build wokfpack using static libraries") (options, args) = parser.parse_args() ! checkPython(options) checkQt() --- 169,173 ---- parser.add_option("--static", action="store_true", dest="staticlink", help="Build wokfpack using static libraries") (options, args) = parser.parse_args() ! checkPython(options) checkQt() *************** *** 178,186 **** global py_incpath global qt_qmake ! config = file("config.pri", "w") config.write("# WARNING: This file was automatically generated by configure.py\n ") config.write("# any changes to this file will be lost!\n") ! config.write("INCLUDEPATH += %s\n" % ( py_incpath ) ) # Build LIBS --- 178,186 ---- global py_incpath global qt_qmake ! config = file("config.pri", "w") config.write("# WARNING: This file was automatically generated by configure.py\n ") config.write("# any changes to this file will be lost!\n") ! config.write("INCLUDEPATH += %s\n" % ( py_incpath ) ) # Build LIBS *************** *** 190,197 **** else: LIBS = "-l%s -L%s" % ( py_libfile, py_libpath ) ! config.write("LIBS += %s\n" % LIBS) config.close() ! sys.stdout.write("Generating makefile...\n") os.spawnv(os.P_WAIT, qt_qmake, [qt_qmake, "wolfpack.pro"]) --- 190,197 ---- else: LIBS = "-l%s -L%s" % ( py_libfile, py_libpath ) ! config.write("LIBS += %s\n" % LIBS) config.close() ! sys.stdout.write("Generating makefile...\n") os.spawnv(os.P_WAIT, qt_qmake, [qt_qmake, "wolfpack.pro"]) *************** *** 201,205 **** sys.stdout.write("Done\n") sys.stdout.write("Configure finished. Please run make now.\n") ! if __name__ == "__main__": main() --- 201,205 ---- sys.stdout.write("Done\n") sys.stdout.write("Configure finished. Please run make now.\n") ! if __name__ == "__main__": main() |