#! /bin/bash source script/discover_package_manager source script/discover_os discover_os discover_package_manager $platform pcman=$discover_package_manager_ret if [ x"$platform" = x"osx" -a x"$pcman" = x"" ]; then echo -e "\033[93;5;1m WARNING \033[0m No package manager has been found on this system" script/solve_brew $platform discover_package_manager $platform pcman=$discover_package_manager_ret if [ x"$pcman" != x"brew" ]; then echo -e "brew \033[91;5;1m FAILED \033[0m" fi fi command -v cmake >/dev/null 2>&1 if [ $? -ne 0 ]; then echo >&2 echo -e "cmake\033[91;5;1m FAILED \033[0m" echo "OpenFPM require cmake but it's not installed, searching a solution... " script/solve_cmake $platform command -v cmake >/dev/null 2>&1 if [ $? -ne 0 ]; then echo -e "cmake\033[91;5;1m FAILED \033[0m" exit 1 else echo -e "cmake\033[92;1m SUCCESS \033[0m" fi else echo -e "cmake\033[92;1m SUCCESS \033[0m" fi command -v wget >/dev/null 2>&1 if [ $? -ne 0 ]; then echo >&2 echo -e "wget\033[91;5;1m FAILED \033[0m" echo "OpenFPM require wget but it's not installed, searching a solution... " script/solve_wget $platform command -v wget >/dev/null 2>&1 if [ $? -ne 0 ]; then echo -e "wget\033[91;5;1m FAILED \033[0m" exit 1 else echo -e "wget\033[92;1m SUCCESS \033[0m" fi else echo -e "wget \033[92;1m SUCCESS \033[0m" fi command -v git >/dev/null 2>&1 if [ $? -ne 0 ]; then echo >&2 echo -e "git\033[91;5;1m FAILED \033[0m" echo "OpenFPM require git but it's not installed, searching a solution... " script/solve_git $platform command -v git >/dev/null 2>&1 if [ $? -ne 0 ]; then echo -e "git\033[91;5;1m FAILED \033[0m" exit 1 else echo -e "git\033[92;1m SUCCESS \033[0m" fi else echo -e "git \033[92;1m SUCCESS \033[0m" fi command -v autoconf >/dev/null 2>&1 if [ $? -ne 0 ]; then echo >&2 echo -e "autoconf\033[91;5;1m FAILED \033[0m" echo "OpenFPM require autoconf but it's not installed, searching a solution..." script/solve_autoconf $platform command -v autoheader >/dev/null 2>&1 if [ $? -ne 0 ]; then echo -e "autoconf\033[91;5;1m FAILED \033[0m" exit 1 else echo -e "autoconf\033[92;1m SUCCESS \033[0m" fi else echo -e "autoconf\033[92;1m SUCCESS \033[0m" fi command -v automake >/dev/null 2>&1 if [ $? -ne 0 ]; then echo >&2 echo -e "automake\033[91;5;1m FAILED \033[0m" echo "OpenFPM require automake but it's not installed, searching a solution..." script/solve_automake $platform command -v automake >/dev/null 2>&1 if [ $? -ne 0 ]; then echo "automake\033[91;5;1m FAILED \033[0m" exit 1 else echo -e "automake\033[92;1m SUCCESS \033[0m" fi else echo -e "automake\033[92;1m SUCCESS \033[0m" fi command -v libtoolize >/dev/null 2>&1 opt1=$? command -v glibtoolize >/dev/null 2>&1 opt2=$? if [ $opt1 -ne 0 -o $opt2 -ne 0 ]; then echo >&2 echo -e "libtool\033[91;5;1m FAILED \033[0m" echo "OpenFPM require libtool but it's not installed, searching a solution..." script/solve_libtool $platform command -v libtoolize >/dev/null 2>&1 opt1=$? command -v glibtoolize >/dev/null 2>&1 opt2=$? if [ opt1 -ne 0 -o opt2 -ne 0 ]; then echo -e "libtool\033[91;5;1m FAILED \033[0m" exit 1 else echo -e "libtool\033[92;1m SUCCESS \033[0m" fi else echo -e "libtool\033[92;1m SUCCESS \033[0m" fi command -v g++ >/dev/null 2>&1 if [ $? -ne 0 ]; then echo >&2 echo -e "Configure\033[91;5;1m FAILED \033[0m" echo "OpenFPM require g++ but it's not installed, searching a solution..." script/solve_gpp $platform command -v g++ >/dev/null 2>&1 if [ $? -ne 0 ]; then echo -e "g++\033[91;5;1m FAILED \033[0m" exit 1 else echo -e "g++\033[92;1m SUCCESS \033[0m" fi else echo -e "g++\033[92;1m SUCCESS \033[0m" fi