# $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $
#
-# Generated on Sat Feb 26 04:42:42 EET 2000 [metaconfig 3.0 PL70]
+# Generated on Sat Feb 26 05:10:12 EET 2000 [metaconfig 3.0 PL70]
# (with additional metaconfig patches by perlbug@perl.com)
cat >/tmp/c1$$ <<EOF
esac
case "$osname" in
-next|rhapsody) multiarch="$define" ;;
+next|rhapsody|darwin) multiarch="$define" ;;
esac
case "$multiarch" in
''|[nN]*) multiarch="$undef" ;;
To build a shared libperl, the environment variable controlling shared
library search (LD_LIBRARY_PATH in most systems, DYLD_LIBRARY_PATH for
-NeXTSTEP/OPENSTEP/Rhapsody, LIBRARY_PATH for BeOS, SHLIB_PATH for
+NeXTSTEP/OPENSTEP/Darwin, LIBRARY_PATH for BeOS, SHLIB_PATH for
HP-UX, LIBPATH for AIX, PATH for Cygwin) must be set up to include
the Perl build directory because that's where the shared libperl will
be created. Configure arranges makefile to have the correct shared
ext/DynaLoader/dl_beos.xs BeOS implementation
ext/DynaLoader/dl_dld.xs GNU dld style implementation
ext/DynaLoader/dl_dlopen.xs BSD/SunOS4&5 dlopen() style implementation
+ext/DynaLoader/dl_dyld.xs NeXT/Apple dyld implementation
ext/DynaLoader/dl_hpux.xs HP-UX implementation
ext/DynaLoader/dl_mpeix.xs MPE/iX implementation
-ext/DynaLoader/dl_next.xs Next implementation
+ext/DynaLoader/dl_next.xs NeXT implementation
ext/DynaLoader/dl_none.xs Stub implementation
-ext/DynaLoader/dl_rhapsody.xs Rhapsody implementation
ext/DynaLoader/dl_vmesa.xs VM/ESA implementation
ext/DynaLoader/dl_vms.xs VMS implementation
ext/DynaLoader/dlutils.c Dynamic loader utilities for dl_*.xs files
hints/convexos.sh Hints for named architecture
hints/cxux.sh Hints for named architecture
hints/cygwin.sh Hints for named architecture
+hints/darwin.sh Hints for named architecture
hints/dcosx.sh Hints for named architecture
hints/dec_osf.sh Hints for named architecture
hints/dgux.sh Hints for named architecture
-compatibility_version 1 -current_version $patchlevel \
-prebind -seg1addr 0x27000000 -install_name \$(shrpdir)/\$@"
;;
+ rhapsody*|darwin*)
+ shrpldflags="${ldflags} -dynamiclib \
+ -compatibility_version 1 \
+ -current_version \
+ ${api_version}.${api_subversion} \
+ -image_base 0x4be00000 \
+ -install_name \$(shrpdir)/\$@"
+ ;;
cygwin*)
linklibperl="-lperl"
;;
os2)
ldlibpth=''
;;
- rhapsody)
- eval "ldlibpth=\"$ldlibpthname=`pwd`/Perl:\$$ldlibpthname\""
- ;;
*)
eval "ldlibpth=\"$ldlibpthname=`pwd`:\$$ldlibpthname\""
;;
-@test -f README.vms && $(LNS) ../README.vms pod/README_vms.pod && echo "pod/README_vms.pod" >> extra.pods
-@test -f vms/perlvms.pod && $(LNS) ../vms/perlvms.pod pod/perlvms.pod && echo "pod/perlvms.pod" >> extra.pods
+install-strip:
+ $(MAKE) STRIPFLAGS=-s install
+
install: all install.perl install.man
install.perl: all installperl
cd ../pod; $(MAKE) compile; \
else :; \
fi
- $(LDLIBPTH) ./perl installperl
+ $(LDLIBPTH) ./perl installperl $(STRIPFLAGS)
install.man: all installman
$(LDLIBPTH) ./perl installman
* OpenBSD
- * NeXTstep, OpenStep (Rhapsody?)
+ * NeXTstep, OpenStep
* OS/2
-/* dl_rhapsody.xs
+/* dl_dyld.xs
*
- * Platform: Apple Rhapsody 5.0
+ * Platform: Darwin (Mac OS)
+ * Author: Wilfredo Sanchez <wsanchez@apple.com>
* Based on: dl_next.xs by Paul Marquess
* Based on: dl_dlopen.xs by Anno Siegel
* Created: Aug 15th, 1994
/* Porting notes:
-dl_next.xs is itself a port from dl_dlopen.xs by Paul Marquess. It
+dl_dyld.xs is based on dl_next.xs by Anno Siegel.
+
+dl_next.xs is in turn a port from dl_dlopen.xs by Paul Marquess. It
should not be used as a base for further ports though it may be used
as an example for how dl_dlopen.xs can be ported to other platforms.
The method used here is just to supply the sun style dlopen etc.
-functions in terms of NeXTs rld_*. The xs code proper is unchanged
-from Paul's original.
+functions in terms of NeXT's/Apple's dyld. The xs code proper is
+unchanged from Paul's original.
The port could use some streamlining. For one, error handling could
be simplified.
-Anno Siegel
+This should be useable as a replacement for dl_next.xs, but it has not
+been tested on NeXT platforms.
+
+ Wilfredo Sanchez
*/
#include "dlutils.c" /* SaveError() etc */
#undef environ
+#undef bool
#import <mach-o/dyld.h>
static char * dl_last_error = (char *) 0;
OUTPUT:
RETVAL
-+# end.
+# end.
--- /dev/null
+##
+# Darwin (Mac OS) hints
+# Wilfredo Sanchez <wsanchez@apple.com>
+##
+
+##
+# Paths
+##
+
+# BSD paths
+prefix='/usr';
+siteprefix='/usr/local';
+vendorprefix='/usr/local'; usevendorprefix='define';
+
+# 4BSD uses /usr/share/man, not /usr/man.
+# Don't put man pages in /usr/lib; that's goofy.
+man1dir='/usr/share/man/man1';
+man3dir='/usr/share/man/man3';
+
+# Where to put modules.
+privlib='/System/Library/Perl';
+sitelib='/Local/Library/Perl';
+vendorlib='/Network/Library/Perl';
+
+##
+# Tool chain settings
+##
+
+# Since we can build fat, the archname doesn't need the processor type
+archname='darwin';
+
+# nm works.
+usenm='true';
+
+# Libc is in libsystem.
+libc='/System/Library/Frameworks/System.framework/System';
+
+# Optimize.
+optimize='-O3';
+
+# We have a prototype for telldir.
+ccflags="${ccflags} -pipe -fno-common -DHAS_TELLDIR_PROTOTYPE";
+
+# Shared library extension is .dylib.
+# Bundle extension is .bundle.
+ld='cc';
+so='dylib';
+dlext='bundle';
+dlsrc='dl_dyld.xs'; usedl='define';
+cccdlflags='';
+lddlflags="${ldflags} -bundle -undefined suppress";
+ldlibpthname='DYLD_LIBRARY_PATH';
+useshrplib='true';
+
+##
+# System libraries
+##
+
+# vfork works
+usevfork='true';
+
+# malloc works
+usemymalloc='n';
# Wilfredo Sanchez <wsanchez@apple.com>
##
-# Since we can build fat, the archname doesn't need the processor type
-archname='rhapsody';
+##
+# Paths
+##
-# Perl5.003 precedes this platform
-d_bincompat3='undef';
+# BSD paths
+prefix='/usr';
+siteprefix='/usr/local';
+vendorprefix='/usr/local'; usevendorprefix='define';
-# Libc is in libsystem.
-libc='/System/Library/Frameworks/System.framework/System';
+# 4BSD uses /usr/share/man, not /usr/man.
+# Don't put man pages in /usr/lib; that's goofy.
+man1dir='/usr/share/man/man1';
+man3dir='/usr/share/man/man3';
+
+# Where to put modules.
+privlib='/System/Library/Perl';
+sitelib='/Local/Library/Perl';
+vendorlib='/Network/Library/Perl';
+
+##
+# Tool chain settings
+##
+
+# Since we can build fat, the archname doesn't need the processor type
+archname='rhapsody';
# nm works.
usenm='true';
+
+# Libc is in libsystem.
+libc='/System/Library/Frameworks/System.framework/System';
# Optimize.
optimize='-O3';
# We have a prototype for telldir.
-# We are not NeXTStep.
-ccflags="${ccflags} -pipe -fno-common -DHAS_TELLDIR_PROTOTYPE -UNeXT -U__NeXT__";
+ccflags="${ccflags} -pipe -fno-common -DHAS_TELLDIR_PROTOTYPE";
-# Don't use /usr/local/lib; we may have junk there.
-libpth='/lib /usr/lib';
-
-# Shared library extension in .dylib.
-# Bundle extension in .bundle.
+# Shared library extension is .dylib.
+# Bundle extension is .bundle.
ld='cc';
so='dylib';
dlext='bundle';
-dlsrc='dl_rhapsody.xs';
+dlsrc='dl_dyld.xs';
+usedl='define';
cccdlflags='';
lddlflags="${ldflags} -bundle -undefined suppress";
+ldlibpthname='DYLD_LIBRARY_PATH';
useshrplib='true';
-libperl='Perl';
-framework_path='/System/Library/Frameworks/Perl.framework';
base_address='0x4be00000';
-# 4BSD uses /usr/share/man, not /usr/man.
-# Don't put man pages in /usr/lib; that's goofy.
-man1dir='/usr/share/man/man1';
-man3dir='/usr/share/man/man3';
-
-# Where to put modules.
-privlib='/System/Library/Perl';
-sitelib='/Local/Library/Perl';
-
+##
+# System libraries
+##
+
# vfork works
usevfork='true';
# malloc works
usemymalloc='n';
-case "$ldlibpthname" in
-'') ldlibpthname=DYLD_LIBRARY_PATH ;;
-esac
}
use strict;
-use vars qw($Is_VMS $Is_W32 $Is_OS2 $Is_Cygwin $nonono $versiononly $depth);
+use vars qw($Is_VMS $Is_W32 $Is_OS2 $Is_Cygwin $nonono $dostrip $versiononly $depth);
BEGIN {
$Is_VMS = $^O eq 'VMS';
while (@ARGV) {
$nonono = 1 if $ARGV[0] eq '-n';
+ $dostrip = 1 if $ARGV[0] eq '-s';
$versiononly = 1 if $ARGV[0] eq '-v';
shift;
}
elsif ($^O ne 'dos') {
safe_unlink("$installbin/$perl_verbase$ver$exe_ext");
copy("perl$exe_ext", "$installbin/$perl_verbase$ver$exe_ext");
- strip("$installbin/$perl_verbase$ver$exe_ext") if $^O =~ /^(rhapsody)$/;
+ strip("$installbin/$perl_verbase$ver$exe_ext");
chmod(0755, "$installbin/$perl_verbase$ver$exe_ext");
}
else {
# HP-UX (at least) needs to maintain execute permissions
# on dynamically-loadable libraries. So we do it for all.
if (copy_if_diff($file,"$installarchlib/CORE/$file")) {
- if ($file =~ /\.(so|\Q$dlext\E)$/) {
+ if ($file =~ /\.(\Q$so\E|\Q$dlext\E)$/) {
chmod(0555, "$installarchlib/CORE/$file");
- strip("-S", "$installarchlib/CORE/$file") if $^O =~ /^(rhapsody)$/;
+ strip("-S", "$installarchlib/CORE/$file") if $^O =~ /^(rhapsody|darwin)$/;
} else {
chmod(0444, "$installarchlib/CORE/$file");
}
{
my(@args) = @_;
+ return unless $dostrip;
+
my @opts;
while (@args && $args[0] =~ /^(-\w+)$/) {
push @opts, shift @args;
/* If SELECT_MIN_BITS is greater than one we most probably will want
* to align the sizes with SELECT_MIN_BITS/8 because for example
* in many little-endian (Intel, Alpha) systems (Linux, OS/2, Digital
- * UNIX, Solaris, NeXT, Rhapsody) the smallest quantum select() operates
+ * UNIX, Solaris, NeXT, Darwin) the smallest quantum select() operates
* on (sets/tests/clears bits) is 32 bits. */
growsize = maxlen + (SELECT_MIN_BITS/8 - (maxlen % (SELECT_MIN_BITS/8)));
# else