X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=hints%2Fnext_4.sh;h=d5c8ba7d64e11bc8334e1aadc6704fc1e7887d28;hb=69ca0fd0bef57ce8f6e0725124a9bd19455d9e2f;hp=0e6b7e0271b3fa370783d33ac54c06b957bc0066;hpb=25b26da3878975e71919c5a0820d769fbae962e5;p=p5sagit%2Fp5-mst-13.2.git diff --git a/hints/next_4.sh b/hints/next_4.sh index 0e6b7e0..d5c8ba7 100644 --- a/hints/next_4.sh +++ b/hints/next_4.sh @@ -1,45 +1,93 @@ -# Posix support has been removed from NextStep, expect test/POSIX to fail -# -# IMPORTANT: before you run 'make', you need to enter one of these two -# lines (depending on your shell): -# DYLD_LIBRARY_PATH=`pwd`; export DYLD_LIBRARY_PATH -# or -# setenv DYLD_LIBRARY_PATH `pwd` +# Posix support has been removed from NextStep # useposix='undef' -altmake='gnumake' -libpth='/lib /usr/lib' +libpth='/lib /usr/lib /usr/local/lib' libswanted=' ' libc='/NextLibrary/Frameworks/System.framework/System' -isnext_4='define' -mab='-arch m68k -arch i386 -arch sparc' -ldflags='-dynamic -prebind' -lddlflags='-dynamic -bundle -undefined suppress' -ccflags='-dynamic -fno-common -DUSE_NEXT_CTYPE' +ldflags="$ldflags -dynamic -prebind" +lddlflags="$lddlflags -dynamic -bundle -undefined suppress" +ccflags="$ccflags -dynamic -fno-common -DUSE_NEXT_CTYPE -DUSE_PERL_SBRK" cccdlflags='none' ld='cc' -optimize='-g -O' +#optimize='-g -O' + +###################################################################### +# MAB support +###################################################################### +# By default we will build for all architectures your development +# environment supports. If you only want to build for the platform +# you are on, simply comment or remove the line below. +# +# If you want to build for specific architectures, change the line +# below to something like +# +# archs='m68k i386' +# + +# On m68k machines, toke.c cannot be compiled at all for i386 and it can +# only be compiled for m68k itself without optimization (this is under +# OPENSTEP 4.2). +# +if [ `hostinfo | grep 'NeXT Mach.*:' | sed 's/.*RELEASE_//'` = M68K ] +then + echo "Cross compilation is impossible on m68k hardware under OS 4" + echo "Forcing architecture to m68k only" + toke_cflags='optimize=""' + archs='m68k' +else + archs=`/bin/lipo -info /usr/lib/libm.a | sed -n 's/^[^:]*:[^:]*: //p'` +fi + +# +# leave the following part alone +# +archcount=`echo $archs |wc -w` +if [ $archcount -gt 1 ] +then + for d in $archs + do + mabflags="$mabflags -arch $d" + done + ccflags="$ccflags $mabflags" + ldflags="$ldflags $mabflags" + lddlflags="$lddlflags $mabflags" +fi +###################################################################### +# END MAB support +###################################################################### -d_shrplib='define' +useshprlib='true' dlext='bundle' so='dylib' -prefix='/usr/local/OPENSTEP' -#archlib='/usr/lib/perl5' -#archlibexp='/usr/lib/perl5' +# +# The default prefix would be '/usr/local'. But since many people are +# likely to have still 3.3 machines on their network, we do not want +# to overwrite possibly existing 3.3 binaries. +# You can use Configure -Dprefix=/foo/bar to override this, or simply +# remove the lines below. +# +case "$prefix" in +'') prefix='/usr/local/OPENSTEP' ;; +esac + archname='OPENSTEP-Mach' +# +# At least on m68k there are situations when memcmp doesn't behave +# as expected. So we'll use perl's memcmp. +# +d_sanemcmp='undef' + d_strcoll='undef' i_dbm='define' i_utime='undef' groupstype='int' direntrytype='struct direct' -# the simple program `for ($i=1;$i<38771;$i++){$t{$i}=123}' fails -# with Larry's malloc on NS 3.2 due to broken sbrk() -usemymalloc='n' +usemymalloc='y' clocktype='int' # @@ -48,8 +96,7 @@ clocktype='int' # running ranlib. The '5' is an empirical number that's "long enough." # (Thanks to Andreas Koenig ) ranlib='sleep 5; /bin/ranlib' -# -# There where reports that the compiler on HPPA machines -# fails with the -O flag on pp.c. -# But since there is no HPPA for OPENSTEP... -# pp_cflags='optimize="-g"' + +case "$ldlibpthname" in +'') ldlibpthname=DYLD_LIBRARY_PATH ;; +esac