diff options
author | Stijn Buys <ingar@osirion.org> | 2012-02-18 11:22:59 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2012-02-18 11:22:59 +0000 |
commit | 3260d19a700cdc48399cc87ef07db1957cf2fedf (patch) | |
tree | 527b330eff515cb91d7ede65a4961d7b6eba9c54 |
Added ./configure skeleton.
-rw-r--r-- | AUTHORS | 0 | ||||
-rw-r--r-- | COPYING | 0 | ||||
-rw-r--r-- | ChangeLog | 0 | ||||
-rw-r--r-- | INSTALL | 0 | ||||
-rw-r--r-- | Makefile.am | 0 | ||||
-rw-r--r-- | NEWS | 0 | ||||
-rw-r--r-- | README | 5 | ||||
-rw-r--r-- | configure.in | 120 | ||||
-rw-r--r-- | src/Makefile.am | 0 | ||||
-rw-r--r-- | src/editor.cc | 0 | ||||
-rw-r--r-- | src/editor.h | 0 |
11 files changed, 125 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/ChangeLog diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Makefile.am @@ -0,0 +1,5 @@ + +This is the Project::OSiRiON zone editor +http://osirion.org + + diff --git a/configure.in b/configure.in new file mode 100644 index 0000000..f26a1a0 --- /dev/null +++ b/configure.in @@ -0,0 +1,120 @@ + +dnl configure.in for the Project::OSiRiON zon editor +dnl +dnl see also http://qtnode.net/wiki/Qt_with_autotools +dnl + +AC_INIT(editor,0.1) + +AC_CONFIG_HEADERS(src/config.h) + +AM_INIT_AUTOMAKE +AC_PROG_CC +AC_PROG_CXX + +AC_MSG_CHECKING(QT4.1 directory) + +QTDIR=xxx +AC_ARG_WITH([qt-dir], + AC_HELP_STRING([--with-qt-dir=/path/to/Qt-4.1.0], + [to specify the path to the Qt-4.1.0 directory.]), + [QTPATHS="$withval"], + [QTPATHS="/usr /usr/qt4 /opt/qt4"]) + +for x in $QTPATHS; do + if test -d $x ; then + QTDIR="$x" + fi +done +if test $QTDIR = xxx ; then + AC_MSG_ERROR(Could not locate QT 4.1) +fi +AC_MSG_RESULT($QTDIR) +host=`uname -a` # AC_CANONICAL_HOST is broken at the time of this writing. +case $host in + MINGW32*) + AC_MSG_NOTICE($host) + QTLIBS="-L$QTDIR/lib -lopengl32 -lglu32 -lgdi32 -luser32 -lmingw32 -lqtmain -lQtOpenGL4 -lQtGui4 -lQtCore4 -mthreads -Wl,-enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -Wl,-s -Wl,-s -Wl,-subsystem,windows" + QTINC="-I$QTDIR/include -I$QTDIR/include/QtCore -I$QTDIR/include/QtGui -I$QTDIR/include/QtOpenGL -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -frtti -fexceptions" + QTBIN="$QTDIR/bin" + ;; + *) + AC_MSG_NOTICE($host) + AC_PATH_XTRA + QTLIBS="-Wl,-rpath,$QTDIR/lib -L$QTDIR/lib -lQtGui -lQtOpenGL -lQtCore $X_LIBS -lX11 -lXext -lXmu -lXt -lXi $X_EXTRA_LIBS -lGLU -lGL -lpthread" + QTINC="-I$QTDIR/include -I$QTDIR/include/QtGui -I$QTDIR/include/QtCore -I$QTDIR/include/QtOpenGL $X_CFLAGS -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED" + QTBIN="$QTDIR/bin" + ;; +esac + +LIBS="$LIBS $QTLIBS" +INCLUDES="$INCLUDES $QTINC" +PATH="$PATH:$QTBIN" +CXXFLAGS="$CXXFLAGS $QTINC" + +# Now we check whether we can actually build a Qt app. +cat > myqt.h << EOF +#include <QObject> +class Test : public QObject +{ +Q_OBJECT +public: + Test() {} + ~Test() {} +public slots: + void receive() {} +signals: + void send(); +}; +EOF + +cat > myqt.cpp << EOF +#include "myqt.h" +#include <QApplication> +int main( int argc, char **argv ) +{ + QApplication app( argc, argv ); + Test t; + QObject::connect( &t, SIGNAL(send()), &t, SLOT(receive()) ); +} +EOF + +AC_MSG_CHECKING(does moc work) +bnv_try_1="moc myqt.h -o moc_myqt.cpp" +AC_TRY_EVAL(bnv_try_1) +if test x"$ac_status" != x0; then + AC_MSG_ERROR(moc doesn't work) +fi +AC_MSG_RESULT(yes) +AC_MSG_CHECKING(can I compile moc_myqt.cpp) +bnv_try_2="$CXX -c $CXXFLAGS -o moc_myqt.o moc_myqt.cpp" +AC_TRY_EVAL(bnv_try_2) +if test x"$ac_status" != x0; then + AC_MSG_ERROR(couldn't compile moc_myqt.cpp) +fi +AC_MSG_RESULT(yes) +AC_MSG_CHECKING(can I compile myqt.cpp) +bnv_try_3="$CXX $QTINC -c $CXXFLAGS -o myqt.o myqt.cpp" +AC_TRY_EVAL(bnv_try_3) +if test x"$ac_status" != x0; then + AC_MSG_ERROR(couldn't compile myqt.cpp) +fi +AC_MSG_RESULT(yes) +AC_MSG_CHECKING(can I link against QT) +nv_try_4="$CXX $LIBS -o myqt myqt.o moc_myqt.o" +AC_TRY_EVAL(bnv_try_4) +if test x"$ac_status" != x0; then + AC_MSG_ERROR(couldn't link) +fi +AC_MSG_RESULT(yes) + +AC_MSG_CHECKING(for mkoctfile) +AC_TRY_EVAL(mkoctfile) +if test x"$ac_status" != x0; then + AC_MSG_ERROR(mkoctfile is not in the path) +fi +AC_MSG_RESULT(yes) +rm -f moc_myqt.cpp myqt.h myqt.cpp myqt.o myqt moc_myqt.o + +AC_CONFIG_FILES(Makefile src/Makefile) +AC_OUTPUT diff --git a/src/Makefile.am b/src/Makefile.am new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/Makefile.am diff --git a/src/editor.cc b/src/editor.cc new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/editor.cc diff --git a/src/editor.h b/src/editor.h new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/editor.h |