Commit 67ea10f7 authored by Erick Gallesio's avatar Erick Gallesio

Various Adaptations for compiling on MacOS 10.6

parent 2672dc87
......@@ -169,6 +169,7 @@ MKDIR_P = @MKDIR_P@
OBJEXT = @OBJEXT@
OS_FLAVOUR = @OS_FLAVOUR@
OS_NAME = @OS_NAME@
OS_NAME_VERSION = @OS_NAME_VERSION@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
......
......@@ -617,6 +617,7 @@ SH_SUFFIX
SH_LOADER
SH_LOAD_FLAGS
SH_COMP_FLAGS
OS_NAME_VERSION
OS_NAME
BUILD_ARCH
BUILD_OS
......@@ -6666,12 +6667,6 @@ then
GCINC="-I../gc/include"
GCLIB="../gc/.libs/libgc.a"
gcmsg="use provided library"
# MacOs kludge
case `uname -s` in
Darwin*) GC_INC="$GC_INC -D_XOPEN_SOURCE" ;;
*) true;;
esac
else
echo "... Using system libgc library"
GC=""
......@@ -6880,17 +6875,22 @@ DEF_FFI="#define HAVE_FFI 1" ; # We always want FFI.
### Determine the options necessary for dynamic loading
eval `CC=$CC /bin/sh ./utils/shlib-options`
case $OS in
SUNOS)
case $OS_NAME_VERSION in
SUNOS*)
CFLAGS="$CFLAGS -DSOLARIS";
LIBS="$LIBS -lsocket -lrt -lnsl -lpthread" ;;
UNKNOWN)
LIBS="$LIBS -lsocket -lrt -lnsl -lpthread"
;;
DARWIN_10)
GC_INC="GC_INC -D_XOPEN_SOURCE"
;;
UNKNOWN*)
echo ""
echo "**** STklos has no support for your system (`uname -s`)"
echo "**** Please modify the script \"utils/shlib-options\" to add"
echo "**** support for your system (it's easy) and restart installation process."
echo "**** Thanks for sending your modifications to <bugs _at_ stklos.net>"
exit 1 ;;
exit 1
;;
esac
......@@ -6903,6 +6903,22 @@ PREFIX=$prefix
BUILD_OS=$os-$version
BUILD_ARCH=`uname -m`
OS_NAME=$OS
case $OS in
LINUX)
v=$(echo $version | sed -e 's/\(0-9*\)\.\(0-9*\).*/\1_\2/')
OS_NAME_VERSION=LINUX_$v
;;
DARWIN)
case $version in
9*) OS_NAME_VERSION=DARWIN_9;;
10*) OS_NAME_VERSION=DARWIN_10;;
*) OS_NAME_VERSION=DARWIN_OLD;;
esac
;;
*)
v=$(echo $version | sed -e 's/^0-9/_/g')
OS_NAME_VERSION=$OS_$v;
esac
### Place version number in VERSION file
### echo "VERSION=${VERSION}">VERSION
......@@ -6919,12 +6935,12 @@ else
biglib="use the system library"
fi
if test "$HAVE_GC" = "no"
then
gclib="compile provided library"
else
gclib="use the system library"
fi
#1.0 if test "$HAVE_GC" = "no"
#1.0 then
#1.0 gclib="compile provided library"
#1.0 else
#1.0 gclib="use the system library"
#1.0 fi
# LURC adjustment
LURCDIR=""
......@@ -6976,6 +6992,7 @@ fi
#GC
......@@ -8473,6 +8490,7 @@ echo "SUMMARY"
echo "*******"
echo " System: " $BUILD_OS
echo " OS type: " $OS_FLAVOUR
echo " OS name: " $OS_NAME_VERSION
echo " Install prefix : " $prefix
echo " C compiler: " $CC
echo " Compilation flags: " $CFLAGS
......
......@@ -271,12 +271,6 @@ then
GCINC="-I../gc/include"
GCLIB="../gc/.libs/libgc.a"
gcmsg="use provided library"
# MacOs kludge
case `uname -s` in
Darwin*) GC_INC="$GC_INC -D_XOPEN_SOURCE" ;;
*) true;;
esac
else
echo "... Using system libgc library"
GC=""
......@@ -391,17 +385,22 @@ DEF_FFI="#define HAVE_FFI 1" ; # We always want FFI.
### Determine the options necessary for dynamic loading
eval `CC=$CC /bin/sh ./utils/shlib-options`
case $OS in
SUNOS)
case $OS_NAME_VERSION in
SUNOS*)
CFLAGS="$CFLAGS -DSOLARIS";
LIBS="$LIBS -lsocket -lrt -lnsl -lpthread" ;;
UNKNOWN)
LIBS="$LIBS -lsocket -lrt -lnsl -lpthread"
;;
DARWIN_10)
GC_INC="GC_INC -D_XOPEN_SOURCE"
;;
UNKNOWN*)
echo ""
echo "**** STklos has no support for your system (`uname -s`)"
echo "**** Please modify the script \"utils/shlib-options\" to add"
echo "**** support for your system (it's easy) and restart installation process."
echo "**** Thanks for sending your modifications to <bugs _at_ stklos.net>"
exit 1 ;;
exit 1
;;
esac
......@@ -414,6 +413,22 @@ PREFIX=$prefix
BUILD_OS=$os-$version
BUILD_ARCH=`uname -m`
OS_NAME=$OS
case $OS in
LINUX)
v=$(echo $version | sed -e 's/\([0-9]*\)\.\([0-9]*\).*/\1_\2/')
OS_NAME_VERSION=LINUX_$v
;;
DARWIN)
case $version in
9*) OS_NAME_VERSION=DARWIN_9;;
10*) OS_NAME_VERSION=DARWIN_10;;
*) OS_NAME_VERSION=DARWIN_OLD;;
esac
;;
*)
v=$(echo $version | sed -e 's/[^0-9]/_/g')
OS_NAME_VERSION=$OS_$v;
esac
### Place version number in VERSION file
### echo "VERSION=${VERSION}">VERSION
......@@ -430,12 +445,12 @@ else
biglib="use the system library"
fi
if test "$HAVE_GC" = "no"
then
gclib="compile provided library"
else
gclib="use the system library"
fi
#1.0 if test "$HAVE_GC" = "no"
#1.0 then
#1.0 gclib="compile provided library"
#1.0 else
#1.0 gclib="use the system library"
#1.0 fi
# LURC adjustment
LURCDIR=""
......@@ -467,6 +482,7 @@ AC_SUBST(EXECDIR)
AC_SUBST(BUILD_OS)
AC_SUBST(BUILD_ARCH)
AC_SUBST(OS_NAME)
AC_SUBST(OS_NAME_VERSION)
AC_SUBST(SH_COMP_FLAGS)
AC_SUBST(SH_LOAD_FLAGS)
AC_SUBST(SH_LOADER)
......@@ -516,6 +532,7 @@ echo "SUMMARY"
echo "*******"
echo " System: " $BUILD_OS
echo " OS type: " $OS_FLAVOUR
echo " OS name: " $OS_NAME_VERSION
echo " Install prefix : " $prefix
echo " C compiler: " $CC
echo " Compilation flags: " $CFLAGS
......
......@@ -42,7 +42,7 @@ subdir = doc
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(srcdir)/stklos-compile.1.in $(srcdir)/stklos-config.1.in \
$(srcdir)/stklos-genlex.1.in $(srcdir)/stklos-install.1.in \
$(srcdir)/stklos-pkg.1.in $(srcdir)/stklos.1.in TODO
$(srcdir)/stklos-pkg.1.in $(srcdir)/stklos.1.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
......@@ -146,6 +146,7 @@ MKDIR_P = @MKDIR_P@
OBJEXT = @OBJEXT@
OS_FLAVOUR = @OS_FLAVOUR@
OS_NAME = @OS_NAME@
OS_NAME_VERSION = @OS_NAME_VERSION@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
......
......@@ -134,6 +134,7 @@ MKDIR_P = @MKDIR_P@
OBJEXT = @OBJEXT@
OS_FLAVOUR = @OS_FLAVOUR@
OS_NAME = @OS_NAME@
OS_NAME_VERSION = @OS_NAME_VERSION@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
......
......@@ -138,6 +138,7 @@ MKDIR_P = @MKDIR_P@
OBJEXT = @OBJEXT@
OS_FLAVOUR = @OS_FLAVOUR@
OS_NAME = @OS_NAME@
OS_NAME_VERSION = @OS_NAME_VERSION@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
......
......@@ -155,6 +155,7 @@ MKDIR_P = @MKDIR_P@
OBJEXT = @OBJEXT@
OS_FLAVOUR = @OS_FLAVOUR@
OS_NAME = @OS_NAME@
OS_NAME_VERSION = @OS_NAME_VERSION@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
......
......@@ -178,6 +178,7 @@ MKDIR_P = @MKDIR_P@
OBJEXT = @OBJEXT@
OS_FLAVOUR = @OS_FLAVOUR@
OS_NAME = @OS_NAME@
OS_NAME_VERSION = @OS_NAME_VERSION@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
......
......@@ -137,6 +137,7 @@ MKDIR_P = @MKDIR_P@
OBJEXT = @OBJEXT@
OS_FLAVOUR = @OS_FLAVOUR@
OS_NAME = @OS_NAME@
OS_NAME_VERSION = @OS_NAME_VERSION@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
......
......@@ -137,6 +137,7 @@ MKDIR_P = @MKDIR_P@
OBJEXT = @OBJEXT@
OS_FLAVOUR = @OS_FLAVOUR@
OS_NAME = @OS_NAME@
OS_NAME_VERSION = @OS_NAME_VERSION@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
......
......@@ -138,6 +138,7 @@ MKDIR_P = @MKDIR_P@
OBJEXT = @OBJEXT@
OS_FLAVOUR = @OS_FLAVOUR@
OS_NAME = @OS_NAME@
OS_NAME_VERSION = @OS_NAME_VERSION@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
......
......@@ -138,6 +138,7 @@ MKDIR_P = @MKDIR_P@
OBJEXT = @OBJEXT@
OS_FLAVOUR = @OS_FLAVOUR@
OS_NAME = @OS_NAME@
OS_NAME_VERSION = @OS_NAME_VERSION@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
......
......@@ -42,7 +42,7 @@ POST_UNINSTALL = :
bin_PROGRAMS = stklos$(EXEEXT)
subdir = src
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(srcdir)/extraconf.h.in $(srcdir)/stklosconf.h.in TODO
$(srcdir)/extraconf.h.in $(srcdir)/stklosconf.h.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
......@@ -190,6 +190,7 @@ MKDIR_P = @MKDIR_P@
OBJEXT = @OBJEXT@
OS_FLAVOUR = @OS_FLAVOUR@
OS_NAME = @OS_NAME@
OS_NAME_VERSION = @OS_NAME_VERSION@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
......
This diff is collapsed.
This diff is collapsed.
......@@ -32,6 +32,7 @@
#define BUILD_ARCH "@BUILD_ARCH@"
#define BUILD_MACHINE "@BUILD_OS@-@BUILD_ARCH@"
#define @OS_NAME@ 1
#define @OS_NAME_VERSION@ 1
#define STACK_GROWS_@STACK_DIRECTION@
/* Various stuff */
......
......@@ -42,7 +42,11 @@ Cambridge, MA 02139, USA. */
#include <sys/stat.h>
#include <unistd.h>
#include <dirent.h>
#include <malloc.h>
#ifdef DARWIN_10
# include <sys/malloc.h>
#else
# include <malloc.h>
#endif
#include <fnmatch.h>
#ifdef STKLOS_CODE
# include "gnu-glob.h"
......
......@@ -113,6 +113,7 @@ MKDIR_P = @MKDIR_P@
OBJEXT = @OBJEXT@
OS_FLAVOUR = @OS_FLAVOUR@
OS_NAME = @OS_NAME@
OS_NAME_VERSION = @OS_NAME_VERSION@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
......
......@@ -138,6 +138,7 @@ MKDIR_P = @MKDIR_P@
OBJEXT = @OBJEXT@
OS_FLAVOUR = @OS_FLAVOUR@
OS_NAME = @OS_NAME@
OS_NAME_VERSION = @OS_NAME_VERSION@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment