From 965ff791c379c39bfe8cbab8bcaded176eac1a21 Mon Sep 17 00:00:00 2001 From: John Toman Date: Wed, 2 Sep 2009 21:58:04 +0000 Subject: [PATCH] adds a version of the config script that may or may not be more friendly if you don't have the necessary dependencies git-svn-id: svn://svn.code.sf.net/p/qjoypad/code/trunk@113 c05e91a0-76c8-4ec0-b377-ef19ce7cc080 --- src/config | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/src/config b/src/config index 759ae64..08766ef 100755 --- a/src/config +++ b/src/config @@ -1,6 +1,28 @@ #!/bin/bash +if( ! pkg-config --exists xtst ); then + echo "Error: you will need libxtst to compile this program"; +fi; + +if( ! pkg-config --atleast-version=4.2 QtCore ); then + echo "Error: you need at least Qt version 4.2 to use this program"; +fi; + +if ( ! qmake ); then + echo "Error: you need qmake!"; +fi; + +if( ! ( qmake --version | grep -qi 'Qt version 4' ) ); then + echo "WARNING: Falling back on qmake-qt4; this may or may not work"; + echo "WARNING: if it fails please see the compilation instructions on + qjoypad.sourceforge.net"; + QMAKE_EXEC="qmake-qt4"; +else + QMAKE_EXEC="qmake"; +fi; + + devdir="/dev/input" prefix="/usr/local" installdir=""; @@ -63,7 +85,7 @@ arg2="PREFIX=$prefix" arg3="DEFINES += $plain_keys $debug_option" arg4="INSTALL_PREFIX=${installdir}/${prefix}/" -qmake -makefile "$arg1" "$arg2" "$arg3" "$arg4" qjoypad.pro +$QMAKE_EXEC -makefile "$arg1" "$arg2" "$arg3" "$arg4" qjoypad.pro echo " Configuring QJoyPad installation...