#!/bin/sh
#*=====================================================================*/
#*    serrano/prgm/project/bigloo/autoconf/unix                        */
#*    -------------------------------------------------------------    */
#*    Author      :  Manuel Serrano                                    */
#*    Creation    :  Wed Oct 22 11:07:08 1997                          */
#*    Last change :  Tue May 13 10:19:46 2003 (serrano)                */
#*    -------------------------------------------------------------    */
#*    Setting bigloo.h up for Unix parameters.                         */
#*=====================================================================*/
fmt=c
tmpdir=/tmp

#*---------------------------------------------------------------------*/
#*    We parse the arguments                                           */
#*---------------------------------------------------------------------*/
while : ; do
  case $1 in
    "")
      break;;

    --user=*)
      user="`echo $1 | sed 's/^[-a-z]*=//'`";;

    --cc=*|-cc=*)
      cc="`echo $1 | sed 's/^[-a-z]*=//'`";;

    --cflags=*|-cflags=*)
      cflags="`echo $1 | sed 's/^[-a-z]*=//'`";;

    --tmpdir=*|-tmpdir=*)
      tmpdir="`echo $1 | sed 's/^[-a-z]*=//'`";;

    -*)
      echo "Unknown option \"$1\", ignored" >&2;;
  esac
  shift
done

#*---------------------------------------------------------------------*/
#*    Uname parameters                                                 */
#*---------------------------------------------------------------------*/
if eval uname > /dev/null 2> /dev/null; then
  osname=`uname -s`
  osarch=`uname -m`
  osversion=`uname -r`
else
  osname="unknown"
  osarch="unknown"
  osversion="unknown"
fi

if [ $fmt = "c" ]; then
  # the kind of OS (Unix)
  echo "#define OS_CLASS \"unix\""
  
  # The name of the OS
  echo "#define OS_NAME \"$osname\""
  
  # The architecture
  echo "#define OS_ARCH \"$osarch\""
  
  # the Os version
  echo "#define OS_VERSION \"$osversion\""
  
  # the temporary directory
  echo "#define OS_TMP \"$tmpdir\""
  
  # the file separator
  echo "#define FILE_SEPARATOR '/'"
  
  # the path separator
  echo "#define PATH_SEPARATOR ':'"
  
  # the static library suffixes
  echo "#define STATIC_LIB_SUFFIX \"a\""
  
  # the shard library suffixes
  echo "#define SHARED_LIB_SUFFIX \"so\""
  
  # Is it possible to directly print UCS2 characters
  echo "#define UCS2_DISPLAYABLE 0"
fi

