misc clean-up related to build changes

This commit is contained in:
Matthew Flatt 2010-11-06 22:08:15 -06:00
parent 53febbeb6c
commit cccfdbe2c4
11 changed files with 30 additions and 923 deletions

View File

@ -59,23 +59,6 @@ Racket software includes or extends the following copyrighted material:
All rights reserved.
}
@copyright{
wxWindows
Copyright (c) 1994
Artificial Intelligence Applications Institute,
The University of Edinburgh
All rights reserved.
}
@copyright{
wxWindows Xt
Copyright (c) 1994
Artificial Intelligence Applications Institute,
The University of Edinburgh
Copyright (c) 1995 GNU (Markus Holzem)
All rights reserved.
}
@copyright{
Conservative garbage collector
Copyright (c) 1988, 1989 Hans-J. Boehm, Alan J. Demers
@ -91,30 +74,6 @@ Racket software includes or extends the following copyrighted material:
All rights reserved.
}
@copyright{
The A List
Copyright (c) 1997-2000 Kyle Hammond.
All rights reserved.
}
@copyright{
Independent JPEG Group library
Copyright (c) 1991-1998 Thomas G. Lane.
All rights reserved.
}
@copyright{
libpng
Copyright (c) 2000-2002 Glenn Randers-Pehrson
All rights reserved.
}
@copyright{
zlib
Copyright (c) 1995-2002 Jean-loup Gailly and Mark Adler
All rights reserved.
}
@copyright{
GNU MP Library
Copyright (c) 1992, 1993, 1994, 1996
@ -132,11 +91,6 @@ Racket software includes or extends the following copyrighted material:
Copyright (c) 2003-2005 Hewlett-Packard Development Company, L.P.
}
@copyright{
GNU Classpath
GNU Public License with special exception
}
@copyright{
Clanbomber icon and Stop icons
Everaldo Coelho

View File

@ -28,7 +28,8 @@ To compile with Microsoft Visual C, read the instructions in
To compile with Cygwin tools, follow the Unix instructions below, and be
sure to configure with `--enable-shared'. The result is a Unix-style
build, not a Windows-style build (e.g., Racket's `system-type' procedure
returns 'unix, not 'windows, and GRacket uses X11).
returns 'unix, not 'windows, and `racket/gui' uses Gtk instead of
Win32).
========================================================================
Compiling for Mac OS X
@ -50,7 +51,7 @@ the Unix instructions below, but note the following:
`--disable-shared' is not supported. (Unless you use
`--enable-xonx'...)
* To build an X11-based GRacket, run `configure' with the
* To build an X11- and Gtk-based GRacket, run `configure' with the
`--enable-xonx' flag. Frameworks are not used for such builds, so
--enable-shared is allowed. The `--enable-xonx' flag also affects
the Racket build, so that `system-type' reports 'unix. Pre-built

29
src/configure vendored
View File

@ -677,7 +677,6 @@ AR
STATIC_AR
ARFLAGS
STRIP_DEBUG
WBUILD
CC_FOR_BUILD
REZ
MZLINKER
@ -714,7 +713,6 @@ MRLIBINSTALL
LIBFINISH
MAKE_GRACKET
MAKE_PLOT
MAKE_WBUILD
MAKE_COPYTREE
MAKE_FINISH
WXPRECOMP
@ -1347,13 +1345,12 @@ Optional Features:
--enable-bigendian assume "big" if endianness cannot be determined
--enable-oskit compile OSKit-based Racket kernel
--enable-smalloskit compile small OSKit-based Racket kernel
--enable-wbuild compile and use wbuild for .w sources
--enable-perl use perl to regenerate certain sources
--enable-gprof compile for profiling with gprof (gcc only)
--enable-gcov compile to gather gcov statistics (gcc3 only)
--enable-noopt drop -O C flags
--enable-sdk=<path> use Mac OS X 10.4 SDK directory
--enable-xonx compile X11 (not Quartz) GRacket for Mac OS X
--enable-xonx compile Unix style (e.g., use Gtk) for Mac OS X
--enable-libfw install Mac OS X frameworks to /Library/Frameworks
--enable-userfw install Mac OS X frameworks to ~/Library/Frameworks
--enable-macprefix allow --prefix with a Mac OS X install
@ -1945,11 +1942,6 @@ if test "${enable_smalloskit+set}" = set; then
fi
# Check whether --enable-wbuild was given.
if test "${enable_wbuild+set}" = set; then
enableval=$enable_wbuild;
fi
# Check whether --enable-perl was given.
if test "${enable_perl+set}" = set; then
enableval=$enable_perl;
@ -2201,7 +2193,7 @@ show_explicitly_enabled "${enable_cgcdefault}" "CGC as default"
show_explicitly_disabled "${enable_docs}" "Documentation build"
show_explicitly_enabled "${enable_xonx}" "X-on-X"
show_explicitly_enabled "${enable_xonx}" "Unix style"
show_explicitly_enabled "${enable_shared}" "Shared libraries"
show_explicitly_disabled "${enable_gracket}" GRacket
@ -2233,7 +2225,6 @@ show_explicitly_enabled "${enable_pthread}" "pthreads"
show_explicitly_enabled "${enable_oskit}" "OSKit"
show_explicitly_enabled "${enable_smalloskit}" "OSKit small mode"
show_explicitly_enabled "${enable_wbuild}" "wbuild"
show_explicitly_enabled "${enable_perl}" "Perl"
show_explicitly_enabled "${enable_gprof}" "gprof"
@ -5282,15 +5273,9 @@ case $OS in
if test "${CC}" = "gcc" ; then
CC=gcc-4.0
fi
if test "${CXX}" = "g++" ; then
CXX=g++-4.0
fi
if test "${CPP}" = "gcc -E" ; then
CPP="gcc-4.0 -E"
fi
if test "${CXXCPP}" = "g++ -E" ; then
CXXCPP="g++-4.0 -E"
fi
if test "${LD}" = "gcc" ; then
LD=gcc-4.0
fi
@ -5362,8 +5347,6 @@ case $OS in
NOT_OSX=".other"
MZINSTALLTARGET=osx-install
DYN_CFLAGS=""
enable_xrender=no
enable_cairo=no
enable_pthread=no
if test "${enable_libfw}" = "yes" ; then
FRAMEWORK_INSTALL_DIR=/Library/Frameworks
@ -9195,8 +9178,6 @@ LIBS="$LIBS $EXTRALIBS"
@ -9962,7 +9943,6 @@ AR!$AR$ac_delim
STATIC_AR!$STATIC_AR$ac_delim
ARFLAGS!$ARFLAGS$ac_delim
STRIP_DEBUG!$STRIP_DEBUG$ac_delim
WBUILD!$WBUILD$ac_delim
CC_FOR_BUILD!$CC_FOR_BUILD$ac_delim
REZ!$REZ$ac_delim
MZLINKER!$MZLINKER$ac_delim
@ -9996,6 +9976,7 @@ WXLIBS!$WXLIBS$ac_delim
WXVARIANT!$WXVARIANT$ac_delim
ICP!$ICP$ac_delim
MRLIBINSTALL!$MRLIBINSTALL$ac_delim
LIBFINISH!$LIBFINISH$ac_delim
_ACEOF
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
@ -10037,10 +10018,8 @@ _ACEOF
ac_delim='%!_!# '
for ac_last_try in false false false false false :; do
cat >conf$$subs.sed <<_ACEOF
LIBFINISH!$LIBFINISH$ac_delim
MAKE_GRACKET!$MAKE_GRACKET$ac_delim
MAKE_PLOT!$MAKE_PLOT$ac_delim
MAKE_WBUILD!$MAKE_WBUILD$ac_delim
MAKE_COPYTREE!$MAKE_COPYTREE$ac_delim
MAKE_FINISH!$MAKE_FINISH$ac_delim
WXPRECOMP!$WXPRECOMP$ac_delim
@ -10074,7 +10053,7 @@ LIBOBJS!$LIBOBJS$ac_delim
LTLIBOBJS!$LTLIBOBJS$ac_delim
_ACEOF
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 35; then
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 33; then
break
elif $ac_last_try; then
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5

View File

@ -27,7 +27,6 @@ NOOP = :
###########################
CC = @CC@
LINKER = $(CC)
PERL = @PERL@
RANLIB = @RANLIB@
AR = @AR@
ARFLAGS = @ARFLAGS@

View File

@ -20,7 +20,6 @@ PLTBUILDDIR = $(builddir)/../..
###########################
CC = @CC@
LINKER = $(CC)
PERL = @PERL@
RANLIB = @RANLIB@
AR = @AR@
ARFLAGS = @ARFLAGS@

View File

@ -1,578 +0,0 @@
#ifdef WX_CARBON
# ifdef OS_X
# include <Carbon/Carbon.h>
# else
# include <Carbon.h>
# endif
#else
# include <Files.h>
# include <EPPC.h>
# include <AppleEvents.h>
# include <Events.h>
#endif
#ifndef FOR_STARTER
# include "scheme.h"
# include <ctype.h>
# include <string.h>
#else
# define scheme_malloc_atomic NewPtr
# define scheme_malloc NewPtr
# define memcpy(d, s, l) BlockMove(s, d, l)
# define malloc NewPtr
extern int strlen(char *);
extern int isspace(int);
static void strcpy(char *s, char *d)
{
while (*d) *(s++) = *(d++);
*s = 0;
}
#endif
#include "simpledrop.h"
#ifndef MZ_PRECISE_GC
# define GC_CAN_IGNORE /* empty */
#endif
int scheme_mac_ready, scheme_mac_argc = 0;
char **scheme_mac_argv;
#ifdef OS_X
void GetStarterInfo();
extern char *wxFSRefToPath(FSRef fsref);
#endif
static char *ThisAppName(void)
{
#ifndef FOR_STARTER
# ifdef OS_X
return "not used";
# else
char *result, *dir;
OSErr err;
ProcessInfoRec info;
ProcessSerialNumber curPSN;
Str255 buffer;
int dlen;
err = GetCurrentProcess(&curPSN);
info.processInfoLength = sizeof(ProcessInfoRec);
info.processName = buffer;
info.processAppSpec = NULL;
err = GetProcessInformation(&curPSN, &info);
dir = scheme_os_getcwd(NULL, 0, NULL, 1);
dlen = strlen(dir);
result = (char *)malloc(buffer[0] + dlen + 2);
memcpy(result, dir, dlen);
result[dlen] = ':';
memcpy(result + dlen + 1, buffer + 1, buffer[0]);
result[buffer[0] + dlen + 1] = 0;
return result;
# endif
#else
return "starter";
#endif
}
static void parse_commandline(char *s, char *src, int addon)
{
GC_CAN_IGNORE char *token, *pos, ender;
int count = 0, i;
char *command[32];
token = s;
while (*token && (count < 32)) {
while (isspace(*token)) {
token++;
}
if (!*token) break;
pos = token;
command[count] = pos;
while (*token && !isspace(*token)) {
if (*token == '"') {
ender = '"';
token++;
} else if (*token == '\'') {
ender = '\'';
token++;
} else
ender = 0;
if (ender) {
while (*token && (*token != ender)) {
*(pos++) = *(token++);
}
if (*token)
token++;
} else
*(pos++) = *(token++);
}
if (*token)
token++;
*pos = 0;
#ifndef FOR_STARTER
if (src && !strcmp(command[count], "%%")) {
/* Replace %% with file name */
command[count] = src;
} else if (src && (command[count][0] == '%') && (command[count][1]) == ':') {
/* Replace % with file directory */
char *ss, *r;
int i;
i = strlen(command[count]) + strlen(src);
r = (char *)malloc(i + 1);
ss = scheme_strdup(src);
i = strlen(ss) - 1;
while (i && ss[i] != ':') {
i--;
}
ss[i + 1] = 0;
strcpy(r, ss);
strcat(r, command[count] + 2);
command[count] = r;
}
#endif
count++;
}
scheme_mac_argc = 1 + count + (addon ? 1 : 0);
scheme_mac_argv = (char **)malloc(scheme_mac_argc * sizeof(char *));
scheme_mac_argv[0] = ThisAppName();
for (i = 0; i < count; i++) {
scheme_mac_argv[i + 1] = (char *)malloc(strlen(command[i]) + 1);
strcpy(scheme_mac_argv[i + 1], command[i]);
}
if (addon)
scheme_mac_argv[count + 1] = src;
}
extern void ParseLine(char *s, int *argc, char ***argv)
{
parse_commandline(s, NULL, 0);
*argc = scheme_mac_argc;
*argv = scheme_mac_argv;
}
static void Startup(char **argv, int argc)
{
int i;
scheme_mac_ready = 1;
if (!argc) {
scheme_mac_argc = 1;
scheme_mac_argv = (char **)malloc(sizeof(char *));
scheme_mac_argv[0] = ThisAppName();
return;
}
scheme_mac_argv = NULL;
#if !defined(FOR_STARTER) && !defined(OS_X)
if (argc == 1) {
/* See if this file has startup flags */
char buf[2048];
FILE *f = fopen(argv[0], "r");
buf[0] = 0;
if (f) {
fgets(buf, 2048, f);
fclose(f);
}
if (buf[0] == '#' && buf[1] == '!') {
GC_CAN_IGNORE char *s;
int l;
s = buf + 2;
while (*s && !isspace(*s))
s++;
while (*s && isspace(*s))
s++;
l = strlen(s);
while (l && isspace(s[l - 1])) {
--l;
s[l] = 0;
}
if (*s) {
/* Yes, it does. */
parse_commandline(s, argv[0], buf[2] == '!');
}
}
}
if (!scheme_mac_argv) {
scheme_mac_argc = (argc ? argc + 2 : 1);
scheme_mac_argv = (char **)malloc(scheme_mac_argc * sizeof(char *));
for (i = 0; i < argc; i++)
scheme_mac_argv[i + 2] = argv[i];
if (argc)
scheme_mac_argv[1] = "-F";
scheme_mac_argv[0] = ThisAppName();
}
#else
scheme_mac_argc = argc + 1;
scheme_mac_argv = (char **)malloc(scheme_mac_argc * sizeof(char *));
for (i = 0; i < argc; i++) {
scheme_mac_argv[i + 1] = argv[i];
}
scheme_mac_argv[0] = ThisAppName();
#endif
}
static int gone = 0;
#ifdef OS_X
extern char *scheme_mac_spec_to_path(FSSpec *spec);
#endif
static pascal short DoNothing(const AppleEvent *a, AppleEvent *b, long c)
{
return 0;
}
static pascal OSErr OpenApplicationStuff(const AppleEvent *a, AppleEvent *b, long c)
{
if (!gone) {
gone = 1;
Startup(NULL, 0);
}
return 0;
}
static pascal OSErr OpenFinderDoc(const AppleEvent *evt, AppleEvent *b, long c)
{
AEDescList docList;
long count, size;
short i, j;
DescType retType;
AEKeyword keywd;
FSSpec fss;
FSRef fsref;
char **files, *fl;
OSErr err;
AEGetParamDesc(evt, keyDirectObject, typeAEList, &docList);
AECountItems(&docList, &count);
if (gone)
files = (char **)scheme_malloc(sizeof(char *) * count);
else
files = (char **)malloc(sizeof(char *) * count);
j = 0;
for (i = 0; i < count; i++) {
#ifdef OS_X
err = AEGetNthPtr(&docList, i + 1, typeFSRef, &keywd, &retType, (Ptr)&fsref, sizeof(fsref), &size);
#else
err = errAECoercionFail;
#endif
if (err != noErr) {
if (err == errAECoercionFail) {
/* Try FSSpec: */
FSSpec spec;
err = AEGetNthPtr(&docList, i + 1, typeFSS, &keywd, &retType, (Ptr)&fss, sizeof(FSSpec), &size);
if (err == noErr) {
fl = scheme_mac_spec_to_path(&spec);
} else {
fl = NULL;
}
} else {
fl = NULL;
}
} else {
#ifdef OS_X
fl = wxFSRefToPath(fsref);
#else
fl = NULL;
#endif
}
if (fl) {
if (gone)
files[i + j] = fl;
else {
/* have to malloc everything */
char *fl2;
fl2 = (char *)malloc(strlen(fl)+1);
memcpy(fl2, fl, strlen(fl)+1);
files[i + j] = fl2;
}
if (!files[i + j])
--j;
} else
--j;
}
AEDisposeDesc(&docList);
if (!gone) {
gone = 1;
Startup(files, count + j);
} else {
wxDrop_Runtime(files, count + j);
}
return 0;
}
static pascal OSErr CmdLineMessage(const AppleEvent *evt, AppleEvent *b, long c)
{
AEDescList cmdList;
DescType retType;
AEKeyword keywd;
char *cmdLine;
long size;
AEGetParamDesc(evt, keyDirectObject, typeAEList, &cmdList);
size = 1023;
cmdLine = (char *)malloc(size + 1);
AEGetNthPtr(&cmdList, 1, typeChar, &keywd, &retType, (Ptr)cmdLine, size, &size);
cmdLine[size] = 0;
scheme_mac_ready = 1;
parse_commandline(cmdLine, NULL, 0);
return 0;
}
static pascal OSErr SetUpQuitMessage(const AppleEvent *a, AppleEvent *b, long c)
{
wxDrop_Quit();
return 0;
}
static void Install(void)
{
short err=0;
err = AEInstallEventHandler(kCoreEventClass, kAEOpenApplication, NewAEEventHandlerUPP(OpenApplicationStuff), 0, 0);
err = AEInstallEventHandler(kCoreEventClass, kAEOpenDocuments, NewAEEventHandlerUPP(OpenFinderDoc), 0, 0);
err = AEInstallEventHandler(kCoreEventClass, kAEPrintDocuments, NewAEEventHandlerUPP(DoNothing), 0, 0);
err = AEInstallEventHandler(kCoreEventClass, kAEQuitApplication, NewAEEventHandlerUPP(SetUpQuitMessage), 0, 0);
err = AEInstallEventHandler('PLT ', 'cmdl', NewAEEventHandlerUPP(CmdLineMessage), 0, 0);
}
void wxDrop_GetArgs(int *argc, char ***argv, int *in_terminal)
{
*in_terminal = 1;
MZ_REGISTER_STATIC(scheme_mac_argv);
Install();
while (!scheme_mac_ready) {
EventRecord event;
WaitNextEvent(highLevelEventMask, &event, 0x7FFFFFFF, 0L);
if (event.what == kHighLevelEvent) {
AEProcessAppleEvent(&event);
}
}
#ifdef OS_X
{
int from_finder;
from_finder = (((*argc) > 1) && (strncmp((*argv)[1],"-psn_",5) == 0));
if (from_finder) {
/* Finder started app, or someone wants us to think so; set
*in_terminal to 0 and combine AE-based command-line with given
command line */
int i, new_argc;
char **new_argv;
*in_terminal = 0;
new_argc = (scheme_mac_argc - 1) + ((*argc) - 2) + 1;
new_argv = (char **)malloc(new_argc * sizeof(char *));
new_argv[0] = (*argv)[0];
for (i = 2; i < (*argc); i++) {
new_argv[i - 1] = (*argv)[i];
}
for (; i < new_argc + 1; i++) {
new_argv[i - 1] = scheme_mac_argv[i - (*argc) + 1];
}
scheme_mac_argc = new_argc;
scheme_mac_argv = new_argv;
} else {
/* command-line start; no AE arguments */
scheme_mac_argc = *argc;
scheme_mac_argv = *argv;
}
GetStarterInfo();
/* Open the GRacket framework resources: */
{
CFBundleRef fwBundle;
fwBundle = CFBundleGetBundleWithIdentifier(CFSTR("org.racket-lang.GRacket"));
if (fwBundle) {
SInt16 refNum;
SInt16 lRefNum;
CFBundleOpenBundleResourceFiles(fwBundle, &refNum, &lRefNum);
}
}
}
#endif
*argc = scheme_mac_argc;
*argv = scheme_mac_argv;
}
/**********************************************************************/
#ifdef OS_X
#define BUFSIZE 1000
#define RSRCNAME "starter-info"
#define EXECNAME "GRacket"
static CFPropertyListRef getPropertyList()
{
CFDataRef xmlData;
CFStringRef error;
CFPropertyListRef propertyList;
CFBundleRef appBundle;
CFURLRef myRef;
// locate the starter's bundle:
appBundle = CFBundleGetMainBundle();
// get a URL for the named resource
myRef = CFBundleCopyResourceURL(appBundle, CFSTR(RSRCNAME),
NULL, NULL);
if (myRef == NULL) {
return NULL;
}
// Load the XML data using its URL.
CFURLCreateDataAndPropertiesFromResource(kCFAllocatorDefault, myRef,
&xmlData, NULL, NULL, NULL);
// convert to a Property List
propertyList = CFPropertyListCreateFromXMLData(kCFAllocatorDefault, xmlData,
kCFPropertyListImmutable,
&error);
if (error != NULL) {
return NULL;
}
return propertyList;
}
char *ConvertCFStringRef(CFStringRef str)
{
static char buf[BUFSIZE];
char *result;
Boolean success;
success = CFStringGetCString(str,buf,BUFSIZE,kCFStringEncodingUTF8);
if (!success) {
return "???";
}
result = (char *)malloc(strlen(buf) + 1);
strcpy(result,buf);
return result;
}
char *ExeRelativeToAbsolute(char *p)
{
CFBundleRef appBundle;
CFURLRef url;
CFStringRef str;
char *s, *a;
long len, len2;
appBundle = CFBundleGetMainBundle();
url = CFBundleCopyExecutableURL(appBundle);
str = CFURLCopyFileSystemPath(url, kCFURLPOSIXPathStyle);
s = ConvertCFStringRef(str);
len = strlen(s);
while (len && (s[len - 1] != '/')) {
--len;
}
len2 = strlen(p);
a = (char *)malloc(len + len2 + 1);
memcpy(a, s, len);
memcpy(a + len, p, len2 + 1);
return a;
}
void GetStarterInfo()
{
int i;
CFPropertyListRef propertyList;
propertyList = getPropertyList();
if (propertyList) {
CFStringRef execName;
CFArrayRef storedArgsArray;
CFIndex count;
char **storedArgs, *tmps, *orig_argv0 = NULL;
int name_offset;
if (CFDictionaryContainsKey((CFDictionaryRef)propertyList,
(const void *)(CFSTR("executable name")))) {
execName = (CFStringRef)CFDictionaryGetValue((CFDictionaryRef)propertyList,
(CFSTR("executable name")));
tmps = ConvertCFStringRef(execName);
if (tmps[0] != '/') {
/* Path is relative to this executable */
tmps = ExeRelativeToAbsolute(tmps);
}
orig_argv0 = scheme_mac_argv[0];
scheme_mac_argv[0] = tmps;
}
if (CFDictionaryContainsKey((CFDictionaryRef)propertyList,
(const void *)CFSTR("stored arguments"))) {
storedArgsArray = (CFArrayRef)CFDictionaryGetValue((CFDictionaryRef)propertyList,
(CFSTR("stored arguments")));
} else {
return;
}
count = CFArrayGetCount(storedArgsArray);
name_offset = (orig_argv0 ? 2 : 0);
storedArgs = (char **)malloc(sizeof(char *) * (scheme_mac_argc + count + name_offset));
storedArgs[0] = scheme_mac_argv[0];
if (orig_argv0) {
/* Preserve the "run" name for a launcher: */
storedArgs[1] = "-N";
storedArgs[2] = orig_argv0;
}
for (i = 0; i < count; i++) {
CFStringRef arg;
char *tmps;
arg = (CFStringRef)CFArrayGetValueAtIndex(storedArgsArray,i);
tmps = ConvertCFStringRef(arg);
storedArgs[i + 1 + name_offset] = tmps;
}
for (i = 1; i < scheme_mac_argc; i++) {
storedArgs[count + i + name_offset] = scheme_mac_argv[i];
}
scheme_mac_argv = storedArgs;
scheme_mac_argc += count + name_offset;
}
}
#endif

View File

@ -1,13 +0,0 @@
/* Call to start: */
extern void wxDrop_GetArgs(int *, char ***, int *in_terminal);
/* You supply: */
void wxDrop_Runtime(char **, int);
void wxDrop_Quit(void);
/* Utility: */
extern void ParseLine(char *, int *, char ***);
extern int scheme_mac_ready;
extern int scheme_mac_argc;
extern char **scheme_mac_argv;

View File

@ -43,15 +43,21 @@ XCOLLECTS = -X ../racket/gc2/xform-collects
CC = @CC@
# This seems like a good idea, but it doesn't work with
# libtool as the compiler. So, we trust the configuration
# taht is built into dynext, instead.
# WITH-ENV = env CC="$(CC)" LD="@MZLINKER@"
WITH_ENV =
# In 3m mode, we can reply on an xform-collects setup
3m:
env CC="$(CC)" LD="@MZLINKER@" ../racket/racket3m $(XCOLLECTS) $(srcdir)/build.rkt "libplplot" $(PLPLOT_SRCS)
env CC="$(CC)" LD="@MZLINKER@" ../racket/racket3m $(XCOLLECTS) $(srcdir)/build.rkt "libfit" $(FIT_SRCS)
$(WITH_ENV) ../racket/racket3m $(XCOLLECTS) $(srcdir)/build.rkt "libplplot" $(PLPLOT_SRCS)
$(WITH_ENV) ../racket/racket3m $(XCOLLECTS) $(srcdir)/build.rkt "libfit" $(FIT_SRCS)
# In just-cgc mode, it's slow to load build.rkt:
cgc:
env CC="$(CC)" LD="@MZLINKER@" ../racket/racketcgc -c $(srcdir)/build.rkt "libplplot" $(PLPLOT_SRCS)
env CC="$(CC)" LD="@MZLINKER@" ../racket/racketcgc -c $(srcdir)/build.rkt "libfit" $(FIT_SRCS)
$(WITH_ENV) ../racket/racketcgc -c $(srcdir)/build.rkt "libplplot" $(PLPLOT_SRCS)
$(WITH_ENV) ../racket/racketcgc -c $(srcdir)/build.rkt "libfit" $(FIT_SRCS)
install:
cd ..; $(ICP) plot/libplplot@SO_SUFFIX@ "$(DESTDIR)$(libpltdir)/libplplot@SO_SUFFIX@"

View File

@ -56,7 +56,6 @@ AC_ARG_ENABLE(bigendian, [ --enable-bigendian assume "big" if endianness c
AC_ARG_ENABLE(oskit, [ --enable-oskit compile OSKit-based Racket kernel])
AC_ARG_ENABLE(smalloskit, [ --enable-smalloskit compile small OSKit-based Racket kernel])
AC_ARG_ENABLE(wbuild, [ --enable-wbuild compile and use wbuild for .w sources])
AC_ARG_ENABLE(perl, [ --enable-perl use perl to regenerate certain sources])
AC_ARG_ENABLE(gprof, [ --enable-gprof compile for profiling with gprof (gcc only)])
@ -66,7 +65,7 @@ AC_ARG_ENABLE(noopt, [ --enable-noopt drop -O C flags])
AC_ARG_ENABLE(enable_sdk, [ --enable-sdk=<path> use Mac OS X 10.4 SDK directory])
AC_ARG_ENABLE(xonx, [ --enable-xonx compile X11 (not Quartz) GRacket for Mac OS X])
AC_ARG_ENABLE(xonx, [ --enable-xonx compile Unix style (e.g., use Gtk) for Mac OS X])
AC_ARG_ENABLE(libfw, [ --enable-libfw install Mac OS X frameworks to /Library/Frameworks])
AC_ARG_ENABLE(libfw, [ --enable-userfw install Mac OS X frameworks to ~/Library/Frameworks])
AC_ARG_ENABLE(macprefix, [ --enable-macprefix allow --prefix with a Mac OS X install])
@ -264,7 +263,7 @@ show_explicitly_enabled "${enable_cgcdefault}" "CGC as default"
show_explicitly_disabled "${enable_docs}" "Documentation build"
show_explicitly_enabled "${enable_xonx}" "X-on-X"
show_explicitly_enabled "${enable_xonx}" "Unix style"
show_explicitly_enabled "${enable_shared}" "Shared libraries"
show_explicitly_disabled "${enable_gracket}" GRacket
@ -296,7 +295,6 @@ show_explicitly_enabled "${enable_pthread}" "pthreads"
show_explicitly_enabled "${enable_oskit}" "OSKit"
show_explicitly_enabled "${enable_smalloskit}" "OSKit small mode"
show_explicitly_enabled "${enable_wbuild}" "wbuild"
show_explicitly_enabled "${enable_perl}" "Perl"
show_explicitly_enabled "${enable_gprof}" "gprof"
@ -605,15 +603,9 @@ case $OS in
if test "${CC}" = "gcc" ; then
CC=gcc-4.0
fi
if test "${CXX}" = "g++" ; then
CXX=g++-4.0
fi
if test "${CPP}" = "gcc -E" ; then
CPP="gcc-4.0 -E"
fi
if test "${CXXCPP}" = "g++ -E" ; then
CXXCPP="g++-4.0 -E"
fi
if test "${LD}" = "gcc" ; then
LD=gcc-4.0
fi
@ -685,8 +677,6 @@ case $OS in
NOT_OSX=".other"
MZINSTALLTARGET=osx-install
DYN_CFLAGS=""
enable_xrender=no
enable_cairo=no
enable_pthread=no
if test "${enable_libfw}" = "yes" ; then
FRAMEWORK_INSTALL_DIR=/Library/Frameworks
@ -1132,7 +1122,6 @@ AC_SUBST(AR)
AC_SUBST(STATIC_AR)
AC_SUBST(ARFLAGS)
AC_SUBST(STRIP_DEBUG)
AC_SUBST(WBUILD)
AC_SUBST(CC_FOR_BUILD)
AC_SUBST(REZ)
AC_SUBST(MZLINKER)
@ -1177,7 +1166,6 @@ AC_SUBST(LIBFINISH)
AC_SUBST(MAKE_GRACKET)
AC_SUBST(MAKE_PLOT)
AC_SUBST(MAKE_WBUILD)
AC_SUBST(MAKE_COPYTREE)
AC_SUBST(MAKE_FINISH)

View File

@ -54,7 +54,6 @@ racket\src\README if you don't know about the two variants.)
The 3m build requires some parts of the CGC build:
racket\src\worksp\racket
racket\src\worksp\wxutils
racket\src\worksp\jpeg
racket\src\worksp\png
racket\src\worksp\zlib
@ -79,25 +78,13 @@ To build GRacketCGC, build the GRacket solution:
[Again, switch to the "Release" configuration if necessary.]
The build processes for RacketCGC automatically builds
The build processes for RacketCGC and GRacketCGC automatically
builds
libmzgc - makes racket\lib\libmzgcxxxxxxx.dll and
racket\src\worksp\libmzgc\Release\libmzgcxxxxxxx.lib
libracket - makes racket\lib\libracketxxxxxxx.dll and
racket\src\worksp\mzsrc\Release\mzsrcxxxxxxx.lib
The build process for GRacketCGC automatically builds
libmzgc - as above
libracket - as above
libgracket - makes racket\lib\libgracketxxxxxxx.dll and
racket\src\worksp\libgracket\Release\libgracketxxxxxxx.lib
wxutils - makes racket\src\worksp\wxutils\Release\wxutils.lib
wxwin - makes racket\src\worksp\wxwin\Release\wxwin.lib
wxs - makes racket\src\worksp\wxs\Release\wxs.lib
wxme - makes racket\src\worksp\wxme\Release\wxme.lib
jpeg - makes racket\src\worksp\jpeg\Release\jpeg.lib
png - makes racket\src\worksp\jpeg\Release\png.lib
zlib - makes racket\src\worksp\jpeg\Release\zlib.lib
In addition, building RacketCGC executes
racket\src\racket\dynsrc\mkmzdyn.bat
which copies .exp, .obj, and .lib files into racket\lib\, and also
@ -106,12 +93,15 @@ copies DLLs from the "extradlls" directory to to racket\lib\.
Finally, you must install pre-build DLLs that GRacket needs to run.
The DLLs are available from
http://github.com/mflatt/gracket-libs/tree/master/win32/i386/?raw=true
http://download.racket-lang.org/libs/
and they must be installed into
racket\lib
The "get-libs.rkt" script in "racket\src\gracket" can download the
libraries, and the script is used by "build.bat".
Building Racket3m and GRacket3m
-------------------------------
@ -127,10 +117,9 @@ After RacketCGC and GRacketCGC are built, you can can build 3m binaries:
..\..\..\racketcgc.exe -c make.rkt
The resulting Racket.exe and GRacket.exe will appear in the top-level
"racket" directory, along with DLLs libracket3mxxxxxxx.dll and
libgracket3mxxxxxxx.dll in racket\lib. (There is no corresponding
libmzgc3mxxxxxxx.dll. Instead, it is merged with
libracket3mxxxxxxx.dll.)
"racket" directory, along with DLLs libracket3mxxxxxxx.dll in
racket\lib. (There is no corresponding libmzgc3mxxxxxxx.dll.
Instead, it is merged with libracket3mxxxxxxx.dll.)
Building Collections and Other Executables
------------------------------------------
@ -239,9 +228,8 @@ The result is mxmain.dll (no 3m suffix) in
Finding DLLs
------------
Since the DLLs libracket3mxxxxxxx.dll (or libmzgcxxxxxxx.dll and
libracketxxxxxxx.dll) and libgracket3mxxxxxxx.dll (or
libgracketxxxxxxx.dll) are installed into racket\lib\ instead of just
Since the DLL libracket3mxxxxxxx.dll (or libmzgcxxxxxxx.dll and
libracketxxxxxxx.dll) is installed into racket\lib\ instead of just
racket\, the normal search path for DLLs would not find them when
running "Racket.exe" or "GRacket.exe". To find the DLLs, the
executables are "delayload" linked with the DLLs, and the executables

View File

@ -1,216 +0,0 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8.00"
Name="libgracket"
ProjectGUID="{81BD2D42-F150-493D-94BA-88585B202789}"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="Debug"
IntermediateDirectory="Debug"
ConfigurationType="2"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..,..\..\racket\gc,..\..\racket\include,..\..\wxwindow\include\base,..\..\wxwindow\include\msw,$(NOINHERIT)"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;GC_DLL;LIBMRED_EXPORTS;_CRT_SECURE_NO_DEPRECATE"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
UsePrecompiledHeader="0"
WarningLevel="3"
SuppressStartupBanner="true"
DebugInformationFormat="3"
CompileAs="0"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="1033"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalOptions="/MACHINE:I386"
AdditionalDependencies="ComCtl32.lib Glu32.lib OpenGL32.lib Unicows.lib WinMM.lib WS2_32.lib User32.lib Gdi32.lib Shell32.lib Comdlg32.lib Advapi32.lib Ole32.lib"
OutputFile="..\..\..\lib\libgracketxxxxxxx.dll"
SuppressStartupBanner="true"
GenerateDebugInformation="true"
BaseAddress="0x11000000"
ImportLibrary="..\..\..\lib\msvc\libgracketxxxxxxx.lib"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="Release"
IntermediateDirectory="Release"
ConfigurationType="2"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="2"
EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="1"
AdditionalIncludeDirectories="..,..\..\racket\gc,..\..\racket\include,..\..\wxwindow\include\base,..\..\wxwindow\include\msw,$(NOINHERIT)"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;GC_DLL;LIBMRED_EXPORTS;_CRT_SECURE_NO_DEPRECATE"
StringPooling="true"
RuntimeLibrary="0"
EnableFunctionLevelLinking="true"
UsePrecompiledHeader="0"
WarningLevel="3"
SuppressStartupBanner="true"
DebugInformationFormat="3"
CompileAs="0"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="1033"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalOptions="/MACHINE:I386"
AdditionalDependencies="ComCtl32.lib Glu32.lib OpenGL32.lib Unicows.lib WinMM.lib WS2_32.lib User32.lib Gdi32.lib Shell32.lib Comdlg32.lib Advapi32.lib Ole32.lib"
OutputFile="..\..\..\lib\libgracketxxxxxxx.dll"
SuppressStartupBanner="true"
GenerateDebugInformation="true"
BaseAddress="0x11000000"
ImportLibrary="..\..\..\lib\msvc\libgracketxxxxxxx.lib"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
>
<File
RelativePath="..\..\gracket\GRACKET.cxx"
>
</File>
<File
RelativePath="..\..\gracket\GRACKETMSW.cxx"
>
</File>
<File
RelativePath="..\racket\uniplt.c"
>
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl"
>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>