#!/bin/sh
# Configuration script for the sC++ distribution.
# Made by Jan Madsen
# Last modified the 16th January 1997.
# Copyright: Computer Networking Laboratory,
#            Swiss Federal Institute of Technology, Lausanne - Switzerland
 
# The INSTALL variable holds the absolute path in which we will install
# the libraries and programs (except gcc) from the distribution.
INSTALL=/usr/local/sCxx

# Default compiler to use when compiling (should be a compiler that accepts
# sC++).
COMPILER=${INSTALL}/bin/gcc

# Default values for the Motif include files and Motif libraries.
MOTIF_INCLUDES_1=-I/logiciels/licences/Motif/include
MOTIF_LIBRARIES_1=-L/logiciels/licences/Motif/lib

# Default value for the X11 library directories.
X_INCLUDE=-I/logiciels/public/X11R5/include
X_LIB=-L/logiciels/public/X11R5/lib
 
for param in $* ; do
   case ${param} in
   INSTALL=*)
       INSTALL=`echo $param | sed 's/INSTALL=//g'`
       ;;
   COMPILER=*)
        COMPILER=`echo $param | sed 's/COMPILER=//g'`
        ;;
   MOTIF_INCLUDE_OPTIONS=*)
        MOTIF_INCLUDES_1=`echo $param | sed 's/MOTIF_INCLUDE_OPTIONS=//g'`
        ;;
   MOTIF_LIBRARY_OPTIONS=*)
        MOTIF_LIBRARIES_1=`echo $param | sed 's/MOTIF_LIBRARY_OPTIONS=//g'`
        ;;
   X_INCLUDE_OPTIONS=*)
        X_INCLUDE=`echo $param | sed 's/X_INCLUDE_OPTIONS=//g'`
        ;;
   X_LIBRARY_OPTIONS=*)
        X_LIB=`echo $param | sed 's/X_LIBRARY_OPTIONS=//g'`
        ;;
   esac
done

# Show the values of the variables passed by the caller (Normally not used).
#echo Install directory from ${PWD} : ${INSTALL}

echo ***Configuring examples/GUI.

echo "# Automatically generated makefile from the configure script." > Makefile
echo "# The Makefile.in is following the automatically generated stuff" >> Makefile
echo "# Made by Jan Madsen," >> Makefile
echo "#         Computer Networking Laboratory," >> Makefile
echo "#         Swiss Federal Institute of Technology," >> Makefile
echo "#         Lausanne - Switzerland" >> Makefile
echo " " >> Makefile
echo "# Directory to install the programs/libraries in" >> Makefile
echo "INSTALL_DIR=${INSTALL}" >> Makefile
echo " " >> Makefile
echo "# Compilers to use when compiling, CC = C compiler, CXX = C++ compiler" >> Makefile
echo "CC=${COMPILER}" >> Makefile
echo "CXX=${COMPILER}" >> Makefile
echo " " >> Makefile
echo "# Miscelaneous shell commands used" >> Makefile
echo "RM=rm -f" >> Makefile
echo "RANLIB=/bin/ranlib" >> Makefile
echo "AR=ar" >> Makefile
echo " " >> Makefile
echo "# Motif include files and libraries path as they are passed to gcc" >> Makefile
echo "MOTIF_INCLUDES=${MOTIF_INCLUDES_1}" >> Makefile
echo "MOTIF_LIBRARIES=${MOTIF_LIBRARIES_1}" >> Makefile
echo " " >> Makefile
echo "# X include files and libraries path(s) as they are passed to gcc" >> Makefile
echo "X_INCLUDES=${X_INCLUDE}" >> Makefile
echo "X_LIBRARIES=${X_LIB}" >> Makefile
echo " " >> Makefile
cat ./Makefile.in >> Makefile

