Annotation of hatari/configure, revision 1.1.1.16

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"
1.1.1.16! root       23:   echo "  --enable-sdl2              Compile with libsdl 2.0 instead of 1.2"
1.1.1.15  root       24:   echo "  --cross-compile-win64_32   Build the 32 bit Windows version under linux using mingw-w64"
                     25:   echo "  --cross-compile-win64_64   Build the 64 bit Windows version under linux using mingw-w64"
1.1.1.12  root       26:   echo
                     27:   echo "Please run cmake directly for full control over the build."
                     28:   echo
1.1       root       29: }
                     30: 
1.1.1.12  root       31: cmake_args=""
                     32: build_type="Release"
1.1       root       33: 
1.1.1.12  root       34: while [ $# -gt 0 ]
1.1       root       35: do
1.1.1.12  root       36:   preq=${1%=*}                 # get part before =
                     37:   case $preq
                     38:   in
                     39:     --help)
                     40:       print_help
                     41:       exit 0
1.1.1.3   root       42:     ;;
1.1.1.12  root       43:     --prefix)
                     44:       prefix=${1##*=}          # get part after =
1.1.1.14  root       45:       cmake_args="$cmake_args -DCMAKE_INSTALL_PREFIX:PATH=$prefix"
1.1       root       46:     ;;
1.1.1.12  root       47:     --enable-debug)
                     48:       build_type="Debug"
                     49:       cmake_args="$cmake_args -DCMAKE_BUILD_TYPE:STRING=Debug"
                     50:     ;;
                     51:     --disable-debug)
                     52:       build_type="Release"
                     53:       cmake_args="$cmake_args -DCMAKE_BUILD_TYPE:STRING=Release"
                     54:     ;;
                     55:     --enable-dsp)
                     56:       cmake_args="$cmake_args -DENABLE_DSP_EMU:BOOL=1"
                     57:     ;;
                     58:     --disable-dsp)
                     59:       cmake_args="$cmake_args -DENABLE_DSP_EMU:BOOL=0"
                     60:     ;;
                     61:     --enable-tracing)
                     62:       cmake_args="$cmake_args -DENABLE_TRACING:BOOL=1"
                     63:     ;;
                     64:     --disable-tracing)
                     65:       cmake_args="$cmake_args -DENABLE_TRACING:BOOL=0"
                     66:     ;;
                     67:     --enable-small-mem)
                     68:       cmake_args="$cmake_args -DENABLE_SMALL_MEM:BOOL=1"
                     69:     ;;
                     70:     --disable-small-mem)
                     71:       cmake_args="$cmake_args -DENABLE_SMALL_MEM:BOOL=0"
                     72:     ;;
1.1.1.13  root       73:     --enable-winuae-cpu)
                     74:       cmake_args="$cmake_args -DENABLE_WINUAE_CPU:BOOL=1"
                     75:     ;;
                     76:     --disable-winuae-cpu)
                     77:       cmake_args="$cmake_args -DENABLE_WINUAE_CPU:BOOL=0"
                     78:     ;;
1.1.1.12  root       79:     --enable-osx-bundle)
                     80:       cmake_args="$cmake_args -DENABLE_OSX_BUNDLE:BOOL=1"
                     81:     ;;
                     82:     --disable-osx-bundle)
                     83:       cmake_args="$cmake_args -DENABLE_OSX_BUNDLE:BOOL=0"
                     84:     ;;
1.1.1.16! root       85:     --enable-sdl2)
        !            86:       cmake_args="$cmake_args -DENABLE_SDL2:BOOL=1"
        !            87:     ;;
        !            88:     --disable-sdl2)
        !            89:       cmake_args="$cmake_args -DENABLE_SDL2:BOOL=0"
        !            90:     ;;
1.1.1.15  root       91:     --cross-compile-win64_32)
                     92:       cmake_args="$cmake_args -DCMAKE_TOOLCHAIN_FILE=cmake/Toolchain-mingw32-win64_32.cmake"
                     93:     ;;
                     94:     --cross-compile-win64_64)
                     95:       cmake_args="$cmake_args -DCMAKE_TOOLCHAIN_FILE=cmake/Toolchain-mingw32-win64_64.cmake"
1.1.1.12  root       96:     ;;
                     97:     *)
                     98:       echo "Invalid argument: $preq"
                     99:       echo "Run $0 --help for a list of valid parameters."
                    100:       exit 2
1.1.1.6   root      101:     ;;
1.1       root      102:   esac
1.1.1.12  root      103:   shift 1
                    104: done
1.1       root      105: 
1.1.1.13  root      106: # remove previous cmake's cache
                    107: rm -f `dirname $0`/CMakeCache.txt
1.1.1.15  root      108: rm -rf `dirname $0`/CMakeFiles/
1.1.1.13  root      109: 
1.1.1.12  root      110: cmake `dirname $0` $cmake_args || exit 1
1.1       root      111: 
1.1.1.12  root      112: echo
                    113: echo "Now you must type: make; make install"
                    114: echo "to actually build and install the software"
                    115: echo

unix.superglobalmegacorp.com

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