Files
epics-base/startup/EpicsHostArch.pl
Janet B. Anderson 00e922dc48 Initial version.
2000-08-30 21:10:12 +00:00

27 lines
854 B
Perl
Executable File

eval 'exec perl -S $0 ${1+"$@"}' # -*- Mode: perl -*-
if $running_under_some_shell; # EpicsHostArch.pl
# $Id$
# Returns the Epics host architecture suitable
# for assigning to the EPICS_HOST_ARCH variable
use Config;
$EpicsHostArch = GetEpicsHostArch();
print "$EpicsHostArch";
sub GetEpicsHostArch { # no args
$arch=$Config{'archname'};
if ($arch =~ /sun4-solaris/) { return "solaris-sparc";
} elsif ($arch =~ m/i86pc-solaris/) { return "solaris-x86";
} elsif ($arch =~ m/sun4-sunos/) { return "sun4-68k";
} elsif ($arch =~ m/i386-linux/) { return "linux-x86";
} elsif ($arch =~ m/i586-linux/) { return "linux-x86";
} elsif ($arch =~ m/MSWin32-x86/) { return "win32-x86";
} elsif ($arch =~ m/PA-RISC1.1/) { return "hpux-parisc";
} else { return "unsupported"; }
}
#EOF EpicsHostArch.pl