Annotation of hatari/configure, revision 1.1.1.15

1.1.1.12  root        1: #!/bin/sh
1.1       root        2: 
1.1.1.12  root        3: # NOTE: this is a simple script wrapper around the cmake command line tools,
                      4: # for those used to the autotools configure script conventions
1.1.1.9   root        5: 
1.1.1.12  root        6: if ! which cmake > /dev/null; then
                      7:   echo "ERROR: You need the 'cmake' program to configure the Hatari build process."
                      8:   echo "Please install 'cmake' first, then try again."
                      9:   exit 1
                     10: fi
                     11: 
                     12: print_help()
                     13: {
                     14:   echo "This is a simple configure script wrapper around cmake build system."
                     15:   echo "Parameters are:"
1.1.1.15! root       16:   echo "  --prefix=<path>            Set the install prefix to path"
        !            17:   echo "  --enable-debug             Enable debug (non-optimized) build"
        !            18:   echo "  --enable-small-mem         Use less memory - at the expense of emulation speed"
        !            19:   echo "  --disable-dsp              Disable DSP emulation for Falcon mode."
        !            20:   echo "  --disable-tracing          Disable tracing messages for debugging"
        !            21:   echo "  --enable-winuae-cpu        Enable WinUAE CPU core (experimental!)"
        !            22:   echo "  --disable-osx-bundle       Disable application bundling on Mac OS X"
        !            23:   echo "  --cross-compile-win64_32   Build the 32 bit Windows version under linux using mingw-w64"
        !            24:   echo "  --cross-compile-win64_64   Build the 64 bit Windows version under linux using mingw-w64"
1.1.1.12  root       25:   echo
                     26:   echo "Please run cmake directly for full control over the build."
                     27:   echo
1.1       root       28: }
                     29: 
1.1.1.12  root       30: cmake_args=""
                     31: build_type="Release"
1.1       root       32: 
1.1.1.12  root       33: while [ $# -gt 0 ]
1.1       root       34: do
1.1.1.12  root       35:   preq=${1%=*}                 # get part before =
                     36:   case $preq
                     37:   in
                     38:     --help)
                     39:       print_help
                     40:       exit 0
1.1.1.3   root       41:     ;;
1.1.1.12  root       42:     --prefix)
                     43:       prefix=${1##*=}          # get part after =
1.1.1.14  root       44:       cmake_args="$cmake_args -DCMAKE_INSTALL_PREFIX:PATH=$prefix"
1.1       root       45:     ;;
1.1.1.12  root       46:     --enable-debug)
                     47:       build_type="Debug"
                     48:       cmake_args="$cmake_args -DCMAKE_BUILD_TYPE:STRING=Debug"
                     49:     ;;
                     50:     --disable-debug)
                     51:       build_type="Release"
                     52:       cmake_args="$cmake_args -DCMAKE_BUILD_TYPE:STRING=Release"
                     53:     ;;
                     54:     --enable-dsp)
                     55:       cmake_args="$cmake_args -DENABLE_DSP_EMU:BOOL=1"
                     56:     ;;
                     57:     --disable-dsp)
                     58:       cmake_args="$cmake_args -DENABLE_DSP_EMU:BOOL=0"
                     59:     ;;
                     60:     --enable-tracing)
                     61:       cmake_args="$cmake_args -DENABLE_TRACING:BOOL=1"
                     62:     ;;
                     63:     --disable-tracing)
                     64:       cmake_args="$cmake_args -DENABLE_TRACING:BOOL=0"
                     65:     ;;
                     66:     --enable-small-mem)
                     67:       cmake_args="$cmake_args -DENABLE_SMALL_MEM:BOOL=1"
                     68:     ;;
                     69:     --disable-small-mem)
                     70:       cmake_args="$cmake_args -DENABLE_SMALL_MEM:BOOL=0"
                     71:     ;;
1.1.1.13  root       72:     --enable-winuae-cpu)
                     73:       cmake_args="$cmake_args -DENABLE_WINUAE_CPU:BOOL=1"
                     74:     ;;
                     75:     --disable-winuae-cpu)
                     76:       cmake_args="$cmake_args -DENABLE_WINUAE_CPU:BOOL=0"
                     77:     ;;
1.1.1.12  root       78:     --enable-osx-bundle)
                     79:       cmake_args="$cmake_args -DENABLE_OSX_BUNDLE:BOOL=1"
                     80:     ;;
                     81:     --disable-osx-bundle)
                     82:       cmake_args="$cmake_args -DENABLE_OSX_BUNDLE:BOOL=0"
                     83:     ;;
1.1.1.15! root       84:     --cross-compile-win64_32)
        !            85:       cmake_args="$cmake_args -DCMAKE_TOOLCHAIN_FILE=cmake/Toolchain-mingw32-win64_32.cmake"
        !            86:     ;;
        !            87:     --cross-compile-win64_64)
        !            88:       cmake_args="$cmake_args -DCMAKE_TOOLCHAIN_FILE=cmake/Toolchain-mingw32-win64_64.cmake"
1.1.1.12  root       89:     ;;
                     90:     *)
                     91:       echo "Invalid argument: $preq"
                     92:       echo "Run $0 --help for a list of valid parameters."
                     93:       exit 2
1.1.1.6   root       94:     ;;
1.1       root       95:   esac
1.1.1.12  root       96:   shift 1
                     97: done
1.1       root       98: 
1.1.1.13  root       99: # remove previous cmake's cache
                    100: rm -f `dirname $0`/CMakeCache.txt
1.1.1.15! root      101: rm -rf `dirname $0`/CMakeFiles/
1.1.1.13  root      102: 
1.1.1.12  root      103: cmake `dirname $0` $cmake_args || exit 1
1.1       root      104: 
1.1.1.12  root      105: echo
                    106: echo "Now you must type: make; make install"
                    107: echo "to actually build and install the software"
                    108: echo

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.