- #!/bin/sh
- # --------------------------------------------------------------------
- # --------------------------------------------------------------------
- if [ -f ".configured" ]
- then
- echo ""
- echo "You have already run 'configure.sh'"
- echo "running it again will overwrite 'Makefile' and 'Makefile.config'"
- echo "Are you sure you wish to continue [Y/N]?"
- read answer
- case "$answer" in
- Y*|y*)
- ;;
- *)
- exit 0
- ;;
- esac
- fi
- # --------------------------------------------------------------------
- UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
- UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
- # --------------------------------------------------------------------
- case $UNAME_SYSTEM in
- SunOS*)
- case $UNAME_RELEASE in
- 5.4)
- EXTENSION=solaris-2.4
- ;;
- 5.5.1)
- EXTENSION=solaris-2.5.1
- ;;
- 5.6)
- EXTENSION=solaris-2.6
- ;;
- *)
- EXTENSION=
- ;;
- esac
- ;;
- Linux*)
- EXTENSION=linux
- ;;
- UnixWare*)
- EXTENSION=unixware
- ;;
- HP-UX*)
- EXTENSION=
- ;;
- OSF1*)
- EXTENSION=
- ;;
- unknown)
- ( hostinfo | grep NeXT ) 2>/dev/null >/dev/null
- if [ $? -eq 0 ]
- then
- EXTENSION=next
- else
- EXTENSION=
- fi
- ;;
- *)
- EXTENSION=
- ;;
- esac
- if [ "X-${EXTENSION}" = "X-" ]
- then
- echo ""
- echo "I Dont know how to build for '${UNAME_SYSTEM}'"
- echo "Copy a 'Makefile.config.OSTYPE' from the config directory"
- echo "which most closely resembles your platform into this"
- echo "directory and rename it 'Makefile.config'"
- echo ""
- echo "You may wish to edit Makefile.config for site specific dependencies"
- echo "When you have finished, to build and install sms_client run:"
- echo ""
- echo " make ; make install"
- echo ""
- exit 1
- fi
- # --------------------------------------------------------------------
- cp config/Makefile.config.${EXTENSION} Makefile.config
- if [ $? -ne 0 ]
- then
- echo "'cp config/Makefile.config.${EXTENSION} Makefile.config' failed"
- exit 1
- fi
- cp config/Makefile Makefile
- if [ $? -ne 0 ]
- then
- echo "'cp config/Makefile Makefile' failed"
- exit 1
- fi
- touch .configured
- if [ $? -ne 0 ]
- then
- echo "'touch .configured' failed"
- exit 1
- fi
- echo ""
- echo "Copying 'config/Makefile.config.${EXTENSION}' to 'Makefile.config'"
- echo "Configuration complete"
- echo "You may wish to edit Makefile.config for site specific dependencies"
- echo "When you have finished, to build and install sms_client run:"
- echo ""
- echo " make ; make install"
- echo ""
- exit 0
- # --------------------------------------------------------------------