diff options
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 401 |
1 files changed, 24 insertions, 377 deletions
@@ -70,161 +70,17 @@ fi #------------------------------------------------------------------------------- -# check commercial license +# Free license only: no check for other licenses #------------------------------------------------------------------------------- - -# Qtopia Edition. -if [ -f $relpath/LICENSE.Qtopia ]; then - Edition="qtopia" - Licensee="Qtopia" - Products="qt-enterprise" -# Open Source Edition - may only be used under the terms of the QPL or GPL. -# Qt/X11, Qt/Embedded -elif [ -f $relpath/LICENSE.QPL -o -f $relpath/LICENSE.GPL2 -o -f $relpath/LICENSE.GPL3 ]; then - [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes - [ "$PLATFORM_QWS" = "maybe" ] && PLATFORM_QWS=yes - Edition="free" - Licensee="Free" - Products="qt-free" -# Evaluation version. -# Qt/X11, Qt/Embedded, Qt/Mac -elif [ -f $relpath/LICENSE.EVAL ]; then - [ "$PLATFORM_QWS" = "maybe" ] && PLATFORM_QWS=yes - Edition="eval" - Licensee="Evaluation" - Products="qt-eval" -# Internal Trolltech edition. -# Qt/X11, Qt/Embedded, Qt/Mac, Qt/QNX -elif [ -f $relpath/LICENSE.TROLL ]; then - [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes - [ "$PLATFORM_QNX" = "maybe" ] && PLATFORM_QNX=yes - Edition="troll" - Licensee="Trolltech" - Products="qt-internal" -# Commercial edition - needs a license. -# Qt/X11, Qt/Embedded, Qt/Mac -elif [ -f $relpath/.LICENSE ]; then - [ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes - [ "$PLATFORM_QWS" = "maybe" ] && PLATFORM_QWS=yes - echo - Desc="" - if [ -f $HOME/.qt-license ]; then - . $HOME/.qt-license >/dev/null 2>&1 - if [ -z "$LicenseKey" ]; then - echo - echo "You are using an old license file." - echo - echo "Please install the license file supplied by Trolltech," - echo "or install the Qt Open Source Edition if you intend to develop" - echo "open source software." - exit 1 - fi - else - if [ -z "$LicenseKey" ]; then - echo - if echo '\c' | grep '\c' >/dev/null; then - echo -n "Please enter your license key: " - else - echo "Please enter your license key: \c" - fi - read LicenseKey - fi - fi - if echo $LicenseKey | grep "....-....-...." >/dev/null 2>&1; then - # get the first character of the key - keyTest=`echo $LicenseKey | cut -b1` - # this character should fit the platform - if [ "$PLATFORM_QWS" = "yes" ]; then - case $keyTest in - A|B|C|D|E|F|G|H|a|b|c|d|e|f|g|h) - # Qt/Embedded - echo - ;; - *) - echo - echo "You are not licensed for the Qt/Embedded platform." - echo - echo "Please contact sales@trolltech.com to upgrade your license" - echo "to include the Qt/Embedded platform, or install the" - echo "Qt Open Source Edition if you intend to develop open source" - echo "software." - exit 1 - ;; - esac - elif [ "$PLATFORM_MAC" = "yes" ]; then - case $keyTest in - *) ### - # Qt/Mac - echo - ;; - *) - echo - echo "You are not licensed for the Qt/Mac platform." - echo - echo "Please contact sales@trolltech.com to upgrade your license" - echo "to include the Qt/Mac platform." - exit 1 - ;; - esac - else - case $keyTest in - 6|7|8|9|E|F|G|H|e|f|g|h) - # Qt/X11 - echo - ;; - *) - echo - echo "You are not licensed for the Qt/X11 platform." - echo - echo "Please contact sales@trolltech.com to upgrade your license to" - echo "include the Qt/X11 platform, or install the Qt Open Source Edition" - echo "if you intend to develop open source software." - exit 1 - ;; - esac - fi - case $keyTest in - 4|5|8|9|C|D|G|H|c|d|g|h) - # Enterprise - Products=qt-enterprise - Desc="Enterprise" - Edition="ent" - ;; - *) - # Professional - Products=qt-professional - Desc="Professional" - Edition="pro" - ;; - esac - case $keyTest in - 3|5|7|9|B|D|F|H|b|d|f|h) - # US - cp -f $relpath/.LICENSE-US $relpath/LICENSE - ;; - *) - cp -f $relpath/.LICENSE $relpath/LICENSE - ;; - esac - else - echo - echo "Invalid license key. Please check the license key." - exit 1 - fi -else - echo "The LICENSE, LICENSE.QPL, or LICENSE.GPL2 file shipped with" - echo "this software has disappeared." - echo - echo "Sorry, you are not licensed to use this software." - echo "Try re-installing." - echo - exit 1 -fi - -# licensed modules depend on type of commercial license -MODULES="styles tools kernel widgets dialogs iconview workspace inputmethod" -[ "$PLATFORM_QWS" = "yes" ] && [ "$Products" = "qt-professional" ] && MODULES="$MODULES network" -[ "$Products" != "qt-professional" ] && MODULES="$MODULES network canvas table xml opengl sql" +[ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes +[ "$PLATFORM_QWS" = "maybe" ] && PLATFORM_QWS=yes +Edition="free" +Licensee="Free" +Products="qt-free" + +# modules depending on free license +MODULES="styles tools kernel widgets dialogs iconview workspace inputmethod \ + network canvas table xml opengl sql" CFG_MODULES_AVAILABLE=$MODULES QMAKE_VARS="$QMAKE_VARS \"QT_PRODUCT=$Products\"" QMAKE_VARS="$QMAKE_VARS \"styles += windows motif mac platinum sgi cde motifplus\"" @@ -2355,234 +2211,25 @@ fi # ----------------------------------------------------------------------------- -# LICENSING, INTERACTIVE PART +# LICENSING # ----------------------------------------------------------------------------- -# check for license confirmation -if [ "$Edition" = "qtopia" ]; then - if [ "$PLATFORM_X11" = "yes" ]; then - Platform="Qt/X11" - else - echo - echo "Internal error: unknown platform." - echo - exit 2 - fi - TheLicense=`head -n 1 $relpath/LICENSE.Qtopia` - while true; do - echo - echo "This is the $Platform Qtopia Edition." - echo - echo "You are licensed to use this software under the terms of" - echo "the $TheLicense." - echo - echo "Type '?' to view the $TheLicense." - echo "Type 'yes' to accept this license offer." - echo "Type 'no' to decline this license offer." - echo - if echo '\c' | grep '\c' >/dev/null; then - echo -n "Do you accept the terms of the $TheLicense? " - else - echo "Do you accept the terms of the $TheLicense? \c" - fi - read acceptance - echo - if [ "$acceptance" = yes ]; then - break - else - if [ "$acceptance" = no ]; then - echo "You are not licensed to use this software." - echo - exit 0 - elif [ "$acceptance" = "?" ]; then - more $relpath/LICENSE.Qtopia - fi - fi - done -elif [ "$Edition" = "free" ]; then - while true; do - if [ "$PLATFORM_QWS" = "yes" ]; then - echo - echo "This is the Qt/Embedded Open Source Edition." - echo - echo "You are licensed to use this software under the terms of" - echo "the GNU General Public License (GPL) versions 2 or 3." - echo - affix="the" - elif [ "$PLATFORM_MAC" = "yes" ]; then - echo - echo "This is the Qt/Mac Open Source Edition." - echo - echo "You are licensed to use this software under the terms of" - echo "the GNU General Public License (GPL) versions 2 or 3." - echo - affix="the" - elif [ "$PLATFORM_X11" = "yes" ]; then - echo - echo "This is the Qt/X11 Open Source Edition." - echo - echo "You are licensed to use this software under the terms of either" - echo "the Q Public License (QPL) or the GNU General Public License (GPL)" - echo "versions 2 or 3." - echo - echo "Type 'Q' to view the Q Public License." - affix="either" - else - echo - echo "Internal error." - echo - exit 2 - fi - echo "Type '2' to view the GNU General Public License version 2." - echo "Type '3' to view the GNU General Public License version 3." - echo "Type 'yes' to accept this license offer." - echo "Type 'no' to decline this license offer." - echo - if echo '\c' | grep '\c' >/dev/null; then - echo -n "Do you accept the terms of $affix license? " - else - echo "Do you accept the terms of $affix license? \c" - fi - read acceptance - echo - if [ "$acceptance" = "yes" ]; then - break - elif [ "$acceptance" = "no" ]; then - echo "You are not licensed to use this software." - echo - exit 0 - elif [ "$acceptance" = "2" ]; then - more $relpath/LICENSE.GPL2 - elif [ "$acceptance" = "3" ]; then - more $relpath/LICENSE.GPL3 - elif [ "$acceptance" = "Q" -o "$acceptance" = "q" ]; then - if [ "$PLATFORM_QWS" != "yes" ]; then - more $relpath/LICENSE.QPL - fi - fi - done -elif [ "$Edition" = "eval" ]; then - while true; do - if [ "$PLATFORM_QWS" = "yes" ]; then - echo - echo "This is the Qt/Embedded Evaluation version." - echo - elif [ "$PLATFORM_X11" = "yes" ]; then - echo - echo "This is the Qt/X11 Evaluation version." - echo - else - echo >&2 - echo "Internal error." >&2 - echo >&2 - exit 2 - fi - echo "You are licensed to use this software under the terms of" - echo "the Qt EVALUATION VERSION LICENSE AGREEMENT" - echo - echo "Type '?' to view the Evaluation License." - echo "Type 'yes' to accept this license offer." - echo "Type 'no' to decline this license offer." - echo - if echo '\c' | grep '\c' >/dev/null; then - echo -n "Do you accept the terms of the license? " - else - echo "Do you accept the terms of the license? \c" - fi - read acceptance - echo - if [ "$acceptance" = "yes" ]; then - break - elif [ "$acceptance" = "no" ] ;then - echo "You are not licensed to use this software." - echo - exit 0 - elif [ "$acceptance" = "?" ]; then - more $relpath/LICENSE.EVAL - fi - done -elif [ "$Edition" = "troll" ]; then - if [ "$PLATFORM_QNX" = "yes" ]; then - Platform="Qt/QNX" - elif [ "$PLATFORM_QWS" = "yes" ]; then - Platform="Qt/Embedded" - elif [ "$PLATFORM_MAC" = "yes" ]; then - Platform="Qt/Mac" - elif [ "$PLATFORM_X11" = "yes" ]; then - Platform="Qt/X11" - else - echo - echo "Internal error: unknown platform." - echo - exit 2 - fi - echo - echo "This is the Trolltech in-house version of $Platform." - echo +echo +if [ "$PLATFORM_QWS" = "yes" ]; then + echo "This is the Qt/Embedded Open Source Edition." +elif [ "$PLATFORM_MAC" = "yes" ]; then + echo "This is the Qt/Mac Open Source Edition." +elif [ "$PLATFORM_X11" = "yes" ]; then + echo "This is the Qt/X11 Open Source Edition." else - if [ -f $HOME/.qt-license ]; then - ExpiryDate=`echo $ExpiryDate | sed -e "s,-,,g" | tr -d "\n\r"` - [ -z "$ExpiryDate" ] && ExpiryDate="0" - Today=`date +%Y%m%d` - if [ "$Today" -gt "$ExpiryDate" ]; then - echo - echo "WARNING WARNING WARNING WARNING" - echo - echo " Your support and upgrade period has expired." - echo - echo " You may continue to use your last licensed release" - echo " of Qt under the terms of your existing license" - echo " agreement. But you are not entitled to technical" - echo " support, nor are you entitled to use any more recent" - echo " Qt releases." - echo - echo " Please contact sales@trolltech.com to renew your" - echo " support and upgrades for this license." - echo - echo "WARNING WARNING WARNING WARNING" - echo - sleep 3 - fi - fi - if [ "$PLATFORM_QWS" = "yes" ]; then - Platform="Qt/Embedded" - elif [ "$PLATFORM_MAC" = "yes" ]; then - Platform="Qt/Mac" - elif [ "$PLATFORM_X11" = "yes" ]; then - Platform="Qt/X11" - else - echo >&2 - echo "Internal error." >&2 - echo >&2 - exit 2 - fi - echo - echo "This is the $Platform $Desc Edition." + echo "Internal error: unknown platform." echo - while true; do - echo - echo "Type '?' to view the $Platform License." - echo "Type 'yes' to accept this license offer." - echo "Type 'no' to decline this license offer." - echo - if echo '\c' | grep '\c' >/dev/null; then - echo -n "Do you accept the terms of the $Platform License? " - else - echo "Do you accept the terms of the $Platform License? \c" - fi - read acceptance - echo - if [ "$acceptance" = "yes" ]; then - break - elif [ "$acceptance" = "no" ]; then - echo "You are not licensed to use this software." - echo - exit 0 - else [ "$acceptance" = "?" ] - more $relpath/LICENSE - fi - done + exit 2 fi +echo +echo "You are licensed to use this software under the terms of" +echo "the GNU General Public License (GPL) versions 2 or 3." +echo # work around for broken system header files in IRIX 6.5.18 - 6.5.22 case "$PLATFORM" in |