#!/bin/sh # # # This is not generated by autoconf or similar, just handcoded, since we don't need this much complexity PREFIX=/usr if [ $# -gt 0 ] then case $1 in --with-prefix=* | --prefix=* | -prefix=*) PREFIX=`echo -e $1 | cut -d"=" -f2-` if [ -z "$PREFIX" ] then echo "Prefix may not be emtpy !" exit fi ;; --help | -help | -h) echo "help" ;; *) echo -e "Unrecognized argument \"$1\"\n" echo -e "Valud options are :" echo -e "\n\t--prefix=\tPath prefix to install the program into. default is /usr" echo -e "\t--help\t\tDisplays this help screen" echo -e "\n" exit esac fi if [ ! -z "$2" ] then echo "You may specify only one option, the prefiy one... try --help to see it ;)" exit fi DM="test" DM=`echo $DM | sed 's/test/mist/g' 2>&1` echo -n "Checking for sed .." if [ "$DM" = "mist" ] then echo ". found." else echo ". not found" echo -e "\nsed was not found in your PATH." echo -e "This script cannot continue." echo -e "However you might be able to compile, just edit the makefile.conf for your own needs\n" exit fi echo -n "Checking for g++ version .." GCCVER=`g++ --version 2>/dev/null` if [ -z "$GCCVER" ] then echo ". not found." echo -e "\nWARNING !!" echo -e "could not find a valid compiler, you will not be able to build smtpmap !" echo -e "make shure that g++ is in your path, smtpmap will only compile with g++ !" else echo -e ". version $GCCVER found." fi echo -n "Checking for compatible make .." MAKE=`gmake --version 2>/dev/null` if [ -z "$MAKE" ] then echo ". not found" echo -e "\n the shipped makefiles are compatible with gmake only. please in stall gmake for compiling !\n" exit else echo ". found." fi if [ ! -e makefile.conf ] then echo "Could not find makefile.conf" echo "Have u installed the full distribution ?" echo "Verify this !" exit fi cat makefile.conf | sed 's/^PREFIX/#PREFIX/g' > mk mv mk makefile.conf echo -e "PREFIX=$PREFIX" >> makefile.conf echo -e "\n\nWe are ready to compile. type \"gmake\" or \"gmake install\" to create and then install the software"